@addresszen/openapi 4.2.0 → 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/index.d.cts +66 -29
- package/dist/index.d.ts +66 -29
- package/dist/openapi.json +50 -33
- package/dist/openapi.yaml +54 -32
- package/openapi.ts +66 -29
- package/package.json +2 -2
package/dist/openapi.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
|
-
"version": "4.
|
|
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/
|
|
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
|
|
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
|
|
59
|
-
"description": "Raw USPS
|
|
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",
|
|
@@ -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
|
|
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": []
|
|
@@ -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",
|
|
@@ -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
|
|
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
|
{
|
|
@@ -963,6 +966,9 @@
|
|
|
963
966
|
},
|
|
964
967
|
{
|
|
965
968
|
"$ref": "#/components/parameters/TagsParam"
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"$ref": "#/components/parameters/RemoveFirmParam"
|
|
966
972
|
}
|
|
967
973
|
],
|
|
968
974
|
"responses": {
|
|
@@ -1413,32 +1419,32 @@
|
|
|
1413
1419
|
{
|
|
1414
1420
|
"lang": "http",
|
|
1415
1421
|
"label": "URL",
|
|
1416
|
-
"source": "https://api.addresszen.com/v1/places/
|
|
1422
|
+
"source": "https://api.addresszen.com/v1/places/geonames_2643743?api_key=ak_test\n"
|
|
1417
1423
|
},
|
|
1418
1424
|
{
|
|
1419
1425
|
"lang": "cURL",
|
|
1420
1426
|
"label": "curl",
|
|
1421
|
-
"source": "curl -G 'https://api.addresszen.com/v1/places/
|
|
1427
|
+
"source": "curl -G 'https://api.addresszen.com/v1/places/geonames_2643743' \\\n -d 'api_key=ak_test'\n"
|
|
1422
1428
|
},
|
|
1423
1429
|
{
|
|
1424
1430
|
"lang": "JavaScript",
|
|
1425
1431
|
"label": "JavaScript",
|
|
1426
|
-
"source": "import { createZenClient, resolvePlace } from '@addresszen/sdk';\n\nconst client = createZenClient({ apiKey: 'ak_test' });\n\nconst { data } = await resolvePlace({\n client,\n path: { place: '
|
|
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"
|
|
1427
1433
|
},
|
|
1428
1434
|
{
|
|
1429
1435
|
"lang": "Python",
|
|
1430
1436
|
"label": "Python",
|
|
1431
|
-
"source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.resolve_place(\"
|
|
1437
|
+
"source": "# pip install addresszen\nfrom addresszen import AddressZen\n\nwith AddressZen(\"ak_test\") as client:\n result = client.resolve_place(\"geonames_2643743\")\n"
|
|
1432
1438
|
},
|
|
1433
1439
|
{
|
|
1434
1440
|
"lang": "Ruby",
|
|
1435
1441
|
"label": "Ruby",
|
|
1436
|
-
"source": "require \"net/http\"\nrequire \"json\"\n\nuri = URI(\"https://api.addresszen.com/v1/places/
|
|
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"
|
|
1437
1443
|
},
|
|
1438
1444
|
{
|
|
1439
1445
|
"lang": "PHP",
|
|
1440
1446
|
"label": "PHP",
|
|
1441
|
-
"source": "<?php\n$response = file_get_contents(\n \"https://api.addresszen.com/v1/places/
|
|
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"
|
|
1442
1448
|
}
|
|
1443
1449
|
]
|
|
1444
1450
|
}
|
|
@@ -1463,12 +1469,11 @@
|
|
|
1463
1469
|
{
|
|
1464
1470
|
"name": "starting_after",
|
|
1465
1471
|
"in": "query",
|
|
1466
|
-
"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.",
|
|
1467
1473
|
"style": "form",
|
|
1468
1474
|
"explode": false,
|
|
1469
1475
|
"schema": {
|
|
1470
|
-
"type": "
|
|
1471
|
-
"format": "int32"
|
|
1476
|
+
"type": "string"
|
|
1472
1477
|
}
|
|
1473
1478
|
},
|
|
1474
1479
|
{
|
|
@@ -1748,7 +1753,7 @@
|
|
|
1748
1753
|
],
|
|
1749
1754
|
"properties": {
|
|
1750
1755
|
"deleted": {
|
|
1751
|
-
"type": "
|
|
1756
|
+
"type": "integer",
|
|
1752
1757
|
"format": "int32",
|
|
1753
1758
|
"example": 1,
|
|
1754
1759
|
"minimum": 0
|
|
@@ -2254,7 +2259,7 @@
|
|
|
2254
2259
|
],
|
|
2255
2260
|
"properties": {
|
|
2256
2261
|
"deleted": {
|
|
2257
|
-
"type": "
|
|
2262
|
+
"type": "integer",
|
|
2258
2263
|
"format": "int32",
|
|
2259
2264
|
"example": 1,
|
|
2260
2265
|
"minimum": 0
|
|
@@ -3021,7 +3026,7 @@
|
|
|
3021
3026
|
"type": "string"
|
|
3022
3027
|
},
|
|
3023
3028
|
"name": "user_token",
|
|
3024
|
-
"description": "**Management Key**\n\nA secret key used to manage your account and API Keys. It was previously called the user token.\n\nYour management key can be retrieved and managed from your [accounts page](https://addresszen.com/
|
|
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",
|
|
3025
3030
|
"example": "uk_B59ScW1p1HHouf1VqclEPZUx"
|
|
3026
3031
|
},
|
|
3027
3032
|
"StartParam": {
|
|
@@ -3082,6 +3087,20 @@
|
|
|
3082
3087
|
},
|
|
3083
3088
|
"style": "form"
|
|
3084
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
|
+
},
|
|
3085
3104
|
"DatasetParam": {
|
|
3086
3105
|
"name": "dataset",
|
|
3087
3106
|
"in": "query",
|
|
@@ -3094,7 +3113,9 @@
|
|
|
3094
3113
|
}
|
|
3095
3114
|
},
|
|
3096
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",
|
|
3097
|
-
"example":
|
|
3116
|
+
"example": [
|
|
3117
|
+
"usps"
|
|
3118
|
+
]
|
|
3098
3119
|
},
|
|
3099
3120
|
"ContextParam": {
|
|
3100
3121
|
"name": "context",
|
|
@@ -4508,7 +4529,7 @@
|
|
|
4508
4529
|
},
|
|
4509
4530
|
"dpv_no_stat": {
|
|
4510
4531
|
"type": "string",
|
|
4511
|
-
"description": "Delivery Point Validation (DPV) NoStat code.\n\nIndicates whether the address is a vacant property, it receives mail as a part of a drop
|
|
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",
|
|
4512
4533
|
"enum": [
|
|
4513
4534
|
"Y",
|
|
4514
4535
|
"N",
|
|
@@ -6608,7 +6629,7 @@
|
|
|
6608
6629
|
"type": "string",
|
|
6609
6630
|
"maxLength": 6,
|
|
6610
6631
|
"nullable": true,
|
|
6611
|
-
"description": "Current AddressBase classification code (e.g. `RD`
|
|
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"
|
|
6612
6633
|
},
|
|
6613
6634
|
"class_scheme": {
|
|
6614
6635
|
"title": "Classification Scheme",
|
|
@@ -14150,7 +14171,7 @@
|
|
|
14150
14171
|
"city_state_name_facility_code": {
|
|
14151
14172
|
"title": "City State Name Facility Code",
|
|
14152
14173
|
"type": "string",
|
|
14153
|
-
"description": "The type of locale identified in the city/state name. The facility may be a USPS facility, such as a post office, station or branch, or a non-postal place name.\n\n- B = Branch\n- C = Community post office (CPO)\n- N = Non-postal community name, former USPS facility
|
|
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",
|
|
14154
14175
|
"enum": [
|
|
14155
14176
|
"B",
|
|
14156
14177
|
"C",
|
|
@@ -14323,14 +14344,14 @@
|
|
|
14323
14344
|
]
|
|
14324
14345
|
},
|
|
14325
14346
|
"count": {
|
|
14326
|
-
"type": "
|
|
14347
|
+
"type": "integer",
|
|
14327
14348
|
"description": "The number of addresses we matched to the input. We return the closest match by default.\n",
|
|
14328
14349
|
"maximum": 10,
|
|
14329
14350
|
"minimum": 0
|
|
14330
14351
|
},
|
|
14331
14352
|
"fit": {
|
|
14332
14353
|
"type": "number",
|
|
14333
|
-
"description": "A score represented as number between 1 and 0. Fit compares the address elements present in your query against the matching address elements. It does not incorporate elements you have not presented in the score. A partial address (e.g. 123 Main St) will have a fit of 1 even though it is missing city and zip code. Its confidence score will be less than 1 however because it is missing some crucial elements.\n",
|
|
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",
|
|
14334
14355
|
"maximum": 1,
|
|
14335
14356
|
"minimum": 0
|
|
14336
14357
|
},
|
|
@@ -14338,7 +14359,7 @@
|
|
|
14338
14359
|
"type": "number",
|
|
14339
14360
|
"maximum": 1,
|
|
14340
14361
|
"minimum": 0,
|
|
14341
|
-
"description": "A confidence score represented as number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.\n"
|
|
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"
|
|
14342
14363
|
},
|
|
14343
14364
|
"match_information": {
|
|
14344
14365
|
"type": "string",
|
|
@@ -14423,7 +14444,7 @@
|
|
|
14423
14444
|
]
|
|
14424
14445
|
},
|
|
14425
14446
|
"count": {
|
|
14426
|
-
"type": "
|
|
14447
|
+
"type": "integer",
|
|
14427
14448
|
"description": "",
|
|
14428
14449
|
"enum": [
|
|
14429
14450
|
0
|
|
@@ -14619,11 +14640,7 @@
|
|
|
14619
14640
|
]
|
|
14620
14641
|
},
|
|
14621
14642
|
"result": {
|
|
14622
|
-
"
|
|
14623
|
-
{
|
|
14624
|
-
"$ref": "#/components/schemas/Address"
|
|
14625
|
-
}
|
|
14626
|
-
]
|
|
14643
|
+
"$ref": "#/components/schemas/Address"
|
|
14627
14644
|
}
|
|
14628
14645
|
}
|
|
14629
14646
|
},
|
|
@@ -15137,7 +15154,7 @@
|
|
|
15137
15154
|
"count": {
|
|
15138
15155
|
"example": 232,
|
|
15139
15156
|
"minimum": 0,
|
|
15140
|
-
"type": "
|
|
15157
|
+
"type": "integer",
|
|
15141
15158
|
"format": "int32",
|
|
15142
15159
|
"description": "The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`"
|
|
15143
15160
|
},
|
package/dist/openapi.yaml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
|
-
version: 4.
|
|
3
|
+
version: 4.3.0
|
|
4
4
|
license:
|
|
5
5
|
name: Copyright (C) IDDQD Limited - All Rights Reserved
|
|
6
6
|
url: https://terms.addresszen.com
|
|
@@ -90,7 +90,7 @@ info:
|
|
|
90
90
|
|
|
91
91
|
## Metadata
|
|
92
92
|
|
|
93
|
-
You 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/
|
|
93
|
+
You 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).
|
|
94
94
|
|
|
95
95
|
## Response Codes
|
|
96
96
|
|
|
@@ -137,15 +137,15 @@ tags:
|
|
|
137
137
|
- name: suggestion
|
|
138
138
|
x-displayName: Address Suggestion
|
|
139
139
|
description: |
|
|
140
|
-
Address Suggestions are simple, human
|
|
140
|
+
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.
|
|
141
141
|
|
|
142
142
|
See our Address Search APIs for more information on address autocompletion.
|
|
143
143
|
|
|
144
144
|
<SchemaDefinition schemaRef="#/components/schemas/AddressSuggestion" />
|
|
145
145
|
- name: usps_native
|
|
146
|
-
x-displayName: USPS
|
|
146
|
+
x-displayName: USPS ZIP+4
|
|
147
147
|
description: |
|
|
148
|
-
Raw USPS
|
|
148
|
+
Raw USPS ZIP+4 record.
|
|
149
149
|
|
|
150
150
|
<SchemaDefinition schemaRef="#/components/schemas/UspsAddress" />
|
|
151
151
|
- name: ecaf_address
|
|
@@ -645,7 +645,7 @@ paths:
|
|
|
645
645
|
|
|
646
646
|
## Data redaction
|
|
647
647
|
|
|
648
|
-
We redact personally identifiable
|
|
648
|
+
We redact personally identifiable information (PII) in your usage log weekly, covering the IP, source IP, search term and URL columns.
|
|
649
649
|
|
|
650
650
|
The default retention is 28 days. Change the period from your dashboard. Set it to `0` days to stop collecting PII altogether.
|
|
651
651
|
security:
|
|
@@ -753,6 +753,7 @@ paths:
|
|
|
753
753
|
parameters:
|
|
754
754
|
- $ref: '#/components/parameters/ApiKeyParam'
|
|
755
755
|
- $ref: '#/components/parameters/TagsParam'
|
|
756
|
+
- $ref: '#/components/parameters/RemoveFirmParam'
|
|
756
757
|
- name: context
|
|
757
758
|
in: query
|
|
758
759
|
schema:
|
|
@@ -883,7 +884,7 @@ paths:
|
|
|
883
884
|
|
|
884
885
|
## Coverage
|
|
885
886
|
|
|
886
|
-
Each 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
|
|
887
|
+
Each 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.
|
|
887
888
|
|
|
888
889
|
## Filters
|
|
889
890
|
|
|
@@ -893,7 +894,7 @@ paths:
|
|
|
893
894
|
|
|
894
895
|
## Address bias
|
|
895
896
|
|
|
896
|
-
Bias 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.
|
|
897
|
+
Bias 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.
|
|
897
898
|
|
|
898
899
|
## Suggestion format
|
|
899
900
|
|
|
@@ -1106,6 +1107,7 @@ paths:
|
|
|
1106
1107
|
- $ref: '#/components/parameters/LicenseeParam'
|
|
1107
1108
|
- $ref: '#/components/parameters/FilterParam'
|
|
1108
1109
|
- $ref: '#/components/parameters/TagsParam'
|
|
1110
|
+
- $ref: '#/components/parameters/RemoveFirmParam'
|
|
1109
1111
|
responses:
|
|
1110
1112
|
'200':
|
|
1111
1113
|
description: Success
|
|
@@ -1529,11 +1531,11 @@ paths:
|
|
|
1529
1531
|
- lang: http
|
|
1530
1532
|
label: URL
|
|
1531
1533
|
source: |
|
|
1532
|
-
https://api.addresszen.com/v1/places/
|
|
1534
|
+
https://api.addresszen.com/v1/places/geonames_2643743?api_key=ak_test
|
|
1533
1535
|
- lang: cURL
|
|
1534
1536
|
label: curl
|
|
1535
1537
|
source: |
|
|
1536
|
-
curl -G 'https://api.addresszen.com/v1/places/
|
|
1538
|
+
curl -G 'https://api.addresszen.com/v1/places/geonames_2643743' \
|
|
1537
1539
|
-d 'api_key=ak_test'
|
|
1538
1540
|
- lang: JavaScript
|
|
1539
1541
|
label: JavaScript
|
|
@@ -1544,7 +1546,7 @@ paths:
|
|
|
1544
1546
|
|
|
1545
1547
|
const { data } = await resolvePlace({
|
|
1546
1548
|
client,
|
|
1547
|
-
path: { place: '
|
|
1549
|
+
path: { place: 'geonames_2643743' },
|
|
1548
1550
|
});
|
|
1549
1551
|
- lang: Python
|
|
1550
1552
|
label: Python
|
|
@@ -1553,14 +1555,14 @@ paths:
|
|
|
1553
1555
|
from addresszen import AddressZen
|
|
1554
1556
|
|
|
1555
1557
|
with AddressZen("ak_test") as client:
|
|
1556
|
-
result = client.resolve_place("
|
|
1558
|
+
result = client.resolve_place("geonames_2643743")
|
|
1557
1559
|
- lang: Ruby
|
|
1558
1560
|
label: Ruby
|
|
1559
1561
|
source: |
|
|
1560
1562
|
require "net/http"
|
|
1561
1563
|
require "json"
|
|
1562
1564
|
|
|
1563
|
-
uri = URI("https://api.addresszen.com/v1/places/
|
|
1565
|
+
uri = URI("https://api.addresszen.com/v1/places/geonames_2643743")
|
|
1564
1566
|
uri.query = URI.encode_www_form(api_key: "ak_test")
|
|
1565
1567
|
result = JSON.parse(Net::HTTP.get(uri))["result"]
|
|
1566
1568
|
- lang: PHP
|
|
@@ -1568,7 +1570,7 @@ paths:
|
|
|
1568
1570
|
source: |
|
|
1569
1571
|
<?php
|
|
1570
1572
|
$response = file_get_contents(
|
|
1571
|
-
"https://api.addresszen.com/v1/places/
|
|
1573
|
+
"https://api.addresszen.com/v1/places/geonames_2643743?" .
|
|
1572
1574
|
http_build_query([
|
|
1573
1575
|
"api_key" => "ak_test",
|
|
1574
1576
|
])
|
|
@@ -1587,12 +1589,11 @@ paths:
|
|
|
1587
1589
|
- $ref: '#/components/parameters/ApiKeyPathParam'
|
|
1588
1590
|
- name: starting_after
|
|
1589
1591
|
in: query
|
|
1590
|
-
description: ID of the licensee after which to list results
|
|
1592
|
+
description: ID of the licensee after which to list results. Pass the `id` of the last licensee on the previous page.
|
|
1591
1593
|
style: form
|
|
1592
1594
|
explode: false
|
|
1593
1595
|
schema:
|
|
1594
|
-
type:
|
|
1595
|
-
format: int32
|
|
1596
|
+
type: string
|
|
1596
1597
|
- $ref: '#/components/parameters/UserTokenParam'
|
|
1597
1598
|
- $ref: '#/components/parameters/LimitParam'
|
|
1598
1599
|
- name: query
|
|
@@ -1890,7 +1891,7 @@ paths:
|
|
|
1890
1891
|
- deleted
|
|
1891
1892
|
properties:
|
|
1892
1893
|
deleted:
|
|
1893
|
-
type:
|
|
1894
|
+
type: integer
|
|
1894
1895
|
format: int32
|
|
1895
1896
|
example: 1
|
|
1896
1897
|
minimum: 0
|
|
@@ -2404,7 +2405,7 @@ paths:
|
|
|
2404
2405
|
- deleted
|
|
2405
2406
|
properties:
|
|
2406
2407
|
deleted:
|
|
2407
|
-
type:
|
|
2408
|
+
type: integer
|
|
2408
2409
|
format: int32
|
|
2409
2410
|
example: 1
|
|
2410
2411
|
minimum: 0
|
|
@@ -3165,7 +3166,7 @@ components:
|
|
|
3165
3166
|
|
|
3166
3167
|
A secret key used to manage your account and API Keys. It was previously called the user token.
|
|
3167
3168
|
|
|
3168
|
-
Your management key can be retrieved and managed from your [accounts page](https://addresszen.com/
|
|
3169
|
+
Your management key can be retrieved and managed from your [accounts page](https://account.addresszen.com/tokens).
|
|
3169
3170
|
|
|
3170
3171
|
Typically 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.
|
|
3171
3172
|
example: uk_B59ScW1p1HHouf1VqclEPZUx
|
|
@@ -3238,6 +3239,24 @@ components:
|
|
|
3238
3239
|
schema:
|
|
3239
3240
|
type: string
|
|
3240
3241
|
style: form
|
|
3242
|
+
RemoveFirmParam:
|
|
3243
|
+
name: remove_firm
|
|
3244
|
+
in: query
|
|
3245
|
+
style: form
|
|
3246
|
+
explode: false
|
|
3247
|
+
required: false
|
|
3248
|
+
description: |
|
|
3249
|
+
**Remove Firm**
|
|
3250
|
+
|
|
3251
|
+
Removes 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.
|
|
3252
|
+
|
|
3253
|
+
Set `remove_firm=true` to enable.
|
|
3254
|
+
|
|
3255
|
+
Firm 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.
|
|
3256
|
+
schema:
|
|
3257
|
+
type: string
|
|
3258
|
+
enum:
|
|
3259
|
+
- 'true'
|
|
3241
3260
|
DatasetParam:
|
|
3242
3261
|
name: dataset
|
|
3243
3262
|
in: query
|
|
@@ -3253,7 +3272,8 @@ components:
|
|
|
3253
3272
|
Comma-separated list of datasets to search within.
|
|
3254
3273
|
|
|
3255
3274
|
Filters results to only include addresses from the specified datasets. Useful for keys with multiple overlapping datasets enabled (e.g. `paf` and `abp`).
|
|
3256
|
-
example:
|
|
3275
|
+
example:
|
|
3276
|
+
- usps
|
|
3257
3277
|
ContextParam:
|
|
3258
3278
|
name: context
|
|
3259
3279
|
in: query
|
|
@@ -4559,7 +4579,7 @@ components:
|
|
|
4559
4579
|
- 'U1' Unique 5-digit ZIP code.
|
|
4560
4580
|
dpv_no_stat:
|
|
4561
4581
|
type: string
|
|
4562
|
-
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
|
|
4582
|
+
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"
|
|
4563
4583
|
enum:
|
|
4564
4584
|
- 'Y'
|
|
4565
4585
|
- 'N'
|
|
@@ -6612,8 +6632,11 @@ components:
|
|
|
6612
6632
|
maxLength: 6
|
|
6613
6633
|
nullable: true
|
|
6614
6634
|
description: |
|
|
6615
|
-
Current AddressBase classification code
|
|
6616
|
-
|
|
6635
|
+
Current AddressBase classification code, passed through verbatim at
|
|
6636
|
+
whatever level the custodian recorded. Usually tertiary (e.g. `RD03`
|
|
6637
|
+
semi-detached, `RD04` terraced, `RD06` self-contained flat, `CR01`
|
|
6638
|
+
retail), but can be quaternary (`LP03PA`), secondary (`RD`) or primary
|
|
6639
|
+
(`C`). Match on prefix rather than equality. Top-level categories: `R` Residential,
|
|
6617
6640
|
`C` Commercial, `L` Land, `M` Military, `O` Other, `P` Parent shell,
|
|
6618
6641
|
`U` Unclassified, `X` Dual use, `Z` Object of interest. NULL when no
|
|
6619
6642
|
current classification row exists for the UPRN.
|
|
@@ -14717,7 +14740,7 @@ components:
|
|
|
14717
14740
|
|
|
14718
14741
|
- B = Branch
|
|
14719
14742
|
- C = Community post office (CPO)
|
|
14720
|
-
- N = Non-postal community name, former USPS facility
|
|
14743
|
+
- N = Non-postal community name, former USPS facility or place name
|
|
14721
14744
|
- P = Post Office
|
|
14722
14745
|
- S = Station
|
|
14723
14746
|
- U = Urbanization
|
|
@@ -14865,7 +14888,7 @@ components:
|
|
|
14865
14888
|
- $ref: '#/components/schemas/UsaCassVerifiedAddress'
|
|
14866
14889
|
- $ref: '#/components/schemas/Address'
|
|
14867
14890
|
count:
|
|
14868
|
-
type:
|
|
14891
|
+
type: integer
|
|
14869
14892
|
description: |
|
|
14870
14893
|
The number of addresses we matched to the input. We return the closest match by default.
|
|
14871
14894
|
maximum: 10
|
|
@@ -14873,7 +14896,7 @@ components:
|
|
|
14873
14896
|
fit:
|
|
14874
14897
|
type: number
|
|
14875
14898
|
description: |
|
|
14876
|
-
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.
|
|
14899
|
+
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.
|
|
14877
14900
|
maximum: 1
|
|
14878
14901
|
minimum: 0
|
|
14879
14902
|
confidence:
|
|
@@ -14881,7 +14904,7 @@ components:
|
|
|
14881
14904
|
maximum: 1
|
|
14882
14905
|
minimum: 0
|
|
14883
14906
|
description: |
|
|
14884
|
-
A confidence score represented as number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.
|
|
14907
|
+
A confidence score represented as a number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.
|
|
14885
14908
|
match_information:
|
|
14886
14909
|
type: string
|
|
14887
14910
|
description: |
|
|
@@ -14958,7 +14981,7 @@ components:
|
|
|
14958
14981
|
enum:
|
|
14959
14982
|
- null
|
|
14960
14983
|
count:
|
|
14961
|
-
type:
|
|
14984
|
+
type: integer
|
|
14962
14985
|
description: ''
|
|
14963
14986
|
enum:
|
|
14964
14987
|
- 0
|
|
@@ -15105,8 +15128,7 @@ components:
|
|
|
15105
15128
|
enum:
|
|
15106
15129
|
- Success
|
|
15107
15130
|
result:
|
|
15108
|
-
|
|
15109
|
-
- $ref: '#/components/schemas/Address'
|
|
15131
|
+
$ref: '#/components/schemas/Address'
|
|
15110
15132
|
place_id:
|
|
15111
15133
|
title: ID
|
|
15112
15134
|
type: string
|
|
@@ -15542,7 +15564,7 @@ components:
|
|
|
15542
15564
|
count:
|
|
15543
15565
|
example: 232
|
|
15544
15566
|
minimum: 0
|
|
15545
|
-
type:
|
|
15567
|
+
type: integer
|
|
15546
15568
|
format: int32
|
|
15547
15569
|
description: The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`
|
|
15548
15570
|
updatedAt:
|