@addresszen/openapi 4.1.1 → 4.3.0

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.1.1",
4
+ "version": "4.3.0",
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, 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/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",
@@ -198,12 +198,12 @@
198
198
  {
199
199
  "lang": "JavaScript",
200
200
  "label": "JavaScript",
201
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test');\n\nconst { result } = await response.json();\n"
201
+ "source": "import { createZenClient, keyAvailability } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await keyAvailability({\n client,\n path: { key: 'ak_test' },\n});\n"
202
202
  },
203
203
  {
204
204
  "lang": "Python",
205
205
  "label": "Python",
206
- "source": "import requests\n\nresponse = requests.get(\"https://api.addresszen.com/v1/keys/ak_test\")\nresult = response.json()[\"result\"]\n"
206
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.key_availability(\"ak_test\")\n"
207
207
  },
208
208
  {
209
209
  "lang": "Ruby",
@@ -286,12 +286,12 @@
286
286
  {
287
287
  "lang": "JavaScript",
288
288
  "label": "JavaScript",
289
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/details?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
289
+ "source": "import { createZenClient, keyDetails } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await keyDetails({\n client,\n path: { key: 'ak_test' },\n});\n"
290
290
  },
291
291
  {
292
292
  "lang": "Python",
293
293
  "label": "Python",
294
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/details\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
294
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.key_details(\"ak_test\", user_token=\"uk_secret\")\n"
295
295
  },
296
296
  {
297
297
  "lang": "Ruby",
@@ -310,7 +310,7 @@
310
310
  "Keys"
311
311
  ],
312
312
  "summary": "Update Details",
313
- "description": "Updates a key's settings and returns its private details. Only the fields you send change. A key on an unlimited plan ignores changes to `datasets`, `daily_limit` and `monthly_limit`.",
313
+ "description": "Updates a key's settings and returns its private details. Only the fields you send change. A key on an unlimited plan ignores changes to `datasets`, `daily_limit` and `monthly_limit`. Datasets set by your plan cannot be changed here: sending one with a different value returns a 400.",
314
314
  "operationId": "UpdateKeyDetails",
315
315
  "security": [
316
316
  {
@@ -371,27 +371,27 @@
371
371
  {
372
372
  "lang": "cURL",
373
373
  "label": "curl",
374
- "source": "curl -X PUT 'https://api.addresszen.com/v1/keys/ak_test/details?user_token=uk_secret' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My Updated Key\",\n \"daily_limit\": 1000,\n \"notifications\": {\n \"enabled\": true\n }\n }'\n"
374
+ "source": "curl -X PUT 'https://api.addresszen.com/v1/keys/ak_test/details?user_token=uk_secret' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My Updated Key\",\n \"daily_limit\": {\n \"limit\": 1000\n },\n \"notifications\": {\n \"enabled\": true\n }\n }'\n"
375
375
  },
376
376
  {
377
377
  "lang": "JavaScript",
378
378
  "label": "JavaScript",
379
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/details?user_token=uk_secret', {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n name: 'My Updated Key',\n daily_limit: 1000,\n notifications: {\n enabled: true,\n },\n }),\n});\n\nconst { result } = await response.json();\n"
379
+ "source": "import { createZenClient, updateKeyDetails } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await updateKeyDetails({\n client,\n path: { key: 'ak_test' },\n body: {\n name: 'My Updated Key',\n daily_limit: {\n limit: 1000,\n },\n notifications: {\n enabled: true,\n },\n },\n});\n"
380
380
  },
381
381
  {
382
382
  "lang": "Python",
383
383
  "label": "Python",
384
- "source": "import requests\n\nresponse = requests.put(\n \"https://api.addresszen.com/v1/keys/ak_test/details\",\n params={\"user_token\": \"uk_secret\"},\n json={\n \"name\": \"My Updated Key\",\n \"daily_limit\": 1000,\n \"notifications\": {\n \"enabled\": True,\n },\n },\n)\nresult = response.json()[\"result\"]\n"
384
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.update_key_details(\n \"ak_test\",\n user_token=\"uk_secret\",\n name=\"My Updated Key\",\n daily_limit={\"limit\": 1000},\n notifications={\"enabled\": True},\n )\n"
385
385
  },
386
386
  {
387
387
  "lang": "Ruby",
388
388
  "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: 1000,\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"
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"
390
390
  },
391
391
  {
392
392
  "lang": "PHP",
393
393
  "label": "PHP",
394
- "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\" => 1000,\n \"notifications\" => [\n \"enabled\" => true,\n ],\n ]),\n CURLOPT_RETURNTRANSFER => true,\n]);\n$result = json_decode(curl_exec($ch), true)[\"result\"];\n"
394
+ "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"
395
395
  }
396
396
  ]
397
397
  }
@@ -465,12 +465,12 @@
465
465
  {
466
466
  "lang": "JavaScript",
467
467
  "label": "JavaScript",
468
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/usage?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
468
+ "source": "import { createZenClient, keyUsage } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await keyUsage({\n client,\n path: { key: 'ak_test' },\n});\n"
469
469
  },
470
470
  {
471
471
  "lang": "Python",
472
472
  "label": "Python",
473
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/usage\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
473
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.key_usage(\"ak_test\", user_token=\"uk_secret\")\n"
474
474
  },
475
475
  {
476
476
  "lang": "Ruby",
@@ -492,7 +492,7 @@
492
492
  ],
493
493
  "summary": "Logs (CSV)",
494
494
  "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",
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 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
496
  "security": [
497
497
  {
498
498
  "ManagementKey": []
@@ -553,12 +553,12 @@
553
553
  {
554
554
  "lang": "JavaScript",
555
555
  "label": "JavaScript",
556
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/lookups?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
556
+ "source": "import { createZenClient, keyLogs } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data: csv } = await keyLogs({\n client,\n path: { key: 'ak_test' },\n});\n"
557
557
  },
558
558
  {
559
559
  "lang": "Python",
560
560
  "label": "Python",
561
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/lookups\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
561
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.key_logs(\"ak_test\", user_token=\"uk_secret\")\n"
562
562
  },
563
563
  {
564
564
  "lang": "Ruby",
@@ -579,7 +579,7 @@
579
579
  "Address Search"
580
580
  ],
581
581
  "summary": "Verify Address",
582
- "description": "Verifies an address against the USPS Coding Accuracy Support System (CASS) and returns it standardized and corrected.\n\nSubmit the whole address in `query`, or the first address line in `query` with either `zip_code`, or `city` and `state`. A freeform `query` is parsed into those components before the search runs.\n\nA match returns the standardized address lines, city, state and ZIP+4, scored by `fit` and `confidence`. It also carries the CASS record behind the match: delivery point, DPV flags, carrier route, eLOT, county, congressional district, RDI, time zone and coordinates. No match returns `200` with a `count` of `0`, a `null` `match` and empty address fields.\n\nOnly a match draws on your balance. A key without address verification enabled returns `401`. A verification still running after 9.5 seconds aborts with `429`.\n\n## Countries\n\nVerify defaults to the United States, where it is CASS certified. Pass `context` with an ISO 3166-1 alpha-3 country code to verify an address elsewhere, e.g. `context=GBR` or `context=FRA`. The address datasets your key is licensed for decide which countries it can verify.\n\nOutside the United States there is no CASS record to return, so `match` carries the standardized address from that country's dataset instead. The top-level fields (`address_line_one`, `city`, `state`, `zip_code`, `country_iso_2`) are populated for every country, along with `confidence` and `fit`.\n",
582
+ "description": "Verifies an address against the USPS Coding Accuracy Support System (CASS) and returns it standardized and corrected.\n\nSubmit the whole address in `query`, or the first address line in `query` with either `zip_code`, or `city` and `state`. A freeform `query` is parsed into those components before the search runs.\n\nA match returns the standardized address lines, city, state and ZIP+4, scored by `fit` and `confidence`. It also carries the CASS record behind the match: delivery point, DPV flags, carrier route, eLOT, county, congressional district, RDI, time zone and coordinates. CASS corrects what it can, so an address with the wrong city or state for its ZIP code still verifies, with the corrected values.\n\nAn address that cannot be verified returns `200` with a `count` of `0`, a `null` `match` and empty address fields. `match_information` says why, e.g. `Address not found` or `House number not valid for this street`. It is for people to read and its wording may change, so test `match` for `null` rather than parsing it.\n\nIn the United States every verification the CASS engine answers draws on your balance, matched or not. A query that cannot be parsed into an address does not. Elsewhere only a match draws on your balance. A key without address verification enabled returns `401`. A verification still running after 9.5 seconds aborts with `429`.\n\n## Countries\n\nVerify defaults to the United States, where it is CASS certified. Pass `context` with an ISO 3166-1 alpha-3 country code to verify an address elsewhere, e.g. `context=GBR` or `context=FRA`. The address datasets your key is licensed for decide which countries it can verify.\n\nOutside the United States there is no CASS record, so `match` is the address in the same format Retrieve Address returns: USPS-style field names, empty strings where the country has no equivalent, and the raw dataset record in `native`. Check `dataset` to tell the two apart: it is present on every non-US match and absent from a CASS match.\n\nThe top-level fields (`address_line_one`, `address_line_two`, `city`, `state`, `zip_code`, `country_iso_2`) are populated for every country, along with `confidence` and `fit`.\n",
583
583
  "operationId": "AddressVerify",
584
584
  "security": [
585
585
  {
@@ -593,6 +593,9 @@
593
593
  {
594
594
  "$ref": "#/components/parameters/TagsParam"
595
595
  },
596
+ {
597
+ "$ref": "#/components/parameters/RemoveFirmParam"
598
+ },
596
599
  {
597
600
  "name": "context",
598
601
  "in": "query",
@@ -630,7 +633,7 @@
630
633
  },
631
634
  "state": {
632
635
  "type": "string",
633
- "description": "State of an address. For the US, use the 2 letter state abbreviation.\n",
636
+ "description": "State of an address. For the US, use the 2-letter state abbreviation.\n",
634
637
  "example": "CO"
635
638
  }
636
639
  }
@@ -669,12 +672,12 @@
669
672
  {
670
673
  "lang": "JavaScript",
671
674
  "label": "JavaScript",
672
- "source": "const response = await fetch('https://api.addresszen.com/v1/verify/addresses', {\n method: 'POST',\n headers: {\n 'Authorization': 'api_key=\"ak_test\"',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n query: '123 Main St, Springfield, IL 62701',\n }),\n});\n\nconst { result } = await response.json();\n"
675
+ "source": "import { createZenClient, addressVerify } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await addressVerify({\n client,\n body: {\n query: '123 Main St, Springfield, IL 62701',\n },\n});\n"
673
676
  },
674
677
  {
675
678
  "lang": "Python",
676
679
  "label": "Python",
677
- "source": "import requests\n\nresponse = requests.post(\n \"https://api.addresszen.com/v1/verify/addresses\",\n headers={\"Authorization\": 'api_key=\"ak_test\"'},\n json={\n \"query\": \"123 Main St, Springfield, IL 62701\",\n },\n)\nresult = response.json()[\"result\"]\n"
680
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.address_verify(query=\"123 Main St, Springfield, IL 62701\")\n"
678
681
  },
679
682
  {
680
683
  "lang": "Ruby",
@@ -695,7 +698,7 @@
695
698
  "Address Search"
696
699
  ],
697
700
  "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",
701
+ "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
702
  "operationId": "FindAddress",
700
703
  "security": [
701
704
  {
@@ -901,12 +904,17 @@
901
904
  {
902
905
  "lang": "JavaScript",
903
906
  "label": "JavaScript",
904
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/autocomplete/addresses?' +\n new URLSearchParams({\n api_key: 'ak_test',\n query: '1600 Pennsylvania',\n })\n);\n\nconst { result } = await response.json();\n"
907
+ "source": "import { createZenClient } from '@addresszen/sdk';\nimport { createAutocomplete } from '@addresszen/sdk/autocomplete';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\n// Debounces keystrokes, drops superseded requests and caches suggestions\nconst autocomplete = createAutocomplete({ client });\n\nconst hits = await autocomplete.find({ query: '1600 Pennsylvania' });\nif (hits?.length) {\n const address = await autocomplete.retrieve({ hit: hits[0] });\n}\n"
908
+ },
909
+ {
910
+ "lang": "JavaScript",
911
+ "label": "JavaScript (direct)",
912
+ "source": "import { createZenClient, findAddress } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await findAddress({\n client,\n query: { query: '1600 Pennsylvania' },\n});\n"
905
913
  },
906
914
  {
907
915
  "lang": "Python",
908
916
  "label": "Python",
909
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/autocomplete/addresses\",\n params={\n \"api_key\": \"ak_test\",\n \"query\": \"1600 Pennsylvania\",\n },\n)\nresult = response.json()[\"result\"]\n"
917
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.find_address(query=\"1600 Pennsylvania\")\n"
910
918
  },
911
919
  {
912
920
  "lang": "Ruby",
@@ -958,6 +966,9 @@
958
966
  },
959
967
  {
960
968
  "$ref": "#/components/parameters/TagsParam"
969
+ },
970
+ {
971
+ "$ref": "#/components/parameters/RemoveFirmParam"
961
972
  }
962
973
  ],
963
974
  "responses": {
@@ -1007,12 +1018,17 @@
1007
1018
  {
1008
1019
  "lang": "JavaScript",
1009
1020
  "label": "JavaScript",
1010
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/autocomplete/addresses/usps_V118834572%7C310%7C%7C3191/usa?' +\n new URLSearchParams({\n api_key: 'ak_test',\n })\n);\n\nconst { result } = await response.json();\n"
1021
+ "source": "import { createZenClient } from '@addresszen/sdk';\nimport { createAutocomplete } from '@addresszen/sdk/autocomplete';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\n// Debounces keystrokes, drops superseded requests and caches suggestions\nconst autocomplete = createAutocomplete({ client });\n\nconst hits = await autocomplete.find({ query: '1600 Pennsylvania' });\nif (hits?.length) {\n const address = await autocomplete.retrieve({ hit: hits[0] });\n}\n"
1022
+ },
1023
+ {
1024
+ "lang": "JavaScript",
1025
+ "label": "JavaScript (direct)",
1026
+ "source": "import { createZenClient, retrieveAddress } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await retrieveAddress({\n client,\n path: { address: 'usps_V118834572|310||3191' },\n});\n"
1011
1027
  },
1012
1028
  {
1013
1029
  "lang": "Python",
1014
1030
  "label": "Python",
1015
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/autocomplete/addresses/usps_V118834572%7C310%7C%7C3191/usa\",\n params={\n \"api_key\": \"ak_test\",\n },\n)\nresult = response.json()[\"result\"]\n"
1031
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.retrieve_address(\"usps_V118834572|310||3191\")\n"
1016
1032
  },
1017
1033
  {
1018
1034
  "lang": "Ruby",
@@ -1157,12 +1173,12 @@
1157
1173
  {
1158
1174
  "lang": "JavaScript",
1159
1175
  "label": "JavaScript",
1160
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/places?' +\n new URLSearchParams({\n api_key: 'ak_test',\n query: 'london',\n })\n);\n\nconst { result } = await response.json();\n"
1176
+ "source": "import { createZenClient, findPlace } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await findPlace({\n client,\n query: { query: 'london' },\n});\n"
1161
1177
  },
1162
1178
  {
1163
1179
  "lang": "Python",
1164
1180
  "label": "Python",
1165
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/places\",\n params={\n \"api_key\": \"ak_test\",\n \"query\": \"london\",\n },\n)\nresult = response.json()[\"result\"]\n"
1181
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.find_place(query=\"london\")\n"
1166
1182
  },
1167
1183
  {
1168
1184
  "lang": "Ruby",
@@ -1403,32 +1419,32 @@
1403
1419
  {
1404
1420
  "lang": "http",
1405
1421
  "label": "URL",
1406
- "source": "https://api.addresszen.com/v1/places/geonames_5353?api_key=ak_test\n"
1422
+ "source": "https://api.addresszen.com/v1/places/geonames_2643743?api_key=ak_test\n"
1407
1423
  },
1408
1424
  {
1409
1425
  "lang": "cURL",
1410
1426
  "label": "curl",
1411
- "source": "curl -G 'https://api.addresszen.com/v1/places/geonames_5353' \\\n -d 'api_key=ak_test'\n"
1427
+ "source": "curl -G 'https://api.addresszen.com/v1/places/geonames_2643743' \\\n -d 'api_key=ak_test'\n"
1412
1428
  },
1413
1429
  {
1414
1430
  "lang": "JavaScript",
1415
1431
  "label": "JavaScript",
1416
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/places/geonames_5353?' +\n new URLSearchParams({\n api_key: 'ak_test',\n })\n);\n\nconst { result } = await response.json();\n"
1432
+ "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"
1417
1433
  },
1418
1434
  {
1419
1435
  "lang": "Python",
1420
1436
  "label": "Python",
1421
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/places/geonames_5353\",\n params={\n \"api_key\": \"ak_test\",\n },\n)\nresult = response.json()[\"result\"]\n"
1437
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.resolve_place(\"geonames_2643743\")\n"
1422
1438
  },
1423
1439
  {
1424
1440
  "lang": "Ruby",
1425
1441
  "label": "Ruby",
1426
- "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"
1442
+ "source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/places/geonames_2643743\")\nuri.query = URI.encode_www_form(api_key: \"ak_test\")\nresult = JSON.parse(Net::HTTP.get(uri))[\"result\"]\n"
1427
1443
  },
1428
1444
  {
1429
1445
  "lang": "PHP",
1430
1446
  "label": "PHP",
1431
- "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"
1447
+ "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"
1432
1448
  }
1433
1449
  ]
1434
1450
  }
@@ -1453,12 +1469,11 @@
1453
1469
  {
1454
1470
  "name": "starting_after",
1455
1471
  "in": "query",
1456
- "description": "ID of the licensee after which to list results",
1472
+ "description": "ID of the licensee after which to list results. Pass the `id` of the last licensee on the previous page.",
1457
1473
  "style": "form",
1458
1474
  "explode": false,
1459
1475
  "schema": {
1460
- "type": "integer",
1461
- "format": "int32"
1476
+ "type": "string"
1462
1477
  }
1463
1478
  },
1464
1479
  {
@@ -1514,12 +1529,12 @@
1514
1529
  {
1515
1530
  "lang": "JavaScript",
1516
1531
  "label": "JavaScript",
1517
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/licensees?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
1532
+ "source": "import { createZenClient, listLicensees } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await listLicensees({\n client,\n path: { key: 'ak_test' },\n});\n"
1518
1533
  },
1519
1534
  {
1520
1535
  "lang": "Python",
1521
1536
  "label": "Python",
1522
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
1537
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.list_licensees(\"ak_test\", user_token=\"uk_secret\")\n"
1523
1538
  },
1524
1539
  {
1525
1540
  "lang": "Ruby",
@@ -1594,12 +1609,12 @@
1594
1609
  {
1595
1610
  "lang": "JavaScript",
1596
1611
  "label": "JavaScript",
1597
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/licensees?user_token=uk_secret', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\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\nconst { result } = await response.json();\n"
1612
+ "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"
1598
1613
  },
1599
1614
  {
1600
1615
  "lang": "Python",
1601
1616
  "label": "Python",
1602
- "source": "import requests\n\nresponse = requests.post(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees\",\n params={\"user_token\": \"uk_secret\"},\n json={\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)\nresult = response.json()[\"result\"]\n"
1617
+ "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"
1603
1618
  },
1604
1619
  {
1605
1620
  "lang": "Ruby",
@@ -1675,12 +1690,12 @@
1675
1690
  {
1676
1691
  "lang": "JavaScript",
1677
1692
  "label": "JavaScript",
1678
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
1693
+ "source": "import { createZenClient, retrieveLicensee } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await retrieveLicensee({\n client,\n path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },\n});\n"
1679
1694
  },
1680
1695
  {
1681
1696
  "lang": "Python",
1682
1697
  "label": "Python",
1683
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
1698
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.retrieve_licensee(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\", user_token=\"uk_secret\")\n"
1684
1699
  },
1685
1700
  {
1686
1701
  "lang": "Ruby",
@@ -1738,7 +1753,7 @@
1738
1753
  ],
1739
1754
  "properties": {
1740
1755
  "deleted": {
1741
- "type": "number",
1756
+ "type": "integer",
1742
1757
  "format": "int32",
1743
1758
  "example": 1,
1744
1759
  "minimum": 0
@@ -1783,12 +1798,12 @@
1783
1798
  {
1784
1799
  "lang": "JavaScript",
1785
1800
  "label": "JavaScript",
1786
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?user_token=uk_secret', {\n method: 'DELETE',\n});\n"
1801
+ "source": "import { createZenClient, deleteLicensee } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await deleteLicensee({\n client,\n path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },\n});\n"
1787
1802
  },
1788
1803
  {
1789
1804
  "lang": "Python",
1790
1805
  "label": "Python",
1791
- "source": "import requests\n\nresponse = requests.delete(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94\",\n params={\"user_token\": \"uk_secret\"},\n)\nresponse.raise_for_status()\n"
1806
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.delete_licensee(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\", user_token=\"uk_secret\")\n"
1792
1807
  },
1793
1808
  {
1794
1809
  "lang": "Ruby",
@@ -1866,12 +1881,12 @@
1866
1881
  {
1867
1882
  "lang": "JavaScript",
1868
1883
  "label": "JavaScript",
1869
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?user_token=uk_secret', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n daily: {\n limit: 20000,\n },\n }),\n});\n\nconst { result } = await response.json();\n"
1884
+ "source": "import { createZenClient, updateLicensee } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await updateLicensee({\n client,\n path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },\n body: {\n daily: {\n limit: 20000,\n },\n },\n});\n"
1870
1885
  },
1871
1886
  {
1872
1887
  "lang": "Python",
1873
1888
  "label": "Python",
1874
- "source": "import requests\n\nresponse = requests.post(\n \"https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94\",\n params={\"user_token\": \"uk_secret\"},\n json={\n \"daily\": {\n \"limit\": 20000,\n },\n },\n)\nresult = response.json()[\"result\"]\n"
1889
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.update_licensee(\n \"ak_test\",\n \"sl_ijoiqsxeQgXW2gkiE0X94\",\n user_token=\"uk_secret\",\n daily={\"limit\": 20000},\n )\n"
1875
1890
  },
1876
1891
  {
1877
1892
  "lang": "Ruby",
@@ -1931,7 +1946,34 @@
1931
1946
  }
1932
1947
  }
1933
1948
  }
1934
- }
1949
+ },
1950
+ "x-codeSamples": [
1951
+ {
1952
+ "lang": "cURL",
1953
+ "label": "curl",
1954
+ "source": "curl -X POST 'https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94/regenerate-key?user_token=uk_secret'\n"
1955
+ },
1956
+ {
1957
+ "lang": "JavaScript",
1958
+ "label": "JavaScript",
1959
+ "source": "import { createZenClient, regenerateLicenseeKey } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await regenerateLicenseeKey({\n client,\n path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },\n});\n"
1960
+ },
1961
+ {
1962
+ "lang": "Python",
1963
+ "label": "Python",
1964
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.regenerate_licensee_key(\"ak_test\", \"sl_ijoiqsxeQgXW2gkiE0X94\", user_token=\"uk_secret\")\n"
1965
+ },
1966
+ {
1967
+ "lang": "Ruby",
1968
+ "label": "Ruby",
1969
+ "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"
1970
+ },
1971
+ {
1972
+ "lang": "PHP",
1973
+ "label": "PHP",
1974
+ "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"
1975
+ }
1976
+ ]
1935
1977
  }
1936
1978
  },
1937
1979
  "/keys/{key}/configs": {
@@ -1991,12 +2033,12 @@
1991
2033
  {
1992
2034
  "lang": "JavaScript",
1993
2035
  "label": "JavaScript",
1994
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/configs?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
2036
+ "source": "import { createZenClient, listConfigs } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await listConfigs({\n client,\n path: { key: 'ak_test' },\n});\n"
1995
2037
  },
1996
2038
  {
1997
2039
  "lang": "Python",
1998
2040
  "label": "Python",
1999
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/configs\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
2041
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.list_configs(\"ak_test\", user_token=\"uk_secret\")\n"
2000
2042
  },
2001
2043
  {
2002
2044
  "lang": "Ruby",
@@ -2071,12 +2113,12 @@
2071
2113
  {
2072
2114
  "lang": "JavaScript",
2073
2115
  "label": "JavaScript",
2074
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/configs?user_token=uk_secret', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n name: 'woocommerce',\n payload: '{\"removeOrganisation\": false}',\n }),\n});\n\nconst { result } = await response.json();\n"
2116
+ "source": "import { createZenClient, createConfig } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await createConfig({\n client,\n path: { key: 'ak_test' },\n body: {\n name: 'woocommerce',\n payload: '{\"removeOrganisation\": false}',\n },\n});\n"
2075
2117
  },
2076
2118
  {
2077
2119
  "lang": "Python",
2078
2120
  "label": "Python",
2079
- "source": "import requests\n\nresponse = requests.post(\n \"https://api.addresszen.com/v1/keys/ak_test/configs\",\n params={\"user_token\": \"uk_secret\"},\n json={\n \"name\": \"woocommerce\",\n \"payload\": \"{\\\"removeOrganisation\\\": false}\",\n },\n)\nresult = response.json()[\"result\"]\n"
2121
+ "source": "# pip install addresszen\nimport json\n\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.create_config(\n \"ak_test\",\n user_token=\"uk_secret\",\n name=\"woocommerce\",\n payload=json.dumps({\"removeOrganisation\": False}),\n )\n"
2080
2122
  },
2081
2123
  {
2082
2124
  "lang": "Ruby",
@@ -2154,12 +2196,12 @@
2154
2196
  {
2155
2197
  "lang": "JavaScript",
2156
2198
  "label": "JavaScript",
2157
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?' +\n new URLSearchParams({\n user_token: 'uk_secret',\n })\n);\n\nconst { result } = await response.json();\n"
2199
+ "source": "import { createZenClient, retrieveConfig } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await retrieveConfig({\n client,\n path: { key: 'ak_test', config: 'woocommerce' },\n});\n"
2158
2200
  },
2159
2201
  {
2160
2202
  "lang": "Python",
2161
2203
  "label": "Python",
2162
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce\",\n params={\n \"user_token\": \"uk_secret\",\n },\n)\nresult = response.json()[\"result\"]\n"
2204
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.retrieve_config(\"ak_test\", \"woocommerce\")\n"
2163
2205
  },
2164
2206
  {
2165
2207
  "lang": "Ruby",
@@ -2217,7 +2259,7 @@
2217
2259
  ],
2218
2260
  "properties": {
2219
2261
  "deleted": {
2220
- "type": "number",
2262
+ "type": "integer",
2221
2263
  "format": "int32",
2222
2264
  "example": 1,
2223
2265
  "minimum": 0
@@ -2272,12 +2314,12 @@
2272
2314
  {
2273
2315
  "lang": "JavaScript",
2274
2316
  "label": "JavaScript",
2275
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret', {\n method: 'DELETE',\n});\n"
2317
+ "source": "import { createZenClient, deleteConfig } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await deleteConfig({\n client,\n path: { key: 'ak_test', config: 'woocommerce' },\n});\n"
2276
2318
  },
2277
2319
  {
2278
2320
  "lang": "Python",
2279
2321
  "label": "Python",
2280
- "source": "import requests\n\nresponse = requests.delete(\n \"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce\",\n params={\"user_token\": \"uk_secret\"},\n)\nresponse.raise_for_status()\n"
2322
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.delete_config(\"ak_test\", \"woocommerce\", user_token=\"uk_secret\")\n"
2281
2323
  },
2282
2324
  {
2283
2325
  "lang": "Ruby",
@@ -2365,12 +2407,12 @@
2365
2407
  {
2366
2408
  "lang": "JavaScript",
2367
2409
  "label": "JavaScript",
2368
- "source": "const response = await fetch('https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n payload: '{\"removeOrganisation\": true}',\n }),\n});\n\nconst { result } = await response.json();\n"
2410
+ "source": "import { createZenClient, updateConfig } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });\n\nconst { data } = await updateConfig({\n client,\n path: { key: 'ak_test', config: 'woocommerce' },\n body: {\n payload: '{\"removeOrganisation\": true}',\n },\n});\n"
2369
2411
  },
2370
2412
  {
2371
2413
  "lang": "Python",
2372
2414
  "label": "Python",
2373
- "source": "import requests\n\nresponse = requests.post(\n \"https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce\",\n params={\"user_token\": \"uk_secret\"},\n json={\n \"payload\": \"{\\\"removeOrganisation\\\": true}\",\n },\n)\nresult = response.json()[\"result\"]\n"
2415
+ "source": "# pip install addresszen\nimport json\n\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.update_config(\n \"ak_test\",\n \"woocommerce\",\n user_token=\"uk_secret\",\n payload=json.dumps({\"removeOrganisation\": True}),\n )\n"
2374
2416
  },
2375
2417
  {
2376
2418
  "lang": "Ruby",
@@ -2471,12 +2513,12 @@
2471
2513
  {
2472
2514
  "lang": "JavaScript",
2473
2515
  "label": "JavaScript",
2474
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/emails?' +\n new URLSearchParams({\n api_key: 'ak_test',\n query: 'foo@domain.com',\n })\n);\n\nconst { result } = await response.json();\n"
2516
+ "source": "import { createZenClient, emailValidation } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await emailValidation({\n client,\n query: { query: 'foo@domain.com' },\n});\n"
2475
2517
  },
2476
2518
  {
2477
2519
  "lang": "Python",
2478
2520
  "label": "Python",
2479
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/emails\",\n params={\n \"api_key\": \"ak_test\",\n \"query\": \"foo@domain.com\",\n },\n)\nresult = response.json()[\"result\"]\n"
2521
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.email_validation(query=\"foo@domain.com\")\n"
2480
2522
  },
2481
2523
  {
2482
2524
  "lang": "Ruby",
@@ -2602,12 +2644,12 @@
2602
2644
  {
2603
2645
  "lang": "JavaScript",
2604
2646
  "label": "JavaScript",
2605
- "source": "const response = await fetch(\n 'https://api.addresszen.com/v1/phone_numbers?' +\n new URLSearchParams({\n api_key: 'ak_test',\n query: '02071128019',\n })\n);\n\nconst { result } = await response.json();\n"
2647
+ "source": "import { createZenClient, phoneNumberValidation } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await phoneNumberValidation({\n client,\n query: { query: '02071128019' },\n});\n"
2606
2648
  },
2607
2649
  {
2608
2650
  "lang": "Python",
2609
2651
  "label": "Python",
2610
- "source": "import requests\n\nresponse = requests.get(\n \"https://api.addresszen.com/v1/phone_numbers\",\n params={\n \"api_key\": \"ak_test\",\n \"query\": \"02071128019\",\n },\n)\nresult = response.json()[\"result\"]\n"
2652
+ "source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.phone_number_validation(query=\"02071128019\")\n"
2611
2653
  },
2612
2654
  {
2613
2655
  "lang": "Ruby",
@@ -2825,7 +2867,7 @@
2825
2867
  "properties": {
2826
2868
  "user_token": {
2827
2869
  "type": "string",
2828
- "description": "User-level token used to manage account resources via the api."
2870
+ "description": "User-level token used to manage account resources via the API."
2829
2871
  },
2830
2872
  "test_api_key": {
2831
2873
  "type": "string",
@@ -2833,7 +2875,7 @@
2833
2875
  },
2834
2876
  "user_id": {
2835
2877
  "type": "string",
2836
- "description": "Internal api user id."
2878
+ "description": "Internal API user id."
2837
2879
  }
2838
2880
  }
2839
2881
  }
@@ -2974,7 +3016,7 @@
2974
3016
  "type": "string"
2975
3017
  },
2976
3018
  "example": "ak_test",
2977
- "description": "**API Key**\n\nThe API Key to retrieve. Begins `ak_`.\n"
3019
+ "description": "**API Key**\n\nThe API Key. Begins `ak_`.\n"
2978
3020
  },
2979
3021
  "UserTokenParam": {
2980
3022
  "in": "query",
@@ -2984,7 +3026,7 @@
2984
3026
  "type": "string"
2985
3027
  },
2986
3028
  "name": "user_token",
2987
- "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 the `Authorization: Bearer uk_...` header.\n",
3029
+ "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",
2988
3030
  "example": "uk_B59ScW1p1HHouf1VqclEPZUx"
2989
3031
  },
2990
3032
  "StartParam": {
@@ -3045,6 +3087,20 @@
3045
3087
  },
3046
3088
  "style": "form"
3047
3089
  },
3090
+ "RemoveFirmParam": {
3091
+ "name": "remove_firm",
3092
+ "in": "query",
3093
+ "style": "form",
3094
+ "explode": false,
3095
+ "required": false,
3096
+ "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",
3097
+ "schema": {
3098
+ "type": "string",
3099
+ "enum": [
3100
+ "true"
3101
+ ]
3102
+ }
3103
+ },
3048
3104
  "DatasetParam": {
3049
3105
  "name": "dataset",
3050
3106
  "in": "query",
@@ -3057,7 +3113,9 @@
3057
3113
  }
3058
3114
  },
3059
3115
  "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",
3060
- "example": "usps"
3116
+ "example": [
3117
+ "usps"
3118
+ ]
3061
3119
  },
3062
3120
  "ContextParam": {
3063
3121
  "name": "context",
@@ -3440,7 +3498,7 @@
3440
3498
  ]
3441
3499
  },
3442
3500
  "available": {
3443
- "description": "Determines whether the key can be used by the requesting agent. \n\nReturns false if one of the following conditions is met:\n - Key has no lookups remaining\n - Daily limit has been reached on the key\n - Daily individual limit has been reached\n - Key is not being used via an authorised URL\n - (Sublicensed key only) Key has a valid licensee attached\n - (Sublicensed key only) Key is not being used via an authorised URL specified by licensee\n",
3501
+ "description": "Determines whether the key can be used by the requesting agent. \n\nReturns false if one of the following conditions is met:\n - Key has no lookups remaining\n - Daily limit has been reached on the key\n - Daily individual limit has been reached\n - Key is not being used via an authorised URL\n - (Sublicensed key only) Key has no valid licensee attached\n - (Sublicensed key only) Key is not being used via an authorised URL specified by licensee\n",
3444
3502
  "type": "boolean",
3445
3503
  "example": true
3446
3504
  }
@@ -4028,7 +4086,7 @@
4028
4086
  "x-nullable": true,
4029
4087
  "nullable": true,
4030
4088
  "type": "integer",
4031
- "description": "`number` or `null` Limit set on the number of lookups that can be\nperformed from a single IP address. `null` means the limit is currently\ndisabled.",
4089
+ "description": "`number` or `null`. Limit set on the number of lookups that can be\nperformed from a single IP address. `null` means the limit is currently\ndisabled.",
4032
4090
  "format": "int32"
4033
4091
  }
4034
4092
  }
@@ -4092,7 +4150,7 @@
4092
4150
  },
4093
4151
  "datasets": {
4094
4152
  "title": "API Key Dataset Availability",
4095
- "description": "Indicates which datasets are available and added by default to the address responses",
4153
+ "description": "Datasets you can switch on or off for this key. Datasets set by your plan (`paf`, `mr`, `nyb`, `ecad`, `ecaf`) cannot be changed here: sending one with a different value returns a 400.",
4096
4154
  "type": "object",
4097
4155
  "properties": {
4098
4156
  "pafa": {
@@ -4415,7 +4473,7 @@
4415
4473
  },
4416
4474
  "check_digit": {
4417
4475
  "type": "string",
4418
- "description": "Character following the 5 or 9 digit ZIP Code. Part of the 11-digit barcode\n"
4476
+ "description": "Character following the 5-digit or 9-digit ZIP Code. Part of the 11-digit barcode\n"
4419
4477
  },
4420
4478
  "city": {
4421
4479
  "type": "string",
@@ -4431,7 +4489,7 @@
4431
4489
  },
4432
4490
  "country_code": {
4433
4491
  "type": "string",
4434
- "description": "ISO3166 country code. Empty string if not present\n"
4492
+ "description": "ISO 3166 country code. Empty string if not present\n"
4435
4493
  },
4436
4494
  "county": {
4437
4495
  "type": "string",
@@ -4471,7 +4529,7 @@
4471
4529
  },
4472
4530
  "dpv_no_stat": {
4473
4531
  "type": "string",
4474
- "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",
4532
+ "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",
4475
4533
  "enum": [
4476
4534
  "Y",
4477
4535
  "N",
@@ -4555,7 +4613,7 @@
4555
4613
  },
4556
4614
  "parsed_pmb_number": {
4557
4615
  "type": "string",
4558
- "description": "Information if a Private Mail Box (PMB) is found in an address. Empty string if not present\n"
4616
+ "description": "Private Mail Box (PMB) number, if one is found in an address. Empty string if not present\n"
4559
4617
  },
4560
4618
  "parsed_post_directional": {
4561
4619
  "type": "string",
@@ -4679,250 +4737,10 @@
4679
4737
  "zip_code": "88310-5631"
4680
4738
  }
4681
4739
  },
4682
- "UsaVerifyMatch": {
4683
- "title": "Address Match",
4684
- "type": "object",
4685
- "required": [
4686
- "query",
4687
- "query_city",
4688
- "query_state",
4689
- "query_zip_code",
4690
- "match",
4691
- "count",
4692
- "fit",
4693
- "confidence",
4694
- "match_information",
4695
- "address_line_one",
4696
- "address_line_two",
4697
- "city",
4698
- "state",
4699
- "zip_code",
4700
- "country_iso_2"
4701
- ],
4702
- "properties": {
4703
- "query": {
4704
- "type": "string",
4705
- "description": "Submitted query"
4706
- },
4707
- "query_city": {
4708
- "type": "string",
4709
- "description": "Submitted city"
4710
- },
4711
- "query_state": {
4712
- "type": "string",
4713
- "description": "Submitted state"
4714
- },
4715
- "query_zip_code": {
4716
- "type": "string",
4717
- "description": "Submitted zip_code"
4718
- },
4719
- "match": {
4720
- "description": "Nearest matching address",
4721
- "allOf": [
4722
- {
4723
- "$ref": "#/components/schemas/UsaCassVerifiedAddress"
4724
- }
4725
- ]
4726
- },
4727
- "count": {
4728
- "type": "number",
4729
- "description": "The number of addresses we matched to the input. We return the closest match by default.\n",
4730
- "maximum": 10,
4731
- "minimum": 0
4732
- },
4733
- "fit": {
4734
- "type": "number",
4735
- "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",
4736
- "maximum": 1,
4737
- "minimum": 0
4738
- },
4739
- "confidence": {
4740
- "type": "number",
4741
- "maximum": 1,
4742
- "minimum": 0,
4743
- "description": "A confidence score represented as number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.\n"
4744
- },
4745
- "match_information": {
4746
- "type": "string",
4747
- "description": "Additional information about the match.\n\nThis information is for human consumption and may not be present in all responses.\n",
4748
- "example": "Single Response - The delivery address was found in the National Database and no further information was required."
4749
- },
4750
- "address_line_one": {
4751
- "type": "string",
4752
- "description": "Primary delivery address\n",
4753
- "example": "123 Main St"
4754
- },
4755
- "address_line_two": {
4756
- "type": "string",
4757
- "description": "Secondary address information\n",
4758
- "example": ""
4759
- },
4760
- "city": {
4761
- "type": "string",
4762
- "description": "City name\n",
4763
- "example": "Springfield"
4764
- },
4765
- "state": {
4766
- "type": "string",
4767
- "description": "State name\n",
4768
- "example": "CO"
4769
- },
4770
- "zip_code": {
4771
- "type": "string",
4772
- "description": "Zip code\n",
4773
- "example": "81073-1119"
4774
- },
4775
- "country_iso_2": {
4776
- "type": "string",
4777
- "description": "2 letter ISO country code\n",
4778
- "example": "US"
4779
- }
4780
- }
4781
- },
4782
- "UsaVerifyNoMatch": {
4783
- "type": "object",
4784
- "title": "No Address Match",
4785
- "required": [
4786
- "query",
4787
- "query_city",
4788
- "query_state",
4789
- "query_zip_code",
4790
- "match",
4791
- "count",
4792
- "fit",
4793
- "confidence",
4794
- "address_line_one",
4795
- "address_line_two",
4796
- "city",
4797
- "state",
4798
- "zip_code",
4799
- "country_iso_2"
4800
- ],
4801
- "properties": {
4802
- "query": {
4803
- "type": "string",
4804
- "description": "Originally submitted query"
4805
- },
4806
- "query_city": {
4807
- "type": "string",
4808
- "description": "Originally submitted city"
4809
- },
4810
- "query_state": {
4811
- "type": "string",
4812
- "description": "Originally submitted state"
4813
- },
4814
- "query_zip_code": {
4815
- "type": "string",
4816
- "description": "Originally submitted zip_code"
4817
- },
4818
- "match": {
4819
- "description": "Nearest matching address",
4820
- "type": "object",
4821
- "nullable": true,
4822
- "enum": [
4823
- null
4824
- ]
4825
- },
4826
- "count": {
4827
- "type": "number",
4828
- "description": "",
4829
- "enum": [
4830
- 0
4831
- ]
4832
- },
4833
- "fit": {
4834
- "type": "number",
4835
- "format": "float",
4836
- "description": "",
4837
- "enum": [
4838
- 0
4839
- ]
4840
- },
4841
- "confidence": {
4842
- "type": "number",
4843
- "format": "float",
4844
- "description": "",
4845
- "enum": [
4846
- 0
4847
- ]
4848
- },
4849
- "address_line_one": {
4850
- "type": "string",
4851
- "description": "Empty if no match\n",
4852
- "enum": [
4853
- ""
4854
- ]
4855
- },
4856
- "address_line_two": {
4857
- "type": "string",
4858
- "description": "Empty if no match\n",
4859
- "enum": [
4860
- ""
4861
- ]
4862
- },
4863
- "city": {
4864
- "type": "string",
4865
- "description": "Empty if no match\n",
4866
- "enum": [
4867
- ""
4868
- ]
4869
- },
4870
- "state": {
4871
- "type": "string",
4872
- "description": "Empty if no match\n",
4873
- "enum": [
4874
- ""
4875
- ]
4876
- },
4877
- "zip_code": {
4878
- "type": "string",
4879
- "description": "Empty if no match\n",
4880
- "enum": [
4881
- ""
4882
- ]
4883
- },
4884
- "country_iso_2": {
4885
- "type": "string",
4886
- "description": "Empty if no match\n",
4887
- "enum": [
4888
- ""
4889
- ]
4890
- }
4891
- }
4892
- },
4893
- "VerifyResponse": {
4894
- "title": "Address Verify Response",
4895
- "type": "object",
4896
- "required": [
4897
- "message",
4898
- "code",
4899
- "result"
4900
- ],
4901
- "properties": {
4902
- "code": {
4903
- "type": "integer",
4904
- "format": "int32",
4905
- "enum": [
4906
- 2000
4907
- ]
4908
- },
4909
- "message": {
4910
- "type": "string",
4911
- "enum": [
4912
- "Success"
4913
- ]
4914
- },
4915
- "result": {
4916
- "oneOf": [
4917
- {
4918
- "$ref": "#/components/schemas/UsaVerifyMatch"
4919
- },
4920
- {
4921
- "$ref": "#/components/schemas/UsaVerifyNoMatch"
4922
- }
4923
- ]
4924
- }
4925
- }
4740
+ "ID": {
4741
+ "title": "Address Identifier",
4742
+ "type": "string",
4743
+ "description": "Globally unique internally generated identifier for an address"
4926
4744
  },
4927
4745
  "Dataset": {
4928
4746
  "title": "Dataset",
@@ -4964,79 +4782,6 @@
4964
4782
  "swt"
4965
4783
  ]
4966
4784
  },
4967
- "ID": {
4968
- "title": "Address Identifier",
4969
- "type": "string",
4970
- "description": "Global unique internally generated identifier for an address"
4971
- },
4972
- "AddressSuggestion": {
4973
- "title": "Address Suggestion",
4974
- "description": "Represents an address suggestion for any address in the world",
4975
- "type": "object",
4976
- "required": [
4977
- "id",
4978
- "suggestion",
4979
- "urls"
4980
- ],
4981
- "example": {
4982
- "id": "usps_V210079628|10||3797",
4983
- "suggestion": "10 Downing St, Montpelier, VT, 05602",
4984
- "urls": {}
4985
- },
4986
- "properties": {
4987
- "id": {
4988
- "$ref": "#/components/schemas/ID"
4989
- },
4990
- "suggestion": {
4991
- "type": "string",
4992
- "description": "Address Suggestion to be displayed to the user"
4993
- },
4994
- "urls": {
4995
- "title": "URLs",
4996
- "type": "object",
4997
- "description": "Always an empty object (`{}`). Retrieve the full address with `id`",
4998
- "additionalProperties": false
4999
- }
5000
- }
5001
- },
5002
- "AutocompleteResponse": {
5003
- "title": "Address Autocomplete Response",
5004
- "type": "object",
5005
- "required": [
5006
- "message",
5007
- "code",
5008
- "result"
5009
- ],
5010
- "properties": {
5011
- "result": {
5012
- "type": "object",
5013
- "required": [
5014
- "hits"
5015
- ],
5016
- "properties": {
5017
- "hits": {
5018
- "type": "array",
5019
- "items": {
5020
- "$ref": "#/components/schemas/AddressSuggestion"
5021
- }
5022
- }
5023
- }
5024
- },
5025
- "code": {
5026
- "type": "integer",
5027
- "format": "int32",
5028
- "enum": [
5029
- 2000
5030
- ]
5031
- },
5032
- "message": {
5033
- "type": "string",
5034
- "enum": [
5035
- "Success"
5036
- ]
5037
- }
5038
- }
5039
- },
5040
4785
  "CountryISO": {
5041
4786
  "title": "ISO Country Code (3)",
5042
4787
  "type": "string",
@@ -6884,7 +6629,7 @@
6884
6629
  "type": "string",
6885
6630
  "maxLength": 6,
6886
6631
  "nullable": true,
6887
- "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"
6632
+ "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"
6888
6633
  },
6889
6634
  "class_scheme": {
6890
6635
  "title": "Classification Scheme",
@@ -14257,12 +14002,12 @@
14257
14002
  "secondary_number": {
14258
14003
  "title": "Secondary Number",
14259
14004
  "type": "string",
14260
- "description": "Number of the sub unit, apartment, suite etc."
14005
+ "description": "Number of the subunit, apartment, suite etc."
14261
14006
  },
14262
14007
  "plus_4_code": {
14263
14008
  "title": "Plus 4 Code",
14264
14009
  "type": "string",
14265
- "description": "4 digit ZIP add-on code. USPS addresses only."
14010
+ "description": "4-digit ZIP add-on code. USPS addresses only."
14266
14011
  },
14267
14012
  "line_1": {
14268
14013
  "title": "First Address Line",
@@ -14282,7 +14027,7 @@
14282
14027
  "zip_code": {
14283
14028
  "title": "ZIP Code",
14284
14029
  "type": "string",
14285
- "description": "Postal code identifying the delivery area. For US addresses this is the 5 digit ZIP Code."
14030
+ "description": "Postal code identifying the delivery area. For US addresses this is the 5-digit ZIP Code."
14286
14031
  },
14287
14032
  "zip_plus_4_code": {
14288
14033
  "title": "ZIP + 4 Code",
@@ -14312,7 +14057,7 @@
14312
14057
  "carrier_route_id": {
14313
14058
  "title": "Carrier Route ID",
14314
14059
  "type": "string",
14315
- "description": "A 4 character ID identifying the USPS postal route for the address. The first character indicates the route type:\n\n- \"B\" indicates PO Box\n- \"H\" indicates highway\n- \"C\" indicates city\n- \"G\" indicates general\n- \"R\" indicates rural"
14060
+ "description": "A 4-character ID identifying the USPS postal route for the address. The first character indicates the route type:\n\n- \"B\" indicates PO Box\n- \"H\" indicates highway\n- \"C\" indicates city\n- \"G\" indicates general\n- \"R\" indicates rural"
14316
14061
  },
14317
14062
  "street_pre_directional_abbreviation": {
14318
14063
  "title": "Street Pre-Directional Abbreviation",
@@ -14381,7 +14126,7 @@
14381
14126
  "state_abbreviation": {
14382
14127
  "title": "State Abbreviation",
14383
14128
  "type": "string",
14384
- "description": "Abbreviated name of the state, province or region. For US addresses this is the 2 character state, territory or armed forces designation (\"AA\", \"AE\" or \"AP\" for APO/FPO/DPO)."
14129
+ "description": "Abbreviated name of the state, province or region. For US addresses this is the 2-character state, territory or armed forces designation (\"AA\", \"AE\" or \"AP\" for APO/FPO/DPO)."
14385
14130
  },
14386
14131
  "state": {
14387
14132
  "title": "State",
@@ -14426,7 +14171,7 @@
14426
14171
  "city_state_name_facility_code": {
14427
14172
  "title": "City State Name Facility Code",
14428
14173
  "type": "string",
14429
- "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",
14174
+ "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",
14430
14175
  "enum": [
14431
14176
  "B",
14432
14177
  "C",
@@ -14550,74 +14295,392 @@
14550
14295
  "county_number": 103
14551
14296
  }
14552
14297
  },
14553
- "UsaResolveAddressResponse": {
14554
- "title": "Address Retrieve Response",
14298
+ "UsaVerifyMatch": {
14299
+ "title": "Address Match",
14555
14300
  "type": "object",
14556
14301
  "required": [
14557
- "message",
14558
- "code",
14559
- "result"
14302
+ "query",
14303
+ "query_city",
14304
+ "query_state",
14305
+ "query_zip_code",
14306
+ "match",
14307
+ "count",
14308
+ "fit",
14309
+ "confidence",
14310
+ "match_information",
14311
+ "address_line_one",
14312
+ "address_line_two",
14313
+ "city",
14314
+ "state",
14315
+ "zip_code",
14316
+ "country_iso_2"
14560
14317
  ],
14561
14318
  "properties": {
14562
- "code": {
14563
- "type": "integer",
14564
- "format": "int32",
14565
- "enum": [
14566
- 2000
14567
- ]
14319
+ "query": {
14320
+ "type": "string",
14321
+ "description": "Submitted query"
14568
14322
  },
14569
- "message": {
14323
+ "query_city": {
14570
14324
  "type": "string",
14571
- "enum": [
14572
- "Success"
14573
- ]
14325
+ "description": "Submitted city"
14574
14326
  },
14575
- "result": {
14576
- "allOf": [
14327
+ "query_state": {
14328
+ "type": "string",
14329
+ "description": "Submitted state"
14330
+ },
14331
+ "query_zip_code": {
14332
+ "type": "string",
14333
+ "description": "Submitted zip_code"
14334
+ },
14335
+ "match": {
14336
+ "description": "Nearest matching address. A CASS verified address in the United States. Elsewhere, the address in the same format Retrieve Address returns, with the raw dataset record in `native`\n",
14337
+ "oneOf": [
14338
+ {
14339
+ "$ref": "#/components/schemas/UsaCassVerifiedAddress"
14340
+ },
14577
14341
  {
14578
14342
  "$ref": "#/components/schemas/Address"
14579
14343
  }
14580
14344
  ]
14345
+ },
14346
+ "count": {
14347
+ "type": "integer",
14348
+ "description": "The number of addresses we matched to the input. We return the closest match by default.\n",
14349
+ "maximum": 10,
14350
+ "minimum": 0
14351
+ },
14352
+ "fit": {
14353
+ "type": "number",
14354
+ "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",
14355
+ "maximum": 1,
14356
+ "minimum": 0
14357
+ },
14358
+ "confidence": {
14359
+ "type": "number",
14360
+ "maximum": 1,
14361
+ "minimum": 0,
14362
+ "description": "A confidence score represented as a number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.\n"
14363
+ },
14364
+ "match_information": {
14365
+ "type": "string",
14366
+ "description": "Additional information about the match.\n\nThis information is for human consumption and may not be present in all responses.\n",
14367
+ "example": "Single Response - The delivery address was found in the National Database and no further information was required."
14368
+ },
14369
+ "address_line_one": {
14370
+ "type": "string",
14371
+ "description": "Primary delivery address\n",
14372
+ "example": "123 Main St"
14373
+ },
14374
+ "address_line_two": {
14375
+ "type": "string",
14376
+ "description": "Secondary address information\n",
14377
+ "example": ""
14378
+ },
14379
+ "city": {
14380
+ "type": "string",
14381
+ "description": "City name\n",
14382
+ "example": "Springfield"
14383
+ },
14384
+ "state": {
14385
+ "type": "string",
14386
+ "description": "State name\n",
14387
+ "example": "CO"
14388
+ },
14389
+ "zip_code": {
14390
+ "type": "string",
14391
+ "description": "ZIP code\n",
14392
+ "example": "81073-1119"
14393
+ },
14394
+ "country_iso_2": {
14395
+ "type": "string",
14396
+ "description": "2-letter ISO country code\n",
14397
+ "example": "US"
14581
14398
  }
14582
14399
  }
14583
14400
  },
14584
- "place_id": {
14585
- "title": "ID",
14586
- "type": "string",
14587
- "description": "Unique identifier for place\n",
14588
- "example": "geonames_7296662"
14589
- },
14590
- "place_name": {
14591
- "title": "Place Name",
14592
- "type": "string",
14593
- "description": "Place name\n",
14594
- "example": "Strumpshaw"
14595
- },
14596
- "place_descriptive_name": {
14597
- "title": "Descriptive Place Name",
14598
- "type": "string",
14599
- "description": "Longer form description of the place.\n",
14600
- "example": "Strumpshaw, Norfolk, England"
14601
- },
14602
- "place_country_iso": {
14603
- "title": "Country",
14604
- "type": "string",
14605
- "description": " 3 letter country code (ISO 3166-1)\n",
14606
- "example": "GBR"
14607
- },
14608
- "PlaceSuggestion": {
14609
- "title": "Place Suggestion",
14610
- "description": "Represents a possible place given an autocomplete query.\n",
14401
+ "UsaVerifyNoMatch": {
14611
14402
  "type": "object",
14403
+ "title": "No Address Match",
14612
14404
  "required": [
14613
- "id",
14614
- "name",
14615
- "descriptive_name",
14616
- "country_iso"
14405
+ "query",
14406
+ "query_city",
14407
+ "query_state",
14408
+ "query_zip_code",
14409
+ "match",
14410
+ "count",
14411
+ "fit",
14412
+ "confidence",
14413
+ "match_information",
14414
+ "address_line_one",
14415
+ "address_line_two",
14416
+ "city",
14417
+ "state",
14418
+ "zip_code",
14419
+ "country_iso_2"
14617
14420
  ],
14618
14421
  "properties": {
14619
- "id": {
14620
- "$ref": "#/components/schemas/place_id"
14422
+ "query": {
14423
+ "type": "string",
14424
+ "description": "Originally submitted query"
14425
+ },
14426
+ "query_city": {
14427
+ "type": "string",
14428
+ "description": "Originally submitted city"
14429
+ },
14430
+ "query_state": {
14431
+ "type": "string",
14432
+ "description": "Originally submitted state"
14433
+ },
14434
+ "query_zip_code": {
14435
+ "type": "string",
14436
+ "description": "Originally submitted zip_code"
14437
+ },
14438
+ "match": {
14439
+ "description": "Nearest matching address",
14440
+ "type": "object",
14441
+ "nullable": true,
14442
+ "enum": [
14443
+ null
14444
+ ]
14445
+ },
14446
+ "count": {
14447
+ "type": "integer",
14448
+ "description": "",
14449
+ "enum": [
14450
+ 0
14451
+ ]
14452
+ },
14453
+ "fit": {
14454
+ "type": "number",
14455
+ "format": "float",
14456
+ "description": "",
14457
+ "enum": [
14458
+ 0
14459
+ ]
14460
+ },
14461
+ "confidence": {
14462
+ "type": "number",
14463
+ "format": "float",
14464
+ "description": "",
14465
+ "enum": [
14466
+ 0
14467
+ ]
14468
+ },
14469
+ "match_information": {
14470
+ "type": "string",
14471
+ "description": "Why the address could not be verified, for people to read. For example `Address not found`, `House number not valid for this street`, `Invalid city, state or ZIP code` or `Address could not be parsed`.\n\nThe wording may change, so do not parse it. Test `match` for `null` instead.\n",
14472
+ "example": "Address not found"
14473
+ },
14474
+ "address_line_one": {
14475
+ "type": "string",
14476
+ "description": "Empty if no match\n",
14477
+ "enum": [
14478
+ ""
14479
+ ]
14480
+ },
14481
+ "address_line_two": {
14482
+ "type": "string",
14483
+ "description": "Empty if no match\n",
14484
+ "enum": [
14485
+ ""
14486
+ ]
14487
+ },
14488
+ "city": {
14489
+ "type": "string",
14490
+ "description": "Empty if no match\n",
14491
+ "enum": [
14492
+ ""
14493
+ ]
14494
+ },
14495
+ "state": {
14496
+ "type": "string",
14497
+ "description": "Empty if no match\n",
14498
+ "enum": [
14499
+ ""
14500
+ ]
14501
+ },
14502
+ "zip_code": {
14503
+ "type": "string",
14504
+ "description": "Empty if no match\n",
14505
+ "enum": [
14506
+ ""
14507
+ ]
14508
+ },
14509
+ "country_iso_2": {
14510
+ "type": "string",
14511
+ "description": "Empty if no match\n",
14512
+ "enum": [
14513
+ ""
14514
+ ]
14515
+ }
14516
+ }
14517
+ },
14518
+ "VerifyResponse": {
14519
+ "title": "Address Verify Response",
14520
+ "type": "object",
14521
+ "required": [
14522
+ "message",
14523
+ "code",
14524
+ "result"
14525
+ ],
14526
+ "properties": {
14527
+ "code": {
14528
+ "type": "integer",
14529
+ "format": "int32",
14530
+ "enum": [
14531
+ 2000
14532
+ ]
14533
+ },
14534
+ "message": {
14535
+ "type": "string",
14536
+ "enum": [
14537
+ "Success"
14538
+ ]
14539
+ },
14540
+ "result": {
14541
+ "oneOf": [
14542
+ {
14543
+ "$ref": "#/components/schemas/UsaVerifyMatch"
14544
+ },
14545
+ {
14546
+ "$ref": "#/components/schemas/UsaVerifyNoMatch"
14547
+ }
14548
+ ]
14549
+ }
14550
+ }
14551
+ },
14552
+ "AddressSuggestion": {
14553
+ "title": "Address Suggestion",
14554
+ "description": "Represents an address suggestion for any address in the world",
14555
+ "type": "object",
14556
+ "required": [
14557
+ "id",
14558
+ "suggestion",
14559
+ "urls"
14560
+ ],
14561
+ "example": {
14562
+ "id": "usps_V210079628|10||3797",
14563
+ "suggestion": "10 Downing St, Montpelier, VT, 05602",
14564
+ "urls": {}
14565
+ },
14566
+ "properties": {
14567
+ "id": {
14568
+ "$ref": "#/components/schemas/ID"
14569
+ },
14570
+ "suggestion": {
14571
+ "type": "string",
14572
+ "description": "Address Suggestion to be displayed to the user"
14573
+ },
14574
+ "urls": {
14575
+ "title": "URLs",
14576
+ "type": "object",
14577
+ "description": "Always an empty object (`{}`). Retrieve the full address with `id`",
14578
+ "additionalProperties": false
14579
+ }
14580
+ }
14581
+ },
14582
+ "AutocompleteResponse": {
14583
+ "title": "Address Autocomplete Response",
14584
+ "type": "object",
14585
+ "required": [
14586
+ "message",
14587
+ "code",
14588
+ "result"
14589
+ ],
14590
+ "properties": {
14591
+ "result": {
14592
+ "type": "object",
14593
+ "required": [
14594
+ "hits"
14595
+ ],
14596
+ "properties": {
14597
+ "hits": {
14598
+ "type": "array",
14599
+ "items": {
14600
+ "$ref": "#/components/schemas/AddressSuggestion"
14601
+ }
14602
+ }
14603
+ }
14604
+ },
14605
+ "code": {
14606
+ "type": "integer",
14607
+ "format": "int32",
14608
+ "enum": [
14609
+ 2000
14610
+ ]
14611
+ },
14612
+ "message": {
14613
+ "type": "string",
14614
+ "enum": [
14615
+ "Success"
14616
+ ]
14617
+ }
14618
+ }
14619
+ },
14620
+ "UsaResolveAddressResponse": {
14621
+ "title": "Address Retrieve Response",
14622
+ "type": "object",
14623
+ "required": [
14624
+ "message",
14625
+ "code",
14626
+ "result"
14627
+ ],
14628
+ "properties": {
14629
+ "code": {
14630
+ "type": "integer",
14631
+ "format": "int32",
14632
+ "enum": [
14633
+ 2000
14634
+ ]
14635
+ },
14636
+ "message": {
14637
+ "type": "string",
14638
+ "enum": [
14639
+ "Success"
14640
+ ]
14641
+ },
14642
+ "result": {
14643
+ "$ref": "#/components/schemas/Address"
14644
+ }
14645
+ }
14646
+ },
14647
+ "place_id": {
14648
+ "title": "ID",
14649
+ "type": "string",
14650
+ "description": "Unique identifier for place\n",
14651
+ "example": "geonames_7296662"
14652
+ },
14653
+ "place_name": {
14654
+ "title": "Place Name",
14655
+ "type": "string",
14656
+ "description": "Place name\n",
14657
+ "example": "Strumpshaw"
14658
+ },
14659
+ "place_descriptive_name": {
14660
+ "title": "Descriptive Place Name",
14661
+ "type": "string",
14662
+ "description": "Longer form description of the place.\n",
14663
+ "example": "Strumpshaw, Norfolk, England"
14664
+ },
14665
+ "place_country_iso": {
14666
+ "title": "Country",
14667
+ "type": "string",
14668
+ "description": " 3 letter country code (ISO 3166-1)\n",
14669
+ "example": "GBR"
14670
+ },
14671
+ "PlaceSuggestion": {
14672
+ "title": "Place Suggestion",
14673
+ "description": "Represents a possible place given an autocomplete query.\n",
14674
+ "type": "object",
14675
+ "required": [
14676
+ "id",
14677
+ "name",
14678
+ "descriptive_name",
14679
+ "country_iso"
14680
+ ],
14681
+ "properties": {
14682
+ "id": {
14683
+ "$ref": "#/components/schemas/place_id"
14621
14684
  },
14622
14685
  "name": {
14623
14686
  "$ref": "#/components/schemas/place_name"
@@ -14915,7 +14978,7 @@
14915
14978
  "id": {
14916
14979
  "title": "Place Identifier",
14917
14980
  "type": "string",
14918
- "description": "Global unique internally generated identifier for a place"
14981
+ "description": "Globally unique internally generated identifier for a place"
14919
14982
  },
14920
14983
  "dataset": {
14921
14984
  "title": "Dataset",
@@ -15019,11 +15082,35 @@
15019
15082
  }
15020
15083
  }
15021
15084
  },
15022
- "LicenseeEditable": {
15085
+ "Licensee": {
15023
15086
  "title": "Licensee",
15024
- "description": "Licensee object which can be defined by user",
15025
15087
  "type": "object",
15088
+ "required": [
15089
+ "id",
15090
+ "key",
15091
+ "createdAt",
15092
+ "name",
15093
+ "address",
15094
+ "postcode",
15095
+ "whitelist",
15096
+ "daily"
15097
+ ],
15026
15098
  "properties": {
15099
+ "id": {
15100
+ "type": "string",
15101
+ "example": "56a11209ebe230380bf104c3",
15102
+ "description": "An immutable ID provided for every licensee. Primarily used for paginated list requests.\n"
15103
+ },
15104
+ "key": {
15105
+ "type": "string",
15106
+ "example": "sl_ijoiqsxeQgXW2gkiE0X94",
15107
+ "description": "Uniquely identifies a licensee for a key.\n\nRequired to perform paid lookups for a specific licensee. Typically begins `sl_`.\n"
15108
+ },
15109
+ "createdAt": {
15110
+ "type": "string",
15111
+ "example": "2016-01-21T17:14:49.971Z",
15112
+ "description": "Timestamp for when the licensee was created"
15113
+ },
15027
15114
  "name": {
15028
15115
  "type": "string",
15029
15116
  "example": "Qwerty Widgets Limited",
@@ -15049,6 +15136,11 @@
15049
15136
  },
15050
15137
  "daily": {
15051
15138
  "type": "object",
15139
+ "required": [
15140
+ "limit",
15141
+ "count",
15142
+ "updatedAt"
15143
+ ],
15052
15144
  "properties": {
15053
15145
  "limit": {
15054
15146
  "example": 10000,
@@ -15058,69 +15150,22 @@
15058
15150
  "format": "int32",
15059
15151
  "type": "number",
15060
15152
  "description": "The maximum number of lookups this licensee can perform in a day. `null` indicates the limit is not active"
15061
- }
15062
- }
15063
- }
15064
- }
15065
- },
15066
- "Licensee": {
15067
- "title": "Licensee",
15068
- "allOf": [
15069
- {
15070
- "$ref": "#/components/schemas/LicenseeEditable"
15071
- },
15072
- {
15073
- "type": "object",
15074
- "required": [
15075
- "id",
15076
- "key",
15077
- "createdAt",
15078
- "name",
15079
- "address",
15080
- "postcode",
15081
- "whitelist",
15082
- "daily"
15083
- ],
15084
- "properties": {
15085
- "id": {
15086
- "type": "string",
15087
- "example": "56a11209ebe230380bf104c3",
15088
- "description": "An immutable ID provided for every licensee. Primarily used for paginated list requests.\n"
15089
15153
  },
15090
- "key": {
15091
- "type": "string",
15092
- "example": "sl_ijoiqsxeQgXW2gkiE0X94",
15093
- "description": "Uniquely identifies a licensee for a key. \n\nRequired to perform paid lookups for a specific licensee. Typically begins `sl_`.\n"
15154
+ "count": {
15155
+ "example": 232,
15156
+ "minimum": 0,
15157
+ "type": "integer",
15158
+ "format": "int32",
15159
+ "description": "The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`"
15094
15160
  },
15095
- "createdAt": {
15161
+ "updatedAt": {
15096
15162
  "type": "string",
15097
- "example": "2016-01-21T17:14:49.971Z",
15098
- "description": "Timestamp for when the licensee was created"
15099
- },
15100
- "daily": {
15101
- "required": [
15102
- "count",
15103
- "updatedAt"
15104
- ],
15105
- "type": "object",
15106
- "properties": {
15107
- "count": {
15108
- "example": 232,
15109
- "minimum": 0,
15110
- "type": "number",
15111
- "format": "int32",
15112
- "description": "The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`"
15113
- },
15114
- "updatedAt": {
15115
- "type": "string",
15116
- "example": "2016-08-05T16:43:28.865Z",
15117
- "description": "The timestamp when the limit was last used."
15118
- }
15119
- }
15163
+ "example": "2016-08-05T16:43:28.865Z",
15164
+ "description": "The timestamp when the limit was last used."
15120
15165
  }
15121
15166
  }
15122
15167
  }
15123
- ]
15168
+ }
15124
15169
  },
15125
15170
  "LicenseesResponse": {
15126
15171
  "title": "Licensee List Response",
@@ -15134,6 +15179,10 @@
15134
15179
  "result": {
15135
15180
  "description": "List of licensees",
15136
15181
  "type": "object",
15182
+ "required": [
15183
+ "licensees",
15184
+ "hasMore"
15185
+ ],
15137
15186
  "properties": {
15138
15187
  "licensees": {
15139
15188
  "type": "array",
@@ -15162,6 +15211,50 @@
15162
15211
  }
15163
15212
  }
15164
15213
  },
15214
+ "LicenseeEditable": {
15215
+ "title": "Licensee",
15216
+ "description": "Licensee object which can be defined by user",
15217
+ "type": "object",
15218
+ "properties": {
15219
+ "name": {
15220
+ "type": "string",
15221
+ "example": "Qwerty Widgets Limited",
15222
+ "description": "Licensee individual or organisation name"
15223
+ },
15224
+ "address": {
15225
+ "example": "12 High Street, Manchester",
15226
+ "type": "string",
15227
+ "description": "Licensee's first, second and third line address as well as post town concatenated by commas"
15228
+ },
15229
+ "postcode": {
15230
+ "example": "BR8 7RE",
15231
+ "type": "string",
15232
+ "description": "Licensee's postcode"
15233
+ },
15234
+ "whitelist": {
15235
+ "type": "array",
15236
+ "items": {
15237
+ "type": "string",
15238
+ "example": "https://www.example.com"
15239
+ },
15240
+ "description": "A list of allowed URLs. An empty list disables the check.\n\nA request is allowed when its `Origin` or `Referer` header matches an entry. Use one of these formats:\n\n- `https://www.example.com` allows one site. Scheme and host must match\n- `*.example.com` allows the domain and all its subdomains"
15241
+ },
15242
+ "daily": {
15243
+ "type": "object",
15244
+ "properties": {
15245
+ "limit": {
15246
+ "example": 10000,
15247
+ "x-nullable": true,
15248
+ "nullable": true,
15249
+ "minimum": 0,
15250
+ "format": "int32",
15251
+ "type": "number",
15252
+ "description": "The maximum number of lookups this licensee can perform in a day. `null` indicates the limit is not active"
15253
+ }
15254
+ }
15255
+ }
15256
+ }
15257
+ },
15165
15258
  "LicenseeResponse": {
15166
15259
  "title": "Licensee Response",
15167
15260
  "type": "object",
@@ -15202,12 +15295,12 @@
15202
15295
  "updatedAt": {
15203
15296
  "type": "string",
15204
15297
  "example": "2016-01-21T17:14:49.971Z",
15205
- "description": "Timestamp for when the config was created"
15298
+ "description": "Timestamp for when the config was last updated"
15206
15299
  },
15207
15300
  "createdAt": {
15208
15301
  "type": "string",
15209
15302
  "example": "2016-01-21T17:14:49.971Z",
15210
- "description": "Timestamp for when the config was updated"
15303
+ "description": "Timestamp for when the config was created"
15211
15304
  },
15212
15305
  "name": {
15213
15306
  "type": "string",