@addresszen/openapi 2.0.2 → 3.1.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.1.0",
5
5
  "license": {
6
6
  "name": "AGPLv3",
7
7
  "url": "https://opensource.org/licenses/AGPL-3.0"
8
8
  },
9
- "title": "API Reference - Ideal Postcodes",
10
- "termsOfService": "https://terms.ideal-postcodes.co.uk",
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.ideal-postcodes.co.uk/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",
9
+ "title": "API Reference - AddressZen",
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: 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,30 @@
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"
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"
59
64
  },
60
65
  {
61
- "name": "suggestion",
62
- "x-displayName": "Global Address Suggestion",
63
- "description": "<SchemaDefinition schemaRef=\"#/components/schemas/GlobalAddressSuggestion\" />\n"
66
+ "name": "ecaf_address",
67
+ "x-displayName": "IE Address",
68
+ "description": "Standard Republic of Ireland Address format as reported by the Eircode ECAF file.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/EcafAddress\" />\n"
69
+ },
70
+ {
71
+ "name": "ecad_address",
72
+ "x-displayName": "IE Address (ECAD)",
73
+ "description": "ECAF file including additional data for each address.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/EcadAddress\" />\n"
64
74
  }
65
75
  ],
66
76
  "x-tagGroups": [
@@ -82,9 +92,11 @@
82
92
  {
83
93
  "name": "Models",
84
94
  "tags": [
95
+ "suggestion",
85
96
  "usps_address",
86
97
  "uk_address",
87
- "suggestion"
98
+ "ecaf_address",
99
+ "ecad_address"
88
100
  ]
89
101
  }
90
102
  ],
@@ -106,14 +118,13 @@
106
118
  "style": "simple",
107
119
  "explode": false,
108
120
  "schema": {
109
- "$ref": "#/components/schemas/Postcode"
121
+ "$ref": "#/components/schemas/paf_postcode"
110
122
  }
111
123
  },
112
124
  {
113
125
  "name": "api_key",
114
126
  "in": "query",
115
127
  "style": "form",
116
- "required": true,
117
128
  "explode": false,
118
129
  "schema": {
119
130
  "$ref": "#/components/schemas/ApiKeyParam"
@@ -151,6 +162,16 @@
151
162
  }
152
163
  }
153
164
  },
165
+ "400": {
166
+ "description": "Bad Request",
167
+ "content": {
168
+ "application/json": {
169
+ "schema": {
170
+ "$ref": "#/components/schemas/BadRequestResponse"
171
+ }
172
+ }
173
+ }
174
+ },
154
175
  "404": {
155
176
  "description": "Postcode Not Found",
156
177
  "content": {
@@ -166,12 +187,12 @@
166
187
  {
167
188
  "lang": "http",
168
189
  "label": "URL",
169
- "source": "https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA?api_key=iddqd\n"
190
+ "source": "https://api.addresszen.com/v1/postcodes/SW1A2AA?api_key=iddqd\n"
170
191
  },
171
192
  {
172
193
  "lang": "cURL",
173
194
  "label": "CLI",
174
- "source": "curl -G -k \\\n--url 'https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA' \\\n--d \"api_key=iddqd\"\n"
195
+ "source": "curl -G -k \\\n--url 'https://api.addresszen.com/v1/postcodes/SW1A2AA' \\\n--d \"api_key=iddqd\"\n"
175
196
  }
176
197
  ]
177
198
  }
@@ -199,7 +220,6 @@
199
220
  {
200
221
  "name": "api_key",
201
222
  "in": "query",
202
- "required": true,
203
223
  "style": "form",
204
224
  "explode": false,
205
225
  "schema": {
@@ -243,12 +263,12 @@
243
263
  {
244
264
  "lang": "http",
245
265
  "label": "URL",
246
- "source": "https://api.ideal-postcodes.co.uk/v1/udprn/0?api_key=iddqd\n"
266
+ "source": "https://api.addresszen.com/v1/udprn/0?api_key=iddqd\n"
247
267
  },
248
268
  {
249
269
  "lang": "cURL",
250
270
  "label": "CLI",
251
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/udprn/0 \\\n -d \"api_key=iddqd\"\n"
271
+ "source": "curl -k -G https://api.addresszen.com/v1/udprn/0 \\\n -d \"api_key=iddqd\"\n"
252
272
  }
253
273
  ]
254
274
  }
@@ -275,7 +295,6 @@
275
295
  },
276
296
  {
277
297
  "name": "api_key",
278
- "required": true,
279
298
  "in": "query",
280
299
  "style": "form",
281
300
  "explode": false,
@@ -320,12 +339,12 @@
320
339
  {
321
340
  "lang": "http",
322
341
  "label": "URL",
323
- "source": "https://api.ideal-postcodes.co.uk/v1/umprn/0?api_key=iddqdmr\n"
342
+ "source": "https://api.addresszen.com/v1/umprn/0?api_key=iddqdmr\n"
324
343
  },
325
344
  {
326
345
  "lang": "cURL",
327
346
  "label": "CLI",
328
- "source": "curl -k -G https://api.ideal-postcodes.co.uk/v1/umprn/0 \\\n -d \"api_key=iddqdmr\"\n"
347
+ "source": "curl -k -G https://api.addresszen.com/v1/umprn/0 \\\n -d \"api_key=iddqdmr\"\n"
329
348
  }
330
349
  ]
331
350
  }
@@ -397,7 +416,6 @@
397
416
  "name": "user_token",
398
417
  "in": "query",
399
418
  "style": "form",
400
- "required": true,
401
419
  "explode": false,
402
420
  "schema": {
403
421
  "$ref": "#/components/schemas/UserTokenParam"
@@ -498,18 +516,28 @@
498
516
  }
499
517
  }
500
518
  }
519
+ },
520
+ "400": {
521
+ "description": "Bad Request",
522
+ "content": {
523
+ "application/json": {
524
+ "schema": {
525
+ "$ref": "#/components/schemas/BadRequestResponse"
526
+ }
527
+ }
528
+ }
501
529
  }
502
530
  },
503
531
  "x-codeSamples": [
504
532
  {
505
533
  "lang": "http",
506
534
  "label": "URL",
507
- "source": "https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage?user_token=my_secret_token\n"
535
+ "source": "https://api.addresszen.com/v1/keys/iddqd/usage?user_token=my_secret_token\n"
508
536
  },
509
537
  {
510
538
  "lang": "cURL",
511
539
  "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"
540
+ "source": "curl -k -G https://api.addresszen.com/v1/keys/iddqd/usage \\\n -d \"user_token=my_secret_token\"\n"
513
541
  }
514
542
  ]
515
543
  }
@@ -521,7 +549,7 @@
521
549
  ],
522
550
  "summary": "Logs (CSV)",
523
551
  "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",
552
+ "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
553
  "parameters": [
526
554
  {
527
555
  "name": "key",
@@ -576,18 +604,28 @@
576
604
  }
577
605
  }
578
606
  }
607
+ },
608
+ "400": {
609
+ "description": "Bad Request",
610
+ "content": {
611
+ "application/json": {
612
+ "schema": {
613
+ "$ref": "#/components/schemas/BadRequestResponse"
614
+ }
615
+ }
616
+ }
579
617
  }
580
618
  },
581
619
  "x-codeSamples": [
582
620
  {
583
621
  "lang": "http",
584
622
  "label": "URL",
585
- "source": "https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups?user_token=my_secret_token\n"
623
+ "source": "https://api.addresszen.com/v1/keys/iddqd/lookups?user_token=my_secret_token\n"
586
624
  },
587
625
  {
588
626
  "lang": "cURL",
589
627
  "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"
628
+ "source": "curl -k -G https://api.addresszen.com/v1/keys/iddqd/lookups \\\n -d \"user_token=my_secret_token\"\n"
591
629
  }
592
630
  ]
593
631
  }
@@ -598,14 +636,13 @@
598
636
  "Address Search"
599
637
  ],
600
638
  "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",
639
+ "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
640
  "operationId": "AddressAutocomplete",
603
641
  "parameters": [
604
642
  {
605
643
  "name": "api_key",
606
644
  "in": "query",
607
645
  "style": "form",
608
- "required": true,
609
646
  "explode": false,
610
647
  "schema": {
611
648
  "$ref": "#/components/schemas/ApiKeyParam"
@@ -845,18 +882,28 @@
845
882
  }
846
883
  }
847
884
  }
885
+ },
886
+ "400": {
887
+ "description": "Bad Request",
888
+ "content": {
889
+ "application/json": {
890
+ "schema": {
891
+ "$ref": "#/components/schemas/BadRequestResponse"
892
+ }
893
+ }
894
+ }
848
895
  }
849
896
  },
850
897
  "x-codeSamples": [
851
898
  {
852
899
  "lang": "http",
853
900
  "label": "URL",
854
- "source": "https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing\n"
901
+ "source": "https://api.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing\n"
855
902
  },
856
903
  {
857
904
  "lang": "cURL",
858
905
  "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"
906
+ "source": "curl -k -G 'https://api.addresszen.com/v1/autocomplete/addresses' \\\n -d 'api_key=iddqd' \\\n --data-urlencode 'query=10 downing'\n"
860
907
  }
861
908
  ]
862
909
  }
@@ -884,7 +931,6 @@
884
931
  {
885
932
  "name": "api_key",
886
933
  "in": "query",
887
- "required": true,
888
934
  "style": "form",
889
935
  "explode": false,
890
936
  "schema": {
@@ -919,12 +965,12 @@
919
965
  {
920
966
  "lang": "http",
921
967
  "label": "URL",
922
- "source": "https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd\n"
968
+ "source": "https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd\n"
923
969
  },
924
970
  {
925
971
  "lang": "cURL",
926
972
  "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"
973
+ "source": "curl -k -G https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd \\\n -d \"api_key=iddqd\"\n"
928
974
  }
929
975
  ]
930
976
  }
@@ -952,7 +998,6 @@
952
998
  {
953
999
  "name": "api_key",
954
1000
  "in": "query",
955
- "required": true,
956
1001
  "style": "form",
957
1002
  "explode": false,
958
1003
  "schema": {
@@ -987,12 +1032,12 @@
987
1032
  {
988
1033
  "lang": "http",
989
1034
  "label": "URL",
990
- "source": "https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd\n"
1035
+ "source": "https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd\n"
991
1036
  },
992
1037
  {
993
1038
  "lang": "cURL",
994
1039
  "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"
1040
+ "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
1041
  }
997
1042
  ]
998
1043
  }
@@ -1003,7 +1048,7 @@
1003
1048
  "UK"
1004
1049
  ],
1005
1050
  "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",
1051
+ "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
1052
  "operationId": "Addresses",
1008
1053
  "parameters": [
1009
1054
  {
@@ -1053,6 +1098,24 @@
1053
1098
  "$ref": "#/components/schemas/FilterParam"
1054
1099
  }
1055
1100
  },
1101
+ {
1102
+ "name": "lon",
1103
+ "in": "query",
1104
+ "style": "form",
1105
+ "explode": false,
1106
+ "schema": {
1107
+ "$ref": "#/components/schemas/AddressLongitudeParam"
1108
+ }
1109
+ },
1110
+ {
1111
+ "name": "lat",
1112
+ "in": "query",
1113
+ "style": "form",
1114
+ "explode": false,
1115
+ "schema": {
1116
+ "$ref": "#/components/schemas/AddressLatitudeParam"
1117
+ }
1118
+ },
1056
1119
  {
1057
1120
  "name": "postcode_outward",
1058
1121
  "in": "query",
@@ -1226,18 +1289,38 @@
1226
1289
  }
1227
1290
  }
1228
1291
  }
1292
+ },
1293
+ "400": {
1294
+ "description": "Bad Request",
1295
+ "content": {
1296
+ "application/json": {
1297
+ "schema": {
1298
+ "$ref": "#/components/schemas/BadRequestResponse"
1299
+ }
1300
+ }
1301
+ }
1302
+ },
1303
+ "404": {
1304
+ "description": "Postcode Not Found",
1305
+ "content": {
1306
+ "application/json": {
1307
+ "schema": {
1308
+ "$ref": "#/components/schemas/PostcodeNotFoundResponse"
1309
+ }
1310
+ }
1311
+ }
1229
1312
  }
1230
1313
  },
1231
1314
  "x-codeSamples": [
1232
1315
  {
1233
1316
  "lang": "http",
1234
1317
  "label": "URL",
1235
- "source": "https://api.ideal-postcodes.co.uk/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london\n"
1318
+ "source": "https://api.addresszen.com/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london\n"
1236
1319
  },
1237
1320
  {
1238
1321
  "lang": "cURL",
1239
1322
  "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"
1323
+ "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
1324
  }
1242
1325
  ]
1243
1326
  }
@@ -1275,7 +1358,6 @@
1275
1358
  {
1276
1359
  "name": "user_token",
1277
1360
  "in": "query",
1278
- "required": true,
1279
1361
  "style": "form",
1280
1362
  "explode": false,
1281
1363
  "schema": {
@@ -1313,6 +1395,16 @@
1313
1395
  }
1314
1396
  }
1315
1397
  }
1398
+ },
1399
+ "400": {
1400
+ "description": "Bad Request",
1401
+ "content": {
1402
+ "application/json": {
1403
+ "schema": {
1404
+ "$ref": "#/components/schemas/BadRequestResponse"
1405
+ }
1406
+ }
1407
+ }
1316
1408
  }
1317
1409
  }
1318
1410
  },
@@ -1337,7 +1429,6 @@
1337
1429
  {
1338
1430
  "name": "user_token",
1339
1431
  "in": "query",
1340
- "required": true,
1341
1432
  "style": "form",
1342
1433
  "explode": false,
1343
1434
  "schema": {
@@ -1365,6 +1456,16 @@
1365
1456
  }
1366
1457
  }
1367
1458
  }
1459
+ },
1460
+ "400": {
1461
+ "description": "Bad Request",
1462
+ "content": {
1463
+ "application/json": {
1464
+ "schema": {
1465
+ "$ref": "#/components/schemas/BadRequestResponse"
1466
+ }
1467
+ }
1468
+ }
1368
1469
  }
1369
1470
  }
1370
1471
  }
@@ -1401,7 +1502,6 @@
1401
1502
  {
1402
1503
  "name": "user_token",
1403
1504
  "in": "query",
1404
- "required": true,
1405
1505
  "style": "form",
1406
1506
  "explode": false,
1407
1507
  "schema": {
@@ -1420,6 +1520,16 @@
1420
1520
  }
1421
1521
  }
1422
1522
  }
1523
+ },
1524
+ "400": {
1525
+ "description": "Bad Request",
1526
+ "content": {
1527
+ "application/json": {
1528
+ "schema": {
1529
+ "$ref": "#/components/schemas/BadRequestResponse"
1530
+ }
1531
+ }
1532
+ }
1423
1533
  }
1424
1534
  }
1425
1535
  },
@@ -1454,7 +1564,6 @@
1454
1564
  {
1455
1565
  "name": "user_token",
1456
1566
  "in": "query",
1457
- "required": true,
1458
1567
  "style": "form",
1459
1568
  "explode": false,
1460
1569
  "schema": {
@@ -1507,6 +1616,16 @@
1507
1616
  }
1508
1617
  }
1509
1618
  }
1619
+ },
1620
+ "400": {
1621
+ "description": "Bad Request",
1622
+ "content": {
1623
+ "application/json": {
1624
+ "schema": {
1625
+ "$ref": "#/components/schemas/BadRequestResponse"
1626
+ }
1627
+ }
1628
+ }
1510
1629
  }
1511
1630
  }
1512
1631
  },
@@ -1541,7 +1660,6 @@
1541
1660
  {
1542
1661
  "name": "user_token",
1543
1662
  "in": "query",
1544
- "required": true,
1545
1663
  "style": "form",
1546
1664
  "explode": false,
1547
1665
  "schema": {
@@ -1569,6 +1687,16 @@
1569
1687
  }
1570
1688
  }
1571
1689
  }
1690
+ },
1691
+ "400": {
1692
+ "description": "Bad Request",
1693
+ "content": {
1694
+ "application/json": {
1695
+ "schema": {
1696
+ "$ref": "#/components/schemas/BadRequestResponse"
1697
+ }
1698
+ }
1699
+ }
1572
1700
  }
1573
1701
  }
1574
1702
  }
@@ -1595,7 +1723,6 @@
1595
1723
  {
1596
1724
  "name": "user_token",
1597
1725
  "in": "query",
1598
- "required": true,
1599
1726
  "style": "form",
1600
1727
  "explode": false,
1601
1728
  "schema": {
@@ -1657,7 +1784,6 @@
1657
1784
  {
1658
1785
  "name": "user_token",
1659
1786
  "in": "query",
1660
- "required": true,
1661
1787
  "style": "form",
1662
1788
  "explode": false,
1663
1789
  "schema": {
@@ -1804,7 +1930,6 @@
1804
1930
  {
1805
1931
  "name": "user_token",
1806
1932
  "in": "query",
1807
- "required": true,
1808
1933
  "style": "form",
1809
1934
  "explode": false,
1810
1935
  "schema": {
@@ -1921,7 +2046,6 @@
1921
2046
  {
1922
2047
  "name": "user_token",
1923
2048
  "in": "query",
1924
- "required": true,
1925
2049
  "style": "form",
1926
2050
  "explode": false,
1927
2051
  "schema": {
@@ -1986,7 +2110,13 @@
1986
2110
  },
1987
2111
  "components": {
1988
2112
  "schemas": {
1989
- "Postcode": {
2113
+ "ecaf": {
2114
+ "$ref": "#/components/schemas/EcafAddress"
2115
+ },
2116
+ "ecad": {
2117
+ "$ref": "#/components/schemas/EcadAddress"
2118
+ },
2119
+ "paf_postcode": {
1990
2120
  "title": "Postcode",
1991
2121
  "type": "string",
1992
2122
  "description": "Correctly formatted postcode. Capitalised and spaced.",
@@ -2015,7 +2145,99 @@
2015
2145
  "default": 0,
2016
2146
  "example": 0
2017
2147
  },
2018
- "PostcodeOutward": {
2148
+ "ID": {
2149
+ "title": "ID",
2150
+ "type": "string",
2151
+ "description": "Global unique internally generated identifier for an address",
2152
+ "example": "paf_8387729"
2153
+ },
2154
+ "paf_dataset": {
2155
+ "title": "Dataset",
2156
+ "type": "string",
2157
+ "description": "Indicates the provenance of an address"
2158
+ },
2159
+ "paf_country_iso": {
2160
+ "title": "ISO Country Code (3)",
2161
+ "type": "string",
2162
+ "description": " 3 letter country code (ISO 3166-1)\n"
2163
+ },
2164
+ "paf_country_iso_2": {
2165
+ "title": "ISO Country Code (2)",
2166
+ "type": "string",
2167
+ "description": " 2 letter country code (ISO 3166-1)\n"
2168
+ },
2169
+ "paf_country": {
2170
+ "title": "Country",
2171
+ "type": "string",
2172
+ "description": " Full country names (ISO 3166)\n",
2173
+ "example": "England"
2174
+ },
2175
+ "paf_language": {
2176
+ "title": "Language",
2177
+ "type": "string",
2178
+ "description": "Language represented by 2 letter ISO Code (639-1)\n"
2179
+ },
2180
+ "paf_line1": {
2181
+ "title": "Line 1",
2182
+ "type": "string",
2183
+ "description": "First Address Line. Often contains premise and thoroughfare information. In the case of a commercial premise, the first line is always the full name of the registered organisation. Never empty.",
2184
+ "example": "Prime Minister &amp; First Lord of Treasury"
2185
+ },
2186
+ "paf_line2": {
2187
+ "title": "Line 2",
2188
+ "type": "string",
2189
+ "description": "Second Address Line. Often contains thoroughfare and locality information. May be empty",
2190
+ "example": "10 Downing Street"
2191
+ },
2192
+ "paf_line3": {
2193
+ "title": "Line 3",
2194
+ "type": "string",
2195
+ "description": "Third address line. May be empty.",
2196
+ "example": ""
2197
+ },
2198
+ "paf_post_town": {
2199
+ "title": "Post Town",
2200
+ "type": "string",
2201
+ "description": "A Post Town is mandatory for delivery of mail to a Delivery Point. This is not necessarily the nearest town geographically, but a routing instruction to the Royal Mail delivery office sorting mail for that Delivery Point. A Post Town will always be present in every address, and for some Localities the Post Town will be the only locality element present.",
2202
+ "maxLength": 30,
2203
+ "example": "London"
2204
+ },
2205
+ "paf_county": {
2206
+ "title": "County",
2207
+ "type": "string",
2208
+ "description": "Since postal, administrative or traditional counties may not apply to some addresses, the county field is designed to return whatever county data is available. Normally, the postal county is returned. If this is not present, the county field will fall back to the administrative county. If the administrative county is also not present, the county field will fall back to the traditional county. May be empty in cases where no administrative, postal or traditional county present.",
2209
+ "example": "London"
2210
+ },
2211
+ "paf_uprn": {
2212
+ "title": "Unique Property Reference Number",
2213
+ "type": "string",
2214
+ "description": "UPRN stands for Unique Property Reference Number and is maintained by the Ordnance Survey (OS). Local governments in the UK have allocated a unique number for each land or property.\n\nUp to 12 digits in length.\n\nMultiple Residence premises currently share the same UPRN as the parent premise.\n\nMay not be available for a small number of Great Britain addresses due to longer update cycles for Ordnance Survey's AddressBase datasets. Returns empty string \"\" in these instances.\n\nAlthough UPRN takes an integer format, we encode and transmit this data as strings. As a 12 digit number, the UPRN can exceed the maximum safe integer `Number.MAX_SAFE_INTEGER` in most browsers causing this datapoint to be corrupted.\n\nTake special care when storing UPRN. As a 12 digit identifier, you will need 64 bits to encode every possible UPRN value. This means applications like Excel will corrupt cells containing UPRN values."
2215
+ },
2216
+ "paf_udprn": {
2217
+ "title": "Unique Delivery Point Reference Number (UDPRN)",
2218
+ "type": "integer",
2219
+ "format": "int32",
2220
+ "description": "UDPRN stands for ‘Unique Delivery Point Reference Number’. Royal Mail assigns a unique UDPRN code for each premise on PAF. Simple, unique reference number for each Delivery Point. Unlikely to be reused when an address expires.\n\nUp to 8-digit numeric code.\n\nA new UDPRN is automatically assigned to each new Delivery Point added to PAF.",
2221
+ "example": 23747771
2222
+ },
2223
+ "paf_umprn": {
2224
+ "title": "UMPRN",
2225
+ "description": "A small minority of individual premises (as identified by a UDPRN) may have multiple occupants behind the same letterbox. These are known as Multiple Residence occupants and can be queried via the Multiple Residence dataset. Simple, unique reference number for each Multiple Residence occupant.\n\nNote: this will be an empty string `\"\"` when not used.",
2226
+ "oneOf": [
2227
+ {
2228
+ "type": "string",
2229
+ "description": "If premise is not multiple occupancy, this will be an empty string"
2230
+ },
2231
+ {
2232
+ "type": "number",
2233
+ "description": "If premise is multiple occupancy, this will be an integer",
2234
+ "example": 983729,
2235
+ "minimum": 0,
2236
+ "maximum": 99999999
2237
+ }
2238
+ ]
2239
+ },
2240
+ "paf_postcode_outward": {
2019
2241
  "title": "Postcode Outward",
2020
2242
  "type": "string",
2021
2243
  "description": "The first part of a postcode is known as the outward code. e.g. The outward code of ID1 1QD is ID1. Enables mail to be sorted to the correct local area for delivery. This part of the code contains the area and the district to which the mail is to be delivered, e.g. ‘PO1’, ‘SW1A’ or ‘B23’.",
@@ -2023,217 +2245,149 @@
2023
2245
  "minLength": 2,
2024
2246
  "example": "SW1A"
2025
2247
  },
2026
- "PostcodeInward": {
2248
+ "paf_postcode_inward": {
2027
2249
  "title": "Postcode Inward",
2028
2250
  "type": "string",
2029
- "description": "The second part of a postcode is known as the inward Code. e.g. The inward code of ID1 1QD is 1QD. This part is one number followed by two letters. The number identifies the sector in the postal district. The letters then define one or more properties in that sector.",
2251
+ "description": "The second part of a postcode is known as the inward code. e.g. The inward code of ID1 1QD is 1QD.\n\nThe number identifies the sector in the postal district. The number is followed by 2 letters. The letters then define one or more properties in that sector.",
2030
2252
  "maxLength": 3,
2031
2253
  "minLength": 3,
2032
2254
  "example": "2AA"
2033
2255
  },
2034
- "PostTown": {
2035
- "title": "Post Town",
2036
- "type": "string",
2037
- "description": "A Post Town is mandatory for delivery of mail to a Delivery Point. This is not necessarily the nearest town geographically, but a routing instruction to the Royal Mail delivery office sorting mail for that Delivery Point. A Post Town will always be present in every address, and for some Localities the Post Town will be the only locality element present.",
2038
- "maxLength": 30,
2039
- "example": "London"
2040
- },
2041
- "DependantLocality": {
2256
+ "paf_dependant_locality": {
2042
2257
  "title": "Dependant Locality",
2043
2258
  "type": "string",
2044
2259
  "description": "When the same thoroughfare name reoccurs in a Post town, it may not be possible to make it dependant on a dependant thoroughfare. In this case the thoroughfare is dependant on a locality. For example if we want to find 1 Back Lane in Huddersfield we see that there are three.",
2045
2260
  "maxLength": 35,
2046
2261
  "example": ""
2047
2262
  },
2048
- "DoubleDependantLocality": {
2263
+ "paf_double_dependant_locality": {
2049
2264
  "title": "Double Dependant Locality",
2050
2265
  "type": "string",
2051
2266
  "description": "Used to supplement Dependant Locality. A Double Dependant Locality supplied along with a Dependant Locality if the Dependant Locality exists twice in the same locality.",
2052
2267
  "maxLength": 35,
2053
2268
  "example": ""
2054
2269
  },
2055
- "Thoroughfare": {
2270
+ "paf_thoroughfare": {
2056
2271
  "title": "Thoroughfare",
2057
2272
  "type": "string",
2058
2273
  "description": "Also known as the street or road name. In general each Thoroughfare Name will have a separate Postcode. Longer Thoroughfares with high number ranges often have multiple Postcodes covering the entire length of the road, with breaks at suitable points e.g. junctions or natural breaks in the road.",
2059
2274
  "maxLength": 80,
2060
2275
  "example": "Downing Street"
2061
2276
  },
2062
- "DependantThoroughfare": {
2277
+ "paf_dependant_thoroughfare": {
2063
2278
  "title": "Dependant Thoroughfare",
2064
2279
  "type": "string",
2065
2280
  "description": "Used to supplement thoroughfare. When a thoroughfare name is used twice in the same Post Town, the dependant thoroughfare is added to uniquely indentify a delivery point.",
2066
2281
  "maxLength": 80,
2067
2282
  "example": ""
2068
2283
  },
2069
- "BuildingNumber": {
2284
+ "paf_building_number": {
2070
2285
  "title": "Building Number",
2071
2286
  "type": "string",
2072
2287
  "description": "Number to identify premise on a thoroughfare or dependant thoroughfare.",
2073
2288
  "maxLength": 4,
2074
2289
  "example": "10"
2075
2290
  },
2076
- "BuildingName": {
2291
+ "paf_building_name": {
2077
2292
  "title": "Building Name",
2078
2293
  "type": "string",
2079
- "description": "Name of residential or commercial premise. E.g. The Manor, 1-2, A, 12A, K, Victoria House",
2294
+ "description": "Name of residential or commercial premise. \n\nExamples:\n - The Manor\n - 1-2\n - A\n - 12A\n - K\n - Victoria House",
2080
2295
  "maxLength": 50,
2081
2296
  "example": ""
2082
2297
  },
2083
- "SubBuildingName": {
2298
+ "paf_sub_building_name": {
2084
2299
  "title": "Sub-Building Name",
2085
2300
  "type": "string",
2086
2301
  "description": "When a premise is split into individual units such as flats, apartments or business units. Cannot be present without either building_name or building_number. E.g. Flat 1, A, 10B",
2087
2302
  "maxLength": 30,
2088
- "example": ""
2303
+ "example": "Flat 1"
2089
2304
  },
2090
- "POBox": {
2305
+ "paf_pobox": {
2091
2306
  "title": "PO Box",
2092
2307
  "type": "string",
2093
2308
  "description": "When the PO Box Number field is populated it will contain PO BOX nnnnnn where n represents the PO Box number. Note that the PO Box details can occasionally consist of a combination of numbers and letters. PO Box Numbers are only allocated to Large Users.",
2094
2309
  "maxLength": 6,
2095
- "example": "HK860"
2310
+ "example": "100"
2096
2311
  },
2097
- "DepartmentName": {
2312
+ "paf_department_name": {
2098
2313
  "title": "Department Name",
2099
2314
  "type": "string",
2100
2315
  "description": "Used to supplment Organisation Name to identify a deparment within the organisation.",
2101
2316
  "maxLength": 60,
2102
2317
  "example": ""
2103
2318
  },
2104
- "OrganisationName": {
2319
+ "paf_organisation_name": {
2105
2320
  "title": "Organisation Name",
2106
2321
  "type": "string",
2107
- "description": "Used to supplment Organisation Name to identify a deparment within the organisation.",
2322
+ "description": "Used to supplment Organisation Name to identify a deparment within the organisation",
2108
2323
  "maxLength": 60,
2109
2324
  "example": "Prime Minister &amp; First Lord Of The Treasury"
2110
2325
  },
2111
- "UDPRN": {
2112
- "title": "Unique Delivery Point Reference Number (UDPRN)",
2113
- "type": "integer",
2114
- "format": "int32",
2115
- "description": "UDPRN stands for ‘Unique Delivery Point Reference Number’. Royal Mail assigns a unique UDPRN code for each premise on PAF. Simple, unique reference number for each Delivery Point. Unlikely to be reused when an address expires. Up to 8-digit numeric code. A new UDPRN is automatically assigned to each new Delivery Point added to PAF.",
2116
- "example": 23747771
2117
- },
2118
- "UMPRN": {
2119
- "title": "UMPRN",
2120
- "description": "A small minority of individual premises (as identified by a UDPRN) may have multiple occupants behind the same letterbox. These are known as Multiple Residence occupants and can be queried via the Multiple Residence dataset. Simple, unique reference number for each Multiple Residence occupant. 8-character numeric code. Note: this will be an empty string `\"\"` when not used for legacy reasons",
2121
- "oneOf": [
2122
- {
2123
- "type": "string",
2124
- "description": "If premise is not multiple occupancy, this will be an empty string",
2125
- "enum": [
2126
- ""
2127
- ]
2128
- },
2129
- {
2130
- "type": "number",
2131
- "description": "If premise is multiple occupancy, this will be an integer",
2132
- "example": 983729,
2133
- "minimum": 0,
2134
- "maximum": 99999999
2135
- }
2136
- ]
2137
- },
2138
- "PostcodeType": {
2326
+ "paf_postcode_type": {
2139
2327
  "title": "Postcode Type",
2140
2328
  "enum": [
2141
2329
  "S",
2142
2330
  "L"
2143
2331
  ],
2144
2332
  "type": "string",
2145
- "description": "This indicates the type of user. It can only take the values 'S' or 'L' indicating small or large respectively. Large User Postcodes. These are assigned to one single address either due to the large volume of mail received at that address, or because a PO Box or Selectapost service has been set up. Small User Postcodes. These identify a group of Delivery Points. On average there are 15 Delivery Points per Postcode. However this can vary between 1 and, in some cases, 100. There will never be more than 100 Delivery Points on a Postcode.",
2146
- "example": "S"
2333
+ "description": "This indicates the type of user. It can only take the values 'S' or 'L' indicating small or large respectively. Large User Postcodes. These are assigned to one single address either due to the large volume of mail received at that address, or because a PO Box or Selectapost service has been set up. Small User Postcodes. These identify a group of Delivery Points.\n\nOn average there are 15 Delivery Points per Postcode. However this can vary between 1 and, in some cases, 100. There will never be more than 100 Delivery Points on a Postcode."
2147
2334
  },
2148
- "SuOrganisationIndicator": {
2335
+ "paf_su_organisation_indicator": {
2149
2336
  "title": "Small User Organisation Indicator",
2150
2337
  "type": "string",
2151
2338
  "description": "Small User Organisation Indicator can have the values 'Y' or space. A value of 'Y' indicates that a Small User Organisation is present at this address.",
2152
- "example": ""
2339
+ "example": "Y"
2153
2340
  },
2154
- "DeliveryPointSuffix": {
2341
+ "paf_delivery_point_suffix": {
2155
2342
  "title": "Delivery Point Suffix",
2156
2343
  "type": "string",
2157
- "description": "A unique Royal Mail 2-character code (the first numeric & the second alphabetical), which, when added to the Postcode, enables each live Delivery Point to be uniquely identified. Once the Delivery Point is deleted from PAF the DPS may be reused (although they aren’t reused until all remaining Delivery Points in the range have been allocated). The DPS for a Large User is always '1A' as each Large User has its own Postcode. E.g. 2B",
2344
+ "description": "A unique Royal Mail 2-character code (the first numeric & the second alphabetical), which, when added to the Postcode, enables each live Delivery Point to be uniquely identified. Once the Delivery Point is deleted from PAF the DPS may be reused (although they aren’t reused until all remaining Delivery Points in the range have been allocated). The DPS for a Large User is always '1A' as each Large User has its own Postcode.",
2158
2345
  "example": "1A"
2159
2346
  },
2160
- "Line1": {
2161
- "title": "Line 1",
2347
+ "paf_premise": {
2348
+ "title": "Premise",
2162
2349
  "type": "string",
2163
- "description": "First Address Line. Often contains premise and thoroughfare information. In the case of a commercial premise, the first line is always the full name of the registered organisation. Never empty.",
2164
- "example": "Prime Minister &amp; First Lord of Treasury"
2350
+ "description": "A pre-computed string which sensibly combines building_number, building_name and sub_building_name. building_number, building_name and sub_building_name represent raw data from Royal Mail's and can be difficult to parse if you are unaware of how the Postcode Address File premise fields work together. For this reason, we also provide a pre-computed premise field which intelligently gathers these points into a single, simple premise string. This field is ideal if you want to pull premise information and thoroughfare information separately instead of using our address lines data.",
2351
+ "maxLength": 84,
2352
+ "example": "10"
2165
2353
  },
2166
- "Line2": {
2167
- "title": "Line 2",
2354
+ "paf_administrative_county": {
2355
+ "title": "Administrative County",
2168
2356
  "type": "string",
2169
- "description": "Second Address Line. Often contains thoroughfare and locality information. May be empty.",
2170
- "example": "10 Downing Street"
2357
+ "description": "The current administrative county to which the postcode has been assigned.\n\nA Unitary Authority name, where one is present. If there is no Unitary Authority, the County name is used. This information is not static, because County boundaries may change due to administrative changes. Data\n\nsource: ONS",
2358
+ "example": ""
2171
2359
  },
2172
- "Line3": {
2173
- "title": "Line 3",
2174
- "type": "string",
2175
- "description": "Third address line. May be empty.",
2176
- "example": ""
2177
- },
2178
- "Premise": {
2179
- "title": "Premise",
2180
- "type": "string",
2181
- "description": "A pre-computed string which sensibly combines building_number, building_name and sub_building_name. building_number, building_name and sub_building_name represent raw data from Royal Mail's and can be difficult to parse if you are unaware of how the Postcode Address File premise fields work together. For this reason, we also provide a pre-computed premise field which intelligently gathers these points into a single, simple premise string. This field is ideal if you want to pull premise information and thoroughfare information separately instead of using our address lines data.",
2182
- "maxLength": 84,
2183
- "example": "10"
2184
- },
2185
- "Country": {
2186
- "title": "Country",
2187
- "type": "string",
2188
- "description": "The country for which the postcode belongs to. May be empty for a small number of addresses.",
2189
- "example": "England"
2190
- },
2191
- "County": {
2192
- "title": "County",
2193
- "type": "string",
2194
- "description": "Since postal, administrative or traditional counties may not apply to some addresses, the county field is designed to return whatever county data is available. Normally, the postal county is returned. If this is not present, the county field will fall back to the administrative county. If the administrative county is also not present, the county field will fall back to the traditional county. May be empty in cases where no administrative, postal or traditional county present.",
2195
- "example": "London"
2196
- },
2197
- "AdministrativeCounty": {
2198
- "title": "Administrative County",
2199
- "type": "string",
2200
- "description": "The current administrative county to which the postcode has been assigned. A Unitary Authority name, where one is present. If there is no Unitary Authority, the County name is used. This information is not static, because County boundaries may change due to administrative changes. Data source: ONS. May be empty.",
2201
- "example": ""
2202
- },
2203
- "PostalCounty": {
2360
+ "paf_postal_county": {
2204
2361
  "title": "Postal County",
2205
2362
  "type": "string",
2206
- "description": "Postal counties were used for the distribution of mail before the Postcode system was introduced in the 1970s. The Former Postal County was the Administrative County at the time. This data rarely changes. Data source: Royal Mail. May be empty.",
2363
+ "description": "Postal counties were used for the distribution of mail before the Postcode system was introduced in the 1970s. The Former Postal County was the Administrative County at the time. This data rarely changes. May be empty.",
2207
2364
  "example": "London"
2208
2365
  },
2209
- "TraditionalCounty": {
2366
+ "paf_traditional_county": {
2210
2367
  "title": "Traditional County",
2211
2368
  "type": "string",
2212
- "description": "Traditional counties are provided by the Association of British Counties. It’s historical data, and can date from the 1800s. Data source: Royal Mail. May be empty.",
2369
+ "description": "Traditional counties are provided by the Association of British Counties. It is historical data, and can date from the 1800s. May be empty.",
2213
2370
  "example": "Greater London"
2214
2371
  },
2215
- "District": {
2372
+ "paf_district": {
2216
2373
  "title": "District",
2217
2374
  "type": "string",
2218
- "description": "The current district/unitary authority to which the postcode has been assigned. Data source: ONS",
2375
+ "description": "The current district/unitary authority to which the postcode has been assigned.",
2219
2376
  "example": "Westminster"
2220
2377
  },
2221
- "Ward": {
2378
+ "paf_ward": {
2222
2379
  "title": "Ward",
2223
2380
  "type": "string",
2224
- "description": "The current administrative/electoral area to which the postcode has been assigned. May be empty for a small number of addresses. Data source: ONS",
2381
+ "description": "The current administrative/electoral area to which the postcode has been assigned. May be empty for a small number of addresses.",
2225
2382
  "example": "St. James'"
2226
2383
  },
2227
2384
  "Longitude": {
2228
2385
  "title": "Longitude",
2229
- "description": "The longitude of the postcode (WGS84/ETRS89). Accurate at the postcode level Can be a positive or negative decimal. E.g. -0.1283983 Returns an empty string if no location data is available. Otherwise, a number is returned",
2386
+ "description": "The longitude of the postcode (WGS84/ETRS89).\n\nCan be a positive or negative decimal. E.g. -0.1283983\n\nReturns an empty string if no location data is available. ",
2230
2387
  "oneOf": [
2231
2388
  {
2232
2389
  "type": "string",
2233
- "description": "Empty string `\"\"` if not available",
2234
- "enum": [
2235
- ""
2236
- ]
2390
+ "description": "Empty string `\"\"` if not available"
2237
2391
  },
2238
2392
  {
2239
2393
  "type": "number",
@@ -2246,14 +2400,11 @@
2246
2400
  },
2247
2401
  "Latitude": {
2248
2402
  "title": "Longitude",
2249
- "description": "The latitude of the postcode (WGS84/ETRS89). Accurate at the postcode level Can be a positive or negative decimal. E.g. 51.5083983 Returns an empty string if no location data is available. Otherwise a number is returned.",
2403
+ "description": "The latitude of the postcode (WGS84/ETRS89).\n\nCan be a positive or negative decimal. E.g. `51.5083983`.\n\nReturns an empty string if no location data is available. ",
2250
2404
  "oneOf": [
2251
2405
  {
2252
2406
  "type": "string",
2253
- "description": "Empty string `\"\"` if not available",
2254
- "enum": [
2255
- ""
2256
- ]
2407
+ "description": "Empty string `\"\"` if not available"
2257
2408
  },
2258
2409
  {
2259
2410
  "type": "number",
@@ -2266,14 +2417,11 @@
2266
2417
  },
2267
2418
  "Eastings": {
2268
2419
  "title": "Eastings",
2269
- "description": "Eastings reference using the [Ordnance Survey National Grid reference system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid) Northern Ireland Eastings uses the [Irish Grid Reference System](https://en.wikipedia.org/wiki/Irish_grid_reference_system) Metres from origin. E.g. 550458 Returns an empty string if no location data is available. Otherwise a number is returned",
2420
+ "description": "Eastings reference using the [Ordnance Survey National Grid reference system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid).\n\nNorthern Ireland Eastings uses the [Irish Grid Reference System](https://en.wikipedia.org/wiki/Irish_grid_reference_system).\n\nMetres from origin. E.g. `550458`\n\nReturns an empty string if no location data is available. Otherwise a number is returned.",
2270
2421
  "oneOf": [
2271
2422
  {
2272
2423
  "type": "string",
2273
- "description": "Empty string `\"\"` if not available",
2274
- "enum": [
2275
- ""
2276
- ]
2424
+ "description": "Empty string `\"\"` if not available"
2277
2425
  },
2278
2426
  {
2279
2427
  "type": "number",
@@ -2285,15 +2433,12 @@
2285
2433
  ]
2286
2434
  },
2287
2435
  "Northings": {
2288
- "title": "Eastings",
2289
- "description": "Northings reference using the [Ordnance Survey National Grid reference system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid) Northern Ireland Northings uses the [Irish Grid Reference System](https://en.wikipedia.org/wiki/Irish_grid_reference_system) Metres from origin. E.g. 180458 Returns an empty string if no location data is available. Otherwise a number is returned ",
2436
+ "title": "Northings",
2437
+ "description": "Northings reference using the [Ordnance Survey National Grid reference system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid)\n\nNorthern Ireland Northings uses the [Irish Grid Reference System](https://en.wikipedia.org/wiki/Irish_grid_reference_system)\n\nMetres from origin. E.g. `180458`\n\nReturns an empty string if no location data is available. Otherwise a number is returned ",
2290
2438
  "oneOf": [
2291
2439
  {
2292
2440
  "type": "string",
2293
- "description": "Empty string `\"\"` if not available",
2294
- "enum": [
2295
- ""
2296
- ]
2441
+ "description": "Empty string `\"\"` if not available"
2297
2442
  },
2298
2443
  {
2299
2444
  "type": "number",
@@ -2304,45 +2449,7 @@
2304
2449
  }
2305
2450
  ]
2306
2451
  },
2307
- "UPRN": {
2308
- "title": "Unique Delivery Point Reference Number (UDPRN)",
2309
- "type": "string",
2310
- "description": "UPRN stands for Unique Property Reference Number and is maintained by the Ordnance Survey (OS). Local governments in the UK have allocated a unique number for each land or property. See our UPRN guide for more information. Up to 12 digits in length. Multiple Residence premises currently share the same UPRN as the parent premise. May not be available for a small number of Great Britain addresses due to longer update cycles for Ordnance Survey's AddressBase datasets. Returns empty string \"\" in these instances. Although UPRN takes an integer format, we encode and transmit this data as strings. As a 12 digit number, the UPRN can exceed the maximum safe integer (Number.MAX_SAFE_INTEGER) in most browsers causing this datapoint to be corrupted. Take special care when storing UPRN. As a 12 digit identifier, you will need 64 bits to encode every possible UPRN value."
2311
- },
2312
- "ID": {
2313
- "title": "ID",
2314
- "type": "string",
2315
- "description": "Global unique internally generated identifier for an address.",
2316
- "example": "paf_8387729"
2317
- },
2318
- "Dataset": {
2319
- "title": "Dataset",
2320
- "type": "string",
2321
- "description": "Indicates the provenance of an address",
2322
- "enum": [
2323
- "paf",
2324
- "mr",
2325
- "nyb",
2326
- "usps"
2327
- ]
2328
- },
2329
- "CountryISO": {
2330
- "title": "ISO Country Code",
2331
- "type": "string",
2332
- "description": "3 letter ISO country code",
2333
- "enum": [
2334
- "GBR",
2335
- "IMN",
2336
- "JEY",
2337
- "GGY",
2338
- "USA",
2339
- "PRI",
2340
- "GUM"
2341
- ]
2342
- },
2343
- "PafAddress": {
2344
- "title": "Postcode Address File Address",
2345
- "description": "Standard UK Address.",
2452
+ "PafBase": {
2346
2453
  "required": [
2347
2454
  "postcode",
2348
2455
  "postcode_outward",
@@ -2379,100 +2486,127 @@
2379
2486
  "northings",
2380
2487
  "uprn",
2381
2488
  "county",
2489
+ "county_code",
2382
2490
  "id",
2383
2491
  "dataset",
2384
- "country_iso"
2492
+ "country_iso",
2493
+ "country_iso_2",
2494
+ "language"
2385
2495
  ],
2386
2496
  "properties": {
2497
+ "id": {
2498
+ "$ref": "#/components/schemas/ID"
2499
+ },
2500
+ "dataset": {
2501
+ "$ref": "#/components/schemas/paf_dataset"
2502
+ },
2503
+ "country_iso": {
2504
+ "$ref": "#/components/schemas/paf_country_iso"
2505
+ },
2506
+ "country_iso_2": {
2507
+ "$ref": "#/components/schemas/paf_country_iso_2"
2508
+ },
2509
+ "country": {
2510
+ "$ref": "#/components/schemas/paf_country"
2511
+ },
2512
+ "language": {
2513
+ "$ref": "#/components/schemas/paf_language"
2514
+ },
2515
+ "line_1": {
2516
+ "$ref": "#/components/schemas/paf_line1"
2517
+ },
2518
+ "line_2": {
2519
+ "$ref": "#/components/schemas/paf_line2"
2520
+ },
2521
+ "line_3": {
2522
+ "$ref": "#/components/schemas/paf_line3"
2523
+ },
2524
+ "post_town": {
2525
+ "$ref": "#/components/schemas/paf_post_town"
2526
+ },
2387
2527
  "postcode": {
2388
- "$ref": "#/components/schemas/Postcode"
2528
+ "$ref": "#/components/schemas/paf_postcode"
2529
+ },
2530
+ "county": {
2531
+ "$ref": "#/components/schemas/paf_county"
2532
+ },
2533
+ "county_code": {
2534
+ "title": "County Code",
2535
+ "type": "string",
2536
+ "description": "Short code representing the county or province. May be empty (`\"\"`)",
2537
+ "example": ""
2538
+ },
2539
+ "uprn": {
2540
+ "$ref": "#/components/schemas/paf_uprn"
2541
+ },
2542
+ "udprn": {
2543
+ "$ref": "#/components/schemas/paf_udprn"
2544
+ },
2545
+ "umprn": {
2546
+ "$ref": "#/components/schemas/paf_umprn"
2389
2547
  },
2390
2548
  "postcode_outward": {
2391
- "$ref": "#/components/schemas/PostcodeOutward"
2549
+ "$ref": "#/components/schemas/paf_postcode_outward"
2392
2550
  },
2393
2551
  "postcode_inward": {
2394
- "$ref": "#/components/schemas/PostcodeInward"
2395
- },
2396
- "post_town": {
2397
- "$ref": "#/components/schemas/PostTown"
2552
+ "$ref": "#/components/schemas/paf_postcode_inward"
2398
2553
  },
2399
2554
  "dependant_locality": {
2400
- "$ref": "#/components/schemas/DependantLocality"
2555
+ "$ref": "#/components/schemas/paf_dependant_locality"
2401
2556
  },
2402
2557
  "double_dependant_locality": {
2403
- "$ref": "#/components/schemas/DoubleDependantLocality"
2558
+ "$ref": "#/components/schemas/paf_double_dependant_locality"
2404
2559
  },
2405
2560
  "thoroughfare": {
2406
- "$ref": "#/components/schemas/Thoroughfare"
2561
+ "$ref": "#/components/schemas/paf_thoroughfare"
2407
2562
  },
2408
2563
  "dependant_thoroughfare": {
2409
- "$ref": "#/components/schemas/DependantThoroughfare"
2564
+ "$ref": "#/components/schemas/paf_dependant_thoroughfare"
2410
2565
  },
2411
2566
  "building_number": {
2412
- "$ref": "#/components/schemas/BuildingNumber"
2567
+ "$ref": "#/components/schemas/paf_building_number"
2413
2568
  },
2414
2569
  "building_name": {
2415
- "$ref": "#/components/schemas/BuildingName"
2570
+ "$ref": "#/components/schemas/paf_building_name"
2416
2571
  },
2417
2572
  "sub_building_name": {
2418
- "$ref": "#/components/schemas/SubBuildingName"
2573
+ "$ref": "#/components/schemas/paf_sub_building_name"
2419
2574
  },
2420
2575
  "po_box": {
2421
- "$ref": "#/components/schemas/POBox"
2576
+ "$ref": "#/components/schemas/paf_pobox"
2422
2577
  },
2423
2578
  "department_name": {
2424
- "$ref": "#/components/schemas/DepartmentName"
2579
+ "$ref": "#/components/schemas/paf_department_name"
2425
2580
  },
2426
2581
  "organisation_name": {
2427
- "$ref": "#/components/schemas/OrganisationName"
2428
- },
2429
- "udprn": {
2430
- "$ref": "#/components/schemas/UDPRN"
2431
- },
2432
- "umprn": {
2433
- "$ref": "#/components/schemas/UMPRN"
2582
+ "$ref": "#/components/schemas/paf_organisation_name"
2434
2583
  },
2435
2584
  "postcode_type": {
2436
- "$ref": "#/components/schemas/PostcodeType"
2585
+ "$ref": "#/components/schemas/paf_postcode_type"
2437
2586
  },
2438
2587
  "su_organisation_indicator": {
2439
- "$ref": "#/components/schemas/SuOrganisationIndicator"
2588
+ "$ref": "#/components/schemas/paf_su_organisation_indicator"
2440
2589
  },
2441
2590
  "delivery_point_suffix": {
2442
- "$ref": "#/components/schemas/DeliveryPointSuffix"
2443
- },
2444
- "line_1": {
2445
- "$ref": "#/components/schemas/Line1"
2446
- },
2447
- "line_2": {
2448
- "$ref": "#/components/schemas/Line2"
2449
- },
2450
- "line_3": {
2451
- "$ref": "#/components/schemas/Line3"
2591
+ "$ref": "#/components/schemas/paf_delivery_point_suffix"
2452
2592
  },
2453
2593
  "premise": {
2454
- "$ref": "#/components/schemas/Premise"
2455
- },
2456
- "country": {
2457
- "$ref": "#/components/schemas/Country"
2458
- },
2459
- "county": {
2460
- "$ref": "#/components/schemas/County"
2594
+ "$ref": "#/components/schemas/paf_premise"
2461
2595
  },
2462
2596
  "administrative_county": {
2463
- "$ref": "#/components/schemas/AdministrativeCounty"
2597
+ "$ref": "#/components/schemas/paf_administrative_county"
2464
2598
  },
2465
2599
  "postal_county": {
2466
- "$ref": "#/components/schemas/PostalCounty"
2600
+ "$ref": "#/components/schemas/paf_postal_county"
2467
2601
  },
2468
2602
  "traditional_county": {
2469
- "$ref": "#/components/schemas/TraditionalCounty"
2603
+ "$ref": "#/components/schemas/paf_traditional_county"
2470
2604
  },
2471
2605
  "district": {
2472
- "$ref": "#/components/schemas/District"
2606
+ "$ref": "#/components/schemas/paf_district"
2473
2607
  },
2474
2608
  "ward": {
2475
- "$ref": "#/components/schemas/Ward"
2609
+ "$ref": "#/components/schemas/paf_ward"
2476
2610
  },
2477
2611
  "longitude": {
2478
2612
  "$ref": "#/components/schemas/Longitude"
@@ -2485,45 +2619,107 @@
2485
2619
  },
2486
2620
  "northings": {
2487
2621
  "$ref": "#/components/schemas/Northings"
2488
- },
2489
- "uprn": {
2490
- "$ref": "#/components/schemas/UPRN"
2491
- },
2492
- "id": {
2493
- "$ref": "#/components/schemas/ID"
2494
- },
2495
- "dataset": {
2496
- "$ref": "#/components/schemas/Dataset",
2497
- "enum": [
2498
- "paf"
2499
- ]
2500
- },
2501
- "country_iso": {
2502
- "$ref": "#/components/schemas/CountryISO",
2503
- "enum": [
2504
- "GBR",
2505
- "IMN",
2506
- "JEY",
2507
- "GGY"
2508
- ]
2509
2622
  }
2510
2623
  }
2511
2624
  },
2625
+ "PafAddress": {
2626
+ "title": "Postcode Address File Address",
2627
+ "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.",
2628
+ "allOf": [
2629
+ {
2630
+ "$ref": "#/components/schemas/PafBase"
2631
+ },
2632
+ {
2633
+ "type": "object",
2634
+ "properties": {
2635
+ "country_iso": {
2636
+ "enum": [
2637
+ "GBR",
2638
+ "IMN",
2639
+ "JEY",
2640
+ "GGY"
2641
+ ]
2642
+ },
2643
+ "dataset": {
2644
+ "type": "string",
2645
+ "enum": [
2646
+ "paf"
2647
+ ]
2648
+ },
2649
+ "country_iso_2": {
2650
+ "enum": [
2651
+ "GB",
2652
+ "IM",
2653
+ "JE",
2654
+ "GG"
2655
+ ]
2656
+ },
2657
+ "language": {
2658
+ "enum": [
2659
+ "en"
2660
+ ]
2661
+ },
2662
+ "country": {
2663
+ "enum": [
2664
+ "England",
2665
+ "Scotland",
2666
+ "Wales",
2667
+ "Northern Ireland",
2668
+ "Jersey",
2669
+ "Guernsey",
2670
+ "Isle of Man"
2671
+ ]
2672
+ }
2673
+ }
2674
+ }
2675
+ ]
2676
+ },
2512
2677
  "MrAddress": {
2513
2678
  "title": "Multiple Residence Address",
2514
- "description": "Subdivision of a Postcode Address File address. Does not have its own delivery point.",
2679
+ "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
2680
  "allOf": [
2516
2681
  {
2517
- "$ref": "#/components/schemas/PafAddress"
2682
+ "$ref": "#/components/schemas/PafBase"
2518
2683
  },
2519
2684
  {
2520
2685
  "type": "object",
2521
2686
  "properties": {
2522
2687
  "dataset": {
2523
- "$ref": "#/components/schemas/Dataset",
2524
2688
  "enum": [
2525
2689
  "mr"
2526
2690
  ]
2691
+ },
2692
+ "country_iso": {
2693
+ "enum": [
2694
+ "GBR",
2695
+ "IMN",
2696
+ "JEY",
2697
+ "GGY"
2698
+ ]
2699
+ },
2700
+ "country_iso_2": {
2701
+ "enum": [
2702
+ "GB",
2703
+ "IM",
2704
+ "JE",
2705
+ "GG"
2706
+ ]
2707
+ },
2708
+ "language": {
2709
+ "enum": [
2710
+ "en"
2711
+ ]
2712
+ },
2713
+ "country": {
2714
+ "enum": [
2715
+ "England",
2716
+ "Scotland",
2717
+ "Wales",
2718
+ "Northern Ireland",
2719
+ "Jersey",
2720
+ "Guernsey",
2721
+ "Isle of Man"
2722
+ ]
2527
2723
  }
2528
2724
  }
2529
2725
  }
@@ -2531,18 +2727,139 @@
2531
2727
  },
2532
2728
  "NybAddress": {
2533
2729
  "title": "Not Yet Built Address",
2534
- "description": "UK premise under construction",
2730
+ "description": "A UK premise under construction and currently not occupied.\n\nThis dataset is updated by Royal Mail on a monthly cadence.",
2535
2731
  "allOf": [
2536
2732
  {
2537
- "$ref": "#/components/schemas/PafAddress"
2733
+ "$ref": "#/components/schemas/PafBase"
2538
2734
  },
2539
2735
  {
2540
2736
  "type": "object",
2541
2737
  "properties": {
2542
2738
  "dataset": {
2543
- "$ref": "#/components/schemas/Dataset",
2544
2739
  "enum": [
2545
- "mr"
2740
+ "nyb"
2741
+ ]
2742
+ },
2743
+ "country_iso": {
2744
+ "enum": [
2745
+ "GBR",
2746
+ "IMN",
2747
+ "JEY",
2748
+ "GGY"
2749
+ ]
2750
+ },
2751
+ "country_iso_2": {
2752
+ "enum": [
2753
+ "GB",
2754
+ "IM",
2755
+ "JE",
2756
+ "GG"
2757
+ ]
2758
+ },
2759
+ "language": {
2760
+ "enum": [
2761
+ "en"
2762
+ ]
2763
+ },
2764
+ "country": {
2765
+ "enum": [
2766
+ "England",
2767
+ "Scotland",
2768
+ "Wales",
2769
+ "Northern Ireland",
2770
+ "Jersey",
2771
+ "Guernsey",
2772
+ "Isle of Man"
2773
+ ]
2774
+ }
2775
+ }
2776
+ }
2777
+ ]
2778
+ },
2779
+ "PafAliasAddress": {
2780
+ "title": "PAF Alias Address",
2781
+ "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.",
2782
+ "allOf": [
2783
+ {
2784
+ "$ref": "#/components/schemas/PafBase"
2785
+ },
2786
+ {
2787
+ "type": "object",
2788
+ "properties": {
2789
+ "dataset": {
2790
+ "enum": [
2791
+ "pafa"
2792
+ ]
2793
+ },
2794
+ "country_iso": {
2795
+ "enum": [
2796
+ "GBR",
2797
+ "IMN",
2798
+ "JEY",
2799
+ "GGY"
2800
+ ]
2801
+ },
2802
+ "country_iso_2": {
2803
+ "enum": [
2804
+ "GB",
2805
+ "IM",
2806
+ "JE",
2807
+ "GG"
2808
+ ]
2809
+ },
2810
+ "language": {
2811
+ "enum": [
2812
+ "en"
2813
+ ]
2814
+ },
2815
+ "country": {
2816
+ "enum": [
2817
+ "England",
2818
+ "Scotland",
2819
+ "Wales",
2820
+ "Northern Ireland",
2821
+ "Jersey",
2822
+ "Guernsey",
2823
+ "Isle of Man"
2824
+ ]
2825
+ }
2826
+ }
2827
+ }
2828
+ ]
2829
+ },
2830
+ "WelshPafAddress": {
2831
+ "title": "Welsh PAF Address",
2832
+ "description": "Welsh language alternative for a PAF Address",
2833
+ "allOf": [
2834
+ {
2835
+ "$ref": "#/components/schemas/PafBase"
2836
+ },
2837
+ {
2838
+ "type": "object",
2839
+ "properties": {
2840
+ "dataset": {
2841
+ "enum": [
2842
+ "pafw"
2843
+ ]
2844
+ },
2845
+ "country_iso": {
2846
+ "enum": [
2847
+ "GBR"
2848
+ ]
2849
+ },
2850
+ "country_iso_2": {
2851
+ "enum": [
2852
+ "GB"
2853
+ ]
2854
+ },
2855
+ "language": {
2856
+ "enum": [
2857
+ "cy"
2858
+ ]
2859
+ },
2860
+ "country": {
2861
+ "enum": [
2862
+ "Wales"
2546
2863
  ]
2547
2864
  }
2548
2865
  }
@@ -2570,6 +2887,12 @@
2570
2887
  },
2571
2888
  {
2572
2889
  "$ref": "#/components/schemas/NybAddress"
2890
+ },
2891
+ {
2892
+ "$ref": "#/components/schemas/PafAliasAddress"
2893
+ },
2894
+ {
2895
+ "$ref": "#/components/schemas/WelshPafAddress"
2573
2896
  }
2574
2897
  ]
2575
2898
  },
@@ -2590,21 +2913,92 @@
2590
2913
  }
2591
2914
  }
2592
2915
  },
2593
- "PostcodeNotFoundResponse": {
2594
- "title": "Postcode Not Found",
2916
+ "ErrorResponse": {
2917
+ "title": "Basic Error Response",
2595
2918
  "type": "object",
2596
2919
  "required": [
2597
- "message",
2598
2920
  "code",
2599
- "suggestions"
2921
+ "message"
2600
2922
  ],
2601
2923
  "properties": {
2602
2924
  "code": {
2603
2925
  "type": "integer",
2604
- "format": "int32",
2605
- "enum": [
2606
- 4040
2607
- ]
2926
+ "description": "API Response Code. Non `2xxx` code indicates a failure. This code will provide a more specific reason when a failure occurs and facilitates debugging.",
2927
+ "format": "int32"
2928
+ },
2929
+ "message": {
2930
+ "type": "string",
2931
+ "description": "Human readable error message supplied with every error response."
2932
+ }
2933
+ }
2934
+ },
2935
+ "BadRequestResponse": {
2936
+ "title": "Bad Request Error Response",
2937
+ "allOf": [
2938
+ {
2939
+ "$ref": "#/components/schemas/ErrorResponse"
2940
+ },
2941
+ {
2942
+ "type": "object",
2943
+ "required": [
2944
+ "code",
2945
+ "message"
2946
+ ],
2947
+ "properties": {
2948
+ "code": {
2949
+ "type": "integer",
2950
+ "description": "`400X` type error response code",
2951
+ "format": "int32"
2952
+ },
2953
+ "message": {
2954
+ "type": "string",
2955
+ "description": "Bad request error description"
2956
+ },
2957
+ "errors": {
2958
+ "type": "array",
2959
+ "items": {
2960
+ "type": "object",
2961
+ "required": [
2962
+ "path",
2963
+ "message"
2964
+ ],
2965
+ "properties": {
2966
+ "message": {
2967
+ "type": "string",
2968
+ "example": "should have required property 'type'",
2969
+ "description": "Indicates location of error in request query or URL parameter"
2970
+ },
2971
+ "path": {
2972
+ "type": "string",
2973
+ "example": ".query.type",
2974
+ "description": "Indicates location of error in request query or URL parameter"
2975
+ },
2976
+ "errorCode": {
2977
+ "type": "string",
2978
+ "example": "required.openapi.validation"
2979
+ }
2980
+ }
2981
+ }
2982
+ }
2983
+ }
2984
+ }
2985
+ ]
2986
+ },
2987
+ "PostcodeNotFoundResponse": {
2988
+ "title": "Postcode Not Found",
2989
+ "type": "object",
2990
+ "required": [
2991
+ "message",
2992
+ "code",
2993
+ "suggestions"
2994
+ ],
2995
+ "properties": {
2996
+ "code": {
2997
+ "type": "integer",
2998
+ "format": "int32",
2999
+ "enum": [
3000
+ 4040
3001
+ ]
2608
3002
  },
2609
3003
  "message": {
2610
3004
  "type": "string",
@@ -2656,25 +3050,6 @@
2656
3050
  }
2657
3051
  }
2658
3052
  },
2659
- "ErrorResponse": {
2660
- "title": "Basic Error Response",
2661
- "type": "object",
2662
- "required": [
2663
- "code",
2664
- "message"
2665
- ],
2666
- "properties": {
2667
- "code": {
2668
- "type": "integer",
2669
- "description": "API Response Code. Non `2xxx` code indicates a failure. This code will provide a more specific reason when a failure occurs and facilitates debugging.",
2670
- "format": "int32"
2671
- },
2672
- "message": {
2673
- "type": "string",
2674
- "description": "Human readable error message supplied with every error response."
2675
- }
2676
- }
2677
- },
2678
3053
  "UMPRNResponse": {
2679
3054
  "title": "UDPRN Response",
2680
3055
  "type": "object",
@@ -2706,13 +3081,77 @@
2706
3081
  }
2707
3082
  }
2708
3083
  },
3084
+ "AvailableContexts": {
3085
+ "title": "Available Contexts",
3086
+ "type": "array",
3087
+ "description": "A list of available contexts for a key",
3088
+ "items": {
3089
+ "type": "object",
3090
+ "properties": {
3091
+ "iso_3": {
3092
+ "type": "string",
3093
+ "example": "USA",
3094
+ "description": "3 letter ISO code"
3095
+ },
3096
+ "iso_2": {
3097
+ "type": "string",
3098
+ "example": "US",
3099
+ "description": "2 letter ISO code"
3100
+ },
3101
+ "description": {
3102
+ "type": "string",
3103
+ "example": "United States",
3104
+ "description": "Country descriptor to show in Address Finder\n"
3105
+ },
3106
+ "emoji": {
3107
+ "type": "string",
3108
+ "description": "Emoji text icon",
3109
+ "example": "🇺🇸"
3110
+ },
3111
+ "rgeo": {
3112
+ "type": "boolean",
3113
+ "example": true,
3114
+ "description": "Indicates availability of reverse geolocation search\n"
3115
+ }
3116
+ }
3117
+ }
3118
+ },
3119
+ "Context": {
3120
+ "title": "Context",
3121
+ "type": "string",
3122
+ "description": "Limits search results within a geographical boundary or country."
3123
+ },
3124
+ "NoContext": {
3125
+ "title": "No Context Provided",
3126
+ "type": "string",
3127
+ "enum": [
3128
+ ""
3129
+ ],
3130
+ "description": "Empty string if no context is provided or key check has failed"
3131
+ },
2709
3132
  "ApiKey": {
2710
3133
  "title": "Key",
2711
3134
  "type": "object",
2712
3135
  "required": [
2713
- "available"
3136
+ "available",
3137
+ "context",
3138
+ "contexts"
2714
3139
  ],
2715
3140
  "properties": {
3141
+ "contexts": {
3142
+ "$ref": "#/components/schemas/AvailableContexts"
3143
+ },
3144
+ "context": {
3145
+ "description": "Returns current context if it is in the list of available contexts for this key.\n",
3146
+ "oneOf": [
3147
+ {
3148
+ "$ref": "#/components/schemas/Context"
3149
+ },
3150
+ {
3151
+ "$ref": "#/components/schemas/NoContext"
3152
+ }
3153
+ ]
3154
+ },
2716
3155
  "available": {
2717
3156
  "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
3157
  "type": "boolean",
@@ -2750,7 +3189,7 @@
2750
3189
  "UserTokenParam": {
2751
3190
  "title": "User Token",
2752
3191
  "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",
3192
+ "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
3193
  "example": "uk_B59ScW1p1HHouf1VqclEPZUx"
2755
3194
  },
2756
3195
  "ApiKeyDailyLimit": {
@@ -3070,15 +3509,6 @@
3070
3509
  }
3071
3510
  }
3072
3511
  },
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
3512
  "LimitParam": {
3083
3513
  "title": "Limit",
3084
3514
  "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 +3632,13 @@
3202
3632
  "description": "Biases search based on approximate geolocation of IP address.\nSet `bias_ip=true` to enable.",
3203
3633
  "example": "bias_ip=true"
3204
3634
  },
3205
- "PafSuggestion": {
3206
- "title": "UK Postcode Address File Address Autocompletion Hit",
3207
- "description": "Represents an address suggestion from the UK Postcode Address File.",
3635
+ "AddressSuggestion": {
3636
+ "title": "Address Suggestion",
3637
+ "description": "Represents an address suggestion for any address in the world",
3208
3638
  "type": "object",
3209
3639
  "required": [
3210
3640
  "id",
3211
3641
  "suggestion",
3212
- "udprn",
3213
3642
  "urls"
3214
3643
  ],
3215
3644
  "properties": {
@@ -3218,35 +3647,22 @@
3218
3647
  },
3219
3648
  "suggestion": {
3220
3649
  "type": "string",
3221
- "description": "Address suggestion for your given query.",
3650
+ "description": "Address Suggestion to be displayed to the user",
3222
3651
  "example": "Flat 6, 12 Roskear, Camborne, TR14"
3223
3652
  },
3224
- "udprn": {
3225
- "$ref": "#/components/schemas/UDPRN"
3226
- },
3227
3653
  "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
- }
3654
+ "type": "object"
3239
3655
  }
3240
3656
  }
3241
3657
  },
3242
- "MrSuggestion": {
3243
- "title": "Multiple Residence Address Autocompletion Hit",
3658
+ "UkAddressSuggestion": {
3659
+ "title": "UK Address Suggestion",
3660
+ "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
3661
  "type": "object",
3245
3662
  "required": [
3246
3663
  "id",
3247
3664
  "suggestion",
3248
3665
  "udprn",
3249
- "umprn",
3250
3666
  "urls"
3251
3667
  ],
3252
3668
  "properties": {
@@ -3255,11 +3671,11 @@
3255
3671
  },
3256
3672
  "suggestion": {
3257
3673
  "type": "string",
3258
- "description": "Address suggestion for your given query.",
3674
+ "description": "Address suggestion for a given query.",
3259
3675
  "example": "Flat 6, 12 Roskear, Camborne, TR14"
3260
3676
  },
3261
3677
  "udprn": {
3262
- "$ref": "#/components/schemas/UDPRN"
3678
+ "$ref": "#/components/schemas/paf_udprn"
3263
3679
  },
3264
3680
  "umprn": {
3265
3681
  "type": "number",
@@ -3268,11 +3684,10 @@
3268
3684
  "example": 51103417
3269
3685
  },
3270
3686
  "urls": {
3271
- "type": "object",
3272
3687
  "required": [
3273
- "udprn",
3274
- "umprn"
3688
+ "udprn"
3275
3689
  ],
3690
+ "type": "object",
3276
3691
  "properties": {
3277
3692
  "udprn": {
3278
3693
  "type": "string",
@@ -3288,44 +3703,6 @@
3288
3703
  }
3289
3704
  }
3290
3705
  },
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
3706
  "AutocompleteResponse": {
3330
3707
  "title": "Address Autocomplete Response",
3331
3708
  "type": "object",
@@ -3346,16 +3723,10 @@
3346
3723
  "items": {
3347
3724
  "oneOf": [
3348
3725
  {
3349
- "$ref": "#/components/schemas/PafSuggestion"
3350
- },
3351
- {
3352
- "$ref": "#/components/schemas/MrSuggestion"
3353
- },
3354
- {
3355
- "$ref": "#/components/schemas/NybSuggestion"
3726
+ "$ref": "#/components/schemas/AddressSuggestion"
3356
3727
  },
3357
3728
  {
3358
- "$ref": "#/components/schemas/GlobalAddressSuggestion"
3729
+ "$ref": "#/components/schemas/UkAddressSuggestion"
3359
3730
  }
3360
3731
  ]
3361
3732
  }
@@ -3377,6 +3748,80 @@
3377
3748
  }
3378
3749
  }
3379
3750
  },
3751
+ "Dataset": {
3752
+ "title": "Dataset",
3753
+ "type": "string",
3754
+ "description": "Indicates the provenance of an address.\n\n - `paf` (GBR) Postcode Address File\n - `mr` (GBR) Multiple Residence File\n - `nyb` (GBR) Not Yet Built File\n - `pafa` (GBR) Alias File\n - `pafw` (GBR) Welsh File\n - `ecaf` (IRL) Eircode ECAF\n - `ecad` (IRL) Eircode ECAD\n - `usps` (USA) USPS Zip+4",
3755
+ "enum": [
3756
+ "paf",
3757
+ "pafw",
3758
+ "pafa",
3759
+ "mr",
3760
+ "nyb",
3761
+ "usps",
3762
+ "ecaf",
3763
+ "ecad"
3764
+ ]
3765
+ },
3766
+ "CountryISO": {
3767
+ "title": "ISO Country Code (3)",
3768
+ "type": "string",
3769
+ "description": " 3 letter country code (ISO 3166-1)\n",
3770
+ "enum": [
3771
+ "GBR",
3772
+ "IMN",
3773
+ "JEY",
3774
+ "GGY",
3775
+ "USA",
3776
+ "PRI",
3777
+ "GUM",
3778
+ "IRL"
3779
+ ]
3780
+ },
3781
+ "CountryISO2": {
3782
+ "title": "ISO Country Code (2)",
3783
+ "type": "string",
3784
+ "description": " 2 letter country code (ISO 3166-1)\n",
3785
+ "enum": [
3786
+ "GB",
3787
+ "IM",
3788
+ "JE",
3789
+ "GG",
3790
+ "US",
3791
+ "PR",
3792
+ "GU",
3793
+ "IE"
3794
+ ]
3795
+ },
3796
+ "Language": {
3797
+ "title": "Language",
3798
+ "type": "string",
3799
+ "description": "Language represented by 2 letter ISO Code (639-1)\n",
3800
+ "enum": [
3801
+ "en",
3802
+ "cy",
3803
+ "ga"
3804
+ ]
3805
+ },
3806
+ "Country": {
3807
+ "title": "Country",
3808
+ "type": "string",
3809
+ "description": " Full country names (ISO 3166)\n",
3810
+ "example": "England",
3811
+ "enum": [
3812
+ "United States",
3813
+ "Guam",
3814
+ "Puerto Rico",
3815
+ "England",
3816
+ "Scotland",
3817
+ "Wales",
3818
+ "Northern Ireland",
3819
+ "Jersey",
3820
+ "Guernsey",
3821
+ "Isle of Man",
3822
+ "Ireland"
3823
+ ]
3824
+ },
3380
3825
  "GbrGlobalAddress": {
3381
3826
  "title": "Global Address",
3382
3827
  "description": "Global (non-UK) address in the UK address format",
@@ -3416,76 +3861,168 @@
3416
3861
  "northings",
3417
3862
  "uprn",
3418
3863
  "county",
3864
+ "county_code",
3419
3865
  "id",
3420
3866
  "dataset",
3421
- "country_iso"
3867
+ "country_iso",
3868
+ "country_iso_2",
3869
+ "language"
3422
3870
  ],
3423
3871
  "properties": {
3424
- "postcode": {
3872
+ "id": {
3873
+ "$ref": "#/components/schemas/ID"
3874
+ },
3875
+ "dataset": {
3876
+ "$ref": "#/components/schemas/Dataset"
3877
+ },
3878
+ "country_iso": {
3879
+ "$ref": "#/components/schemas/CountryISO"
3880
+ },
3881
+ "country_iso_2": {
3882
+ "$ref": "#/components/schemas/CountryISO2"
3883
+ },
3884
+ "language": {
3885
+ "$ref": "#/components/schemas/Language"
3886
+ },
3887
+ "line_1": {
3425
3888
  "type": "string",
3426
- "description": "Postal or Zip Code"
3889
+ "description": "First address line"
3427
3890
  },
3428
- "postcode_outward": {
3891
+ "line_2": {
3429
3892
  "type": "string",
3430
- "description": "Not available for non-UK addresses",
3431
- "enum": [
3432
- ""
3433
- ]
3893
+ "description": "Second address line"
3434
3894
  },
3435
- "postcode_inward": {
3895
+ "line_3": {
3436
3896
  "type": "string",
3437
- "description": "Not available for non-UK addresses",
3438
- "enum": [
3439
- ""
3440
- ]
3897
+ "description": "Third address line"
3898
+ },
3899
+ "postcode": {
3900
+ "type": "string",
3901
+ "description": "Postal Code or Zip Code"
3441
3902
  },
3442
3903
  "post_town": {
3443
3904
  "type": "string",
3444
3905
  "description": "Town or City"
3445
3906
  },
3446
- "dependant_locality": {
3447
- "$ref": "#/components/schemas/DependantLocality"
3448
- },
3907
+ "county": {
3908
+ "type": "string",
3909
+ "description": "Province, state or county"
3910
+ },
3911
+ "county_code": {
3912
+ "type": "string",
3913
+ "description": "Code or abbreviation associated with provice, state or county",
3914
+ "example": "NY"
3915
+ },
3916
+ "longitude": {
3917
+ "$ref": "#/components/schemas/Longitude"
3918
+ },
3919
+ "latitude": {
3920
+ "$ref": "#/components/schemas/Latitude"
3921
+ },
3922
+ "country": {
3923
+ "$ref": "#/components/schemas/Country"
3924
+ },
3925
+ "postcode_outward": {
3926
+ "type": "string",
3927
+ "description": "Not available for non-UK addresses",
3928
+ "enum": [
3929
+ ""
3930
+ ]
3931
+ },
3932
+ "postcode_inward": {
3933
+ "type": "string",
3934
+ "description": "Not available for non-UK addresses",
3935
+ "enum": [
3936
+ ""
3937
+ ]
3938
+ },
3939
+ "dependant_locality": {
3940
+ "type": "string",
3941
+ "description": "Not available for non-UK addresses",
3942
+ "enum": [
3943
+ ""
3944
+ ]
3945
+ },
3449
3946
  "double_dependant_locality": {
3450
- "$ref": "#/components/schemas/DoubleDependantLocality"
3947
+ "type": "string",
3948
+ "description": "Not available for non-UK addresses",
3949
+ "enum": [
3950
+ ""
3951
+ ]
3451
3952
  },
3452
3953
  "thoroughfare": {
3453
- "$ref": "#/components/schemas/Thoroughfare"
3954
+ "type": "string",
3955
+ "description": "Not available for non-UK addresses",
3956
+ "enum": [
3957
+ ""
3958
+ ]
3454
3959
  },
3455
3960
  "dependant_thoroughfare": {
3456
- "$ref": "#/components/schemas/DependantThoroughfare"
3961
+ "type": "string",
3962
+ "description": "Not available for non-UK addresses",
3963
+ "enum": [
3964
+ ""
3965
+ ]
3457
3966
  },
3458
3967
  "building_number": {
3459
- "$ref": "#/components/schemas/BuildingNumber"
3968
+ "type": "string",
3969
+ "description": "Not available for non-UK addresses",
3970
+ "enum": [
3971
+ ""
3972
+ ]
3460
3973
  },
3461
3974
  "building_name": {
3462
- "$ref": "#/components/schemas/BuildingName"
3975
+ "type": "string",
3976
+ "description": "Not available for non-UK addresses",
3977
+ "enum": [
3978
+ ""
3979
+ ]
3463
3980
  },
3464
3981
  "sub_building_name": {
3465
- "$ref": "#/components/schemas/SubBuildingName"
3982
+ "type": "string",
3983
+ "description": "Not available for non-UK addresses",
3984
+ "enum": [
3985
+ ""
3986
+ ]
3987
+ },
3988
+ "premise": {
3989
+ "type": "string",
3990
+ "description": "Not available for non-UK addresses",
3991
+ "enum": [
3992
+ ""
3993
+ ]
3466
3994
  },
3467
3995
  "po_box": {
3468
3996
  "type": "string",
3469
- "description": "PO Box"
3997
+ "description": "Not available for non-UK addresses",
3998
+ "enum": [
3999
+ ""
4000
+ ]
3470
4001
  },
3471
4002
  "department_name": {
3472
4003
  "type": "string",
3473
- "description": "Department name at premise"
4004
+ "description": "Not available for non-UK addresses",
4005
+ "enum": [
4006
+ ""
4007
+ ]
3474
4008
  },
3475
4009
  "organisation_name": {
3476
4010
  "type": "string",
3477
- "description": "Name of organisation at premise"
4011
+ "description": "Not available for non-UK addresses",
4012
+ "enum": [
4013
+ ""
4014
+ ]
3478
4015
  },
3479
4016
  "udprn": {
3480
4017
  "type": "string",
3481
- "description": "Not available for non-UK addresses. See id for address identifier",
4018
+ "description": "Not available for non-UK addresses. See `id` for address identifier",
3482
4019
  "enum": [
3483
4020
  ""
3484
4021
  ]
3485
4022
  },
3486
4023
  "umprn": {
3487
4024
  "type": "string",
3488
- "description": "Not available for non-UK addresses. See id for address identifier",
4025
+ "description": "Not available for non-UK addresses. See `id` for address identifier",
3489
4026
  "enum": [
3490
4027
  ""
3491
4028
  ]
@@ -3511,25 +4048,6 @@
3511
4048
  ""
3512
4049
  ]
3513
4050
  },
3514
- "line_1": {
3515
- "$ref": "#/components/schemas/Line1"
3516
- },
3517
- "line_2": {
3518
- "$ref": "#/components/schemas/Line2"
3519
- },
3520
- "line_3": {
3521
- "$ref": "#/components/schemas/Line3"
3522
- },
3523
- "premise": {
3524
- "$ref": "#/components/schemas/Premise"
3525
- },
3526
- "country": {
3527
- "$ref": "#/components/schemas/Country"
3528
- },
3529
- "county": {
3530
- "type": "string",
3531
- "description": "Province, state or county"
3532
- },
3533
4051
  "administrative_county": {
3534
4052
  "type": "string",
3535
4053
  "description": "Not available for non-UK addresses",
@@ -3552,16 +4070,18 @@
3552
4070
  ]
3553
4071
  },
3554
4072
  "district": {
3555
- "$ref": "#/components/schemas/District"
4073
+ "type": "string",
4074
+ "description": "Not available for non-UK addresses",
4075
+ "enum": [
4076
+ ""
4077
+ ]
3556
4078
  },
3557
4079
  "ward": {
3558
- "$ref": "#/components/schemas/Ward"
3559
- },
3560
- "longitude": {
3561
- "$ref": "#/components/schemas/Longitude"
3562
- },
3563
- "latitude": {
3564
- "$ref": "#/components/schemas/Latitude"
4080
+ "type": "string",
4081
+ "description": "Not available for non-UK addresses",
4082
+ "enum": [
4083
+ ""
4084
+ ]
3565
4085
  },
3566
4086
  "eastings": {
3567
4087
  "type": "string",
@@ -3579,19 +4099,10 @@
3579
4099
  },
3580
4100
  "uprn": {
3581
4101
  "type": "string",
3582
- "description": "Not available for non-UK addresses. See id for address identifier",
4102
+ "description": "Not available for non-UK addresses. See `id` for address identifier",
3583
4103
  "enum": [
3584
4104
  ""
3585
4105
  ]
3586
- },
3587
- "id": {
3588
- "$ref": "#/components/schemas/ID"
3589
- },
3590
- "dataset": {
3591
- "$ref": "#/components/schemas/Dataset"
3592
- },
3593
- "country_iso": {
3594
- "$ref": "#/components/schemas/CountryISO"
3595
4106
  }
3596
4107
  }
3597
4108
  },
@@ -3625,6 +4136,12 @@
3625
4136
  {
3626
4137
  "$ref": "#/components/schemas/MrAddress"
3627
4138
  },
4139
+ {
4140
+ "$ref": "#/components/schemas/WelshPafAddress"
4141
+ },
4142
+ {
4143
+ "$ref": "#/components/schemas/PafAliasAddress"
4144
+ },
3628
4145
  {
3629
4146
  "$ref": "#/components/schemas/NybAddress"
3630
4147
  },
@@ -3646,7 +4163,7 @@
3646
4163
  "usps_country": {
3647
4164
  "title": "Country",
3648
4165
  "type": "string",
3649
- "description": "Full country name associated with address",
4166
+ "description": " Full country names (ISO 3166)\n",
3650
4167
  "enum": [
3651
4168
  "United States",
3652
4169
  "Guam",
@@ -3654,15 +4171,33 @@
3654
4171
  ]
3655
4172
  },
3656
4173
  "usps_country_iso": {
3657
- "title": "USPS ISO Country Codes",
4174
+ "title": "ISO Country Code (3)",
3658
4175
  "type": "string",
3659
- "description": "3 letter ISO country code associated with USA",
4176
+ "description": " 3 letter country code (ISO 3166-1)\n",
3660
4177
  "enum": [
3661
4178
  "USA",
3662
4179
  "PRI",
3663
4180
  "GUM"
3664
4181
  ]
3665
4182
  },
4183
+ "usps_country_iso_2": {
4184
+ "title": "ISO Country Code (2)",
4185
+ "type": "string",
4186
+ "description": " 2 letter country code (ISO 3166-1)\n",
4187
+ "enum": [
4188
+ "US",
4189
+ "PR",
4190
+ "GU"
4191
+ ]
4192
+ },
4193
+ "usps_language": {
4194
+ "title": "Language",
4195
+ "type": "string",
4196
+ "description": "Language represented by 2 letter ISO Code (639-1)\n",
4197
+ "enum": [
4198
+ "en"
4199
+ ]
4200
+ },
3666
4201
  "primary_number": {
3667
4202
  "title": "Primary Number",
3668
4203
  "type": "string",
@@ -3694,10 +4229,10 @@
3694
4229
  "example": "9450 Pinecroft Dr"
3695
4230
  },
3696
4231
  "last_line": {
3697
- "title": "TITLE",
4232
+ "title": "Last Line",
3698
4233
  "type": "string",
3699
4234
  "description": "Last line of the address comprising of city, state, zip code and zip+4",
3700
- "example": "GREENWICH, CT, 06830-1234"
4235
+ "example": "Greenwich CT 06830-1234"
3701
4236
  },
3702
4237
  "zip_code": {
3703
4238
  "title": "ZIP Code",
@@ -3838,7 +4373,7 @@
3838
4373
  "title": "County Name",
3839
4374
  "type": "string",
3840
4375
  "description": "The name of the county or parish in which the 5-digit ZIP Code resides. If APO/FPO/DPO, then the county name will be blank.",
3841
- "example": "SUFFOLK"
4376
+ "example": "Suffolk"
3842
4377
  },
3843
4378
  "city": {
3844
4379
  "title": "City Name",
@@ -3945,7 +4480,10 @@
3945
4480
  "required": [
3946
4481
  "id",
3947
4482
  "dataset",
4483
+ "country",
3948
4484
  "country_iso",
4485
+ "country_iso_2",
4486
+ "language",
3949
4487
  "primary_number",
3950
4488
  "secondary_number",
3951
4489
  "plus_4_code",
@@ -3996,6 +4534,12 @@
3996
4534
  "country_iso": {
3997
4535
  "$ref": "#/components/schemas/usps_country_iso"
3998
4536
  },
4537
+ "country_iso_2": {
4538
+ "$ref": "#/components/schemas/usps_country_iso_2"
4539
+ },
4540
+ "language": {
4541
+ "$ref": "#/components/schemas/usps_language"
4542
+ },
3999
4543
  "primary_number": {
4000
4544
  "$ref": "#/components/schemas/primary_number"
4001
4545
  },
@@ -4112,7 +4656,10 @@
4112
4656
  "required": [
4113
4657
  "id",
4114
4658
  "dataset",
4659
+ "country",
4115
4660
  "country_iso",
4661
+ "country_iso_2",
4662
+ "language",
4116
4663
  "primary_number",
4117
4664
  "secondary_number",
4118
4665
  "plus_4_code",
@@ -4166,6 +4713,12 @@
4166
4713
  "country_iso": {
4167
4714
  "$ref": "#/components/schemas/CountryISO"
4168
4715
  },
4716
+ "country_iso_2": {
4717
+ "$ref": "#/components/schemas/CountryISO2"
4718
+ },
4719
+ "language": {
4720
+ "$ref": "#/components/schemas/Language"
4721
+ },
4169
4722
  "primary_number": {
4170
4723
  "type": "string",
4171
4724
  "description": "Not available for non-US addresses",
@@ -4427,6 +4980,24 @@
4427
4980
  }
4428
4981
  }
4429
4982
  },
4983
+ "AddressLongitudeParam": {
4984
+ "title": "Longitude",
4985
+ "type": "number",
4986
+ "format": "float",
4987
+ "description": "Longitude query for reverse geocoding.\n\nAn accompanying latitude (lat=) query must be submitted for a valid reverse geocode query.\n",
4988
+ "minimum": -90,
4989
+ "maximum": 90,
4990
+ "example": -0.12767
4991
+ },
4992
+ "AddressLatitudeParam": {
4993
+ "title": "Latitude",
4994
+ "type": "number",
4995
+ "format": "float",
4996
+ "description": "Latitude query for reverse geocoding.\n\nAn accompanying longitude (lon=) query must be submitted for a valid reverse geocode query.\n",
4997
+ "minimum": -90,
4998
+ "maximum": 90,
4999
+ "example": 51.503541
5000
+ },
4430
5001
  "AddressResponse": {
4431
5002
  "title": "Address Search Response",
4432
5003
  "type": "object",
@@ -4471,6 +5042,12 @@
4471
5042
  },
4472
5043
  {
4473
5044
  "$ref": "#/components/schemas/NybAddress"
5045
+ },
5046
+ {
5047
+ "$ref": "#/components/schemas/WelshPafAddress"
5048
+ },
5049
+ {
5050
+ "$ref": "#/components/schemas/PafAliasAddress"
4474
5051
  }
4475
5052
  ]
4476
5053
  }
@@ -4745,58 +5322,6 @@
4745
5322
  }
4746
5323
  }
4747
5324
  },
4748
- "BadRequestResponse": {
4749
- "title": "Bad Request Error Response",
4750
- "allOf": [
4751
- {
4752
- "$ref": "#/components/schemas/ErrorResponse"
4753
- },
4754
- {
4755
- "type": "object",
4756
- "required": [
4757
- "code",
4758
- "message"
4759
- ],
4760
- "properties": {
4761
- "code": {
4762
- "type": "integer",
4763
- "description": "`400X` type error response code",
4764
- "format": "int32"
4765
- },
4766
- "message": {
4767
- "type": "string",
4768
- "description": "Bad request error description"
4769
- },
4770
- "errors": {
4771
- "type": "array",
4772
- "items": {
4773
- "type": "object",
4774
- "required": [
4775
- "path",
4776
- "message"
4777
- ],
4778
- "properties": {
4779
- "message": {
4780
- "type": "string",
4781
- "example": "should have required property 'type'",
4782
- "description": "Indicates location of error in request query or URL parameter"
4783
- },
4784
- "path": {
4785
- "type": "string",
4786
- "example": ".query.type",
4787
- "description": "Indicates location of error in request query or URL parameter"
4788
- },
4789
- "errorCode": {
4790
- "type": "string",
4791
- "example": "required.openapi.validation"
4792
- }
4793
- }
4794
- }
4795
- }
4796
- }
4797
- }
4798
- ]
4799
- },
4800
5325
  "UnauthorizedResponse": {
4801
5326
  "title": "Unauthorized Request Error Response",
4802
5327
  "allOf": [
@@ -4920,6 +5445,524 @@
4920
5445
  "description": "A serialised payload of up to `4096` characters"
4921
5446
  }
4922
5447
  }
5448
+ },
5449
+ "EircBase": {
5450
+ "required": [
5451
+ "id",
5452
+ "dataset",
5453
+ "country",
5454
+ "country_iso",
5455
+ "country_iso_2",
5456
+ "language",
5457
+ "longitude",
5458
+ "latitude",
5459
+ "department",
5460
+ "organisation",
5461
+ "sub_building_name",
5462
+ "building_name",
5463
+ "building_number",
5464
+ "building_group",
5465
+ "primary_thoroughfare",
5466
+ "secondary_thoroughfare",
5467
+ "primary_locality",
5468
+ "secondary_locality",
5469
+ "tertiary_locality",
5470
+ "post_county",
5471
+ "eircode",
5472
+ "line_1",
5473
+ "line_2",
5474
+ "line_3",
5475
+ "line_4",
5476
+ "line_5",
5477
+ "line_6",
5478
+ "line_7",
5479
+ "line_8",
5480
+ "line_9",
5481
+ "address_reference"
5482
+ ],
5483
+ "properties": {
5484
+ "id": {
5485
+ "$ref": "#/components/schemas/ID"
5486
+ },
5487
+ "dataset": {
5488
+ "type": "string",
5489
+ "description": "Source of address"
5490
+ },
5491
+ "country_iso": {
5492
+ "description": " 3 letter country code (ISO 3166-1)\n",
5493
+ "enum": [
5494
+ "IRL"
5495
+ ]
5496
+ },
5497
+ "country_iso_2": {
5498
+ "type": "string",
5499
+ "description": " 2 letter country code (ISO 3166-1)\n",
5500
+ "enum": [
5501
+ "IE"
5502
+ ]
5503
+ },
5504
+ "country": {
5505
+ "type": "string",
5506
+ "description": " Full country names (ISO 3166)\n",
5507
+ "enum": [
5508
+ "Ireland"
5509
+ ]
5510
+ },
5511
+ "language": {
5512
+ "enum": [
5513
+ "en",
5514
+ "ga"
5515
+ ],
5516
+ "description": "Language represented by 2 letter ISO Code (639-1)\n"
5517
+ },
5518
+ "line_1": {
5519
+ "description": "Address Line 1",
5520
+ "type": "string",
5521
+ "maxLength": 200,
5522
+ "minLength": 0
5523
+ },
5524
+ "line_2": {
5525
+ "description": "Address Line 2",
5526
+ "type": "string",
5527
+ "maxLength": 200,
5528
+ "minLength": 0
5529
+ },
5530
+ "line_3": {
5531
+ "description": "Address Line 3",
5532
+ "type": "string",
5533
+ "maxLength": 200,
5534
+ "minLength": 0
5535
+ },
5536
+ "line_4": {
5537
+ "description": "Address Line 4",
5538
+ "type": "string",
5539
+ "maxLength": 200,
5540
+ "minLength": 0
5541
+ },
5542
+ "line_5": {
5543
+ "description": "Address Line 5",
5544
+ "type": "string",
5545
+ "maxLength": 200,
5546
+ "minLength": 0
5547
+ },
5548
+ "line_6": {
5549
+ "description": "Address Line 6",
5550
+ "type": "string",
5551
+ "maxLength": 200,
5552
+ "minLength": 0
5553
+ },
5554
+ "line_7": {
5555
+ "description": "Address Line 7",
5556
+ "type": "string",
5557
+ "maxLength": 200,
5558
+ "minLength": 0
5559
+ },
5560
+ "line_8": {
5561
+ "description": "Address Line 8",
5562
+ "type": "string",
5563
+ "maxLength": 200,
5564
+ "minLength": 0
5565
+ },
5566
+ "line_9": {
5567
+ "description": "Address Line 9",
5568
+ "type": "string",
5569
+ "maxLength": 200,
5570
+ "minLength": 0
5571
+ },
5572
+ "department": {
5573
+ "type": "string",
5574
+ "maxLength": 60,
5575
+ "minLength": 0,
5576
+ "description": "The department or division within an organisation. If the department element exists, then the organisation must also exist.",
5577
+ "example": "Accounts Department"
5578
+ },
5579
+ "organisation": {
5580
+ "type": "string",
5581
+ "description": "Organisation name",
5582
+ "maxLength": 60,
5583
+ "minLength": 0,
5584
+ "example": "Oak Tree Limited"
5585
+ },
5586
+ "sub_building_name": {
5587
+ "type": "string",
5588
+ "example": "Flat 1",
5589
+ "maxLength": 60,
5590
+ "minLength": 0,
5591
+ "description": "The sub-building refers to an apartment, flat or unit within a building."
5592
+ },
5593
+ "building_name": {
5594
+ "type": "string",
5595
+ "example": "Rose Cottage",
5596
+ "maxLength": 60,
5597
+ "minLength": 0,
5598
+ "description": "The name given to the building. Prepended by sub building, if any, when the sub building does not appear on a line to itself. The building name is omitted if it is the same as either the Organisation or Building Group."
5599
+ },
5600
+ "building_number": {
5601
+ "type": "string",
5602
+ "example": 22,
5603
+ "maxLength": 40,
5604
+ "minLength": 0,
5605
+ "description": "A number associated with the whole building. The building number may have a numeric and an alphanumeric component, which are concatenated e.g. 2A, or alternatively will have a simple building number or a complex building number. The building number always relates to the whole building and not a sub-unit within it.\nA complex building number may be one of the following:\n - Dual. Two number separated by '/' e.g. 63/64 = 63, 64\n - Sequence. An odd or even sequence of numbers with lower and upper bound separated by an underscore '_' e.g. `1_5` = 1,3,5 and `2_6` = 2,4,6 \n - Range. A range of consecutive numbers with lower and upper bound separated by a dash '-' e.g. `63-66` = 63, 64, 56, 66\nThe building number never appears on a line by itself and can prepend Building Group, Primary Thoroughfare or Primary Locality."
5606
+ },
5607
+ "building_group": {
5608
+ "type": "string",
5609
+ "maxLength": 60,
5610
+ "minLength": 0,
5611
+ "description": "A building group is a collection of buildings with a collective name, located on or near the same thoroughfare.",
5612
+ "example": "Marrian Terrace"
5613
+ },
5614
+ "primary_thoroughfare": {
5615
+ "type": "string",
5616
+ "maxLength": 40,
5617
+ "minLength": 0,
5618
+ "description": "The name of the thoroughfare on which premises are located. It may appear on a line by itself or be appended to either a sub building or building number.\n\nAddresses with thoroughfares can sometimes have the thoroughfare excluded where a Building Group exists, such as a Retail Centre or Business Park, and the thoroughfare is not part of the Postal Address.",
5619
+ "example": "Griffith Road"
5620
+ },
5621
+ "secondary_thoroughfare": {
5622
+ "type": "string",
5623
+ "maxLength": 40,
5624
+ "minLength": 0,
5625
+ "description": "It is never present without a primary thoroughfare. The primary thoroughfare is dependent on the secondary thoroughfare and appears before the secondary thoroughfare in any address.\n\nSecondary thoroughfare are generally used to assist locating a primary thoroughfare.",
5626
+ "example": "Navan Road"
5627
+ },
5628
+ "primary_locality": {
5629
+ "type": "string",
5630
+ "maxLength": 40,
5631
+ "minLength": 0,
5632
+ "description": "First locality elements which can refer to areas, districts, industrial estates, towns, etc.\n\nThe primary locality refers to the specific place the address is.\n\nIn urban areas, the primary locality can be required to distinguish between two thoroughfares of the same name in the same district or town. Industrial estates with named thoroughfares are also held as localities. In rural areas the primary locality is generally a townland name.",
5633
+ "example": "Cookstown Industrial Estate"
5634
+ },
5635
+ "secondary_locality": {
5636
+ "type": "string",
5637
+ "maxLength": 40,
5638
+ "minLength": 0,
5639
+ "description": "Never present without a primary locality. The secondary locality has a wider geographic scope than the primary locality.\n\nIt is the secondary locality therefore which differentiates addresses with the same primary locality name within the same county.\n\nSecondary localities are more likely to be required for rural addresses.\n\nSecond locality elements which can refer to areas, districts, industrial estates, towns, etc\n\nThe secondary locality helps identify where the primary locality is located.",
5640
+ "example": "Manorhamilton"
5641
+ },
5642
+ "tertiary_locality": {
5643
+ "type": "string",
5644
+ "maxLength": 40,
5645
+ "minLength": 0,
5646
+ "example": "Dublin 14",
5647
+ "description": "Also known as the Post Town.\n\nThe name of the post town associated with the premises for postal delivery purposes. This includes Dublin Postal Districts \"Dublin 1\" to \"Dublin 24\".\n\nThe post town is a significant element of the Postal Address, however it is not always populated in an address. The official post office guide, Eolaí an Phoist4, describes post towns in the following manner:\n\n\"A provincial postal address may include the name of a town or village several miles distant, with which the addressee has little or no connection, and, in some places, especially if this residence happens to be near a county boundary, the name of the neighbouring county instead of the county in which he actually resides. The explanation is that the main mail despatches have to be sent for more detailed sub division to certain centres known as POST TOWNS, chosen because of their accessibility and convenience.\""
5648
+ },
5649
+ "post_county": {
5650
+ "type": "string",
5651
+ "maxLength": 30,
5652
+ "minLength": 0,
5653
+ "description": "One of the 26 Counties in the Republic of Ireland. These counties are sub-national divisions used for the purposes of administrative, geographical and political demarcation. Post County is the County associated with the Post Town, not the geographic county in which the building is located. The Post County is normally used as part of the Postal Address with some exceptions e.g. Dublin Postal Districts where the Post County is not used and some Post Towns (e.g. Tipperary, Kildare, etc.) that have the same name as the Post County.",
5654
+ "example": "Cork"
5655
+ },
5656
+ "eircode": {
5657
+ "type": "string",
5658
+ "maxLength": 60,
5659
+ "minLength": 0,
5660
+ "description": "The seven character Eircode has an A65 F4E2 format. The Eircode is a mandatory address element. The last line of a Postal Address will contain the Eircode, displayed with a space. e.g. `A65 F4E2`.\n\nThe Eircode is always the last line of a Postal Address generated within the state, e.g. if an address has four lines then the Eircode will be on its own on Address Line 5. For inbound international mail the country name IRELAND should be appended as the last line of the Postal Address.",
5661
+ "example": "A65 R2AF"
5662
+ },
5663
+ "address_reference": {
5664
+ "type": "string",
5665
+ "maxLength": 16,
5666
+ "minLength": 0,
5667
+ "description": "The address reference is the An Post GeoDirectory address reference identifier used by the Universal Service Provider."
5668
+ },
5669
+ "longitude": {
5670
+ "$ref": "#/components/schemas/Longitude"
5671
+ },
5672
+ "latitude": {
5673
+ "$ref": "#/components/schemas/Latitude"
5674
+ }
5675
+ }
5676
+ },
5677
+ "EcafAddress": {
5678
+ "title": "Ireland ECAF Address",
5679
+ "description": "ECAF is the Eircode Address File which contains one record for each Postal Address. English language and Irish language versions are available. It is distributed as a flat file, details of data provision and updates are provided in section 2.",
5680
+ "required": [
5681
+ "ecaf_id"
5682
+ ],
5683
+ "allOf": [
5684
+ {
5685
+ "$ref": "#/components/schemas/EircBase"
5686
+ },
5687
+ {
5688
+ "type": "object",
5689
+ "properties": {
5690
+ "dataset": {
5691
+ "type": "string",
5692
+ "enum": [
5693
+ "ecaf"
5694
+ ]
5695
+ },
5696
+ "ecaf_id": {
5697
+ "type": "string",
5698
+ "maxLength": 10,
5699
+ "minLength": 0,
5700
+ "description": "The unique identifier in the ECAF is the `ecaf_id`. This unique identifier allows each address in the ECAF to be uniquely identified. It can also be used as index once the data has been imported into a relational database. This is a numeric field that can store values from 0 to 2,147,483,647. It is represented as a number up to 10 digits long. All other fields in ECAF are alphanumeric."
5701
+ }
5702
+ }
5703
+ }
5704
+ ]
5705
+ },
5706
+ "EcadAddress": {
5707
+ "title": "Ireland ECAD Address",
5708
+ "description": "The ECAD contains additional data for each ECAF address.",
5709
+ "required": [
5710
+ "organisation_id",
5711
+ "address_point_id",
5712
+ "building_id",
5713
+ "building_group_id",
5714
+ "primary_thoroughfare_id",
5715
+ "secondary_thoroughfare_id",
5716
+ "primary_locality_id",
5717
+ "secondary_locality_id",
5718
+ "post_town",
5719
+ "post_town_id",
5720
+ "post_county_id",
5721
+ "nua",
5722
+ "gaeltacht",
5723
+ "address_type",
5724
+ "building_address_type",
5725
+ "building_group_address_type",
5726
+ "primary_locality_address_type",
5727
+ "secondary_locality_address_type",
5728
+ "building_type",
5729
+ "holiday_home",
5730
+ "under_construction",
5731
+ "building_use",
5732
+ "vacant",
5733
+ "org_vacant",
5734
+ "nace_code",
5735
+ "nace_category",
5736
+ "local_authority",
5737
+ "ded_id",
5738
+ "small_area_id",
5739
+ "townland_id",
5740
+ "gaeltacht_id",
5741
+ "postaim_presort_61",
5742
+ "postaim_presort_152",
5743
+ "publicity_post_zone"
5744
+ ],
5745
+ "allOf": [
5746
+ {
5747
+ "$ref": "#/components/schemas/EircBase"
5748
+ },
5749
+ {
5750
+ "type": "object",
5751
+ "properties": {
5752
+ "dataset": {
5753
+ "type": "string",
5754
+ "enum": [
5755
+ "ecad"
5756
+ ]
5757
+ },
5758
+ "ecad_id": {
5759
+ "type": "string",
5760
+ "description": "Unique 10 digit ECAD ID",
5761
+ "example": "17000000",
5762
+ "minLength": 1,
5763
+ "maxLength": 10
5764
+ },
5765
+ "organisation_id": {
5766
+ "type": "string",
5767
+ "description": "Organisation ID",
5768
+ "example": "10098783",
5769
+ "maxLength": 10,
5770
+ "minLength": 1
5771
+ },
5772
+ "address_point_id": {
5773
+ "type": "string",
5774
+ "description": "Address Point ID",
5775
+ "example": "10098783",
5776
+ "maxLength": 10,
5777
+ "minLength": 1
5778
+ },
5779
+ "building_id": {
5780
+ "type": "string",
5781
+ "description": "Building ID",
5782
+ "example": "10098783",
5783
+ "maxLength": 10,
5784
+ "minLength": 1
5785
+ },
5786
+ "building_group_id": {
5787
+ "type": "string",
5788
+ "description": "Building Group ID",
5789
+ "example": "10098783"
5790
+ },
5791
+ "primary_thoroughfare_id": {
5792
+ "type": "string",
5793
+ "description": "Primary Thoroughfare ID",
5794
+ "example": "10098783",
5795
+ "maxLength": 10,
5796
+ "minLength": 1
5797
+ },
5798
+ "secondary_thoroughfare_id": {
5799
+ "type": "string",
5800
+ "description": "Secondary Thoroughfare ID",
5801
+ "example": "10098783"
5802
+ },
5803
+ "primary_locality_id": {
5804
+ "type": "string",
5805
+ "description": "Primary Locality ID",
5806
+ "example": "10098783",
5807
+ "maxLength": 10,
5808
+ "minLength": 1
5809
+ },
5810
+ "secondary_locality_id": {
5811
+ "type": "string",
5812
+ "description": "Secondary Locality ID",
5813
+ "example": "10098783"
5814
+ },
5815
+ "post_town": {
5816
+ "type": "string",
5817
+ "minLength": 0,
5818
+ "description": "The post town is a significant element of the Postal Address, however it is not always populated in an address. The official post office guide, Eolaí an Phoist1, describes post towns in the following manner:\n\n\"A provincial postal address may include the name of a town or village several miles distant, with which the addressee has little or no connection, and, in some places, especially if this residence happens to be near a county boundary, the name of the neighbouring county instead of the county in which he actually resides. The explanation is that the main mail despatches have to be sent for more detailed sub division to certain centres known as post towns, chosen because of their accessibility and convenience.\""
5819
+ },
5820
+ "post_town_id": {
5821
+ "type": "string",
5822
+ "description": "Post Town ID",
5823
+ "example": "10098783",
5824
+ "maxLength": 10,
5825
+ "minLength": 1
5826
+ },
5827
+ "post_county_id": {
5828
+ "type": "string",
5829
+ "description": "Post County ID",
5830
+ "example": "10098783",
5831
+ "maxLength": 10,
5832
+ "minLength": 1
5833
+ },
5834
+ "nua": {
5835
+ "type": "boolean",
5836
+ "description": "NUA means \"non-unique address\".\n\nThe NUA field contains `true` when the address is a non-unique address, and `false` when it is a unique address.\n\nIreland has a very high level of non-unique addresses (NUA), i.e. the address does not contain a unique building number or name. Approximately 35% of all Irish addresses are non-unique which equates to 600,000 addresses.\n\nThe typical example of NUA addressing is where every address in a townland is the same. The way that post is delivered is by local knowledge of postal delivery personnel of which addressee lives in which house.\n\nN.B. For a NUA address, it is impossible to match to a unique record in the ECAD and assign an Eircode."
5837
+ },
5838
+ "gaeltacht": {
5839
+ "type": "boolean",
5840
+ "description": "Gaeltact refers to a district where the Irish government recognises that the Irish language is the predominant language.\n\nReturns `true` if address is in a Gaeltacht area and `false` if not."
5841
+ },
5842
+ "address_type": {
5843
+ "type": "string",
5844
+ "minLength": 0,
5845
+ "description": "Addresses points can assume one of the following values:\n\n- Residential Address Point. This type of address point has one residential addresses associated with it.\n- Non-Residential Address Point. This type of address point has one or more non-residential address (business, club or other organisation) associated with it.\n- Mixed Address Point. This is a special case where the residential and non residential addresses in the building are essentially the same address. The typical example is a farm house on an active farm. It is important to note that this is a special case. In general a building with both residential and non-residential addresses (e.g. an apartment over a shop) will receive two address points, one commercial and one residential, and hence two Eircodes.\n\nBuildings can contain multiple address points of type Residential and/or Non-Residential."
5846
+ },
5847
+ "building_address_type": {
5848
+ "description": "The building type can assume one of the following values:\n\n- Single Occupancy Residential Building. This type of building contains one residential address.\n- Multi Occupancy Residential Building. This type of building contains multiple residential addresses.\n- Single Occupancy Non-Residential Building. This type of building contains one non-residential address (business, club or other organisation).\n- Multi Occupancy Non-Residential Building. This type of building contains multiple non-residential addresses (business, club or other organisation).\n- Multi Occupancy Mixed Use Building. This type of building contains multiple residential and non- residential addresses.\n\nBuildings can also have a more specific address types such as a Hospital, School, Shopping Centre, etc.",
5849
+ "type": "string",
5850
+ "minLength": 0
5851
+ },
5852
+ "building_group_address_type": {
5853
+ "type": "string",
5854
+ "minLength": 0,
5855
+ "description": "The building group type can be:\n\n- Residential Building Group. This type of building group contains buildings with residential addresses only.\n- Non-Residential Building Group This type of building group contains buildings with non-residential addresses (business, club or other organisation) only.\n- Mixed Building Group. This type of building group contains buildings with residential and non-residential addresses. Can also have a more specific address type such as a Hospital, School, Shopping Centre, etc.\n\nBuilding groups can also have a more specific address type such as a Hospital, School, Shopping Centre, etc."
5856
+ },
5857
+ "primary_locality_address_type": {
5858
+ "type": "string",
5859
+ "minLength": 0,
5860
+ "description": "The locality type can be:\n - Rural Locality. This is generally a townland.\n - Industrial Estate. Industrial Estate, Industrial Park, Business Campus, etc.\n - Shopping District. Shopping Centre.\n - Housing Estate. Residential Housing Estate.\n - Village. Based on Census 2011 population < 1,500.\n - Town. Based on Census 2011 population > 1,500.\n - Urban Area. Wholly within a village/town/city e.g. Rathmines.\n - Suburban Locality. This is an area that is both rural and urban, as it is both a townland, and also an area name applied to houses in a town, as the town has extended partially into the townland.\n\nWhere the locality is also the post town, the type can be:\n - Village. Based on Census 2011 population < 1,500\n - Town. Based on Census 2011 population > 1,500\n - Postal District. Dublin 1 to 24\n - City. Dublin, Cork, Limerick, Galway or Waterford"
5861
+ },
5862
+ "secondary_locality_address_type": {
5863
+ "type": "string",
5864
+ "minLength": 0,
5865
+ "description": "The locality type can be:\n - Rural Locality. This is generally a townland.\n - Industrial Estate. Industrial Estate, Industrial Park, Business Campus, etc.\n - Shopping District. Shopping Centre.\n - Housing Estate. Residential Housing Estate.\n - Village. Based on Census 2011 population < 1,500.\n - Town. Based on Census 2011 population > 1,500.\n - Urban Area. Wholly within a village/town/city e.g. Rathmines.\n - Suburban Locality. This is an area that is both rural and urban, as it is both a townland, and also an area name applied to houses in a town, as the town has extended partially into the townland.\n\nWhere the locality is also the post town, the type can be:\n - Village. Based on Census 2011 population < 1,500\n - Town. Based on Census 2011 population > 1,500\n - Postal District. Dublin 1 to 24\n - City. Dublin, Cork, Limerick, Galway or Waterford"
5866
+ },
5867
+ "building_type": {
5868
+ "type": "string",
5869
+ "minLength": 0,
5870
+ "description": "Describes the type of building, e.g. detached, semi-detached, bungalow."
5871
+ },
5872
+ "holiday_home": {
5873
+ "enum": [
5874
+ "N",
5875
+ "Y",
5876
+ ""
5877
+ ],
5878
+ "description": "A Yes/No field, indicating whether or not the building is a holiday home."
5879
+ },
5880
+ "under_construction": {
5881
+ "enum": [
5882
+ "N",
5883
+ "Y",
5884
+ ""
5885
+ ],
5886
+ "description": "A Yes/No field, indicating whether or not the building is under construction."
5887
+ },
5888
+ "building_use": {
5889
+ "enum": [
5890
+ "R",
5891
+ "C",
5892
+ "B",
5893
+ "U"
5894
+ ],
5895
+ "description": "Can be one of:\n\n- `R` Residential \n- `C` Commercial\n- `B` Both \n- `U` Unknown"
5896
+ },
5897
+ "vacant": {
5898
+ "description": "A Yes/No field, indicating whether the building is vacant.",
5899
+ "enum": [
5900
+ "Y",
5901
+ "N",
5902
+ ""
5903
+ ]
5904
+ },
5905
+ "org_vacant": {
5906
+ "description": "A Yes/No field, indicating whether the organisation is vacant.",
5907
+ "enum": [
5908
+ "Y",
5909
+ "N",
5910
+ ""
5911
+ ]
5912
+ },
5913
+ "nace_code": {
5914
+ "description": "The NACE Code for the Category.",
5915
+ "type": "string",
5916
+ "minLength": 0
5917
+ },
5918
+ "nace_category": {
5919
+ "description": "Name of the NACE Category",
5920
+ "type": "string",
5921
+ "minLength": 0
5922
+ },
5923
+ "local_authority": {
5924
+ "description": "Name of local authority",
5925
+ "type": "string",
5926
+ "minLength": 0
5927
+ },
5928
+ "ded_id": {
5929
+ "description": "Unique Identifier for Electoral Divisions 2017 data.\n\nNote that this field is subject to breaking changes if a new generation of government data IDs is released. Currently this uses 2017 IDs. Contact us to be notified ahead of his change.",
5930
+ "type": "string",
5931
+ "minLength": 0
5932
+ },
5933
+ "small_area_id": {
5934
+ "description": "Unique Identifier for the Small Area 2017 data.\n\nNote that this field is subject to breaking changes if a new generation of government data IDs is released. Currently this uses 2017 IDs. Contact us to be notified ahead of his change.",
5935
+ "type": "string",
5936
+ "minLength": 0
5937
+ },
5938
+ "townland_id": {
5939
+ "description": "Unique Identifier for townland 2017 data.\n\nNote that this field is subject to breaking changes if a new generation of government data IDs is released. Currently this uses 2017 IDs. Contact us to be notified ahead of his change.",
5940
+ "type": "string",
5941
+ "minLength": 0
5942
+ },
5943
+ "gaeltacht_id": {
5944
+ "description": "Unique Identifier for the 7 Gaeltacht areas 2017 data.\n\nNote that this field is subject to breaking changes if a new generation of government data IDs is released. Currently this uses 2017 IDs. Contact us to be notified ahead of his change.",
5945
+ "type": "string",
5946
+ "minLength": 0
5947
+ },
5948
+ "postaim_presort_61": {
5949
+ "description": "An Post sorting information.",
5950
+ "type": "string",
5951
+ "minLength": 0
5952
+ },
5953
+ "postaim_presort_152": {
5954
+ "description": "An Post sorting information.",
5955
+ "type": "string",
5956
+ "minLength": 0
5957
+ },
5958
+ "publicity_post_zone": {
5959
+ "description": "An Post publicity post zone information.",
5960
+ "type": "string",
5961
+ "minLength": 0
5962
+ }
5963
+ }
5964
+ }
5965
+ ]
4923
5966
  }
4924
5967
  }
4925
5968
  }