@addresszen/openapi 4.2.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
- "version": "4.2.0",
4
+ "version": "4.3.1",
5
5
  "license": {
6
6
  "name": "Copyright (C) IDDQD Limited - All Rights Reserved",
7
7
  "url": "https://terms.addresszen.com"
8
8
  },
9
9
  "title": "API Reference",
10
10
  "termsOfService": "https://terms.addresszen.com",
11
- "description": "## Getting Started\n\nAll API methods are either a `GET`, `POST` or `OPTIONS` request.\n\nThe API communicates over both HTTPS and plain HTTP using IPv4 and IPv6.\n\nWe use appropriate HTTP status codes where possible to indicate the request status. Every error body also carries a numeric `code`. The [error codes guide](https://docs.addresszen.com/docs/guides/error-codes) lists each code and how to fix it.\n\n## OpenAPI Spec\n\nOur OpenAPI specification is available at:\n\n- [npm package](https://www.npmjs.com/package/@addresszen/openapi)\n- [API Reference](https://openapi.addresszen.com)\n- [OpenAPI v3 JSON File](https://openapi.addresszen.com/openapi.json)\n- [OpenAPI v3 YAML File](https://openapi.addresszen.com/openapi.yaml)\n\n## Rate Limiting\n\nEach IP address is rate limited at 30 requests per second. Exceeding the limit returns a 503 response.\n\nThe autocomplete API has an additional rate limit.\n\nIf you expect to exceed the limit, contact us and we can move you to an endpoint with a higher limit.\n\n## Authentication\n\nMost requests need an **API key**. Send it as a Bearer token in the `Authorization` header:\n\n```\ncurl 'https://api.addresszen.com/v1/autocomplete/addresses?q=parkside' \\\n -H 'Authorization: Bearer ak_test'\n```\n\nA header keeps the key out of URLs and server logs.\n\nTwo credentials exist, and they do different jobs:\n\n| Credential | Looks like | Authenticates | Exposure |\n| --- | --- | --- | --- |\n| API Key | `ak_test` | Address, postcode and place lookups. Every billable request | Usable in a browser. Restrict it with allowed URLs |\n| Management Key | `uk_...` | Managing a key under `/keys/{key}`: usage, licensees, configs | Secret. Server side only |\n\nRequests that manage a key, under `/keys/{key}`, take your **Management Key** instead: `Authorization: Bearer uk_...`. The API key is already in the path. The management key was previously called the user token.\n\nTo bill a request to a licensee, send the licensee key as the Bearer token: `Authorization: Bearer sl_...`.\n\nIf you cannot set headers, for example in some browser integrations, pass the key as `api_key` in the query string (or the management key as `user_token`):\n\n```\napi.addresszen.com/v1/autocomplete/addresses?api_key=ak_test&q=parkside\n```\n\nThe query string takes precedence when both are present.\n\nThe older `Authorization: api_key=\"ak_test\"` form still works but is deprecated. Use Bearer in new integrations.\n\n## Versioning\n\nThis API is versioned with a simple prefix in the URL. The current version is `/v1/`. We will maintain backwards-compatibility by releasing breaking changes under a new version.\n\nThe following changes are backwards-compatible:\n\n- Adding new properties to existing API responses\n- Adding new API endpoints\n- Adding new optional request parameters to existing API endpoints\n- Changing the order of properties in existing API responses\n- Changing the autocomplete address suggestion format\n\n## Error Handling\n\nA successful lookup returns an HTTP status code of 200 and a response code of 2000 in the body.\n\nAny other status code means an error. These range from a benign 404 (resource not found) to more urgent problems, such as an API Key out of credit or a failed authentication.\n\n## Testing\n\nTo test the API, create an account. Each new account comes with a free test balance. Contact us if you need more for testing and integration.\n\nThe code samples in this reference use the `ak_test` key. You can use it too, but it is capped at 5 requests per day.\n\n## Metadata\n\nYou can annotate requests that affect your balance with arbitrary metadata. We store it with your lookup history, and you can query it later via the API or the dashboard. We call the ability to label your requests [tagging](https://docs.addresszen.com/docs/guides/tags).\n\n## Response Codes\n\nThe API returns two indicators to help you determine the status of each HTTP request.\n\nThe first is the **HTTP Status**, which is found in the status line of every HTTP response. The API will return status codes that adhere to HTTP/1.1 Specifications wherever possible.\n\n`2XX` status codes indicate success while `4XX` and `5XX` indicate client and server errors respectively.\n\nThe second is the **API response code**, which can be found in the `code` property of the response body. This code gives a more specific reason for a failure and points you in the right direction when debugging.\n",
11
+ "description": "## Getting Started\n\nAll API methods are either a `GET`, `POST` or `OPTIONS` request.\n\nThe API communicates over both HTTPS and plain HTTP using IPv4 and IPv6.\n\nWe use appropriate HTTP status codes where possible to indicate the request status. Every error body also carries a numeric `code`. The [error codes guide](https://docs.addresszen.com/docs/guides/error-codes) lists each code and how to fix it.\n\n## OpenAPI Spec\n\nOur OpenAPI specification is available at:\n\n- [npm package](https://www.npmjs.com/package/@addresszen/openapi)\n- [API Reference](https://openapi.addresszen.com)\n- [OpenAPI v3 JSON File](https://openapi.addresszen.com/openapi.json)\n- [OpenAPI v3 YAML File](https://openapi.addresszen.com/openapi.yaml)\n\n## Rate Limiting\n\nEach IP address is rate limited at 30 requests per second. Exceeding the limit returns a 503 response.\n\nThe autocomplete API has an additional rate limit.\n\nIf you expect to exceed the limit, contact us and we can move you to an endpoint with a higher limit.\n\n## Authentication\n\nMost requests need an **API key**. Send it as a Bearer token in the `Authorization` header:\n\n```\ncurl 'https://api.addresszen.com/v1/autocomplete/addresses?q=parkside' \\\n -H 'Authorization: Bearer ak_test'\n```\n\nA header keeps the key out of URLs and server logs.\n\nTwo credentials exist, and they do different jobs:\n\n| Credential | Looks like | Authenticates | Exposure |\n| --- | --- | --- | --- |\n| API Key | `ak_test` | Address, postal code and place lookups. Every billable request | Usable in a browser. Restrict it with allowed URLs |\n| Management Key | `uk_...` | Managing a key under `/keys/{key}`: usage, licensees, configs | Secret. Server side only |\n\nRequests that manage a key, under `/keys/{key}`, take your **Management Key** instead: `Authorization: Bearer uk_...`. The API key is already in the path. The management key was previously called the user token.\n\nTo bill a request to a licensee, send the licensee key as the Bearer token: `Authorization: Bearer sl_...`.\n\nIf you cannot set headers, for example in some browser integrations, pass the key as `api_key` in the query string (or the management key as `user_token`):\n\n```\napi.addresszen.com/v1/autocomplete/addresses?api_key=ak_test&q=parkside\n```\n\nThe query string takes precedence when both are present.\n\nThe older `Authorization: api_key=\"ak_test\"` form still works but is deprecated. Use Bearer in new integrations.\n\n## Versioning\n\nThis API is versioned with a simple prefix in the URL. The current version is `/v1/`. We will maintain backwards-compatibility by releasing breaking changes under a new version.\n\nThe following changes are backwards-compatible:\n\n- Adding new properties to existing API responses\n- Adding new API endpoints\n- Adding new optional request parameters to existing API endpoints\n- Changing the order of properties in existing API responses\n- Changing the autocomplete address suggestion format\n\n## Error Handling\n\nA successful lookup returns an HTTP status code of 200 and a response code of 2000 in the body.\n\nAny other status code means an error. These range from a benign 404 (resource not found) to more urgent problems, such as an API Key out of credit or a failed authentication.\n\n## Testing\n\nTo test the API, create an account. Each new account comes with a free test balance. Contact us if you need more for testing and integration.\n\nThe code samples in this reference use the `ak_test` key. You can use it too, but it is capped at 5 requests per day.\n\n## Metadata\n\nYou can annotate requests that affect your balance with arbitrary metadata. We store it with your lookup history, and you can query it later via the API or the dashboard. We call the ability to label your requests [tagging](https://docs.addresszen.com/docs/guides/tag-and-track).\n\n## Response Codes\n\nThe API returns two indicators to help you determine the status of each HTTP request.\n\nThe first is the **HTTP Status**, which is found in the status line of every HTTP response. The API will return status codes that adhere to HTTP/1.1 Specifications wherever possible.\n\n`2XX` status codes indicate success while `4XX` and `5XX` indicate client and server errors respectively.\n\nThe second is the **API response code**, which can be found in the `code` property of the response body. This code gives a more specific reason for a failure and points you in the right direction when debugging.\n",
12
12
  "contact": {
13
13
  "email": "support@addresszen.com",
14
14
  "name": "Support",
@@ -51,12 +51,12 @@
51
51
  {
52
52
  "name": "suggestion",
53
53
  "x-displayName": "Address Suggestion",
54
- "description": "Address Suggestions are simple, human readable representations of an address. This format is sufficient for a user to determine an address match in an address autocomplete interface. A second request must be made to the API to gather fully validated address.\n\nSee our Address Search APIs for more information on address autocompletion.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AddressSuggestion\" />\n"
54
+ "description": "Address Suggestions are simple, human-readable representations of an address. This format is sufficient for a user to determine an address match in an address autocomplete interface. A second request must be made to the API to gather a fully validated address.\n\nSee our Address Search APIs for more information on address autocompletion.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AddressSuggestion\" />\n"
55
55
  },
56
56
  {
57
57
  "name": "usps_native",
58
- "x-displayName": "USPS Zip+4",
59
- "description": "Raw USPS Zip+4 record.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/UspsAddress\" />\n"
58
+ "x-displayName": "USPS ZIP+4",
59
+ "description": "Raw USPS ZIP+4 record.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/UspsAddress\" />\n"
60
60
  },
61
61
  {
62
62
  "name": "ecaf_address",
@@ -208,12 +208,17 @@
208
208
  {
209
209
  "lang": "Ruby",
210
210
  "label": "Ruby",
211
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
211
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.key_availability(\"ak_test\").result\n"
212
212
  },
213
213
  {
214
214
  "lang": "PHP",
215
215
  "label": "PHP",
216
216
  "source": "<?php\n$response = file_get_contents(\"https://api.addresszen.com/v1/keys/ak_test\");\n$result = json_decode($response, true)[\"result\"];\n"
217
+ },
218
+ {
219
+ "lang": "Go",
220
+ "label": "Go",
221
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.KeyAvailability(context.Background(), \"ak_test\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
217
222
  }
218
223
  ]
219
224
  }
@@ -296,12 +301,17 @@
296
301
  {
297
302
  "lang": "Ruby",
298
303
  "label": "Ruby",
299
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/details\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
304
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.key_details(\"ak_test\").result\n"
300
305
  },
301
306
  {
302
307
  "lang": "PHP",
303
308
  "label": "PHP",
304
309
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/details?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
310
+ },
311
+ {
312
+ "lang": "Go",
313
+ "label": "Go",
314
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.KeyDetails(context.Background(), \"ak_test\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
305
315
  }
306
316
  ]
307
317
  },
@@ -386,12 +396,17 @@
386
396
  {
387
397
  "lang": "Ruby",
388
398
  "label": "Ruby",
389
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/details?user_token=uk_secret\")\nbody = {\n name: \"My Updated Key\",\n daily_limit: {\n limit: 1000,\n },\n notifications: {\n enabled: true,\n },\n}\nresponse = Net::HTTP.put(uri, body.to_json, \"Content-Type\" => \"application/json\")\nresult = JSON.parse(response.body)[\"result\"]\n"
399
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.update_key_details(\n \"ak_test\",\n name: \"My Updated Key\",\n daily_limit: { limit: 1000 },\n notifications: { enabled: true }\n).result\n"
390
400
  },
391
401
  {
392
402
  "lang": "PHP",
393
403
  "label": "PHP",
394
404
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/details?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_CUSTOMREQUEST => \"PUT\",\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"name\" => \"My Updated Key\",\n \"daily_limit\" => [\n \"limit\" => 1000,\n ],\n \"notifications\" => [\n \"enabled\" => true,\n ],\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
405
+ },
406
+ {
407
+ "lang": "Go",
408
+ "label": "Go",
409
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.UpdateKeyDetails(context.Background(), \"ak_test\", addresszen.UpdateKeyDetailsBody{\n\t\tName: new(\"My Updated Key\"),\n\t\tDailyLimit: map[string]any{\"limit\": 1000},\n\t\tNotifications: map[string]any{\"enabled\": true},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
395
410
  }
396
411
  ]
397
412
  }
@@ -475,12 +490,17 @@
475
490
  {
476
491
  "lang": "Ruby",
477
492
  "label": "Ruby",
478
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/usage\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
493
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.key_usage(\"ak_test\").result\n"
479
494
  },
480
495
  {
481
496
  "lang": "PHP",
482
497
  "label": "PHP",
483
498
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/usage?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
499
+ },
500
+ {
501
+ "lang": "Go",
502
+ "label": "Go",
503
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.KeyUsage(context.Background(), \"ak_test\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
484
504
  }
485
505
  ]
486
506
  }
@@ -492,7 +512,7 @@
492
512
  ],
493
513
  "summary": "Logs (CSV)",
494
514
  "operationId": "KeyLogs",
495
- "description": "Returns a CSV of the charged lookups made on a key, one row per request.\n\nRequires the account Management Key. The maximum interval is 90 days. Without a start or end date the interval is the last 21 days.\n\nThe response is `text/csv` and downloads as an attachment. A non-200 response reverts to JSON, with the error code and message in the body.\n\n## CSV format\n\nThe CSV has no header row. Columns, in order:\n\n1. Timestamp (ISO 8601)\n2. IP address the request was received from\n3. Search term\n4. URL the request originated from\n5. Lookup type\n6. Tags\n7. Lookups consumed\n8. Licensee name (sublicensing keys only)\n9. Source IP address\n\nThe source IP column carries the address forwarded in the `AZ-Source-IP` header. We record it only for keys with IP address forwarding enabled, and only when the header holds a valid IP address. It is empty otherwise.\n\n## Data redaction\n\nWe redact personally identifiable data (PII) in your usage log weekly, covering the IP, source IP, search term and URL columns.\n\nThe default retention is 28 days. Change the period from your dashboard. Set it to `0` days to stop collecting PII altogether.\n",
515
+ "description": "Returns a CSV of the charged lookups made on a key, one row per request.\n\nRequires the account Management Key. The maximum interval is 90 days. Without a start or end date the interval is the last 21 days.\n\nThe response is `text/csv` and downloads as an attachment. A non-200 response reverts to JSON, with the error code and message in the body.\n\n## CSV format\n\nThe CSV has no header row. Columns, in order:\n\n1. Timestamp (ISO 8601)\n2. IP address the request was received from\n3. Search term\n4. URL the request originated from\n5. Lookup type\n6. Tags\n7. Lookups consumed\n8. Licensee name (sublicensing keys only)\n9. Source IP address\n\nThe source IP column carries the address forwarded in the `AZ-Source-IP` header. We record it only for keys with IP address forwarding enabled, and only when the header holds a valid IP address. It is empty otherwise.\n\n## Data redaction\n\nWe redact personally identifiable information (PII) in your usage log weekly, covering the IP, source IP, search term and URL columns.\n\nThe default retention is 28 days. Change the period from your dashboard. Set it to `0` days to stop collecting PII altogether.\n",
496
516
  "security": [
497
517
  {
498
518
  "ManagementKey": []
@@ -563,12 +583,17 @@
563
583
  {
564
584
  "lang": "Ruby",
565
585
  "label": "Ruby",
566
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/lookups\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
586
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\ncsv = client.key_logs(\"ak_test\")\n"
567
587
  },
568
588
  {
569
589
  "lang": "PHP",
570
590
  "label": "PHP",
571
591
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/lookups?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
592
+ },
593
+ {
594
+ "lang": "Go",
595
+ "label": "Go",
596
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tcsv, err := client.KeyLogs(context.Background(), \"ak_test\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Print(csv)\n}\n"
572
597
  }
573
598
  ]
574
599
  }
@@ -593,6 +618,9 @@
593
618
  {
594
619
  "$ref": "#/components/parameters/TagsParam"
595
620
  },
621
+ {
622
+ "$ref": "#/components/parameters/RemoveFirmParam"
623
+ },
596
624
  {
597
625
  "name": "context",
598
626
  "in": "query",
@@ -679,12 +707,17 @@
679
707
  {
680
708
  "lang": "Ruby",
681
709
  "label": "Ruby",
682
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/verify/addresses\")\nbody = {\n query: \"123 Main St, Springfield, IL 62701\",\n}\nresponse = Net::HTTP.post(uri, body.to_json, \"Authorization\" => 'api_key=\"ak_test\"', \"Content-Type\" => \"application/json\")\nresult = JSON.parse(response.body)[\"result\"]\n"
710
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.address_verify(query: \"123 Main St, Springfield, IL 62701\").result\n"
683
711
  },
684
712
  {
685
713
  "lang": "PHP",
686
714
  "label": "PHP",
687
715
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/verify/addresses\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => ['Authorization: api_key=\"ak_test\"', \"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"query\" => \"123 Main St, Springfield, IL 62701\",\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
716
+ },
717
+ {
718
+ "lang": "Go",
719
+ "label": "Go",
720
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.AddressVerify(context.Background(), addresszen.AddressVerifyBody{\n\t\tQuery: \"123 Main St, Springfield, IL 62701\",\n\t}, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result.Variant())\n}\n"
688
721
  }
689
722
  ]
690
723
  }
@@ -695,7 +728,7 @@
695
728
  "Address Search"
696
729
  ],
697
730
  "summary": "Find Address",
698
- "description": "Returns address suggestions for a partial address, ranked by relevance. Use it to autofill an address form as the user types.\n\nA suggestion is a display label and an `id`, not a full address. Retrieve the address with a second request to `/autocomplete/addresses/{id}/usa`. That second request is the one which decrements your lookup balance.\n\nAutocomplete is not a free standalone resource. We rate limit, then suspend, keys that autocomplete without resolving suggestions.\n\nOur address autocomplete JavaScript libraries add this to a form without calling the API directly.\n\n## Coverage\n\nEach search runs in one country, selected with `context`. A missing or unrecognized `context` falls back to your account default. Results come from the datasets enabled on your key: USPS Zip+4 for the US and its territories, and the country datasets you license elsewhere. Where a key has more than one dataset for a country, `dataset` narrows the search.\n\n## Filters\n\nFilters restrict results, e.g. `state_code=NY` searches New York only. A filter which matches no address returns an empty set. An unrecognized filter name is ignored. Neither affects your lookup balance.\n\nFilters combine with `AND` logic, so `state_code=CA&city=San Francisco` requires both. A comma-separated value combines terms for one filter, e.g. `postal_code_3=11225,11226,11238` accepts any of the three ZIP codes. Unless a parameter states otherwise, every filter takes multiple terms. The maximum is 10 filter terms.\n\n## Address bias\n\nBias terms carry the `bias_` prefix and promote addresses rather than restricting the set, so unmatched addresses still appear, lower down. For example, `bias_state_code=NY,NJ` favors addresses in New York and New Jersey, `bias_lonlat` favors addresses near a point. Invalid bias terms have no effect. Multiple bias terms are allowed unless stated otherwise, with a combined maximum of 5.\n\n## Suggestion format\n\nThe suggestion string is subject to change. Present it to the user as it arrives rather than parsing it.\n\n## Rate limiting and cost\n\nThe default rate limit is 3,000 requests per 5 minutes, counted per API key and IP address. The `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers report the current window.\n\nAutocomplete requests do not draw on your balance. Resolving a suggestion to a full address does.\n",
731
+ "description": "Returns address suggestions for a partial address, ranked by relevance. Use it to autofill an address form as the user types.\n\nA suggestion is a display label and an `id`, not a full address. Retrieve the address with a second request to `/autocomplete/addresses/{id}/usa`. That second request is the one which decrements your lookup balance.\n\nAutocomplete is not a free standalone resource. We rate limit, then suspend, keys that autocomplete without resolving suggestions.\n\nOur address autocomplete JavaScript libraries add this to a form without calling the API directly.\n\n## Coverage\n\nEach search runs in one country, selected with `context`. A missing or unrecognized `context` falls back to your account default. Results come from the datasets enabled on your key: USPS ZIP+4 for the US and its territories, and the country datasets you license elsewhere. Where a key has more than one dataset for a country, `dataset` narrows the search.\n\n## Filters\n\nFilters restrict results, e.g. `state_code=NY` searches New York only. A filter which matches no address returns an empty set. An unrecognized filter name is ignored. Neither affects your lookup balance.\n\nFilters combine with `AND` logic, so `state_code=CA&city=San Francisco` requires both. A comma-separated value combines terms for one filter, e.g. `postal_code_3=11225,11226,11238` accepts any of the three ZIP codes. Unless a parameter states otherwise, every filter takes multiple terms. The maximum is 10 filter terms.\n\n## Address bias\n\nBias terms carry the `bias_` prefix and promote addresses rather than restricting the set, so unmatched addresses still appear, lower down. For example, `bias_state_code=NY,NJ` favors addresses in New York and New Jersey, and `bias_lonlat` favors addresses near a point. Invalid bias terms have no effect. Multiple bias terms are allowed unless stated otherwise, with a combined maximum of 5.\n\n## Suggestion format\n\nThe suggestion string is subject to change. Present it to the user as it arrives rather than parsing it.\n\n## Rate limiting and cost\n\nThe default rate limit is 3,000 requests per 5 minutes, counted per API key and IP address. The `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers report the current window.\n\nAutocomplete requests do not draw on your balance. Resolving a suggestion to a full address does.\n",
699
732
  "operationId": "FindAddress",
700
733
  "security": [
701
734
  {
@@ -916,12 +949,17 @@
916
949
  {
917
950
  "lang": "Ruby",
918
951
  "label": "Ruby",
919
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/autocomplete/addresses\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\", query: \"1600 Pennsylvania\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
952
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.find_address(query: \"1600 Pennsylvania\").result\n"
920
953
  },
921
954
  {
922
955
  "lang": "PHP",
923
956
  "label": "PHP",
924
957
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/autocomplete/addresses?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n \"query\" => \"1600 Pennsylvania\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
958
+ },
959
+ {
960
+ "lang": "Go",
961
+ "label": "Go",
962
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.FindAddress(context.Background(), &addresszen.FindAddressParams{\n\t\tQuery: \"1600 Pennsylvania\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
925
963
  }
926
964
  ]
927
965
  }
@@ -963,6 +1001,9 @@
963
1001
  },
964
1002
  {
965
1003
  "$ref": "#/components/parameters/TagsParam"
1004
+ },
1005
+ {
1006
+ "$ref": "#/components/parameters/RemoveFirmParam"
966
1007
  }
967
1008
  ],
968
1009
  "responses": {
@@ -1027,12 +1068,17 @@
1027
1068
  {
1028
1069
  "lang": "Ruby",
1029
1070
  "label": "Ruby",
1030
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/autocomplete/addresses/usps_V118834572%7C310%7C%7C3191/usa\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
1071
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.retrieve_address(\"usps_V118834572|310||3191\").result\n"
1031
1072
  },
1032
1073
  {
1033
1074
  "lang": "PHP",
1034
1075
  "label": "PHP",
1035
1076
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/autocomplete/addresses/usps_V118834572%7C310%7C%7C3191/usa?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
1077
+ },
1078
+ {
1079
+ "lang": "Go",
1080
+ "label": "Go",
1081
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.RetrieveAddress(context.Background(), \"usps_V118834572|310||3191\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1036
1082
  }
1037
1083
  ]
1038
1084
  }
@@ -1177,12 +1223,17 @@
1177
1223
  {
1178
1224
  "lang": "Ruby",
1179
1225
  "label": "Ruby",
1180
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/places\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\", query: \"london\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
1226
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.find_place(query: \"london\").result\n"
1181
1227
  },
1182
1228
  {
1183
1229
  "lang": "PHP",
1184
1230
  "label": "PHP",
1185
1231
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/places?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n \"query\" => \"london\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
1232
+ },
1233
+ {
1234
+ "lang": "Go",
1235
+ "label": "Go",
1236
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.FindPlace(context.Background(), &addresszen.FindPlaceParams{\n\t\tQuery: \"london\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfor _, hit := range res.Result.Hits {\n\t\tfmt.Printf(\"%+v\\n\", hit.Variant())\n\t}\n}\n"
1186
1237
  }
1187
1238
  ]
1188
1239
  }
@@ -1413,32 +1464,37 @@
1413
1464
  {
1414
1465
  "lang": "http",
1415
1466
  "label": "URL",
1416
- "source": "https://api.addresszen.com/v1/places/geonames_5353?api_key=ak_test\n"
1467
+ "source": "https://api.addresszen.com/v1/places/geonames_2643743?api_key=ak_test\n"
1417
1468
  },
1418
1469
  {
1419
1470
  "lang": "cURL",
1420
1471
  "label": "curl",
1421
- "source": "curl -G 'https://api.addresszen.com/v1/places/geonames_5353' \\\n -d 'api_key=ak_test'\n"
1472
+ "source": "curl -G 'https://api.addresszen.com/v1/places/geonames_2643743' \\\n -d 'api_key=ak_test'\n"
1422
1473
  },
1423
1474
  {
1424
1475
  "lang": "JavaScript",
1425
1476
  "label": "JavaScript",
1426
- "source": "import { createZenClient, resolvePlace } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await resolvePlace({\n client,\n path: { place: 'geonames_5353' },\n});\n"
1477
+ "source": "import { createZenClient, resolvePlace } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await resolvePlace({\n client,\n path: { place: 'geonames_2643743' },\n});\n"
1427
1478
  },
1428
1479
  {
1429
1480
  "lang": "Python",
1430
1481
  "label": "Python",
1431
- "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.resolve_place(\"geonames_5353\")\n"
1482
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.resolve_place(\"geonames_2643743\")\n"
1432
1483
  },
1433
1484
  {
1434
1485
  "lang": "Ruby",
1435
1486
  "label": "Ruby",
1436
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/places/geonames_5353\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
1487
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.resolve_place(\"geonames_2643743\").result\n"
1437
1488
  },
1438
1489
  {
1439
1490
  "lang": "PHP",
1440
1491
  "label": "PHP",
1441
- "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/places/geonames_5353?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
1492
+ "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/places/geonames_2643743?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
1493
+ },
1494
+ {
1495
+ "lang": "Go",
1496
+ "label": "Go",
1497
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.ResolvePlace(context.Background(), \"geonames_2643743\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1442
1498
  }
1443
1499
  ]
1444
1500
  }
@@ -1449,7 +1505,7 @@
1449
1505
  "Licensees"
1450
1506
  ],
1451
1507
  "summary": "List",
1452
- "description": "Returns a key's licensees, oldest first, up to 100 per request. The list omits canceled licensees. The key must be enabled for sub-licensing.",
1508
+ "description": "Returns a key's licensees, oldest first, up to 100 per request. The list omits canceled licensees. The key must be enabled for sublicensing.",
1453
1509
  "operationId": "ListLicensees",
1454
1510
  "security": [
1455
1511
  {
@@ -1463,12 +1519,11 @@
1463
1519
  {
1464
1520
  "name": "starting_after",
1465
1521
  "in": "query",
1466
- "description": "ID of the licensee after which to list results",
1522
+ "description": "ID of the licensee after which to list results. Pass the `id` of the last licensee on the previous page.",
1467
1523
  "style": "form",
1468
1524
  "explode": false,
1469
1525
  "schema": {
1470
- "type": "integer",
1471
- "format": "int32"
1526
+ "type": "string"
1472
1527
  }
1473
1528
  },
1474
1529
  {
@@ -1534,12 +1589,17 @@
1534
1589
  {
1535
1590
  "lang": "Ruby",
1536
1591
  "label": "Ruby",
1537
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/licensees\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
1592
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.list_licensees(\"ak_test\").result\n"
1538
1593
  },
1539
1594
  {
1540
1595
  "lang": "PHP",
1541
1596
  "label": "PHP",
1542
1597
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
1598
+ },
1599
+ {
1600
+ "lang": "Go",
1601
+ "label": "Go",
1602
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.ListLicensees(context.Background(), \"ak_test\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1543
1603
  }
1544
1604
  ]
1545
1605
  },
@@ -1548,7 +1608,7 @@
1548
1608
  "Licensees"
1549
1609
  ],
1550
1610
  "summary": "Create",
1551
- "description": "Creates a licensee on a key and returns it with its generated `sl_` key. The key must be enabled for sub-licensing.",
1611
+ "description": "Creates a licensee on a key and returns it with its generated `sl_` key. The key must be enabled for sublicensing.",
1552
1612
  "operationId": "CreateLicensee",
1553
1613
  "security": [
1554
1614
  {
@@ -1599,27 +1659,32 @@
1599
1659
  {
1600
1660
  "lang": "cURL",
1601
1661
  "label": "curl",
1602
- "source": "curl -X POST 'https://api.addresszen.com/v1/keys/ak_test/licensees?user_token=uk_secret' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Qwerty Widgets Limited\",\n \"address\": \"12 High Street, Manchester\",\n \"postcode\": \"BR8 7RE\",\n \"whitelist\": [],\n \"daily\": {\n \"limit\": 10000\n }\n }'\n"
1662
+ "source": "curl -X POST 'https://api.addresszen.com/v1/keys/ak_test/licensees?user_token=uk_secret' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Acme Inc\",\n \"address\": \"1010 Cauthen Ln, Alamogordo, NM\",\n \"postcode\": \"88310\",\n \"whitelist\": [],\n \"daily\": {\n \"limit\": 10000\n }\n }'\n"
1603
1663
  },
1604
1664
  {
1605
1665
  "lang": "JavaScript",
1606
1666
  "label": "JavaScript",
1607
- "source": "import { createZenClient, createLicensee } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await createLicensee({\n client,\n path: { key: 'ak_test' },\n body: {\n name: 'Qwerty Widgets Limited',\n address: '12 High Street, Manchester',\n postcode: 'BR8 7RE',\n whitelist: [],\n daily: {\n limit: 10000,\n },\n },\n});\n"
1667
+ "source": "import { createZenClient, createLicensee } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await createLicensee({\n client,\n path: { key: 'ak_test' },\n body: {\n name: 'Acme Inc',\n address: '1010 Cauthen Ln, Alamogordo, NM',\n postcode: '88310',\n whitelist: [],\n daily: {\n limit: 10000,\n },\n },\n});\n"
1608
1668
  },
1609
1669
  {
1610
1670
  "lang": "Python",
1611
1671
  "label": "Python",
1612
- "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.create_licensee(\n \"ak_test\",\n user_token=\"uk_secret\",\n name=\"Qwerty Widgets Limited\",\n address=\"12 High Street, Manchester\",\n postcode=\"BR8 7RE\",\n whitelist=[],\n daily={\"limit\": 10000},\n )\n"
1672
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.create_licensee(\n \"ak_test\",\n user_token=\"uk_secret\",\n name=\"Acme Inc\",\n address=\"1010 Cauthen Ln, Alamogordo, NM\",\n postcode=\"88310\",\n whitelist=[],\n daily={\"limit\": 10000},\n )\n"
1613
1673
  },
1614
1674
  {
1615
1675
  "lang": "Ruby",
1616
1676
  "label": "Ruby",
1617
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/licensees?user_token=uk_secret\")\nbody = {\n name: \"Qwerty Widgets Limited\",\n address: \"12 High Street, Manchester\",\n postcode: \"BR8 7RE\",\n whitelist: [],\n daily: {\n limit: 10000,\n },\n}\nresponse = Net::HTTP.post(uri, body.to_json, \"Content-Type\" => \"application/json\")\nresult = JSON.parse(response.body)[\"result\"]\n"
1677
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.create_licensee(\n \"ak_test\",\n name: \"Acme Inc\",\n address: \"1010 Cauthen Ln, Alamogordo, NM\",\n postcode: \"88310\",\n whitelist: [],\n daily: { limit: 10000 }\n).result\n"
1618
1678
  },
1619
1679
  {
1620
1680
  "lang": "PHP",
1621
1681
  "label": "PHP",
1622
- "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/licensees?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"name\" => \"Qwerty Widgets Limited\",\n \"address\" => \"12 High Street, Manchester\",\n \"postcode\" => \"BR8 7RE\",\n \"whitelist\" => [],\n \"daily\" => [\n \"limit\" => 10000,\n ],\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
1682
+ "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/licensees?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"name\" => \"Acme Inc\",\n \"address\" => \"1010 Cauthen Ln, Alamogordo, NM\",\n \"postcode\" => \"88310\",\n \"whitelist\" => [],\n \"daily\" => [\n \"limit\" => 10000,\n ],\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
1683
+ },
1684
+ {
1685
+ "lang": "Go",
1686
+ "label": "Go",
1687
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.CreateLicensee(context.Background(), \"ak_test\", addresszen.CreateLicenseeBody{\n\t\tName: new(\"Acme Inc\"),\n\t\tAddress: new(\"1010 Cauthen Ln, Alamogordo, NM\"),\n\t\tPostcode: new(\"88310\"),\n\t\tWhitelist: new([]string{}),\n\t\tDaily: map[string]any{\"limit\": 10000},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1623
1688
  }
1624
1689
  ]
1625
1690
  }
@@ -1695,12 +1760,17 @@
1695
1760
  {
1696
1761
  "lang": "Ruby",
1697
1762
  "label": "Ruby",
1698
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
1763
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.retrieve_licensee(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\").result\n"
1699
1764
  },
1700
1765
  {
1701
1766
  "lang": "PHP",
1702
1767
  "label": "PHP",
1703
1768
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
1769
+ },
1770
+ {
1771
+ "lang": "Go",
1772
+ "label": "Go",
1773
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.RetrieveLicensee(context.Background(), \"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1704
1774
  }
1705
1775
  ]
1706
1776
  },
@@ -1748,7 +1818,7 @@
1748
1818
  ],
1749
1819
  "properties": {
1750
1820
  "deleted": {
1751
- "type": "number",
1821
+ "type": "integer",
1752
1822
  "format": "int32",
1753
1823
  "example": 1,
1754
1824
  "minimum": 0
@@ -1803,12 +1873,17 @@
1803
1873
  {
1804
1874
  "lang": "Ruby",
1805
1875
  "label": "Ruby",
1806
- "source": "require \"net/http\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?user_token=uk_secret\")\nNet::HTTP.start(uri.host, use_ssl: true) do |http|\n http.delete(uri.request_uri)\nend\n"
1876
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.delete_licensee(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\").result\n"
1807
1877
  },
1808
1878
  {
1809
1879
  "lang": "PHP",
1810
1880
  "label": "PHP",
1811
1881
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_RETURNTRANSFER => true,\n]);\ncurl_exec($ch);\n"
1882
+ },
1883
+ {
1884
+ "lang": "Go",
1885
+ "label": "Go",
1886
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.DeleteLicensee(context.Background(), \"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1812
1887
  }
1813
1888
  ]
1814
1889
  },
@@ -1886,12 +1961,17 @@
1886
1961
  {
1887
1962
  "lang": "Ruby",
1888
1963
  "label": "Ruby",
1889
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?user_token=uk_secret\")\nbody = {\n daily: {\n limit: 20000,\n },\n}\nresponse = Net::HTTP.post(uri, body.to_json, \"Content-Type\" => \"application/json\")\nresult = JSON.parse(response.body)[\"result\"]\n"
1964
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.update_licensee(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\", daily: { limit: 20000 }).result\n"
1890
1965
  },
1891
1966
  {
1892
1967
  "lang": "PHP",
1893
1968
  "label": "PHP",
1894
1969
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"daily\" => [\n \"limit\" => 20000,\n ],\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
1970
+ },
1971
+ {
1972
+ "lang": "Go",
1973
+ "label": "Go",
1974
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.UpdateLicensee(context.Background(), \"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\", addresszen.UpdateLicenseeBody{\n\t\tDaily: map[string]any{\"limit\": 20000},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1895
1975
  }
1896
1976
  ]
1897
1977
  }
@@ -1961,12 +2041,17 @@
1961
2041
  {
1962
2042
  "lang": "Ruby",
1963
2043
  "label": "Ruby",
1964
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94/regenerate-key?user_token=uk_secret\")\nresponse = Net::HTTP.post(uri, \"\")\nresult = JSON.parse(response.body)[\"result\"]\n"
2044
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.regenerate_licensee_key(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\").result\n"
1965
2045
  },
1966
2046
  {
1967
2047
  "lang": "PHP",
1968
2048
  "label": "PHP",
1969
2049
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94/regenerate-key?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
2050
+ },
2051
+ {
2052
+ "lang": "Go",
2053
+ "label": "Go",
2054
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.RegenerateLicenseeKey(context.Background(), \"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
1970
2055
  }
1971
2056
  ]
1972
2057
  }
@@ -2038,12 +2123,17 @@
2038
2123
  {
2039
2124
  "lang": "Ruby",
2040
2125
  "label": "Ruby",
2041
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/configs\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
2126
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.list_configs(\"ak_test\").result\n"
2042
2127
  },
2043
2128
  {
2044
2129
  "lang": "PHP",
2045
2130
  "label": "PHP",
2046
2131
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/configs?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
2132
+ },
2133
+ {
2134
+ "lang": "Go",
2135
+ "label": "Go",
2136
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.ListConfigs(context.Background(), \"ak_test\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
2047
2137
  }
2048
2138
  ]
2049
2139
  },
@@ -2118,12 +2208,17 @@
2118
2208
  {
2119
2209
  "lang": "Ruby",
2120
2210
  "label": "Ruby",
2121
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/configs?user_token=uk_secret\")\nbody = {\n name: \"woocommerce\",\n payload: '{\"removeOrganisation\": false}',\n}\nresponse = Net::HTTP.post(uri, body.to_json, \"Content-Type\" => \"application/json\")\nresult = JSON.parse(response.body)[\"result\"]\n"
2211
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.create_config(\n \"ak_test\",\n name: \"woocommerce\",\n payload: '{\"removeOrganisation\": false}'\n).result\n"
2122
2212
  },
2123
2213
  {
2124
2214
  "lang": "PHP",
2125
2215
  "label": "PHP",
2126
2216
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/configs?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"name\" => \"woocommerce\",\n \"payload\" => '{\"removeOrganisation\": false}',\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
2217
+ },
2218
+ {
2219
+ "lang": "Go",
2220
+ "label": "Go",
2221
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.CreateConfig(context.Background(), \"ak_test\", addresszen.CreateConfigBody{\n\t\tName: \"woocommerce\",\n\t\tPayload: `{\"removeOrganisation\": false}`,\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
2127
2222
  }
2128
2223
  ]
2129
2224
  }
@@ -2201,12 +2296,17 @@
2201
2296
  {
2202
2297
  "lang": "Ruby",
2203
2298
  "label": "Ruby",
2204
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce\")\nuri.query = URI.encode_www_form(user_token: \"uk_secret\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
2299
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.retrieve_config(\"ak_test\", \"woocommerce\").result\n"
2205
2300
  },
2206
2301
  {
2207
2302
  "lang": "PHP",
2208
2303
  "label": "PHP",
2209
2304
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?\" .\n http_build_query([\n \"user_token\" => \"uk_secret\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
2305
+ },
2306
+ {
2307
+ "lang": "Go",
2308
+ "label": "Go",
2309
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.RetrieveConfig(context.Background(), \"ak_test\", \"woocommerce\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
2210
2310
  }
2211
2311
  ]
2212
2312
  },
@@ -2254,7 +2354,7 @@
2254
2354
  ],
2255
2355
  "properties": {
2256
2356
  "deleted": {
2257
- "type": "number",
2357
+ "type": "integer",
2258
2358
  "format": "int32",
2259
2359
  "example": 1,
2260
2360
  "minimum": 0
@@ -2319,12 +2419,17 @@
2319
2419
  {
2320
2420
  "lang": "Ruby",
2321
2421
  "label": "Ruby",
2322
- "source": "require \"net/http\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret\")\nNet::HTTP.start(uri.host, use_ssl: true) do |http|\n http.delete(uri.request_uri)\nend\n"
2422
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.delete_config(\"ak_test\", \"woocommerce\").result\n"
2323
2423
  },
2324
2424
  {
2325
2425
  "lang": "PHP",
2326
2426
  "label": "PHP",
2327
2427
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_RETURNTRANSFER => true,\n]);\ncurl_exec($ch);\n"
2428
+ },
2429
+ {
2430
+ "lang": "Go",
2431
+ "label": "Go",
2432
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.DeleteConfig(context.Background(), \"ak_test\", \"woocommerce\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
2328
2433
  }
2329
2434
  ]
2330
2435
  },
@@ -2412,12 +2517,17 @@
2412
2517
  {
2413
2518
  "lang": "Ruby",
2414
2519
  "label": "Ruby",
2415
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret\")\nbody = {\n payload: '{\"removeOrganisation\": true}',\n}\nresponse = Net::HTTP.post(uri, body.to_json, \"Content-Type\" => \"application/json\")\nresult = JSON.parse(response.body)[\"result\"]\n"
2520
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\", management_key: \"uk_secret\")\nresult = client.update_config(\"ak_test\", \"woocommerce\", payload: '{\"removeOrganisation\": true}').result\n"
2416
2521
  },
2417
2522
  {
2418
2523
  "lang": "PHP",
2419
2524
  "label": "PHP",
2420
2525
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"payload\" => '{\"removeOrganisation\": true}',\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
2526
+ },
2527
+ {
2528
+ "lang": "Go",
2529
+ "label": "Go",
2530
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\", addresszen.WithManagementKey(\"uk_secret\"))\n\tres, err := client.UpdateConfig(context.Background(), \"ak_test\", \"woocommerce\", addresszen.UpdateConfigBody{\n\t\tPayload: new(`{\"removeOrganisation\": true}`),\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result)\n}\n"
2421
2531
  }
2422
2532
  ]
2423
2533
  }
@@ -2518,12 +2628,17 @@
2518
2628
  {
2519
2629
  "lang": "Ruby",
2520
2630
  "label": "Ruby",
2521
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/emails\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\", query: \"foo@domain.com\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
2631
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.email_validation(query: \"foo@domain.com\").result\n"
2522
2632
  },
2523
2633
  {
2524
2634
  "lang": "PHP",
2525
2635
  "label": "PHP",
2526
2636
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/emails?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n \"query\" => \"foo@domain.com\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
2637
+ },
2638
+ {
2639
+ "lang": "Go",
2640
+ "label": "Go",
2641
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.EmailValidation(context.Background(), \"foo@domain.com\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result.Variant())\n}\n"
2527
2642
  }
2528
2643
  ]
2529
2644
  }
@@ -2649,12 +2764,17 @@
2649
2764
  {
2650
2765
  "lang": "Ruby",
2651
2766
  "label": "Ruby",
2652
- "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/phone_numbers\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\", query: \"02071128019\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
2767
+ "source": "# gem install addresszen\nrequire \"addresszen\"\n\nclient = AddressZen::Client.new(api_key: \"ak_test\")\nresult = client.phone_number_validation(query: \"02071128019\").result\n"
2653
2768
  },
2654
2769
  {
2655
2770
  "lang": "PHP",
2656
2771
  "label": "PHP",
2657
2772
  "source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/phone_numbers?\" .\n http_build_query([\n \"api_key\" => \"ak_test\",\n \"query\" => \"02071128019\",\n ])\n);\n$result = json_decode($response, true)[\"result\"];\n"
2773
+ },
2774
+ {
2775
+ "lang": "Go",
2776
+ "label": "Go",
2777
+ "source": "// go get go.addresszen.com/sdk\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\taddresszen \"go.addresszen.com/sdk\"\n)\n\nfunc main() {\n\tclient := addresszen.NewClient(\"ak_test\")\n\tres, err := client.PhoneNumberValidation(context.Background(), \"02071128019\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", res.Result.Variant())\n}\n"
2658
2778
  }
2659
2779
  ]
2660
2780
  }
@@ -2807,6 +2927,11 @@
2807
2927
  "lang": "PHP",
2808
2928
  "label": "PHP",
2809
2929
  "source": "<?php\n$ch = curl_init(\"https://api.addresszen.com/v1/sign_up\");\ncurl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => [\"Content-Type: application/json\"],\n CURLOPT_POSTFIELDS => json_encode([\n \"email\" => \"user@example.com\",\n \"name\" => \"Jane Smith\",\n \"org_name\" => \"Example Corp\",\n \"org_address_line_one\" => \"10 Example Street\",\n \"org_post_town\" => \"London\",\n \"org_postcode\" => \"SW1A 1AA\",\n \"org_country_code\" => \"GB\",\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
2930
+ },
2931
+ {
2932
+ "lang": "Go",
2933
+ "label": "Go",
2934
+ "source": "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tbody, err := json.Marshal(map[string]string{\n\t\t\"email\": \"user@example.com\",\n\t\t\"name\": \"Jane Smith\",\n\t\t\"org_name\": \"Example Corp\",\n\t\t\"org_address_line_one\": \"10 Example Street\",\n\t\t\"org_post_town\": \"London\",\n\t\t\"org_postcode\": \"SW1A 1AA\",\n\t\t\"org_country_code\": \"GB\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tresp, err := http.Post(\"https://api.addresszen.com/v1/sign_up\", \"application/json\", bytes.NewReader(body))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer resp.Body.Close()\n\tvar data map[string]any\n\tif err := json.NewDecoder(resp.Body).Decode(&data); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", data[\"result\"])\n}\n"
2810
2935
  }
2811
2936
  ]
2812
2937
  }
@@ -2982,6 +3107,11 @@
2982
3107
  "lang": "PHP",
2983
3108
  "label": "PHP",
2984
3109
  "source": "<?php\n$response = file_get_contents(\"https://api.addresszen.com/v1/sign_up/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\");\n$result = json_decode($response, true)[\"result\"];\n"
3110
+ },
3111
+ {
3112
+ "lang": "Go",
3113
+ "label": "Go",
3114
+ "source": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tresp, err := http.Get(\"https://api.addresszen.com/v1/sign_up/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer resp.Body.Close()\n\tvar data map[string]any\n\tif err := json.NewDecoder(resp.Body).Decode(&data); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"%+v\\n\", data[\"result\"])\n}\n"
2985
3115
  }
2986
3116
  ]
2987
3117
  }
@@ -3021,7 +3151,7 @@
3021
3151
  "type": "string"
3022
3152
  },
3023
3153
  "name": "user_token",
3024
- "description": "**Management Key**\n\nA secret key used to manage your account and API Keys. It was previously called the user token.\n\nYour management key can be retrieved and managed from your [accounts page](https://addresszen.com/account).\n\nTypically begins `uk_`. Prefer sending it in the `Authorization` header as `Bearer uk_...` instead of this query parameter. The `Authorization: user_token=\"uk_...\"` header also works.\n",
3154
+ "description": "**Management Key**\n\nA secret key used to manage your account and API Keys. It was previously called the user token.\n\nYour management key can be retrieved and managed from your [accounts page](https://account.addresszen.com/tokens).\n\nTypically begins `uk_`. Prefer sending it in the `Authorization` header as `Bearer uk_...` instead of this query parameter. The `Authorization: user_token=\"uk_...\"` header also works.\n",
3025
3155
  "example": "uk_B59ScW1p1HHouf1VqclEPZUx"
3026
3156
  },
3027
3157
  "StartParam": {
@@ -3082,6 +3212,20 @@
3082
3212
  },
3083
3213
  "style": "form"
3084
3214
  },
3215
+ "RemoveFirmParam": {
3216
+ "name": "remove_firm",
3217
+ "in": "query",
3218
+ "style": "form",
3219
+ "explode": false,
3220
+ "required": false,
3221
+ "description": "**Remove Firm**\n\nRemoves firm names from the address lines (`line_1`, `line_2`, ...). Outside the USA this covers organization and department names. Remaining lines move up. Useful when delivering to people rather than businesses.\n\nSet `remove_firm=true` to enable.\n\nFirm fields and the `native` record are unchanged. If removing the firm would leave no address lines, it is kept and the lines are returned unchanged. Building names are not removed.\n",
3222
+ "schema": {
3223
+ "type": "string",
3224
+ "enum": [
3225
+ "true"
3226
+ ]
3227
+ }
3228
+ },
3085
3229
  "DatasetParam": {
3086
3230
  "name": "dataset",
3087
3231
  "in": "query",
@@ -3094,7 +3238,9 @@
3094
3238
  }
3095
3239
  },
3096
3240
  "description": "**Filter by Dataset**\n\nComma-separated list of datasets to search within.\n\nFilters results to only include addresses from the specified datasets. Useful for keys with multiple overlapping datasets enabled (e.g. `paf` and `abp`).\n",
3097
- "example": "usps"
3241
+ "example": [
3242
+ "usps"
3243
+ ]
3098
3244
  },
3099
3245
  "ContextParam": {
3100
3246
  "name": "context",
@@ -3120,7 +3266,7 @@
3120
3266
  "format": "int32"
3121
3267
  },
3122
3268
  "example": 5,
3123
- "description": "**Limit**\n\nSpecifies the maximum number of records to retrieve.\n\nBy default the limit is 10. Requesting a larger result set adds latency.\n"
3269
+ "description": "**Limit**\n\nSpecifies the maximum number of records to retrieve.\n\nBy default the limit is 10. Requesting a larger result set adds latency. A value above 100 is reduced to 100 without an error.\n"
3124
3270
  },
3125
3271
  "BiasLonLatParam": {
3126
3272
  "name": "bias_lonlat",
@@ -3265,7 +3411,7 @@
3265
3411
  "schema": {
3266
3412
  "type": "string"
3267
3413
  },
3268
- "description": "**Bias by city**\n\nBoost addresses in the named city, town or locality. Case, spaces and accents are ignored. For UK addresses use `bias_posttown`.\n",
3414
+ "description": "**Bias by city**\n\nBoost addresses in the named city, town or locality. Case, spaces and accents are ignored.\n",
3269
3415
  "example": "San Francisco"
3270
3416
  },
3271
3417
  "BiasStateParam": {
@@ -4508,7 +4654,7 @@
4508
4654
  },
4509
4655
  "dpv_no_stat": {
4510
4656
  "type": "string",
4511
- "description": "Delivery Point Validation (DPV) NoStat code.\n\nIndicates whether the address is a vacant property, it receives mail as a part of a drop, or it does not have an established delivery yet.\n\nPossible values:\n- 'Y'\tConfirmed\n- 'N'\tNot confirmed\n- '' Empty string if address is not DPV validated.\n",
4657
+ "description": "Delivery Point Validation (DPV) NoStat code.\n\nIndicates whether the address is a vacant property, it receives mail as a part of a drop or it does not have an established delivery yet.\n\nPossible values:\n- 'Y'\tConfirmed\n- 'N'\tNot confirmed\n- '' Empty string if address is not DPV validated.\n",
4512
4658
  "enum": [
4513
4659
  "Y",
4514
4660
  "N",
@@ -4546,7 +4692,7 @@
4546
4692
  },
4547
4693
  "geo_coded": {
4548
4694
  "type": "boolean",
4549
- "description": "Indicates whether the address was geo-coded\n"
4695
+ "description": "Indicates whether the address was geocoded\n"
4550
4696
  },
4551
4697
  "lacs_indicator": {
4552
4698
  "type": "string",
@@ -6608,7 +6754,7 @@
6608
6754
  "type": "string",
6609
6755
  "maxLength": 6,
6610
6756
  "nullable": true,
6611
- "description": "Current AddressBase classification code (e.g. `RD` residential,\n`CR` commercial retail). Top-level categories: `R` Residential,\n`C` Commercial, `L` Land, `M` Military, `O` Other, `P` Parent shell,\n`U` Unclassified, `X` Dual use, `Z` Object of interest. NULL when no\ncurrent classification row exists for the UPRN.\n"
6757
+ "description": "Current AddressBase classification code, passed through verbatim at\nwhatever level the custodian recorded. Usually tertiary (e.g. `RD03`\nsemi-detached, `RD04` terraced, `RD06` self-contained flat, `CR01`\nretail), but can be quaternary (`LP03PA`), secondary (`RD`) or primary\n(`C`). Match on prefix rather than equality. Top-level categories: `R` Residential,\n`C` Commercial, `L` Land, `M` Military, `O` Other, `P` Parent shell,\n`U` Unclassified, `X` Dual use, `Z` Object of interest. NULL when no\ncurrent classification row exists for the UPRN.\n"
6612
6758
  },
6613
6759
  "class_scheme": {
6614
6760
  "title": "Classification Scheme",
@@ -14150,7 +14296,7 @@
14150
14296
  "city_state_name_facility_code": {
14151
14297
  "title": "City State Name Facility Code",
14152
14298
  "type": "string",
14153
- "description": "The type of locale identified in the city/state name. The facility may be a USPS facility, such as a post office, station or branch, or a non-postal place name.\n\n- B = Branch\n- C = Community post office (CPO)\n- N = Non-postal community name, former USPS facility, or place name\n- P = Post Office\n- S = Station\n- U = Urbanization",
14299
+ "description": "The type of locale identified in the city/state name. The facility may be a USPS facility, such as a post office, station or branch, or a non-postal place name.\n\n- B = Branch\n- C = Community post office (CPO)\n- N = Non-postal community name, former USPS facility or place name\n- P = Post Office\n- S = Station\n- U = Urbanization",
14154
14300
  "enum": [
14155
14301
  "B",
14156
14302
  "C",
@@ -14323,14 +14469,14 @@
14323
14469
  ]
14324
14470
  },
14325
14471
  "count": {
14326
- "type": "number",
14472
+ "type": "integer",
14327
14473
  "description": "The number of addresses we matched to the input. We return the closest match by default.\n",
14328
14474
  "maximum": 10,
14329
14475
  "minimum": 0
14330
14476
  },
14331
14477
  "fit": {
14332
14478
  "type": "number",
14333
- "description": "A score represented as number between 1 and 0. Fit compares the address elements present in your query against the matching address elements. It does not incorporate elements you have not presented in the score. A partial address (e.g. 123 Main St) will have a fit of 1 even though it is missing city and zip code. Its confidence score will be less than 1 however because it is missing some crucial elements.\n",
14479
+ "description": "A score represented as a number between 1 and 0. Fit compares the address elements present in your query against the matching address elements. It does not incorporate elements you have not presented in the score. A partial address (e.g. 123 Main St) will have a fit of 1 even though it is missing city and ZIP code. Its confidence score will be less than 1 however because it is missing some crucial elements.\n",
14334
14480
  "maximum": 1,
14335
14481
  "minimum": 0
14336
14482
  },
@@ -14338,7 +14484,7 @@
14338
14484
  "type": "number",
14339
14485
  "maximum": 1,
14340
14486
  "minimum": 0,
14341
- "description": "A confidence score represented as number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.\n"
14487
+ "description": "A confidence score represented as a number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.\n"
14342
14488
  },
14343
14489
  "match_information": {
14344
14490
  "type": "string",
@@ -14423,7 +14569,7 @@
14423
14569
  ]
14424
14570
  },
14425
14571
  "count": {
14426
- "type": "number",
14572
+ "type": "integer",
14427
14573
  "description": "",
14428
14574
  "enum": [
14429
14575
  0
@@ -14619,11 +14765,7 @@
14619
14765
  ]
14620
14766
  },
14621
14767
  "result": {
14622
- "allOf": [
14623
- {
14624
- "$ref": "#/components/schemas/Address"
14625
- }
14626
- ]
14768
+ "$ref": "#/components/schemas/Address"
14627
14769
  }
14628
14770
  }
14629
14771
  },
@@ -15096,16 +15238,16 @@
15096
15238
  },
15097
15239
  "name": {
15098
15240
  "type": "string",
15099
- "example": "Qwerty Widgets Limited",
15241
+ "example": "Acme Inc",
15100
15242
  "description": "Licensee individual or organisation name"
15101
15243
  },
15102
15244
  "address": {
15103
- "example": "12 High Street, Manchester",
15245
+ "example": "1010 Cauthen Ln, Alamogordo, NM",
15104
15246
  "type": "string",
15105
15247
  "description": "Licensee's first, second and third line address as well as post town concatenated by commas"
15106
15248
  },
15107
15249
  "postcode": {
15108
- "example": "BR8 7RE",
15250
+ "example": "88310",
15109
15251
  "type": "string",
15110
15252
  "description": "Licensee's postcode"
15111
15253
  },
@@ -15137,7 +15279,7 @@
15137
15279
  "count": {
15138
15280
  "example": 232,
15139
15281
  "minimum": 0,
15140
- "type": "number",
15282
+ "type": "integer",
15141
15283
  "format": "int32",
15142
15284
  "description": "The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`"
15143
15285
  },
@@ -15201,16 +15343,16 @@
15201
15343
  "properties": {
15202
15344
  "name": {
15203
15345
  "type": "string",
15204
- "example": "Qwerty Widgets Limited",
15346
+ "example": "Acme Inc",
15205
15347
  "description": "Licensee individual or organisation name"
15206
15348
  },
15207
15349
  "address": {
15208
- "example": "12 High Street, Manchester",
15350
+ "example": "1010 Cauthen Ln, Alamogordo, NM",
15209
15351
  "type": "string",
15210
15352
  "description": "Licensee's first, second and third line address as well as post town concatenated by commas"
15211
15353
  },
15212
15354
  "postcode": {
15213
- "example": "BR8 7RE",
15355
+ "example": "88310",
15214
15356
  "type": "string",
15215
15357
  "description": "Licensee's postcode"
15216
15358
  },