@addresszen/openapi 2.0.1 → 3.0.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,27 +1,27 @@
1
1
  {
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
- "version": "2.0.0",
4
+ "version": "3.0.0",
5
5
  "license": {
6
6
  "name": "AGPLv3",
7
7
  "url": "https://opensource.org/licenses/AGPL-3.0"
8
8
  },
9
9
  "title": "API Reference - AddressZen",
10
10
  "termsOfService": "https://terms.addresszen.com",
11
- "description": "# Getting Started\n\n## Overview\n\n### Access\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 recommend using HTTPS only although HTTP is available.\n\nWe use appropriate HTTP status codes where possible to indicate the request status.\n\n### Rate Limiting\n\nEach IP address is rate limited at 30 requests per second. Tripping the rate limit will result in a 503 response.\n\nThe autocomplete API also has an additional rate limit.\n\nIf you expect to breach the limit please contact us and we can move you to an endpoint with a higher limit.\n\n### JSONP\n\n[JSONP](http://en.wikipedia.org/wiki/JSONP) requests are supported. Include a `callback=` in your request as a query parameter. Your results return wrapped in a function designated by your request.\n\n## Authentication\n\nMost requests require an **API key** for authentication. Authenticate by passing an `api_key` as part of the query string. For example:\n\n```\napi.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=parkside\n```\n\nAlternatively, authentication can be transmitted via the `Authorization` header using the following scheme:\n\n```\nAuthorization: IDEALPOSTCODES api_key=\"iddqd\" [other_key=\"foo\"]\n```\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\nPlease note that the 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 is accompanied with a HTTP status code of 200 and a response code of 2000 (found in the body).\n\nAn error has occurred if the HTTP status code is not 200. Errors can range from a benign 404 (resource not found) to more urgent errors (your API Key ran out of credit, failed authentication, etc).\n\n## Testing\n\nEach new account comes with a free test balance. Contact us if you need more for testing and integration.\n\n### Community Key\n\nOur documentation and demos make heavy use of our community key `iddqd`. This allows for convenient access for trialing the API.\n\nMany restrictions on this key are relaxed to allow developers make test requests. This key has a limit of 15 lookups per IP address per day as well as a daily usage cap. If you hit any limit restrictions, you can continue testing the API by creating a key of your own and using our free test methods.\n\nPlease be kind with the community key. We're trusting everyone to use it responsibly so that other developers may trial the API. Thank you!\n\n## Metadata\n\nRequests that affect your balance may be annotated with arbitrary metadata. This data is stored along with your lookup history and can be queried at a later date via the API or the dashboard. We call the ability to label your requests [tagging](https://docs.ideal-postcodes.co.uk/docs/guides/tags).\n\n# Response Codes\n\nThe API returns two indicators to help you to determine the status of each HTTP request.\n\nThe first is the **HTTP Status**, which is found in the status-line of all HTTP requests. The API will return status codes that adhere to HTTP /1.1 Specifications wherever possible.\n\n`2XX` status codes indicates 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 will provide a more specific reason if a failure has occurred and can point you in the right direction when debugging.\n\nPlease use the glossary of code numbers and HTTP status codes below when debugging your requests.\n\n## 200 Request Success\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | -------------------------------------------- |\n| 200 | 2000 | Success. Request was completed successfully. |\n\n## 400 Bad Request\n\nThe request could not be understood due to some input error.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| 400 | 4000 | Invalid syntax submitted. Some part of your request was malformed or did not match our specifications. |\n| 400 | 4001 | Validation failed on your submitted data. Some of the data you provided did not meet our validation requirements, e.g. string length. |\n| 400 | 4005 | Invalid start date. Please ensure start dates are provided as a UTC Timestamp in milliseconds. |\n| 400 | 4006 | Invalid end date. Please ensure end dates are provided as a UTC Timestamp in milliseconds. |\n| 400 | 4007 | Invalid date range. Check if your start and end dates are in the right order. |\n| 400 | 4008 | Invalid date range. Check that your date range is 90 days or less. |\n| 400 | 4009 | Too many tags. Please specify no more than 3 tags to query. |\n\n## 401 Unauthorised\n\nAuthorization credentials are not valid.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 401 | 4010 | Invalid Key. The `api_key` you provided is not valid. |\n| 401 | 4011 | Requesting URL not on whitelist. The cross domain request is not coming from a whitelisted URL. You can update or disable your allowed URLs via your Key settings. |\n| 401 | 4012 | Failed user authentication. Invalid `user_token` presented. |\n| 401 | 4013 | Licensee Key is required. Sublicensed keys require you need to present licensee credentials via the `licensee` parameter. |\n\n## 402 Request Failed\n\nYour request is well-formed but are not able to complete your request for another reason.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 402 | 4020 | Key balance depleted. You're out of lookups on your API Key. |\n| 402 | 4021 | Limit reached. One of your lookup limits has been breached for today. This could either be your total daily limit on your key or the individual IP limit. You can either wait for for the limit to reset (after a day) or manually disable or increase your limit. |\n\n## 404 Resource Not Found\n\nThe resource you requested does not exist.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | --------------------------------------------------------------------------------------------- |\n| 404 | 4040 | Postcode not found. The postcode you have submitted does not exist. |\n| 404 | 4041 | User not found. Your user could not be identified given the credentials you presented. |\n| 404 | 4042 | Key not found. Your key could not be identified given the credentials you presented. |\n| 404 | 4044 | No UDPRN found. No address is associated with the UDPRN queried |\n| 404 | 4045 | No licensee found. Your licensee could not be identified given the credentials you presented. |\n| 404 | 4046 | No UMPRN found. No Multiple Residence premise is associated with the UMPRN queried. |\n\n## 500 Server Error\n\nA error occurred on our server.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 500 | 5000 | An error occurred on our end. These errors are logged and queued so we can understand what went wrong. However, if you need speedy resolution please email support |\n| 500 | 5001 | Akin to 5000. |\n| 500 | 5002 | The server took too long to process on our end, so we aborted the request. You may retry the request. |\n",
11
+ "description": "# Getting Started\n\n## Overview\n\n### Access\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 recommend using HTTPS only although HTTP is available.\n\nWe use appropriate HTTP status codes where possible to indicate the request status.\n\n### Rate Limiting\n\nEach IP address is rate limited at 30 requests per second. Tripping the rate limit will result in a 503 response.\n\nThe autocomplete API also has an additional rate limit.\n\nIf you expect to breach the limit please contact us and we can move you to an endpoint with a higher limit.\n\n### JSONP\n\n[JSONP](http://en.wikipedia.org/wiki/JSONP) requests are supported. Include a `callback=` in your request as a query parameter. Your results return wrapped in a function designated by your request.\n\n## Authentication\n\nMost requests require an **API key** for authentication. Authenticate by passing an `api_key` as part of the query string. For example:\n\n```\napi.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=parkside\n```\n\nAlternatively, authentication can be transmitted via the `Authorization` header using the following scheme:\n\n```\nAuthorization: api_key=\"iddqd\" [other_key=\"foo\"]\n```\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\nPlease note that the 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 is accompanied with a HTTP status code of 200 and a response code of 2000 (found in the body).\n\nAn error has occurred if the HTTP status code is not 200. Errors can range from a benign 404 (resource not found) to more urgent errors (your API Key ran out of credit, failed authentication, etc).\n\n## Testing\n\nEach new account comes with a free test balance. Contact us if you need more for testing and integration.\n\n### Community Key\n\nOur documentation and demos make heavy use of our community key `iddqd`. This allows for convenient access for trialing the API.\n\nMany restrictions on this key are relaxed to allow developers make test requests. This key has a limit of 15 lookups per IP address per day as well as a daily usage cap. If you hit any limit restrictions, you can continue testing the API by creating a key of your own and using our free test methods.\n\nPlease be kind with the community key. We're trusting everyone to use it responsibly so that other developers may trial the API. Thank you!\n\n## Metadata\n\nRequests that affect your balance may be annotated with arbitrary metadata. This data is stored along with your lookup history and can be queried at a later date 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 to determine the status of each HTTP request.\n\nThe first is the **HTTP Status**, which is found in the status-line of all HTTP requests. The API will return status codes that adhere to HTTP /1.1 Specifications wherever possible.\n\n`2XX` status codes indicates 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 will provide a more specific reason if a failure has occurred and can point you in the right direction when debugging.\n\nPlease use the glossary of code numbers and HTTP status codes below when debugging your requests.\n\n## 200 Request Success\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | -------------------------------------------- |\n| 200 | 2000 | Success. Request was completed successfully. |\n\n## 400 Bad Request\n\nThe request could not be understood due to some input error.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| 400 | 4000 | Invalid syntax submitted. Some part of your request was malformed or did not match our specifications. |\n| 400 | 4001 | Validation failed on your submitted data. Some of the data you provided did not meet our validation requirements, e.g. string length. |\n| 400 | 4005 | Invalid start date. Please ensure start dates are provided as a UTC Timestamp in milliseconds. |\n| 400 | 4006 | Invalid end date. Please ensure end dates are provided as a UTC Timestamp in milliseconds. |\n| 400 | 4007 | Invalid date range. Check if your start and end dates are in the right order. |\n| 400 | 4008 | Invalid date range. Check that your date range is 90 days or less. |\n| 400 | 4009 | Too many tags. Please specify no more than 3 tags to query. |\n\n## 401 Unauthorised\n\nAuthorization credentials are not valid.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 401 | 4010 | Invalid Key. The `api_key` you provided is not valid. |\n| 401 | 4011 | Requesting URL not on whitelist. The cross domain request is not coming from a whitelisted URL. You can update or disable your allowed URLs via your Key settings. |\n| 401 | 4012 | Failed user authentication. Invalid `user_token` presented. |\n| 401 | 4013 | Licensee Key is required. Sublicensed keys require you need to present licensee credentials via the `licensee` parameter. |\n\n## 402 Request Failed\n\nYour request is well-formed but are not able to complete your request for another reason.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 402 | 4020 | Key balance depleted. You're out of lookups on your API Key. |\n| 402 | 4021 | Limit reached. One of your lookup limits has been breached for today. This could either be your total daily limit on your key or the individual IP limit. You can either wait for for the limit to reset (after a day) or manually disable or increase your limit. |\n\n## 404 Resource Not Found\n\nThe resource you requested does not exist.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | --------------------------------------------------------------------------------------------- |\n| 404 | 4040 | Postcode not found. The postcode you have submitted does not exist. |\n| 404 | 4041 | User not found. Your user could not be identified given the credentials you presented. |\n| 404 | 4042 | Key not found. Your key could not be identified given the credentials you presented. |\n| 404 | 4044 | No UDPRN found. No address is associated with the UDPRN queried |\n| 404 | 4045 | No licensee found. Your licensee could not be identified given the credentials you presented. |\n| 404 | 4046 | No UMPRN found. No Multiple Residence premise is associated with the UMPRN queried. |\n\n## 500 Server Error\n\nA error occurred on our server.\n\n| HTTP Code | API Code | Description |\n| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 500 | 5000 | An error occurred on our end. These errors are logged and queued so we can understand what went wrong. However, if you need speedy resolution please email support |\n| 500 | 5001 | Akin to 5000. |\n| 500 | 5002 | The server took too long to process on our end, so we aborted the request. You may retry the request. |\n",
12
12
  "contact": {
13
- "email": "support@ideal-postcodes.co.uk",
13
+ "email": "support@addresszen.com",
14
14
  "name": "Support",
15
- "url": "https://ideal-postcodes.co.uk/support"
15
+ "url": "https://addresszen.com/support"
16
16
  }
17
17
  },
18
18
  "externalDocs": {
19
19
  "description": "More on our APIs, libraries with guides and examples",
20
- "url": "https://docs.ideal-postcodes.co.uk"
20
+ "url": "https://docs.addresszen.com"
21
21
  },
22
22
  "servers": [
23
23
  {
24
- "url": "https://api.ideal-postcodes.co.uk/v1",
24
+ "url": "https://api.addresszen.com/v1",
25
25
  "description": "API Server",
26
26
  "variables": {}
27
27
  }
@@ -47,20 +47,20 @@
47
47
  "name": "Configs",
48
48
  "description": "The Config resource allows users to assign serialised configuration data to API Keys. The payloads assigned to a Config object can later be retrieved to dynamically configure your integration.\n\nUseful if you need to configure your integration remotely rather than editing code in situ.\n"
49
49
  },
50
+ {
51
+ "name": "suggestion",
52
+ "x-displayName": "Address Suggestion",
53
+ "description": "Address Suggestions are simple, human readable representations of an address. This format is sufficient tfor 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
+ },
50
55
  {
51
56
  "name": "usps_address",
52
57
  "x-displayName": "US Address",
53
- "description": "<SchemaDefinition schemaRef=\"#/components/schemas/UspsAddress\" />\n"
58
+ "description": "Standard US Address format as reported by USPS.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/UspsAddress\" />\n"
54
59
  },
55
60
  {
56
61
  "name": "uk_address",
57
62
  "x-displayName": "UK Address",
58
- "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PafAddress\" />\n"
59
- },
60
- {
61
- "name": "suggestion",
62
- "x-displayName": "Global Address Suggestion",
63
- "description": "<SchemaDefinition schemaRef=\"#/components/schemas/GlobalAddressSuggestion\" />\n"
63
+ "description": "Standard UK Address format as reported by Royal Mail's Postcode Address File (PAF). PAF is the most complete and up-to-date address database in the UK.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PafAddress\" />\n"
64
64
  }
65
65
  ],
66
66
  "x-tagGroups": [
@@ -113,7 +113,6 @@
113
113
  "name": "api_key",
114
114
  "in": "query",
115
115
  "style": "form",
116
- "required": true,
117
116
  "explode": false,
118
117
  "schema": {
119
118
  "$ref": "#/components/schemas/ApiKeyParam"
@@ -166,12 +165,12 @@
166
165
  {
167
166
  "lang": "http",
168
167
  "label": "URL",
169
- "source": "https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA?api_key=iddqd\n"
168
+ "source": "https://api.addresszen.com/v1/postcodes/SW1A2AA?api_key=iddqd\n"
170
169
  },
171
170
  {
172
171
  "lang": "cURL",
173
172
  "label": "CLI",
174
- "source": "curl -G -k \\\n--url 'https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA' \\\n--d \"api_key=iddqd\"\n"
173
+ "source": "curl -G -k \\\n--url 'https://api.addresszen.com/v1/postcodes/SW1A2AA' \\\n--d \"api_key=iddqd\"\n"
175
174
  }
176
175
  ]
177
176
  }
@@ -199,7 +198,6 @@
199
198
  {
200
199
  "name": "api_key",
201
200
  "in": "query",
202
- "required": true,
203
201
  "style": "form",
204
202
  "explode": false,
205
203
  "schema": {
@@ -243,12 +241,12 @@
243
241
  {
244
242
  "lang": "http",
245
243
  "label": "URL",
246
- "source": "https://api.ideal-postcodes.co.uk/v1/udprn/0?api_key=iddqd\n"
244
+ "source": "https://api.addresszen.com/v1/udprn/0?api_key=iddqd\n"
247
245
  },
248
246
  {
249
247
  "lang": "cURL",
250
248
  "label": "CLI",
251
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/udprn/0 \\\n -d \"api_key=iddqd\"\n"
249
+ "source": "curl -k -G https://api.addresszen.com/v1/udprn/0 \\\n -d \"api_key=iddqd\"\n"
252
250
  }
253
251
  ]
254
252
  }
@@ -275,7 +273,6 @@
275
273
  },
276
274
  {
277
275
  "name": "api_key",
278
- "required": true,
279
276
  "in": "query",
280
277
  "style": "form",
281
278
  "explode": false,
@@ -320,12 +317,12 @@
320
317
  {
321
318
  "lang": "http",
322
319
  "label": "URL",
323
- "source": "https://api.ideal-postcodes.co.uk/v1/umprn/0?api_key=iddqdmr\n"
320
+ "source": "https://api.addresszen.com/v1/umprn/0?api_key=iddqdmr\n"
324
321
  },
325
322
  {
326
323
  "lang": "cURL",
327
324
  "label": "CLI",
328
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/umprn/0 \\\n -d \"api_key=iddqdmr\"\n"
325
+ "source": "curl -k -G https://api.addresszen.com/v1/umprn/0 \\\n -d \"api_key=iddqdmr\"\n"
329
326
  }
330
327
  ]
331
328
  }
@@ -397,7 +394,6 @@
397
394
  "name": "user_token",
398
395
  "in": "query",
399
396
  "style": "form",
400
- "required": true,
401
397
  "explode": false,
402
398
  "schema": {
403
399
  "$ref": "#/components/schemas/UserTokenParam"
@@ -504,12 +500,12 @@
504
500
  {
505
501
  "lang": "http",
506
502
  "label": "URL",
507
- "source": "https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage?user_token=my_secret_token\n"
503
+ "source": "https://api.addresszen.com/v1/keys/iddqd/usage?user_token=my_secret_token\n"
508
504
  },
509
505
  {
510
506
  "lang": "cURL",
511
507
  "label": "CLI",
512
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage \\\n -d \"user_token=my_secret_token\"\n"
508
+ "source": "curl -k -G https://api.addresszen.com/v1/keys/iddqd/usage \\\n -d \"user_token=my_secret_token\"\n"
513
509
  }
514
510
  ]
515
511
  }
@@ -521,7 +517,7 @@
521
517
  ],
522
518
  "summary": "Logs (CSV)",
523
519
  "operationId": "KeyLogs",
524
- "description": "Reports lookup information on a key for paid lookups.\n\nThis method requires a `user_token`, which can be found on your [accounts page](https://ideal-postcodes.co.uk/account).\n\nA maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.\n\n## Download Usage History (CSV)\n\n`GET /keys/:key/lookups`\n\nReturns a CSV download of lookups performed and associated information.\n\nNote that the Content-Type returned will be CSV (text/csv). For a non 200 response, the `Content-Type` will revert to JSON with the error code and message embedded.\n\n## Data Redaction\n\nPersonally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.\n\nBy default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.\n\nYou may prevent PII collection altogether by setting the interval to `0` days.\n",
520
+ "description": "Reports lookup information on a key for paid lookups.\n\nThis method requires a `user_token`, which can be found on your [accounts page](https://addresszen.com/account).\n\nA maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.\n\n## Download Usage History (CSV)\n\n`GET /keys/:key/lookups`\n\nReturns a CSV download of lookups performed and associated information.\n\nNote that the Content-Type returned will be CSV (text/csv). For a non 200 response, the `Content-Type` will revert to JSON with the error code and message embedded.\n\n## Data Redaction\n\nPersonally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.\n\nBy default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.\n\nYou may prevent PII collection altogether by setting the interval to `0` days.\n",
525
521
  "parameters": [
526
522
  {
527
523
  "name": "key",
@@ -582,12 +578,12 @@
582
578
  {
583
579
  "lang": "http",
584
580
  "label": "URL",
585
- "source": "https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups?user_token=my_secret_token\n"
581
+ "source": "https://api.addresszen.com/v1/keys/iddqd/lookups?user_token=my_secret_token\n"
586
582
  },
587
583
  {
588
584
  "lang": "cURL",
589
585
  "label": "CLI",
590
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups \\\n -d \"user_token=my_secret_token\"\n"
586
+ "source": "curl -k -G https://api.addresszen.com/v1/keys/iddqd/lookups \\\n -d \"user_token=my_secret_token\"\n"
591
587
  }
592
588
  ]
593
589
  }
@@ -598,14 +594,13 @@
598
594
  "Address Search"
599
595
  ],
600
596
  "summary": "Find Address",
601
- "description": "The address autocomplete API returns a list of address suggestions that match the query ordered by relevance score.\n\nThis API can be used to power realtime address finders, also known as address autofill or address autocomplete.\n\nIf you wish to quickly add address autocompletion to your address forms, see [Address Finder](/address-finder) and [associated demos](/address-finder-demo).\n\n## Implementing Address Autocomplete\n\nRetrieving addresses using Address Autocomplete is a 2 step process.\n\n1. Retrieve partial address suggestions via `/autocomplete/addresses`\n2. Retrieve the entire address by following the URL provided by the suggestion\n\nStep 2 will decrement your lookup balance.\n\nPlease note, this API is not intended to be a free standalone resource.\n\n## Filters\n\nYou can strictly narrow your result by adding filters to your querystring which correspond with an address attribute.\n\nFor instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.\n\nIf a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.\n\nYou can also scope using multiple terms for the same filter with a comma separated list of terms. E.g. Restrict results to E1, E2 and E3 outward codes: `postcode_outward=e1,e2,e3`. Multiple terms are <code>OR</code>'ed, i.e. the matching result sets are combined.\n\nAll filters can accept multiple terms unless stated otherwise below.\n\nMultiple filters can also be combined. E.g. Restrict results to small user organisations in the N postcode area: `su_organisation_indicator=Y&postcode_area=n`. Multiple filters are <code>AND</code>'ed, i.e. each additional filter narrows the result set.\n\nA maximum of **10** terms are allowed across all filters.\n\n## Biases\n\nYou can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.\n\nBiased searches, unlike filtered searches, also allow unmatched addresses to appear. These will rank lower.\n\nFor instance, can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.\n\nNo bias effect applies to bias terms that are invalid.\ne.g. `bias_postcode=SW1A2AAA`\n\nYou may scope using multiple terms for the same bias with a comma separated list of terms. E.g. Restrict results to `E1`, `E2` and `E3` outward codes: <code>bias_postcode_outward=e1,e2,e3</code>.\n\nAll biases can accept multiple terms unless stated otherwise below.\n\nA combined maximum of **5** terms are allowed across all biases.\n\n## Suggestion Format\n\nThe suggestion format is prone to change over time. Attempts to parse the suggestion may result in your integration breaking. Instead use the suggestion as-is.\n\n## Rate Limiting\n\nYou can make up to 3000 requests to the autocomplete API within a 5 minute span. The HTTP Header contains information on your current rate limit.\n\n| Header | Description |\n| ----------------------- | -------------------------------------------------------------------------------------- |\n| `X-RateLimit-Limit` | The maximum number of requests that can be made in 5 minutes |\n| `X-RateLimit-Remaining` | The remaining requests within the current rate limit window |\n| `X-RateLimit-Reset` | The time when the rate limit window resets in Unix Time (seconds) or UTC Epoch seconds |\n\n## Pricing\n\nThis API currently does not affect your balance. However, resolving a suggestion into a full address requires a paid request.\n\nPlease note, this API is not intended as a standalone free resource. Integrations that consistently make autocomplete requests without a paid request to resolve an address may be disrupted via tightened rate limits. Continued misuse will result in account suspension.\n",
597
+ "description": "The address autocomplete API returns a list of address suggestions that match the query ordered by relevance.\n\nThis API can be used to power realtime address finders, also known as address autofill or address autocomplete.\n\nConsider using our Address Autocomplete JavaScript libraries to add address lookup to a form in moments.\n\n## Implementing Address Autocomplete\n\nRapid address autocompletion using our Address Autocomplete API is a 2 step process.\n\n1. Retrieve partial address suggestions via `/autocomplete/addresses`\n2. Retrieve the entire address with the ID provided in the suggestion\n\nStep 2 will decrement your lookup balance.\n\nPlease note, this API is not intended to be a free standalone resource.\n\n## Filters\n\nYou can strictly narrow your result by adding filters to your querystring. For instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.\n\nIf a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.\n\nYou can also scope using multiple terms for the same filter with a comma separated list of terms. E.g. Restrict results to E1, E2 and E3 outward codes: `postcode_outward=e1,e2,e3`. Multiple terms are `OR`'ed, i.e. the matching result sets are combined.\n\nAll filters can accept multiple terms unless stated otherwise below.\n\nFilters can also be combined. E.g. Restrict results to small user organisations in the N postcode area: `su_organisation_indicator=Y&postcode_area=n`. Multiple filters are `AND`'ed, i.e. each additional filter narrows the result set.\n\nA maximum of **10** terms are allowed across all filters.\n\n## Biases\n\nYou can boost certain addresses results that match specific address criteria. All bias searches are prefixed with `bias_`.\n\nBiasing (unlike filtering) also allow unmatched addresses to appear with lower precedence.\n\nFor instance, can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.\n\nNo bias effect applies to bias terms that are invalid. e.g. `bias_postcode=SW1A2AAA`\n\nYou may scope using multiple terms for the same bias with a comma separated list of terms. E.g. Restrict results to `E1`, `E2` and `E3` outward codes: <code>bias_postcode_outward=e1,e2,e3</code>.\n\nAll biases can accept multiple terms unless stated otherwise below.\n\nA combined maximum of **5** terms are allowed across all biases.\n\n## Suggestion Format\n\nThe suggestion format is prone to change over time. Attempts to parse the suggestion may result in your integration breaking. Instead use the suggestion as-is.\n\n## Rate Limiting\n\nYou can make up to 3000 requests to the autocomplete API within a 5 minute span. The HTTP Header contains information on your current rate limit.\n\n| Header | Description |\n| ----------------------- | -------------------------------------------------------------------------------------- |\n| `X-RateLimit-Limit` | The maximum number of requests that can be made in 5 minutes |\n| `X-RateLimit-Remaining` | The remaining requests within the current rate limit window |\n| `X-RateLimit-Reset` | The time when the rate limit window resets in Unix Time (seconds) or UTC Epoch seconds |\n\n## Pricing\n\nThis API currently does not affect your balance. However, resolving a suggestion into a full address requires a paid request.\n\nPlease note, this API is not intended as a standalone free resource. Integrations that consistently make autocomplete requests without a paid request to resolve an address may be disrupted via tightened rate limits. Continued misuse will result in account suspension.\n",
602
598
  "operationId": "AddressAutocomplete",
603
599
  "parameters": [
604
600
  {
605
601
  "name": "api_key",
606
602
  "in": "query",
607
603
  "style": "form",
608
- "required": true,
609
604
  "explode": false,
610
605
  "schema": {
611
606
  "$ref": "#/components/schemas/ApiKeyParam"
@@ -851,12 +846,12 @@
851
846
  {
852
847
  "lang": "http",
853
848
  "label": "URL",
854
- "source": "https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing\n"
849
+ "source": "https://api.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing\n"
855
850
  },
856
851
  {
857
852
  "lang": "cURL",
858
853
  "label": "CLI",
859
- "source": "curl -k -G 'https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses' \\\n -d 'api_key=iddqd' \\\n --data-urlencode 'query=10 downing'\n"
854
+ "source": "curl -k -G 'https://api.addresszen.com/v1/autocomplete/addresses' \\\n -d 'api_key=iddqd' \\\n --data-urlencode 'query=10 downing'\n"
860
855
  }
861
856
  ]
862
857
  }
@@ -884,7 +879,6 @@
884
879
  {
885
880
  "name": "api_key",
886
881
  "in": "query",
887
- "required": true,
888
882
  "style": "form",
889
883
  "explode": false,
890
884
  "schema": {
@@ -919,12 +913,12 @@
919
913
  {
920
914
  "lang": "http",
921
915
  "label": "URL",
922
- "source": "https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd\n"
916
+ "source": "https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd\n"
923
917
  },
924
918
  {
925
919
  "lang": "cURL",
926
920
  "label": "CLI",
927
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd \\\n -d \"api_key=iddqd\"\n"
921
+ "source": "curl -k -G https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd \\\n -d \"api_key=iddqd\"\n"
928
922
  }
929
923
  ]
930
924
  }
@@ -952,7 +946,6 @@
952
946
  {
953
947
  "name": "api_key",
954
948
  "in": "query",
955
- "required": true,
956
949
  "style": "form",
957
950
  "explode": false,
958
951
  "schema": {
@@ -987,12 +980,12 @@
987
980
  {
988
981
  "lang": "http",
989
982
  "label": "URL",
990
- "source": "https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd\n"
983
+ "source": "https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd\n"
991
984
  },
992
985
  {
993
986
  "lang": "cURL",
994
987
  "label": "CLI",
995
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd \\\n -d \"api_key=iddqd\"\n"
988
+ "source": "curl -k -G https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd \\\n -d \"api_key=iddqd\"\n"
996
989
  }
997
990
  ]
998
991
  }
@@ -1003,7 +996,7 @@
1003
996
  "UK"
1004
997
  ],
1005
998
  "summary": "Extract Addresses",
1006
- "description": "Extract a list of complete addresses that match the query ordered by relevance score. This query accepts an optional limit and page query (defaults to 10 and 0 respectively).\n\nIf a valid postcode is passed as the query string, the entire address list for that postcode is passed as a result. Note, in these cases, limit and page parameters are ignored.\n\nThis API is designed as a multi-purpose tool for generating address lists, cleansing and wholesale data extraction according to specific parameters.\n\nFor address autocomplete, see our address finder API - which is designed for speed and address completion.\n\n## Filters\n\nYou can strictly narrow your result by adding filters to your query string which correspond with an address attribute.\n\nFor instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.\n\nIf a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.\n\nYou can also scope using multiple terms for the same filter with a comma separated list of terms. E.g. Restrict results to E1, E2 and E3 outward codes: `postcode_outward=e1,e2,e3`. Multiple terms are `OR`'ed, i.e. the matching result sets are combined.\n\nAll filters can accept multiple terms unless stated otherwise below.\n\nMultiple filters can also be combined. E.g. Restrict results to small user organisations in the N postcode area: `su_organisation_indicator=Y&postcode_area=n`. Multiple filters are `AND`'ed, i.e. each additional filter narrows the result set.\n\nA combined maximum of 5 terms are allowed across all filters.\n\n## Biases\n\nYou can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.\n\nBiased searches, unlike filtered searches, also allow unmatched addresses to appear . These will rank lower.\n\nFor instance, you can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.\n\nIf a bias term is invalid, e.g. `bias_postcode=SW1A2AAA` no bias effect is applied.\n\nYou may scope using multiple terms for the same bias with a comma separated list of terms. E.g. Restrict results to `E1`, `E2` and `E3` outward codes: `bias_postcode_outward=e1,e2,e3`.\n\nAll biases can accept multiple terms unless stated otherwise below.\n\nA combined maximum of 5 terms are allowed across all biases.\n\n## Search by Postcode and Building Name or Number\n\nSearch by postcode and building attribute with the postcode filter and query argument. E.g. For \"SW1A 2AA Prime Minister\" `/v1/addresses?postcode=sw1a2aa&q=prime minister`.\n\nThe advantage of using filters is a postcode mismatch does not result in a lookup as no results are returned.\n\n#### Search By UPRN\n\nSearch by UPRN using the `uprn` filter and excluding the query argument. E.g. `/v1/addresses?uprn=100`.\n\n## Testing\n\n- **ID1 1QD** Returns a successful query response `2000`\n- **ID1 KFA** Returns an empty query response `2000`\n- **ID1 CLIP** Returns \"no lookups remaining\" error `4020`\n- **ID1 CHOP** Returns \"daily (or individual) lookup limit breached\" error `4021`\n\nTest request undergo the usual authentication and restriction rules. This is to help surface any issues that occur during implementation and does not cost you a lookup.\n",
999
+ "description": "Extract a list of complete addresses that match the query ordered by relevance score. This query accepts an optional limit and page query (defaults to 10 and 0 respectively).\n\nIf a valid postcode is passed as the query string, the entire address list for that postcode is passed as a result. Note, in these cases, limit and page parameters are ignored.\n\nThis API is designed as a multi-purpose tool for generating address lists, cleansing and wholesale data extraction according to specific parameters.\n\nFor address autocomplete, see our address finder API - which is designed for speed and address completion.\n\n## Reverse Geocoding\n\nReturn a list of addresses around a point using the lon= and lat= querystring arguments. Addresses will be sorted in order of distance to the point. The search radius is 100m.\n\n## Filters\n\nYou can strictly narrow your result by adding filters to your query string which correspond with an address attribute.\n\nFor instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.\n\nIf a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.\n\nYou can also scope using multiple terms for the same filter with a comma separated list of terms. E.g. Restrict results to E1, E2 and E3 outward codes: `postcode_outward=e1,e2,e3`. Multiple terms are `OR`'ed, i.e. the matching result sets are combined.\n\nAll filters can accept multiple terms unless stated otherwise below.\n\nMultiple filters can also be combined. E.g. Restrict results to small user organisations in the N postcode area: `su_organisation_indicator=Y&postcode_area=n`. Multiple filters are `AND`'ed, i.e. each additional filter narrows the result set.\n\nA combined maximum of 5 terms are allowed across all filters.\n\n## Biases\n\nYou can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.\n\nBiased searches, unlike filtered searches, also allow unmatched addresses to appear . These will rank lower.\n\nFor instance, you can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.\n\nIf a bias term is invalid, e.g. `bias_postcode=SW1A2AAA` no bias effect is applied.\n\nYou may scope using multiple terms for the same bias with a comma separated list of terms. E.g. Restrict results to `E1`, `E2` and `E3` outward codes: `bias_postcode_outward=e1,e2,e3`.\n\nAll biases can accept multiple terms unless stated otherwise below.\n\nA combined maximum of 5 terms are allowed across all biases.\n\n## Search by Postcode and Building Name or Number\n\nSearch by postcode and building attribute with the postcode filter and query argument. E.g. For \"SW1A 2AA Prime Minister\" `/v1/addresses?postcode=sw1a2aa&q=prime minister`.\n\nThe advantage of using filters is a postcode mismatch does not result in a lookup as no results are returned.\n\n#### Search By UPRN\n\nSearch by UPRN using the `uprn` filter and excluding the query argument. E.g. `/v1/addresses?uprn=100`.\n\n## Testing\n\n- **ID1 1QD** Returns a successful query response `2000`\n- **ID1 KFA** Returns an empty query response `2000`\n- **ID1 CLIP** Returns \"no lookups remaining\" error `4020`\n- **ID1 CHOP** Returns \"daily (or individual) lookup limit breached\" error `4021`\n\nTest request undergo the usual authentication and restriction rules. This is to help surface any issues that occur during implementation and does not cost you a lookup.\n",
1007
1000
  "operationId": "Addresses",
1008
1001
  "parameters": [
1009
1002
  {
@@ -1053,6 +1046,24 @@
1053
1046
  "$ref": "#/components/schemas/FilterParam"
1054
1047
  }
1055
1048
  },
1049
+ {
1050
+ "name": "lon",
1051
+ "in": "query",
1052
+ "style": "form",
1053
+ "explode": false,
1054
+ "schema": {
1055
+ "$ref": "#/components/schemas/AddressLongitudeParam"
1056
+ }
1057
+ },
1058
+ {
1059
+ "name": "lat",
1060
+ "in": "query",
1061
+ "style": "form",
1062
+ "explode": false,
1063
+ "schema": {
1064
+ "$ref": "#/components/schemas/AddressLatitudeParam"
1065
+ }
1066
+ },
1056
1067
  {
1057
1068
  "name": "postcode_outward",
1058
1069
  "in": "query",
@@ -1232,12 +1243,12 @@
1232
1243
  {
1233
1244
  "lang": "http",
1234
1245
  "label": "URL",
1235
- "source": "https://api.ideal-postcodes.co.uk/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london\n"
1246
+ "source": "https://api.addresszen.com/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london\n"
1236
1247
  },
1237
1248
  {
1238
1249
  "lang": "cURL",
1239
1250
  "label": "CLI",
1240
- "source": "curl -k -G 'https://api.ideal-postcodes.co.uk/v1/addresses' \\\n -d 'api_key=iddqd' \\\n --data-urlencode 'query=10 downing street london'\n"
1251
+ "source": "curl -k -G 'https://api.addresszen.com/v1/addresses' \\\n -d 'api_key=iddqd' \\\n --data-urlencode 'query=10 downing street london'\n"
1241
1252
  }
1242
1253
  ]
1243
1254
  }
@@ -1275,7 +1286,6 @@
1275
1286
  {
1276
1287
  "name": "user_token",
1277
1288
  "in": "query",
1278
- "required": true,
1279
1289
  "style": "form",
1280
1290
  "explode": false,
1281
1291
  "schema": {
@@ -1337,7 +1347,6 @@
1337
1347
  {
1338
1348
  "name": "user_token",
1339
1349
  "in": "query",
1340
- "required": true,
1341
1350
  "style": "form",
1342
1351
  "explode": false,
1343
1352
  "schema": {
@@ -1401,7 +1410,6 @@
1401
1410
  {
1402
1411
  "name": "user_token",
1403
1412
  "in": "query",
1404
- "required": true,
1405
1413
  "style": "form",
1406
1414
  "explode": false,
1407
1415
  "schema": {
@@ -1454,7 +1462,6 @@
1454
1462
  {
1455
1463
  "name": "user_token",
1456
1464
  "in": "query",
1457
- "required": true,
1458
1465
  "style": "form",
1459
1466
  "explode": false,
1460
1467
  "schema": {
@@ -1541,7 +1548,6 @@
1541
1548
  {
1542
1549
  "name": "user_token",
1543
1550
  "in": "query",
1544
- "required": true,
1545
1551
  "style": "form",
1546
1552
  "explode": false,
1547
1553
  "schema": {
@@ -1595,7 +1601,6 @@
1595
1601
  {
1596
1602
  "name": "user_token",
1597
1603
  "in": "query",
1598
- "required": true,
1599
1604
  "style": "form",
1600
1605
  "explode": false,
1601
1606
  "schema": {
@@ -1657,7 +1662,6 @@
1657
1662
  {
1658
1663
  "name": "user_token",
1659
1664
  "in": "query",
1660
- "required": true,
1661
1665
  "style": "form",
1662
1666
  "explode": false,
1663
1667
  "schema": {
@@ -1804,7 +1808,6 @@
1804
1808
  {
1805
1809
  "name": "user_token",
1806
1810
  "in": "query",
1807
- "required": true,
1808
1811
  "style": "form",
1809
1812
  "explode": false,
1810
1813
  "schema": {
@@ -1921,7 +1924,6 @@
1921
1924
  {
1922
1925
  "name": "user_token",
1923
1926
  "in": "query",
1924
- "required": true,
1925
1927
  "style": "form",
1926
1928
  "explode": false,
1927
1929
  "schema": {
@@ -2121,10 +2123,7 @@
2121
2123
  "oneOf": [
2122
2124
  {
2123
2125
  "type": "string",
2124
- "description": "If premise is not multiple occupancy, this will be an empty string",
2125
- "enum": [
2126
- ""
2127
- ]
2126
+ "description": "If premise is not multiple occupancy, this will be an empty string"
2128
2127
  },
2129
2128
  {
2130
2129
  "type": "number",
@@ -2230,10 +2229,7 @@
2230
2229
  "oneOf": [
2231
2230
  {
2232
2231
  "type": "string",
2233
- "description": "Empty string `\"\"` if not available",
2234
- "enum": [
2235
- ""
2236
- ]
2232
+ "description": "Empty string `\"\"` if not available"
2237
2233
  },
2238
2234
  {
2239
2235
  "type": "number",
@@ -2250,10 +2246,7 @@
2250
2246
  "oneOf": [
2251
2247
  {
2252
2248
  "type": "string",
2253
- "description": "Empty string `\"\"` if not available",
2254
- "enum": [
2255
- ""
2256
- ]
2249
+ "description": "Empty string `\"\"` if not available"
2257
2250
  },
2258
2251
  {
2259
2252
  "type": "number",
@@ -2270,10 +2263,7 @@
2270
2263
  "oneOf": [
2271
2264
  {
2272
2265
  "type": "string",
2273
- "description": "Empty string `\"\"` if not available",
2274
- "enum": [
2275
- ""
2276
- ]
2266
+ "description": "Empty string `\"\"` if not available"
2277
2267
  },
2278
2268
  {
2279
2269
  "type": "number",
@@ -2290,10 +2280,7 @@
2290
2280
  "oneOf": [
2291
2281
  {
2292
2282
  "type": "string",
2293
- "description": "Empty string `\"\"` if not available",
2294
- "enum": [
2295
- ""
2296
- ]
2283
+ "description": "Empty string `\"\"` if not available"
2297
2284
  },
2298
2285
  {
2299
2286
  "type": "number",
@@ -2321,6 +2308,8 @@
2321
2308
  "description": "Indicates the provenance of an address",
2322
2309
  "enum": [
2323
2310
  "paf",
2311
+ "pafw",
2312
+ "pafa",
2324
2313
  "mr",
2325
2314
  "nyb",
2326
2315
  "usps"
@@ -2342,7 +2331,7 @@
2342
2331
  },
2343
2332
  "PafAddress": {
2344
2333
  "title": "Postcode Address File Address",
2345
- "description": "Standard UK Address.",
2334
+ "description": "Standard UK Address. Also known as a Postcode Address File (PAF) address is defined by Royal Mail and updated on a daily cadence.\n\nA PAF Address represents a deliverable endpoint.\n",
2346
2335
  "required": [
2347
2336
  "postcode",
2348
2337
  "postcode_outward",
@@ -2511,7 +2500,7 @@
2511
2500
  },
2512
2501
  "MrAddress": {
2513
2502
  "title": "Multiple Residence Address",
2514
- "description": "Subdivision of a Postcode Address File address. Does not have its own delivery point.",
2503
+ "description": "Subdivision of a Postcode Address File address. Also known as a Multiple Residence or Multiple Occupancy address.\n\nA Multiple Residence address does not have its own deliverable endpoint. Instead it relies on the deliverable endpoint of a parent address, where the parent address can be found on the main Postcode Address File.\n",
2515
2504
  "allOf": [
2516
2505
  {
2517
2506
  "$ref": "#/components/schemas/PafAddress"
@@ -2531,7 +2520,7 @@
2531
2520
  },
2532
2521
  "NybAddress": {
2533
2522
  "title": "Not Yet Built Address",
2534
- "description": "UK premise under construction",
2523
+ "description": "A UK premise under construction and currently not occupied.\n\nThis dataset is updated by Royal Mail on a monthly cadence.\n",
2535
2524
  "allOf": [
2536
2525
  {
2537
2526
  "$ref": "#/components/schemas/PafAddress"
@@ -2542,7 +2531,7 @@
2542
2531
  "dataset": {
2543
2532
  "$ref": "#/components/schemas/Dataset",
2544
2533
  "enum": [
2545
- "mr"
2534
+ "nyb"
2546
2535
  ]
2547
2536
  }
2548
2537
  }
@@ -2706,13 +2695,42 @@
2706
2695
  }
2707
2696
  }
2708
2697
  },
2698
+ "Context": {
2699
+ "title": "Context",
2700
+ "type": "string",
2701
+ "enum": [
2702
+ "GBR",
2703
+ "USA"
2704
+ ],
2705
+ "description": "Limits search results within a geographical boundary or country."
2706
+ },
2707
+ "NoContext": {
2708
+ "title": "No Context Provided",
2709
+ "type": "string",
2710
+ "enum": [
2711
+ ""
2712
+ ],
2713
+ "description": "Empty string if no context is provided or key check has failed"
2714
+ },
2709
2715
  "ApiKey": {
2710
2716
  "title": "Key",
2711
2717
  "type": "object",
2712
2718
  "required": [
2713
- "available"
2719
+ "available",
2720
+ "context"
2714
2721
  ],
2715
2722
  "properties": {
2723
+ "context": {
2724
+ "description": "Returns current context if it is in the list of available contexts for this key.\n",
2725
+ "oneOf": [
2726
+ {
2727
+ "$ref": "#/components/schemas/Context"
2728
+ },
2729
+ {
2730
+ "$ref": "#/components/schemas/NoContext"
2731
+ }
2732
+ ]
2733
+ },
2716
2734
  "available": {
2717
2735
  "description": "Determines whether the key can be used by the requesting agent. \n\nReturns false if one of the following conditions are 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",
2718
2736
  "type": "boolean",
@@ -2750,7 +2768,7 @@
2750
2768
  "UserTokenParam": {
2751
2769
  "title": "User Token",
2752
2770
  "type": "string",
2753
- "description": "A secret key used for sensitive operations on your account and API Keys.\n\nYour user token can be retrieved and managed from your [accounts page](https://ideal-postcodes.co.uk/account).\n\nTypically beings `uk_...`\n",
2771
+ "description": "A secret key used for sensitive operations on your account and API Keys.\n\nYour user token can be retrieved and managed from your [accounts page](https://addresszen.com/account).\n\nTypically beings `uk_...`\n",
2754
2772
  "example": "uk_B59ScW1p1HHouf1VqclEPZUx"
2755
2773
  },
2756
2774
  "ApiKeyDailyLimit": {
@@ -3070,15 +3088,6 @@
3070
3088
  }
3071
3089
  }
3072
3090
  },
3073
- "Context": {
3074
- "title": "Context",
3075
- "type": "string",
3076
- "enum": [
3077
- "gbr",
3078
- "usa"
3079
- ],
3080
- "description": "Limits search results within a geographical boundary or country."
3081
- },
3082
3091
  "LimitParam": {
3083
3092
  "title": "Limit",
3084
3093
  "description": "Specifies the maximum number of suggestions to retrieve.\n\nBy default the limit is 10, unless a postcode is queried (then all addresses at that postcode will be returned). Limit can be shortened to `l=`\n",
@@ -3202,14 +3211,13 @@
3202
3211
  "description": "Biases search based on approximate geolocation of IP address.\nSet `bias_ip=true` to enable.",
3203
3212
  "example": "bias_ip=true"
3204
3213
  },
3205
- "PafSuggestion": {
3206
- "title": "UK Postcode Address File Address Autocompletion Hit",
3207
- "description": "Represents an address suggestion from the UK Postcode Address File.",
3214
+ "AddressSuggestion": {
3215
+ "title": "Address Suggestion",
3216
+ "description": "Represents an address suggestion for any address in the world",
3208
3217
  "type": "object",
3209
3218
  "required": [
3210
3219
  "id",
3211
3220
  "suggestion",
3212
- "udprn",
3213
3221
  "urls"
3214
3222
  ],
3215
3223
  "properties": {
@@ -3218,35 +3226,22 @@
3218
3226
  },
3219
3227
  "suggestion": {
3220
3228
  "type": "string",
3221
- "description": "Address suggestion for your given query.",
3229
+ "description": "Address Suggestion to be displayed to the user",
3222
3230
  "example": "Flat 6, 12 Roskear, Camborne, TR14"
3223
3231
  },
3224
- "udprn": {
3225
- "$ref": "#/components/schemas/UDPRN"
3226
- },
3227
3232
  "urls": {
3228
- "required": [
3229
- "udprn"
3230
- ],
3231
- "type": "object",
3232
- "properties": {
3233
- "udprn": {
3234
- "type": "string",
3235
- "description": "URL to retrieve the entire details for a given address suggestion by the UDPRN",
3236
- "example": "/v1/udprn/50985827"
3237
- }
3238
- }
3233
+ "type": "object"
3239
3234
  }
3240
3235
  }
3241
3236
  },
3242
- "MrSuggestion": {
3243
- "title": "Multiple Residence Address Autocompletion Hit",
3237
+ "UkAddressSuggestion": {
3238
+ "title": "UK Address Suggestion",
3239
+ "description": "Represents a possible address given an autocomplete query.\n\nUK Address Suggestions will return a UDPRN attribute if it references a deliverable endpoint found on Royal Mail's Postcode Address File dataset.\n\nUK Address Suggestion will return a UMPRN if it references a multiple occupancy premise found on Royal Mail's Multiple Residence dataset.\n",
3244
3240
  "type": "object",
3245
3241
  "required": [
3246
3242
  "id",
3247
3243
  "suggestion",
3248
3244
  "udprn",
3249
- "umprn",
3250
3245
  "urls"
3251
3246
  ],
3252
3247
  "properties": {
@@ -3255,7 +3250,7 @@
3255
3250
  },
3256
3251
  "suggestion": {
3257
3252
  "type": "string",
3258
- "description": "Address suggestion for your given query.",
3253
+ "description": "Address suggestion for a given query.",
3259
3254
  "example": "Flat 6, 12 Roskear, Camborne, TR14"
3260
3255
  },
3261
3256
  "udprn": {
@@ -3268,11 +3263,10 @@
3268
3263
  "example": 51103417
3269
3264
  },
3270
3265
  "urls": {
3271
- "type": "object",
3272
3266
  "required": [
3273
- "udprn",
3274
- "umprn"
3267
+ "udprn"
3275
3268
  ],
3269
+ "type": "object",
3276
3270
  "properties": {
3277
3271
  "udprn": {
3278
3272
  "type": "string",
@@ -3288,44 +3282,6 @@
3288
3282
  }
3289
3283
  }
3290
3284
  },
3291
- "NybSuggestion": {
3292
- "title": "Not Yet Built Address Autocompletion Hit",
3293
- "allOf": [
3294
- {
3295
- "$ref": "#/components/schemas/PafSuggestion"
3296
- }
3297
- ]
3298
- },
3299
- "GlobalAddressSuggestion": {
3300
- "title": "Global Address Autocompletion Suggestion",
3301
- "description": "Represents an address suggestion for any address in the world",
3302
- "type": "object",
3303
- "required": [
3304
- "id",
3305
- "suggestion",
3306
- "urls"
3307
- ],
3308
- "properties": {
3309
- "id": {
3310
- "$ref": "#/components/schemas/ID"
3311
- },
3312
- "suggestion": {
3313
- "type": "string",
3314
- "description": "Address Suggestion to be displayed to the user",
3315
- "example": "Flat 6, 12 Roskear, Camborne, TR14"
3316
- },
3317
- "urls": {
3318
- "type": "object",
3319
- "properties": {
3320
- "id": {
3321
- "type": "string",
3322
- "description": "URL to retrieve the entire details for a given address suggestion by the UDPRN",
3323
- "example": "/v1/udprn/50985827"
3324
- }
3325
- }
3326
- }
3327
- }
3328
- },
3329
3285
  "AutocompleteResponse": {
3330
3286
  "title": "Address Autocomplete Response",
3331
3287
  "type": "object",
@@ -3346,16 +3302,10 @@
3346
3302
  "items": {
3347
3303
  "oneOf": [
3348
3304
  {
3349
- "$ref": "#/components/schemas/PafSuggestion"
3305
+ "$ref": "#/components/schemas/AddressSuggestion"
3350
3306
  },
3351
3307
  {
3352
- "$ref": "#/components/schemas/MrSuggestion"
3353
- },
3354
- {
3355
- "$ref": "#/components/schemas/NybSuggestion"
3356
- },
3357
- {
3358
- "$ref": "#/components/schemas/GlobalAddressSuggestion"
3308
+ "$ref": "#/components/schemas/UkAddressSuggestion"
3359
3309
  }
3360
3310
  ]
3361
3311
  }
@@ -3377,6 +3327,46 @@
3377
3327
  }
3378
3328
  }
3379
3329
  },
3330
+ "WelshPafAddress": {
3331
+ "title": "Welsh PAF Address",
3332
+ "description": "Welsh language alternative for a PAF Address",
3333
+ "allOf": [
3334
+ {
3335
+ "$ref": "#/components/schemas/PafAddress"
3336
+ },
3337
+ {
3338
+ "type": "object",
3339
+ "properties": {
3340
+ "dataset": {
3341
+ "$ref": "#/components/schemas/Dataset",
3342
+ "enum": [
3343
+ "pafw"
3344
+ ]
3345
+ }
3346
+ }
3347
+ }
3348
+ ]
3349
+ },
3350
+ "PafAliasAddress": {
3351
+ "title": "PAF Alias Address",
3352
+ "description": "PAF Aliases addresses are alternate ways to present an address already found on PAF.\n\nAlias data is information the public chooses to use when addressing mail, but which isn’t actually required for delivery purposes. The Alias data contains records of alternative address details that are included in the address but not necessarily needed for delivery purposes.\n",
3353
+ "allOf": [
3354
+ {
3355
+ "$ref": "#/components/schemas/PafAddress"
3356
+ },
3357
+ {
3358
+ "type": "object",
3359
+ "properties": {
3360
+ "dataset": {
3361
+ "$ref": "#/components/schemas/Dataset",
3362
+ "enum": [
3363
+ "pafa"
3364
+ ]
3365
+ }
3366
+ }
3367
+ }
3368
+ ]
3369
+ },
3380
3370
  "GbrGlobalAddress": {
3381
3371
  "title": "Global Address",
3382
3372
  "description": "Global (non-UK) address in the UK address format",
@@ -3625,6 +3615,12 @@
3625
3615
  {
3626
3616
  "$ref": "#/components/schemas/MrAddress"
3627
3617
  },
3618
+ {
3619
+ "$ref": "#/components/schemas/WelshPafAddress"
3620
+ },
3621
+ {
3622
+ "$ref": "#/components/schemas/PafAliasAddress"
3623
+ },
3628
3624
  {
3629
3625
  "$ref": "#/components/schemas/NybAddress"
3630
3626
  },
@@ -4427,6 +4423,24 @@
4427
4423
  }
4428
4424
  }
4429
4425
  },
4426
+ "AddressLongitudeParam": {
4427
+ "title": "Longitude",
4428
+ "type": "number",
4429
+ "format": "float",
4430
+ "description": "Longitude query for reverse geocoding.\n\nAn accompanying latitude (lat=) query must be submitted for a valid reverse geocode query.\n",
4431
+ "minimum": -90,
4432
+ "maximum": 90,
4433
+ "example": -0.12767
4434
+ },
4435
+ "AddressLatitudeParam": {
4436
+ "title": "Latitude",
4437
+ "type": "number",
4438
+ "format": "float",
4439
+ "description": "Latitude query for reverse geocoding.\n\nAn accompanying longitude (lon=) query must be submitted for a valid reverse geocode query.\n",
4440
+ "minimum": -90,
4441
+ "maximum": 90,
4442
+ "example": 51.503541
4443
+ },
4430
4444
  "AddressResponse": {
4431
4445
  "title": "Address Search Response",
4432
4446
  "type": "object",
@@ -4471,6 +4485,12 @@
4471
4485
  },
4472
4486
  {
4473
4487
  "$ref": "#/components/schemas/NybAddress"
4488
+ },
4489
+ {
4490
+ "$ref": "#/components/schemas/WelshPafAddress"
4491
+ },
4492
+ {
4493
+ "$ref": "#/components/schemas/PafAliasAddress"
4474
4494
  }
4475
4495
  ]
4476
4496
  }