@addresszen/openapi 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/_headers +2 -0
- package/dist/index.html +37 -0
- package/dist/openapi.d.ts +2848 -0
- package/dist/openapi.js +6 -0
- package/dist/openapi.json +4926 -0
- package/dist/openapi.yaml +4835 -0
- package/package.json +63 -0
|
@@ -0,0 +1,2848 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/postcodes/{postcode}": {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.
|
|
9
|
+
*
|
|
10
|
+
* The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like [Postcode Lookup](/postcode-lookup).
|
|
11
|
+
*
|
|
12
|
+
* ## Postcode Not Found
|
|
13
|
+
*
|
|
14
|
+
* Lookup balance is unaffected by invalid postcodes. The API returns a `404` response with response body:
|
|
15
|
+
*
|
|
16
|
+
* ```json
|
|
17
|
+
* {
|
|
18
|
+
* "code": 4040,
|
|
19
|
+
* "message": "Postcode not found",
|
|
20
|
+
* "suggestions": ["SW1A 0AA"]
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ### Suggestions
|
|
25
|
+
*
|
|
26
|
+
* If a postcode cannot be found, the API will provide up to 5 closest matching postcodes. Common errors will be corrected first (e.g. mixing up `O` and `0` or `I` and `1`).
|
|
27
|
+
*
|
|
28
|
+
* If the suggestion list is small (fewer than 3), there is a high probability the correct postcode is there. You may notify the user or immediately trigger new searches.
|
|
29
|
+
*
|
|
30
|
+
* The suggestion list will be empty if the postcode has deviated too far from a valid postcode format.
|
|
31
|
+
*
|
|
32
|
+
* ## Multiple Residence
|
|
33
|
+
*
|
|
34
|
+
* A small number of postcodes will return more than 100 premises. These may require pagination. Use `page` to paginate the result set.
|
|
35
|
+
*/
|
|
36
|
+
get: operations["Postcodes"];
|
|
37
|
+
};
|
|
38
|
+
"/udprn/{udprn}": {
|
|
39
|
+
/**
|
|
40
|
+
* Returns an address as identified by its Unique Delivery Point Reference Number (UDPRN).
|
|
41
|
+
*
|
|
42
|
+
* You may find it useful to store UDPRN information as it can be used to retrieve the most recent information for an address. It can also be used to test for a deleted address.
|
|
43
|
+
*
|
|
44
|
+
* UDPRNs are an eight digit unique numeric code (e.g. 25962203) for any premise on the Postcode Address File. It's essentially a unique identifier for every address in the UK that Royal Mail has in its database.
|
|
45
|
+
*
|
|
46
|
+
* ## Testing
|
|
47
|
+
*
|
|
48
|
+
* To test your implementation of our API we have a range of test UDPRNs that yield both successful and unsuccessful responses to your request.
|
|
49
|
+
*
|
|
50
|
+
* They are the following:
|
|
51
|
+
*
|
|
52
|
+
* - `0` Returns a successful UDPRN lookup response
|
|
53
|
+
* `2000`
|
|
54
|
+
* - `-1` Returns "UDPRN not found", error `4044`
|
|
55
|
+
* - `-2` Returns "no lookups remaining", error `4020`
|
|
56
|
+
* - `-3` Returns "daily (or individual) lookup limit breached",
|
|
57
|
+
* error `4021`
|
|
58
|
+
*
|
|
59
|
+
* Test 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.
|
|
60
|
+
*/
|
|
61
|
+
get: operations["UDPRN"];
|
|
62
|
+
};
|
|
63
|
+
"/umprn/{umprn}": {
|
|
64
|
+
/**
|
|
65
|
+
* Returns a multiple occupancy address identifited via its UMPRN (Multiple Residence Unique ID).
|
|
66
|
+
*
|
|
67
|
+
* UMPRNs are a unique numeric code for any Multiple Residence household on the optional Multiple Residence dataset.
|
|
68
|
+
*
|
|
69
|
+
* ## Testing
|
|
70
|
+
*
|
|
71
|
+
* To test your implementation of our API we have a range of test UMPRNs that yield both successful and unsuccessful responses to your request. They are the following
|
|
72
|
+
*
|
|
73
|
+
* - `0` Returns a successful UMPRN lookup response `2000`
|
|
74
|
+
* - `-1` Returns "UMPRN not found", error `4044`
|
|
75
|
+
* - `-2` Returns "no lookups remaining", error `4020`
|
|
76
|
+
* - `-3` Returns "daily (or individual) lookup limit breached", error `4021`
|
|
77
|
+
*
|
|
78
|
+
* Test 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.
|
|
79
|
+
*
|
|
80
|
+
* ### Pricing
|
|
81
|
+
*
|
|
82
|
+
* Per lookup charges apply. Empty responses are not charged.
|
|
83
|
+
*/
|
|
84
|
+
get: operations["UMPRN"];
|
|
85
|
+
};
|
|
86
|
+
"/keys/{key}": {
|
|
87
|
+
/**
|
|
88
|
+
* Returns public information on key. Currently only returns whether the key is currently useable via the `available` property. Use this to discover if the key is useable before making further requests.
|
|
89
|
+
*
|
|
90
|
+
* You may pass both API Keys (beginning `ak_`) and Sub-licensed Keys (beginning `sl_`).
|
|
91
|
+
* ## Testing
|
|
92
|
+
*
|
|
93
|
+
* To test your implementation of our API, you may use the following test keys.
|
|
94
|
+
*
|
|
95
|
+
* - **iddqd** Availability will return as `true`
|
|
96
|
+
* - **idkfa** Availability will return as `false`
|
|
97
|
+
*/
|
|
98
|
+
get: operations["KeyAvailability"];
|
|
99
|
+
};
|
|
100
|
+
"/keys/{key}/details": {
|
|
101
|
+
/** Returns private data on the key including remaining lookups, available datasets and usage limits. */
|
|
102
|
+
get: operations["KeyDetails"];
|
|
103
|
+
};
|
|
104
|
+
"/keys/{key}/usage": {
|
|
105
|
+
/**
|
|
106
|
+
* Reports the number of lookups consumed on a key for a range of days.
|
|
107
|
+
*
|
|
108
|
+
* A 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.
|
|
109
|
+
*/
|
|
110
|
+
get: operations["KeyUsage"];
|
|
111
|
+
};
|
|
112
|
+
"/keys/{key}/lookups": {
|
|
113
|
+
/**
|
|
114
|
+
* Reports lookup information on a key for paid lookups.
|
|
115
|
+
*
|
|
116
|
+
* This method requires a `user_token`, which can be found on your [accounts page](https://addresszen.com/account).
|
|
117
|
+
*
|
|
118
|
+
* A 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.
|
|
119
|
+
*
|
|
120
|
+
* ## Download Usage History (CSV)
|
|
121
|
+
*
|
|
122
|
+
* `GET /keys/:key/lookups`
|
|
123
|
+
*
|
|
124
|
+
* Returns a CSV download of lookups performed and associated information.
|
|
125
|
+
*
|
|
126
|
+
* Note 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.
|
|
127
|
+
*
|
|
128
|
+
* ## Data Redaction
|
|
129
|
+
*
|
|
130
|
+
* Personally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.
|
|
131
|
+
*
|
|
132
|
+
* By default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.
|
|
133
|
+
*
|
|
134
|
+
* You may prevent PII collection altogether by setting the interval to `0` days.
|
|
135
|
+
*/
|
|
136
|
+
get: operations["KeyLogs"];
|
|
137
|
+
};
|
|
138
|
+
"/autocomplete/addresses": {
|
|
139
|
+
/**
|
|
140
|
+
* The address autocomplete API returns a list of address suggestions that match the query ordered by relevance score.
|
|
141
|
+
*
|
|
142
|
+
* This API can be used to power realtime address finders, also known as address autofill or address autocomplete.
|
|
143
|
+
*
|
|
144
|
+
* If you wish to quickly add address autocompletion to your address forms, see [Address Finder](/address-finder) and [associated demos](/address-finder-demo).
|
|
145
|
+
*
|
|
146
|
+
* ## Implementing Address Autocomplete
|
|
147
|
+
*
|
|
148
|
+
* Retrieving addresses using Address Autocomplete is a 2 step process.
|
|
149
|
+
*
|
|
150
|
+
* 1. Retrieve partial address suggestions via `/autocomplete/addresses`
|
|
151
|
+
* 2. Retrieve the entire address by following the URL provided by the suggestion
|
|
152
|
+
*
|
|
153
|
+
* Step 2 will decrement your lookup balance.
|
|
154
|
+
*
|
|
155
|
+
* Please note, this API is not intended to be a free standalone resource.
|
|
156
|
+
*
|
|
157
|
+
* ## Filters
|
|
158
|
+
*
|
|
159
|
+
* You can strictly narrow your result by adding filters to your querystring which correspond with an address attribute.
|
|
160
|
+
*
|
|
161
|
+
* For instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.
|
|
162
|
+
*
|
|
163
|
+
* If a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.
|
|
164
|
+
*
|
|
165
|
+
* You 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.
|
|
166
|
+
*
|
|
167
|
+
* All filters can accept multiple terms unless stated otherwise below.
|
|
168
|
+
*
|
|
169
|
+
* Multiple 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.
|
|
170
|
+
*
|
|
171
|
+
* A maximum of **10** terms are allowed across all filters.
|
|
172
|
+
*
|
|
173
|
+
* ## Biases
|
|
174
|
+
*
|
|
175
|
+
* You can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.
|
|
176
|
+
*
|
|
177
|
+
* Biased searches, unlike filtered searches, also allow unmatched addresses to appear. These will rank lower.
|
|
178
|
+
*
|
|
179
|
+
* For instance, can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.
|
|
180
|
+
*
|
|
181
|
+
* No bias effect applies to bias terms that are invalid.
|
|
182
|
+
* e.g. `bias_postcode=SW1A2AAA`
|
|
183
|
+
*
|
|
184
|
+
* You 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>.
|
|
185
|
+
*
|
|
186
|
+
* All biases can accept multiple terms unless stated otherwise below.
|
|
187
|
+
*
|
|
188
|
+
* A combined maximum of **5** terms are allowed across all biases.
|
|
189
|
+
*
|
|
190
|
+
* ## Suggestion Format
|
|
191
|
+
*
|
|
192
|
+
* The 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.
|
|
193
|
+
*
|
|
194
|
+
* ## Rate Limiting
|
|
195
|
+
*
|
|
196
|
+
* You 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.
|
|
197
|
+
*
|
|
198
|
+
* | Header | Description |
|
|
199
|
+
* | ----------------------- | -------------------------------------------------------------------------------------- |
|
|
200
|
+
* | `X-RateLimit-Limit` | The maximum number of requests that can be made in 5 minutes |
|
|
201
|
+
* | `X-RateLimit-Remaining` | The remaining requests within the current rate limit window |
|
|
202
|
+
* | `X-RateLimit-Reset` | The time when the rate limit window resets in Unix Time (seconds) or UTC Epoch seconds |
|
|
203
|
+
*
|
|
204
|
+
* ## Pricing
|
|
205
|
+
*
|
|
206
|
+
* This API currently does not affect your balance. However, resolving a suggestion into a full address requires a paid request.
|
|
207
|
+
*
|
|
208
|
+
* Please 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.
|
|
209
|
+
*/
|
|
210
|
+
get: operations["AddressAutocomplete"];
|
|
211
|
+
};
|
|
212
|
+
"/autocomplete/addresses/{address}/gbr": {
|
|
213
|
+
/**
|
|
214
|
+
* Resolves an address autocompletion by its address ID.
|
|
215
|
+
*
|
|
216
|
+
* Resolved addresses (including global addresses) are returned in a UK format (up to 3 address lines) using UK nomenclature (like postcode and county).
|
|
217
|
+
*/
|
|
218
|
+
get: operations["Resolve"];
|
|
219
|
+
};
|
|
220
|
+
"/autocomplete/addresses/{address}/usa": {
|
|
221
|
+
/**
|
|
222
|
+
* Resolves an address autocompletion by its address ID.
|
|
223
|
+
*
|
|
224
|
+
* Resolved addresses (including global addresses) are returned in a US format (up to 2 address lines) using US nomenclature (like zipcode, state and city).
|
|
225
|
+
*/
|
|
226
|
+
get: operations["ResolveUsa"];
|
|
227
|
+
};
|
|
228
|
+
"/addresses": {
|
|
229
|
+
/**
|
|
230
|
+
* 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).
|
|
231
|
+
*
|
|
232
|
+
* If 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.
|
|
233
|
+
*
|
|
234
|
+
* This API is designed as a multi-purpose tool for generating address lists, cleansing and wholesale data extraction according to specific parameters.
|
|
235
|
+
*
|
|
236
|
+
* For address autocomplete, see our address finder API - which is designed for speed and address completion.
|
|
237
|
+
*
|
|
238
|
+
* ## Filters
|
|
239
|
+
*
|
|
240
|
+
* You can strictly narrow your result by adding filters to your query string which correspond with an address attribute.
|
|
241
|
+
*
|
|
242
|
+
* For instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.
|
|
243
|
+
*
|
|
244
|
+
* If a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.
|
|
245
|
+
*
|
|
246
|
+
* You 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.
|
|
247
|
+
*
|
|
248
|
+
* All filters can accept multiple terms unless stated otherwise below.
|
|
249
|
+
*
|
|
250
|
+
* Multiple 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.
|
|
251
|
+
*
|
|
252
|
+
* A combined maximum of 5 terms are allowed across all filters.
|
|
253
|
+
*
|
|
254
|
+
* ## Biases
|
|
255
|
+
*
|
|
256
|
+
* You can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.
|
|
257
|
+
*
|
|
258
|
+
* Biased searches, unlike filtered searches, also allow unmatched addresses to appear . These will rank lower.
|
|
259
|
+
*
|
|
260
|
+
* For instance, you can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.
|
|
261
|
+
*
|
|
262
|
+
* If a bias term is invalid, e.g. `bias_postcode=SW1A2AAA` no bias effect is applied.
|
|
263
|
+
*
|
|
264
|
+
* You 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`.
|
|
265
|
+
*
|
|
266
|
+
* All biases can accept multiple terms unless stated otherwise below.
|
|
267
|
+
*
|
|
268
|
+
* A combined maximum of 5 terms are allowed across all biases.
|
|
269
|
+
*
|
|
270
|
+
* ## Search by Postcode and Building Name or Number
|
|
271
|
+
*
|
|
272
|
+
* Search 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`.
|
|
273
|
+
*
|
|
274
|
+
* The advantage of using filters is a postcode mismatch does not result in a lookup as no results are returned.
|
|
275
|
+
*
|
|
276
|
+
* #### Search By UPRN
|
|
277
|
+
*
|
|
278
|
+
* Search by UPRN using the `uprn` filter and excluding the query argument. E.g. `/v1/addresses?uprn=100`.
|
|
279
|
+
*
|
|
280
|
+
* ## Testing
|
|
281
|
+
*
|
|
282
|
+
* - **ID1 1QD** Returns a successful query response `2000`
|
|
283
|
+
* - **ID1 KFA** Returns an empty query response `2000`
|
|
284
|
+
* - **ID1 CLIP** Returns "no lookups remaining" error `4020`
|
|
285
|
+
* - **ID1 CHOP** Returns "daily (or individual) lookup limit breached" error `4021`
|
|
286
|
+
*
|
|
287
|
+
* Test 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.
|
|
288
|
+
*/
|
|
289
|
+
get: operations["Addresses"];
|
|
290
|
+
};
|
|
291
|
+
"/keys/{key}/licensees": {
|
|
292
|
+
/** Returns a list of licensees for a key. */
|
|
293
|
+
get: operations["ListLicensees"];
|
|
294
|
+
/** Create a licensee for the specified API Key. */
|
|
295
|
+
post: operations["CreateLicensee"];
|
|
296
|
+
};
|
|
297
|
+
"/keys/{key}/licensees/{licensee}": {
|
|
298
|
+
/** Returns licensee information as identified by the licensee key. */
|
|
299
|
+
get: operations["RetrieveLicensee"];
|
|
300
|
+
/** Update Licensee */
|
|
301
|
+
put: operations["UpdateLicensee"];
|
|
302
|
+
/** Cancels a licensee key. This renders a licensee unusable. This action can be reversed if you get in contact with us. */
|
|
303
|
+
delete: operations["DeleteLicensee"];
|
|
304
|
+
};
|
|
305
|
+
"/keys/{key}/configs": {
|
|
306
|
+
/** Lists configurations associated with a key */
|
|
307
|
+
get: operations["ListConfigs"];
|
|
308
|
+
/** Create a config */
|
|
309
|
+
post: operations["CreateConfig"];
|
|
310
|
+
};
|
|
311
|
+
"/keys/{key}/configs/{config}": {
|
|
312
|
+
/** Retrieve config object by name */
|
|
313
|
+
get: operations["RetrieveConfig"];
|
|
314
|
+
/** Updates configuration object */
|
|
315
|
+
post: operations["UpdateConfig"];
|
|
316
|
+
/** Permanently deletes a configuration object. */
|
|
317
|
+
delete: operations["DeleteConfig"];
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
export interface components {
|
|
321
|
+
schemas: {
|
|
322
|
+
/**
|
|
323
|
+
* Postcode
|
|
324
|
+
* @description Correctly formatted postcode. Capitalised and spaced.
|
|
325
|
+
* @example SW1A 2AA
|
|
326
|
+
*/
|
|
327
|
+
Postcode: string;
|
|
328
|
+
/**
|
|
329
|
+
* API Key
|
|
330
|
+
* @description Your API Key. Typically beings `ak_`.
|
|
331
|
+
*
|
|
332
|
+
* Available from your dashboard
|
|
333
|
+
*
|
|
334
|
+
* @example ak_hk71kco54zGSGvF9eXXrvvnMOLLNh
|
|
335
|
+
*/
|
|
336
|
+
ApiKeyParam: string;
|
|
337
|
+
/**
|
|
338
|
+
* Filter
|
|
339
|
+
* @description Comma separated whitelist of address elements to return.
|
|
340
|
+
*
|
|
341
|
+
* E.g. `filter=line_1,line_2,line_3` returns only `line_1`, `line_2` and `line_3` address elements in your response
|
|
342
|
+
*
|
|
343
|
+
* @example line_1,line_2,line_3
|
|
344
|
+
*/
|
|
345
|
+
FilterParam: string;
|
|
346
|
+
/**
|
|
347
|
+
* Page
|
|
348
|
+
* Format: int32
|
|
349
|
+
* @description 0 indexed indicator of the page of results to receive. Virtually all postcode results are returned on page 0.
|
|
350
|
+
*
|
|
351
|
+
* A small number of Multiple Residence postcodes may need pagination (i.e. have more than 100 premises).
|
|
352
|
+
*/
|
|
353
|
+
PageParam: number;
|
|
354
|
+
/**
|
|
355
|
+
* Postcode Outward
|
|
356
|
+
* @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’.
|
|
357
|
+
* @example SW1A
|
|
358
|
+
*/
|
|
359
|
+
PostcodeOutward: string;
|
|
360
|
+
/**
|
|
361
|
+
* Postcode Inward
|
|
362
|
+
* @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.
|
|
363
|
+
* @example 2AA
|
|
364
|
+
*/
|
|
365
|
+
PostcodeInward: string;
|
|
366
|
+
/**
|
|
367
|
+
* Post Town
|
|
368
|
+
* @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.
|
|
369
|
+
* @example London
|
|
370
|
+
*/
|
|
371
|
+
PostTown: string;
|
|
372
|
+
/**
|
|
373
|
+
* Dependant Locality
|
|
374
|
+
* @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.
|
|
375
|
+
*/
|
|
376
|
+
DependantLocality: string;
|
|
377
|
+
/**
|
|
378
|
+
* Double Dependant Locality
|
|
379
|
+
* @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.
|
|
380
|
+
*/
|
|
381
|
+
DoubleDependantLocality: string;
|
|
382
|
+
/**
|
|
383
|
+
* Thoroughfare
|
|
384
|
+
* @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.
|
|
385
|
+
* @example Downing Street
|
|
386
|
+
*/
|
|
387
|
+
Thoroughfare: string;
|
|
388
|
+
/**
|
|
389
|
+
* Dependant Thoroughfare
|
|
390
|
+
* @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.
|
|
391
|
+
*/
|
|
392
|
+
DependantThoroughfare: string;
|
|
393
|
+
/**
|
|
394
|
+
* Building Number
|
|
395
|
+
* @description Number to identify premise on a thoroughfare or dependant thoroughfare.
|
|
396
|
+
* @example 10
|
|
397
|
+
*/
|
|
398
|
+
BuildingNumber: string;
|
|
399
|
+
/**
|
|
400
|
+
* Building Name
|
|
401
|
+
* @description Name of residential or commercial premise. E.g. The Manor, 1-2, A, 12A, K, Victoria House
|
|
402
|
+
*/
|
|
403
|
+
BuildingName: string;
|
|
404
|
+
/**
|
|
405
|
+
* Sub-Building Name
|
|
406
|
+
* @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
|
|
407
|
+
*/
|
|
408
|
+
SubBuildingName: string;
|
|
409
|
+
/**
|
|
410
|
+
* PO Box
|
|
411
|
+
* @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.
|
|
412
|
+
* @example HK860
|
|
413
|
+
*/
|
|
414
|
+
POBox: string;
|
|
415
|
+
/**
|
|
416
|
+
* Department Name
|
|
417
|
+
* @description Used to supplment Organisation Name to identify a deparment within the organisation.
|
|
418
|
+
*/
|
|
419
|
+
DepartmentName: string;
|
|
420
|
+
/**
|
|
421
|
+
* Organisation Name
|
|
422
|
+
* @description Used to supplment Organisation Name to identify a deparment within the organisation.
|
|
423
|
+
* @example Prime Minister & First Lord Of The Treasury
|
|
424
|
+
*/
|
|
425
|
+
OrganisationName: string;
|
|
426
|
+
/**
|
|
427
|
+
* Unique Delivery Point Reference Number (UDPRN)
|
|
428
|
+
* Format: int32
|
|
429
|
+
* @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.
|
|
430
|
+
* @example 23747771
|
|
431
|
+
*/
|
|
432
|
+
UDPRN: number;
|
|
433
|
+
/**
|
|
434
|
+
* UMPRN
|
|
435
|
+
* @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
|
|
436
|
+
*/
|
|
437
|
+
UMPRN: "" | number;
|
|
438
|
+
/**
|
|
439
|
+
* Postcode Type
|
|
440
|
+
* @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.
|
|
441
|
+
* @example S
|
|
442
|
+
* @enum {string}
|
|
443
|
+
*/
|
|
444
|
+
PostcodeType: "S" | "L";
|
|
445
|
+
/**
|
|
446
|
+
* Small User Organisation Indicator
|
|
447
|
+
* @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.
|
|
448
|
+
*/
|
|
449
|
+
SuOrganisationIndicator: string;
|
|
450
|
+
/**
|
|
451
|
+
* Delivery Point Suffix
|
|
452
|
+
* @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
|
|
453
|
+
* @example 1A
|
|
454
|
+
*/
|
|
455
|
+
DeliveryPointSuffix: string;
|
|
456
|
+
/**
|
|
457
|
+
* Line 1
|
|
458
|
+
* @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.
|
|
459
|
+
* @example Prime Minister & First Lord of Treasury
|
|
460
|
+
*/
|
|
461
|
+
Line1: string;
|
|
462
|
+
/**
|
|
463
|
+
* Line 2
|
|
464
|
+
* @description Second Address Line. Often contains thoroughfare and locality information. May be empty.
|
|
465
|
+
* @example 10 Downing Street
|
|
466
|
+
*/
|
|
467
|
+
Line2: string;
|
|
468
|
+
/**
|
|
469
|
+
* Line 3
|
|
470
|
+
* @description Third address line. May be empty.
|
|
471
|
+
*/
|
|
472
|
+
Line3: string;
|
|
473
|
+
/**
|
|
474
|
+
* Premise
|
|
475
|
+
* @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.
|
|
476
|
+
* @example 10
|
|
477
|
+
*/
|
|
478
|
+
Premise: string;
|
|
479
|
+
/**
|
|
480
|
+
* Country
|
|
481
|
+
* @description The country for which the postcode belongs to. May be empty for a small number of addresses.
|
|
482
|
+
* @example England
|
|
483
|
+
*/
|
|
484
|
+
Country: string;
|
|
485
|
+
/**
|
|
486
|
+
* County
|
|
487
|
+
* @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.
|
|
488
|
+
* @example London
|
|
489
|
+
*/
|
|
490
|
+
County: string;
|
|
491
|
+
/**
|
|
492
|
+
* Administrative County
|
|
493
|
+
* @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.
|
|
494
|
+
*/
|
|
495
|
+
AdministrativeCounty: string;
|
|
496
|
+
/**
|
|
497
|
+
* Postal County
|
|
498
|
+
* @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.
|
|
499
|
+
* @example London
|
|
500
|
+
*/
|
|
501
|
+
PostalCounty: string;
|
|
502
|
+
/**
|
|
503
|
+
* Traditional County
|
|
504
|
+
* @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.
|
|
505
|
+
* @example Greater London
|
|
506
|
+
*/
|
|
507
|
+
TraditionalCounty: string;
|
|
508
|
+
/**
|
|
509
|
+
* District
|
|
510
|
+
* @description The current district/unitary authority to which the postcode has been assigned. Data source: ONS
|
|
511
|
+
* @example Westminster
|
|
512
|
+
*/
|
|
513
|
+
District: string;
|
|
514
|
+
/**
|
|
515
|
+
* Ward
|
|
516
|
+
* @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
|
|
517
|
+
* @example St. James'
|
|
518
|
+
*/
|
|
519
|
+
Ward: string;
|
|
520
|
+
/**
|
|
521
|
+
* Longitude
|
|
522
|
+
* @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
|
|
523
|
+
*/
|
|
524
|
+
Longitude: "" | number;
|
|
525
|
+
/**
|
|
526
|
+
* Longitude
|
|
527
|
+
* @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.
|
|
528
|
+
*/
|
|
529
|
+
Latitude: "" | number;
|
|
530
|
+
/**
|
|
531
|
+
* Eastings
|
|
532
|
+
* @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
|
|
533
|
+
*/
|
|
534
|
+
Eastings: "" | number;
|
|
535
|
+
/**
|
|
536
|
+
* Eastings
|
|
537
|
+
* @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
|
|
538
|
+
*/
|
|
539
|
+
Northings: "" | number;
|
|
540
|
+
/**
|
|
541
|
+
* Unique Delivery Point Reference Number (UDPRN)
|
|
542
|
+
* @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.
|
|
543
|
+
*/
|
|
544
|
+
UPRN: string;
|
|
545
|
+
/**
|
|
546
|
+
* ID
|
|
547
|
+
* @description Global unique internally generated identifier for an address.
|
|
548
|
+
* @example paf_8387729
|
|
549
|
+
*/
|
|
550
|
+
ID: string;
|
|
551
|
+
/**
|
|
552
|
+
* Dataset
|
|
553
|
+
* @description Indicates the provenance of an address
|
|
554
|
+
* @enum {string}
|
|
555
|
+
*/
|
|
556
|
+
Dataset: "paf" | "mr" | "nyb" | "usps";
|
|
557
|
+
/**
|
|
558
|
+
* ISO Country Code
|
|
559
|
+
* @description 3 letter ISO country code
|
|
560
|
+
* @enum {string}
|
|
561
|
+
*/
|
|
562
|
+
CountryISO: "GBR" | "IMN" | "JEY" | "GGY" | "USA" | "PRI" | "GUM";
|
|
563
|
+
/**
|
|
564
|
+
* Postcode Address File Address
|
|
565
|
+
* @description Standard UK Address.
|
|
566
|
+
*/
|
|
567
|
+
PafAddress: {
|
|
568
|
+
postcode: components["schemas"]["Postcode"];
|
|
569
|
+
postcode_outward: components["schemas"]["PostcodeOutward"];
|
|
570
|
+
postcode_inward: components["schemas"]["PostcodeInward"];
|
|
571
|
+
post_town: components["schemas"]["PostTown"];
|
|
572
|
+
dependant_locality: components["schemas"]["DependantLocality"];
|
|
573
|
+
double_dependant_locality: components["schemas"]["DoubleDependantLocality"];
|
|
574
|
+
thoroughfare: components["schemas"]["Thoroughfare"];
|
|
575
|
+
dependant_thoroughfare: components["schemas"]["DependantThoroughfare"];
|
|
576
|
+
building_number: components["schemas"]["BuildingNumber"];
|
|
577
|
+
building_name: components["schemas"]["BuildingName"];
|
|
578
|
+
sub_building_name: components["schemas"]["SubBuildingName"];
|
|
579
|
+
po_box: components["schemas"]["POBox"];
|
|
580
|
+
department_name: components["schemas"]["DepartmentName"];
|
|
581
|
+
organisation_name: components["schemas"]["OrganisationName"];
|
|
582
|
+
udprn: components["schemas"]["UDPRN"];
|
|
583
|
+
umprn: components["schemas"]["UMPRN"];
|
|
584
|
+
postcode_type: components["schemas"]["PostcodeType"];
|
|
585
|
+
su_organisation_indicator: components["schemas"]["SuOrganisationIndicator"];
|
|
586
|
+
delivery_point_suffix: components["schemas"]["DeliveryPointSuffix"];
|
|
587
|
+
line_1: components["schemas"]["Line1"];
|
|
588
|
+
line_2: components["schemas"]["Line2"];
|
|
589
|
+
line_3: components["schemas"]["Line3"];
|
|
590
|
+
premise: components["schemas"]["Premise"];
|
|
591
|
+
country: components["schemas"]["Country"];
|
|
592
|
+
county: components["schemas"]["County"];
|
|
593
|
+
administrative_county: components["schemas"]["AdministrativeCounty"];
|
|
594
|
+
postal_county: components["schemas"]["PostalCounty"];
|
|
595
|
+
traditional_county: components["schemas"]["TraditionalCounty"];
|
|
596
|
+
district: components["schemas"]["District"];
|
|
597
|
+
ward: components["schemas"]["Ward"];
|
|
598
|
+
longitude: components["schemas"]["Longitude"];
|
|
599
|
+
latitude: components["schemas"]["Latitude"];
|
|
600
|
+
eastings: components["schemas"]["Eastings"];
|
|
601
|
+
northings: components["schemas"]["Northings"];
|
|
602
|
+
uprn: components["schemas"]["UPRN"];
|
|
603
|
+
id: components["schemas"]["ID"];
|
|
604
|
+
/** @enum {undefined} */
|
|
605
|
+
dataset: components["schemas"]["Dataset"];
|
|
606
|
+
/** @enum {undefined} */
|
|
607
|
+
country_iso: components["schemas"]["CountryISO"];
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* Multiple Residence Address
|
|
611
|
+
* @description Subdivision of a Postcode Address File address. Does not have its own delivery point.
|
|
612
|
+
*/
|
|
613
|
+
MrAddress: components["schemas"]["PafAddress"] & {
|
|
614
|
+
/** @enum {undefined} */
|
|
615
|
+
dataset?: components["schemas"]["Dataset"];
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* Not Yet Built Address
|
|
619
|
+
* @description UK premise under construction
|
|
620
|
+
*/
|
|
621
|
+
NybAddress: components["schemas"]["PafAddress"] & {
|
|
622
|
+
/** @enum {undefined} */
|
|
623
|
+
dataset?: components["schemas"]["Dataset"];
|
|
624
|
+
};
|
|
625
|
+
/** Postcode Response */
|
|
626
|
+
PostcodeResponse: {
|
|
627
|
+
/** @description All addresses listed at the postcode */
|
|
628
|
+
result: (components["schemas"]["PafAddress"] | components["schemas"]["MrAddress"] | components["schemas"]["NybAddress"])[];
|
|
629
|
+
/**
|
|
630
|
+
* Format: int32
|
|
631
|
+
* @enum {integer}
|
|
632
|
+
*/
|
|
633
|
+
code: 2000;
|
|
634
|
+
/** @enum {string} */
|
|
635
|
+
message: "Success";
|
|
636
|
+
};
|
|
637
|
+
/** Postcode Not Found */
|
|
638
|
+
PostcodeNotFoundResponse: {
|
|
639
|
+
/**
|
|
640
|
+
* Format: int32
|
|
641
|
+
* @enum {integer}
|
|
642
|
+
*/
|
|
643
|
+
code: 4040;
|
|
644
|
+
/** @enum {string} */
|
|
645
|
+
message: "Postcode not found";
|
|
646
|
+
/** @description A list of alternate nearest matching postcodes you can try */
|
|
647
|
+
suggestions: string[];
|
|
648
|
+
};
|
|
649
|
+
/** UDPRN Response */
|
|
650
|
+
UDPRNResponse: {
|
|
651
|
+
result: components["schemas"]["PafAddress"] | components["schemas"]["NybAddress"];
|
|
652
|
+
/**
|
|
653
|
+
* Format: int32
|
|
654
|
+
* @enum {integer}
|
|
655
|
+
*/
|
|
656
|
+
code: 2000;
|
|
657
|
+
/** @enum {string} */
|
|
658
|
+
message: "Success";
|
|
659
|
+
};
|
|
660
|
+
/** Basic Error Response */
|
|
661
|
+
ErrorResponse: {
|
|
662
|
+
/**
|
|
663
|
+
* Format: int32
|
|
664
|
+
* @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.
|
|
665
|
+
*/
|
|
666
|
+
code: number;
|
|
667
|
+
/** @description Human readable error message supplied with every error response. */
|
|
668
|
+
message: string;
|
|
669
|
+
};
|
|
670
|
+
/** UDPRN Response */
|
|
671
|
+
UMPRNResponse: {
|
|
672
|
+
result: components["schemas"]["MrAddress"];
|
|
673
|
+
/**
|
|
674
|
+
* Format: int32
|
|
675
|
+
* @enum {integer}
|
|
676
|
+
*/
|
|
677
|
+
code: 2000;
|
|
678
|
+
/** @enum {string} */
|
|
679
|
+
message: "Success";
|
|
680
|
+
};
|
|
681
|
+
/** Key */
|
|
682
|
+
ApiKey: {
|
|
683
|
+
/**
|
|
684
|
+
* @description Determines whether the key can be used by the requesting agent.
|
|
685
|
+
*
|
|
686
|
+
* Returns false if one of the following conditions are met:
|
|
687
|
+
* - Key has no lookups remaining
|
|
688
|
+
* - Daily limit has been reached on the key
|
|
689
|
+
* - Daily individual limit has been reached
|
|
690
|
+
* - Key is not being used via an authorised URL
|
|
691
|
+
* - (Sublicensed key only) Key has a valid licensee attached
|
|
692
|
+
* - (Sublicensed key only) Key is not being used via an authorised URL specified by licensee
|
|
693
|
+
*
|
|
694
|
+
* @example true
|
|
695
|
+
*/
|
|
696
|
+
available: boolean;
|
|
697
|
+
};
|
|
698
|
+
/** API Key Response */
|
|
699
|
+
ApiKeyResponse: {
|
|
700
|
+
result: components["schemas"]["ApiKey"];
|
|
701
|
+
/** @enum {string} */
|
|
702
|
+
message: "Success";
|
|
703
|
+
/**
|
|
704
|
+
* Format: int32
|
|
705
|
+
* @enum {integer}
|
|
706
|
+
*/
|
|
707
|
+
code: 2000;
|
|
708
|
+
};
|
|
709
|
+
/**
|
|
710
|
+
* User Token
|
|
711
|
+
* @description A secret key used for sensitive operations on your account and API Keys.
|
|
712
|
+
*
|
|
713
|
+
* Your user token can be retrieved and managed from your [accounts page](https://ideal-postcodes.co.uk/account).
|
|
714
|
+
*
|
|
715
|
+
* Typically beings `uk_...`
|
|
716
|
+
*
|
|
717
|
+
* @example uk_B59ScW1p1HHouf1VqclEPZUx
|
|
718
|
+
*/
|
|
719
|
+
UserTokenParam: string;
|
|
720
|
+
/** API Key Daily Limit */
|
|
721
|
+
ApiKeyDailyLimit: {
|
|
722
|
+
/**
|
|
723
|
+
* Format: int32
|
|
724
|
+
* @description `number` or `null`. The daily lookup limit currently set on your key.
|
|
725
|
+
* `null` means the limit is currently disabled.
|
|
726
|
+
* @example 1000
|
|
727
|
+
*/
|
|
728
|
+
limit: number;
|
|
729
|
+
/**
|
|
730
|
+
* Format: int32
|
|
731
|
+
* @description Number of lookups performed today which count towards your daily limit.
|
|
732
|
+
* @example 288
|
|
733
|
+
*/
|
|
734
|
+
consumed: number;
|
|
735
|
+
};
|
|
736
|
+
/** API Key Individual Limit */
|
|
737
|
+
ApiKeyIndividualLimit: {
|
|
738
|
+
/**
|
|
739
|
+
* Format: int32
|
|
740
|
+
* @description `number` or `null` Limit set on the number of lookups that can be
|
|
741
|
+
* performed from a single IP address. `null` means the limit is currently
|
|
742
|
+
* disabled.
|
|
743
|
+
* @example 30
|
|
744
|
+
*/
|
|
745
|
+
limit: number;
|
|
746
|
+
};
|
|
747
|
+
/** API Key Notifications */
|
|
748
|
+
ApiKeyNotifications: {
|
|
749
|
+
/** @description A list of email addresses designated by you to receive notifications about this key. */
|
|
750
|
+
emails: string[];
|
|
751
|
+
/** @description Indicates whether email notifications are enabled. */
|
|
752
|
+
enabled: boolean;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* API Key Dataset Availability
|
|
756
|
+
* @description Indicates which datasets are available and added by default to the address responses
|
|
757
|
+
*/
|
|
758
|
+
ApiKeyDatasets: {
|
|
759
|
+
/**
|
|
760
|
+
* @description UK Postcode Address File enabled
|
|
761
|
+
* @example true
|
|
762
|
+
*/
|
|
763
|
+
paf: boolean;
|
|
764
|
+
/**
|
|
765
|
+
* @description UK Multiple Residence Dataset enabled
|
|
766
|
+
* @example true
|
|
767
|
+
*/
|
|
768
|
+
mr: boolean;
|
|
769
|
+
/** @description UK Not Yet Built Dataset enabled */
|
|
770
|
+
nyb: boolean;
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* API Key Automated Topup
|
|
774
|
+
* @description Automated topup status
|
|
775
|
+
*/
|
|
776
|
+
ApiKeyAutomatedTopup: {
|
|
777
|
+
/**
|
|
778
|
+
* @description Indicates whether automated top-ups are enabled
|
|
779
|
+
* @example true
|
|
780
|
+
*/
|
|
781
|
+
enabled: boolean;
|
|
782
|
+
};
|
|
783
|
+
/** API Key Batch Purchase */
|
|
784
|
+
ApiKeyCurrentPurchase: {
|
|
785
|
+
/**
|
|
786
|
+
* @description `string` or `null` The date when this purchase will expire in simplified
|
|
787
|
+
* extended ISO format (ISO 8601). This is typically 365 days from the time
|
|
788
|
+
* of first use. This field will be `null` if the purchase has not yet been
|
|
789
|
+
* used.
|
|
790
|
+
* @example 2022-01-06T11:41:27.092Z
|
|
791
|
+
*/
|
|
792
|
+
expires: string;
|
|
793
|
+
/**
|
|
794
|
+
* Format: int32
|
|
795
|
+
* @description Number of procured lookups from this purchase.
|
|
796
|
+
* @example 20000
|
|
797
|
+
*/
|
|
798
|
+
purchased: number;
|
|
799
|
+
/**
|
|
800
|
+
* Format: int32
|
|
801
|
+
* @description Number of consumed lookups off this purchase.
|
|
802
|
+
* @example 121
|
|
803
|
+
*/
|
|
804
|
+
consumed: number;
|
|
805
|
+
};
|
|
806
|
+
/** API Key Details */
|
|
807
|
+
ApiKeyDetails: {
|
|
808
|
+
/**
|
|
809
|
+
* Format: int32
|
|
810
|
+
* @example 19889
|
|
811
|
+
*/
|
|
812
|
+
lookups_remaining: number;
|
|
813
|
+
daily_limit: components["schemas"]["ApiKeyDailyLimit"];
|
|
814
|
+
individual_limit: components["schemas"]["ApiKeyIndividualLimit"];
|
|
815
|
+
/** @description A list of allowed URLs. An empty list means that allowed URLs are disabled. */
|
|
816
|
+
allowed_urls: string[];
|
|
817
|
+
notifications?: components["schemas"]["ApiKeyNotifications"];
|
|
818
|
+
datasets?: components["schemas"]["ApiKeyDatasets"];
|
|
819
|
+
automated_topups: components["schemas"]["ApiKeyAutomatedTopup"];
|
|
820
|
+
/** @description Current balance purchases attached to key. */
|
|
821
|
+
current_purchases: components["schemas"]["ApiKeyCurrentPurchase"][];
|
|
822
|
+
} & {
|
|
823
|
+
notificatinos: unknown;
|
|
824
|
+
};
|
|
825
|
+
/** API Key Details Response */
|
|
826
|
+
ApiKeyDetailsResponse: {
|
|
827
|
+
result: components["schemas"]["ApiKeyDetails"];
|
|
828
|
+
/**
|
|
829
|
+
* Format: int32
|
|
830
|
+
* @enum {integer}
|
|
831
|
+
*/
|
|
832
|
+
code: 2000;
|
|
833
|
+
/** @enum {string} */
|
|
834
|
+
message: "Success";
|
|
835
|
+
};
|
|
836
|
+
/**
|
|
837
|
+
* Start Time
|
|
838
|
+
* Format: int32
|
|
839
|
+
* @description A start date/time in the form of a UNIX Timestamp in milliseconds, e.g. `1418556452651`.
|
|
840
|
+
*
|
|
841
|
+
* @example 1418556452651
|
|
842
|
+
*/
|
|
843
|
+
StartParam: number;
|
|
844
|
+
/**
|
|
845
|
+
* End Time
|
|
846
|
+
* Format: int32
|
|
847
|
+
* @description An start date/time in the form of a UNIX Timestamp in milliseconds, e.g. `1418556477882`.
|
|
848
|
+
*
|
|
849
|
+
* @example 1418556477882
|
|
850
|
+
*/
|
|
851
|
+
EndParam: number;
|
|
852
|
+
/**
|
|
853
|
+
* Tags
|
|
854
|
+
* @description A comma separated list of tags to query over.
|
|
855
|
+
*
|
|
856
|
+
* Useful if you want to specify the circumstances in which the request was made.
|
|
857
|
+
*
|
|
858
|
+
* If multiple tags are specified, the response will only comprise of requests for which all the tags are satisfied - i.e. searching `"foo,bar"` will only query requests which tagged both `"foo"` and `"bar"`.
|
|
859
|
+
*
|
|
860
|
+
* @example foo,bar
|
|
861
|
+
*/
|
|
862
|
+
TagsParam: string;
|
|
863
|
+
/**
|
|
864
|
+
* Licensee Key
|
|
865
|
+
* @description Uniquely identifies a licensee
|
|
866
|
+
*
|
|
867
|
+
* @example sk_hk71kco54zGSGvF9eXXrvvnMOLLNh
|
|
868
|
+
*/
|
|
869
|
+
LicenseeParam: string;
|
|
870
|
+
/** Key Usage */
|
|
871
|
+
KeyUsageResult: {
|
|
872
|
+
/**
|
|
873
|
+
* @description Start date in ISO 8601 format.
|
|
874
|
+
* @example 2015-01-22T15:08:06.609Z
|
|
875
|
+
*/
|
|
876
|
+
start: string;
|
|
877
|
+
/**
|
|
878
|
+
* @description End date in ISO 8601 format.
|
|
879
|
+
* @example 2015-01-23T15:08:06.609Z
|
|
880
|
+
*/
|
|
881
|
+
end: string;
|
|
882
|
+
/**
|
|
883
|
+
* Format: int32
|
|
884
|
+
* @description Total of paid lookups performed in specified period.
|
|
885
|
+
* @example 132
|
|
886
|
+
*/
|
|
887
|
+
total: number;
|
|
888
|
+
/** @description An array of objects representing number of paid lookups made on specific days, ordered by date. Each object contains a `date` attribute, which represents the day and a `count` attribute, which represents the number of paid lookups made on that day. */
|
|
889
|
+
dailyCount: {
|
|
890
|
+
/** @example 2015-01-22T00:00:00.000Z */
|
|
891
|
+
date: string;
|
|
892
|
+
/**
|
|
893
|
+
* Format: int32
|
|
894
|
+
* @example 132
|
|
895
|
+
*/
|
|
896
|
+
count: number;
|
|
897
|
+
}[];
|
|
898
|
+
};
|
|
899
|
+
/** Key Usage Response */
|
|
900
|
+
ApiKeyUsageResponse: {
|
|
901
|
+
result: components["schemas"]["KeyUsageResult"];
|
|
902
|
+
/**
|
|
903
|
+
* Format: int32
|
|
904
|
+
* @enum {integer}
|
|
905
|
+
*/
|
|
906
|
+
code: 2000;
|
|
907
|
+
/** @enum {string} */
|
|
908
|
+
message: "Success";
|
|
909
|
+
};
|
|
910
|
+
/**
|
|
911
|
+
* Context
|
|
912
|
+
* @description Limits search results within a geographical boundary or country.
|
|
913
|
+
* @enum {string}
|
|
914
|
+
*/
|
|
915
|
+
Context: "gbr" | "usa";
|
|
916
|
+
/**
|
|
917
|
+
* Limit
|
|
918
|
+
* Format: int32
|
|
919
|
+
* @description Specifies the maximum number of suggestions to retrieve.
|
|
920
|
+
*
|
|
921
|
+
* By 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=`
|
|
922
|
+
*
|
|
923
|
+
* @default 10
|
|
924
|
+
* @example 5
|
|
925
|
+
*/
|
|
926
|
+
LimitParam: number;
|
|
927
|
+
/**
|
|
928
|
+
* Postcode Outward
|
|
929
|
+
* @description Filter by outward code.
|
|
930
|
+
* @example 1AA
|
|
931
|
+
*/
|
|
932
|
+
PostcodeOutwardParam: string;
|
|
933
|
+
/**
|
|
934
|
+
* Postcode
|
|
935
|
+
* @description Filter by postcode. Can be combined with query to perform a postcode + building number/name search.
|
|
936
|
+
* @example SW1A 2AA
|
|
937
|
+
*/
|
|
938
|
+
PostcodeParam: string;
|
|
939
|
+
/**
|
|
940
|
+
* Postcode Area
|
|
941
|
+
* @description Filter by postcode. Can be combined with query to perform a postcode + building number/name search.
|
|
942
|
+
* @example SW
|
|
943
|
+
*/
|
|
944
|
+
PostcodeAreaParam: string;
|
|
945
|
+
/**
|
|
946
|
+
* Postcode Sector
|
|
947
|
+
* @description Filter by postcode sector, the outward code plus first numeric of the inward code.
|
|
948
|
+
* @example SW1A 2
|
|
949
|
+
*/
|
|
950
|
+
PostcodeSectorParam: string;
|
|
951
|
+
/**
|
|
952
|
+
* Post Town
|
|
953
|
+
* @description Filter by town.
|
|
954
|
+
* @example London
|
|
955
|
+
*/
|
|
956
|
+
PostTownParam: string;
|
|
957
|
+
/**
|
|
958
|
+
* UPRN
|
|
959
|
+
* @description Filters by UPRN. Does not accept comma separated terms. Only a single term is permitted
|
|
960
|
+
* @example 100023336956
|
|
961
|
+
*/
|
|
962
|
+
UPRNParam: number;
|
|
963
|
+
/**
|
|
964
|
+
* Country
|
|
965
|
+
* @description Filter by country. Possible values are England, Scotland, Wales, Northern Ireland, Jersey, Guernsey and Isle of Man.
|
|
966
|
+
* @example England
|
|
967
|
+
*/
|
|
968
|
+
CountryParam: string;
|
|
969
|
+
/**
|
|
970
|
+
* Country
|
|
971
|
+
* @description Filter by Postcode Type. Useful for separating organisational and residential addresses
|
|
972
|
+
* @example L
|
|
973
|
+
*/
|
|
974
|
+
PostcodeTypeParam: string;
|
|
975
|
+
/**
|
|
976
|
+
* SU Organisation Indicator
|
|
977
|
+
* @description Filter by Organisation Indicator. Useful for separating organisational and residential addresses
|
|
978
|
+
* @example Y
|
|
979
|
+
*/
|
|
980
|
+
SmallUserParam: string;
|
|
981
|
+
/**
|
|
982
|
+
* Box
|
|
983
|
+
* @description Restrict search to a geospatial box determined by the "top-left" and "bottom-right" gelocations. Only one geospatial box can be provided.
|
|
984
|
+
* @example 2.095,57.15,-2.096,57.14
|
|
985
|
+
*/
|
|
986
|
+
BoxParam: string;
|
|
987
|
+
/**
|
|
988
|
+
* Bias Postcode Outward
|
|
989
|
+
* @description Bias by outward code
|
|
990
|
+
*/
|
|
991
|
+
BiasPostcodeOutwardParam: string;
|
|
992
|
+
/**
|
|
993
|
+
* Bias Postcode
|
|
994
|
+
* @description Bias by postcode. Can be combined with query to perform a postcode + building number/name search.
|
|
995
|
+
* @example /addresses?postcode=SW1A2AA&q=10
|
|
996
|
+
*/
|
|
997
|
+
BiasPostcodeParam: string;
|
|
998
|
+
/**
|
|
999
|
+
* Bias Postcode Area
|
|
1000
|
+
* @description Bias by postcode area, the first one or two non-numeric characters of a postcode.
|
|
1001
|
+
* @example The postcode area of SW1A 2AA and N1 6RT are SW and N respectively
|
|
1002
|
+
*/
|
|
1003
|
+
BiasPostcodeAreaParam: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Bias Postcode Sector
|
|
1006
|
+
* @description Bias by postcode sector, the outward code plus first numeric of the inward code.
|
|
1007
|
+
* @example SW1A 2AA is SW1A 2
|
|
1008
|
+
*/
|
|
1009
|
+
BiasPostcodeSectorParam: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* Bias Post Town
|
|
1012
|
+
* @description Bias by town.
|
|
1013
|
+
*/
|
|
1014
|
+
BiasPosttownParam: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* Bias Thoroughfare
|
|
1017
|
+
* @description Bias by street name.
|
|
1018
|
+
*/
|
|
1019
|
+
BiasThoroughfareParam: string;
|
|
1020
|
+
/**
|
|
1021
|
+
* Bias County
|
|
1022
|
+
* @description Bias by country. Possible values are England, Scotland, Wales, Northern Ireland, Jersey, Guernsey and Isle of Man.
|
|
1023
|
+
*/
|
|
1024
|
+
BiasCountryParam: string;
|
|
1025
|
+
/**
|
|
1026
|
+
* Bias Lon/Lat
|
|
1027
|
+
* @description Bias search to a geospatial circle determined by an origin and radius in meters. Max radius is `50000`. Uses the format bias_lonlat=[longitude],[latitude],[radius in metres] Only one geospatial bias may be provided
|
|
1028
|
+
* @example -2.095,57.15,100
|
|
1029
|
+
*/
|
|
1030
|
+
BiasLonLatParam: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* Bias query by Geolocation of IP
|
|
1033
|
+
* @description Biases search based on approximate geolocation of IP address.
|
|
1034
|
+
* Set `bias_ip=true` to enable.
|
|
1035
|
+
* @example bias_ip=true
|
|
1036
|
+
* @enum {string}
|
|
1037
|
+
*/
|
|
1038
|
+
BiasIpParam: "true";
|
|
1039
|
+
/**
|
|
1040
|
+
* UK Postcode Address File Address Autocompletion Hit
|
|
1041
|
+
* @description Represents an address suggestion from the UK Postcode Address File.
|
|
1042
|
+
*/
|
|
1043
|
+
PafSuggestion: {
|
|
1044
|
+
id: components["schemas"]["ID"];
|
|
1045
|
+
/**
|
|
1046
|
+
* @description Address suggestion for your given query.
|
|
1047
|
+
* @example Flat 6, 12 Roskear, Camborne, TR14
|
|
1048
|
+
*/
|
|
1049
|
+
suggestion: string;
|
|
1050
|
+
udprn: components["schemas"]["UDPRN"];
|
|
1051
|
+
urls: {
|
|
1052
|
+
/**
|
|
1053
|
+
* @description URL to retrieve the entire details for a given address suggestion by the UDPRN
|
|
1054
|
+
* @example /v1/udprn/50985827
|
|
1055
|
+
*/
|
|
1056
|
+
udprn: string;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
/** Multiple Residence Address Autocompletion Hit */
|
|
1060
|
+
MrSuggestion: {
|
|
1061
|
+
id: components["schemas"]["ID"];
|
|
1062
|
+
/**
|
|
1063
|
+
* @description Address suggestion for your given query.
|
|
1064
|
+
* @example Flat 6, 12 Roskear, Camborne, TR14
|
|
1065
|
+
*/
|
|
1066
|
+
suggestion: string;
|
|
1067
|
+
udprn: components["schemas"]["UDPRN"];
|
|
1068
|
+
/**
|
|
1069
|
+
* Format: int32
|
|
1070
|
+
* @description Optionally returned field, representing the UMPRN of a Multiple Residence household
|
|
1071
|
+
* @example 51103417
|
|
1072
|
+
*/
|
|
1073
|
+
umprn: number;
|
|
1074
|
+
urls: {
|
|
1075
|
+
/**
|
|
1076
|
+
* @description URL to retrieve the entire details for a given address suggestion by the UDPRN
|
|
1077
|
+
* @example /v1/udprn/50985827
|
|
1078
|
+
*/
|
|
1079
|
+
udprn: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* @description Optionally returned field, to retrieve the entire details for a suggested Multiple Residence household
|
|
1082
|
+
* @example /v1/umprn/51103417
|
|
1083
|
+
*/
|
|
1084
|
+
umprn: string;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
/** Not Yet Built Address Autocompletion Hit */
|
|
1088
|
+
NybSuggestion: components["schemas"]["PafSuggestion"];
|
|
1089
|
+
/**
|
|
1090
|
+
* Global Address Autocompletion Suggestion
|
|
1091
|
+
* @description Represents an address suggestion for any address in the world
|
|
1092
|
+
*/
|
|
1093
|
+
GlobalAddressSuggestion: {
|
|
1094
|
+
id: components["schemas"]["ID"];
|
|
1095
|
+
/**
|
|
1096
|
+
* @description Address Suggestion to be displayed to the user
|
|
1097
|
+
* @example Flat 6, 12 Roskear, Camborne, TR14
|
|
1098
|
+
*/
|
|
1099
|
+
suggestion: string;
|
|
1100
|
+
urls: {
|
|
1101
|
+
/**
|
|
1102
|
+
* @description URL to retrieve the entire details for a given address suggestion by the UDPRN
|
|
1103
|
+
* @example /v1/udprn/50985827
|
|
1104
|
+
*/
|
|
1105
|
+
id?: string;
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
/** Address Autocomplete Response */
|
|
1109
|
+
AutocompleteResponse: {
|
|
1110
|
+
result: {
|
|
1111
|
+
hits: (components["schemas"]["PafSuggestion"] | components["schemas"]["MrSuggestion"] | components["schemas"]["NybSuggestion"] | components["schemas"]["GlobalAddressSuggestion"])[];
|
|
1112
|
+
};
|
|
1113
|
+
/**
|
|
1114
|
+
* Format: int32
|
|
1115
|
+
* @enum {integer}
|
|
1116
|
+
*/
|
|
1117
|
+
code: 2000;
|
|
1118
|
+
/** @enum {string} */
|
|
1119
|
+
message: "Success";
|
|
1120
|
+
};
|
|
1121
|
+
/**
|
|
1122
|
+
* Global Address
|
|
1123
|
+
* @description Global (non-UK) address in the UK address format
|
|
1124
|
+
*/
|
|
1125
|
+
GbrGlobalAddress: {
|
|
1126
|
+
/** @description Postal or Zip Code */
|
|
1127
|
+
postcode: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* @description Not available for non-UK addresses
|
|
1130
|
+
* @enum {string}
|
|
1131
|
+
*/
|
|
1132
|
+
postcode_outward: "";
|
|
1133
|
+
/**
|
|
1134
|
+
* @description Not available for non-UK addresses
|
|
1135
|
+
* @enum {string}
|
|
1136
|
+
*/
|
|
1137
|
+
postcode_inward: "";
|
|
1138
|
+
/** @description Town or City */
|
|
1139
|
+
post_town: string;
|
|
1140
|
+
dependant_locality: components["schemas"]["DependantLocality"];
|
|
1141
|
+
double_dependant_locality: components["schemas"]["DoubleDependantLocality"];
|
|
1142
|
+
thoroughfare: components["schemas"]["Thoroughfare"];
|
|
1143
|
+
dependant_thoroughfare: components["schemas"]["DependantThoroughfare"];
|
|
1144
|
+
building_number: components["schemas"]["BuildingNumber"];
|
|
1145
|
+
building_name: components["schemas"]["BuildingName"];
|
|
1146
|
+
sub_building_name: components["schemas"]["SubBuildingName"];
|
|
1147
|
+
/** @description PO Box */
|
|
1148
|
+
po_box: string;
|
|
1149
|
+
/** @description Department name at premise */
|
|
1150
|
+
department_name: string;
|
|
1151
|
+
/** @description Name of organisation at premise */
|
|
1152
|
+
organisation_name: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* @description Not available for non-UK addresses. See id for address identifier
|
|
1155
|
+
* @enum {string}
|
|
1156
|
+
*/
|
|
1157
|
+
udprn: "";
|
|
1158
|
+
/**
|
|
1159
|
+
* @description Not available for non-UK addresses. See id for address identifier
|
|
1160
|
+
* @enum {string}
|
|
1161
|
+
*/
|
|
1162
|
+
umprn: "";
|
|
1163
|
+
/**
|
|
1164
|
+
* @description Not available for non-UK addresses
|
|
1165
|
+
* @enum {string}
|
|
1166
|
+
*/
|
|
1167
|
+
postcode_type: "";
|
|
1168
|
+
/**
|
|
1169
|
+
* @description Not available for non-UK addresses
|
|
1170
|
+
* @enum {string}
|
|
1171
|
+
*/
|
|
1172
|
+
su_organisation_indicator: "";
|
|
1173
|
+
/**
|
|
1174
|
+
* @description Not available for non-UK addresses
|
|
1175
|
+
* @enum {string}
|
|
1176
|
+
*/
|
|
1177
|
+
delivery_point_suffix: "";
|
|
1178
|
+
line_1: components["schemas"]["Line1"];
|
|
1179
|
+
line_2: components["schemas"]["Line2"];
|
|
1180
|
+
line_3: components["schemas"]["Line3"];
|
|
1181
|
+
premise: components["schemas"]["Premise"];
|
|
1182
|
+
country: components["schemas"]["Country"];
|
|
1183
|
+
/** @description Province, state or county */
|
|
1184
|
+
county: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* @description Not available for non-UK addresses
|
|
1187
|
+
* @enum {string}
|
|
1188
|
+
*/
|
|
1189
|
+
administrative_county: "";
|
|
1190
|
+
/**
|
|
1191
|
+
* @description Not available for non-UK addresses
|
|
1192
|
+
* @enum {string}
|
|
1193
|
+
*/
|
|
1194
|
+
postal_county: "";
|
|
1195
|
+
/**
|
|
1196
|
+
* @description Not available for non-UK addresses
|
|
1197
|
+
* @enum {string}
|
|
1198
|
+
*/
|
|
1199
|
+
traditional_county: "";
|
|
1200
|
+
district: components["schemas"]["District"];
|
|
1201
|
+
ward: components["schemas"]["Ward"];
|
|
1202
|
+
longitude: components["schemas"]["Longitude"];
|
|
1203
|
+
latitude: components["schemas"]["Latitude"];
|
|
1204
|
+
/**
|
|
1205
|
+
* @description Not available for non-UK addresses
|
|
1206
|
+
* @enum {string}
|
|
1207
|
+
*/
|
|
1208
|
+
eastings: "";
|
|
1209
|
+
/**
|
|
1210
|
+
* @description Not available for non-UK addresses
|
|
1211
|
+
* @enum {string}
|
|
1212
|
+
*/
|
|
1213
|
+
northings: "";
|
|
1214
|
+
/**
|
|
1215
|
+
* @description Not available for non-UK addresses. See id for address identifier
|
|
1216
|
+
* @enum {string}
|
|
1217
|
+
*/
|
|
1218
|
+
uprn: "";
|
|
1219
|
+
id: components["schemas"]["ID"];
|
|
1220
|
+
dataset: components["schemas"]["Dataset"];
|
|
1221
|
+
country_iso: components["schemas"]["CountryISO"];
|
|
1222
|
+
};
|
|
1223
|
+
/** Address Resolution Response (GBR) */
|
|
1224
|
+
GbrResolveAddressResponse: {
|
|
1225
|
+
/**
|
|
1226
|
+
* Format: int32
|
|
1227
|
+
* @enum {integer}
|
|
1228
|
+
*/
|
|
1229
|
+
code: 2000;
|
|
1230
|
+
/** @enum {string} */
|
|
1231
|
+
message: "Success";
|
|
1232
|
+
result: components["schemas"]["PafAddress"] | components["schemas"]["MrAddress"] | components["schemas"]["NybAddress"] | components["schemas"]["GbrGlobalAddress"];
|
|
1233
|
+
};
|
|
1234
|
+
/**
|
|
1235
|
+
* USA Dataset
|
|
1236
|
+
* @description Identifies the address as sourced from USPS
|
|
1237
|
+
* @enum {string}
|
|
1238
|
+
*/
|
|
1239
|
+
usps_dataset: "usps";
|
|
1240
|
+
/**
|
|
1241
|
+
* Country
|
|
1242
|
+
* @description Full country name associated with address
|
|
1243
|
+
* @enum {string}
|
|
1244
|
+
*/
|
|
1245
|
+
usps_country: "United States" | "Guam" | "Puerto Rico";
|
|
1246
|
+
/**
|
|
1247
|
+
* USPS ISO Country Codes
|
|
1248
|
+
* @description 3 letter ISO country code associated with USA
|
|
1249
|
+
* @enum {string}
|
|
1250
|
+
*/
|
|
1251
|
+
usps_country_iso: "USA" | "PRI" | "GUM";
|
|
1252
|
+
/**
|
|
1253
|
+
* Primary Number
|
|
1254
|
+
* @description A house, rural route, contract box, or Post Office Box number. The numeric or alphanumeric component of an address preceding the street name. Often referred to as house number.
|
|
1255
|
+
* @example A298
|
|
1256
|
+
*/
|
|
1257
|
+
primary_number: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* Secondary Number
|
|
1260
|
+
* @description Number of the sub unit, apartment, suite etc
|
|
1261
|
+
* @example 123A
|
|
1262
|
+
*/
|
|
1263
|
+
secondary_number: string;
|
|
1264
|
+
/**
|
|
1265
|
+
* Plus 4 Code
|
|
1266
|
+
* @description 4 digit ZIP add-on code.
|
|
1267
|
+
* @example 1234
|
|
1268
|
+
*/
|
|
1269
|
+
plus_4_code: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* First Address Line
|
|
1272
|
+
* @description The primary delivery line (usually the street address) of the address.
|
|
1273
|
+
* @example 12 Armstrong Ct Apt 12
|
|
1274
|
+
*/
|
|
1275
|
+
line_1: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* Second Address Line
|
|
1278
|
+
* @description Secondary delivery line of the address. Typically populated if the first line is the firm or building name.
|
|
1279
|
+
* @example 9450 Pinecroft Dr
|
|
1280
|
+
*/
|
|
1281
|
+
line_2: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* TITLE
|
|
1284
|
+
* @description Last line of the address comprising of city, state, zip code and zip+4
|
|
1285
|
+
* @example GREENWICH, CT, 06830-1234
|
|
1286
|
+
*/
|
|
1287
|
+
last_line: string;
|
|
1288
|
+
/**
|
|
1289
|
+
* ZIP Code
|
|
1290
|
+
* @description A 5-digit code that identifies a specific geographic delivery area. ZIP Codes can represent an area within a state, or a single building or company that has a very high mail volume.
|
|
1291
|
+
* @example 1234
|
|
1292
|
+
*/
|
|
1293
|
+
zip_code: string;
|
|
1294
|
+
/**
|
|
1295
|
+
* ZIP + 4 Code
|
|
1296
|
+
* @description Nine-digit code that identifies a small geographic delivery area that is serviceable by a single carrier; appears in the last line of the address on a mail piece.
|
|
1297
|
+
* @example 12345-6789
|
|
1298
|
+
*/
|
|
1299
|
+
zip_plus_4_code: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Update Key Number
|
|
1302
|
+
* @description Field that contains a number that uniquely identifies a record; used to identify the base record to which an add or delete transaction is being directed. The Update Key Number field is used only when applying transactions to the base file; it is not used in address matching and remains fixed for the life of the record. The field is alphanumeric and consists of the database segment code (V1, V2, W1, W2, X1, X2, Y1, Y2, Z1, or Z2) and eight characters containing an alphanumeric value ranging from 00000001 to AAAAAAAA.
|
|
1303
|
+
* @example 00000001
|
|
1304
|
+
*/
|
|
1305
|
+
update_key_number: string;
|
|
1306
|
+
/**
|
|
1307
|
+
* Record Type Code
|
|
1308
|
+
* @description An alphabetic value that identifies the type of data in the record. - G = General delivery (5-Digit ZIP, ZIP + 4, and Carrier Route products) - H = High-rise (ZIP + 4 only) - F = Firm (ZIP + 4 only) - S = Street (5-Digit ZIP, ZIP + 4, and Carrier Route products) - P = PO Box (5-Digit ZIP, ZIP + 4, and Carrier Route products) - R = Rural route/contract (5-Digit ZIP, ZIP + 4, and Carrier Route products) - M = Multi-carrier (Carrier Route product only)
|
|
1309
|
+
* @enum {string}
|
|
1310
|
+
*/
|
|
1311
|
+
record_type_code: "G" | "H" | "F" | "S" | "P" | "R" | "M" | "";
|
|
1312
|
+
/**
|
|
1313
|
+
* Carrier Route ID
|
|
1314
|
+
* @description A 4 character ID identifying the postal route for the address.
|
|
1315
|
+
* The first character indicates the route type. Specifically:
|
|
1316
|
+
* - "B" indicates PO Box
|
|
1317
|
+
* - "H" indicates highway
|
|
1318
|
+
* - "C" indicates city
|
|
1319
|
+
* - "G" indicates general
|
|
1320
|
+
* - "R" indicates rural
|
|
1321
|
+
* @example R012
|
|
1322
|
+
*/
|
|
1323
|
+
carrier_route_id: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Street Pre-Directional Abbreviation
|
|
1326
|
+
* @description A geographic direction that precedes the street name.
|
|
1327
|
+
*/
|
|
1328
|
+
street_pre_directional_abbreviation: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* Street Name
|
|
1331
|
+
* @description The official name of a street as assigned by a local governing authority. The Street Name field contains only the street name and does not include directionals (EAST, WEST, etc.) or suffixes (ST, DR, BLVD, etc.). This element may also contain literals, such as PO BOX, GENERAL DELIVERY, USS, PSC, or UNIT.
|
|
1332
|
+
* @example GOSHEN
|
|
1333
|
+
*/
|
|
1334
|
+
street_name: string;
|
|
1335
|
+
/**
|
|
1336
|
+
* Street Suffix Abbreviation
|
|
1337
|
+
* @description Code that is the standard USPS abbreviation for the trailing designator in a street address.
|
|
1338
|
+
* @example ST
|
|
1339
|
+
*/
|
|
1340
|
+
street_suffix_abbreviation: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Street Post Directional Abbreviation
|
|
1343
|
+
* @description A geographic direction that follows the street name.
|
|
1344
|
+
*/
|
|
1345
|
+
street_post_directional_abbreviation: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* Building or Firm Name
|
|
1348
|
+
* @description The name of a company, building, apartment complex, shopping center, or other distinguishing secondary address information.
|
|
1349
|
+
* This field is normally used with firm and highrise records but may also contain literals such as “Postmaster” or “United States Postal Service.”
|
|
1350
|
+
* @example POSTMASTER
|
|
1351
|
+
*/
|
|
1352
|
+
building_or_firm_name: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* Address Secondary Abbreviation
|
|
1355
|
+
* @description A descriptive code used to identify the type of address secondary range information in the Address Secondary Range field.
|
|
1356
|
+
* This code may be useful in address matching, e.g., the secondary address numbers may indicate apartment, suite, or trailer numbers.
|
|
1357
|
+
*/
|
|
1358
|
+
address_secondary_abbreviation: string;
|
|
1359
|
+
/**
|
|
1360
|
+
* Base Alternate Code
|
|
1361
|
+
* @description Code that specifies whether a record is a base (preferred) or alternate record.
|
|
1362
|
+
* Base records (represented as "B") can represent a range of addresses or an individual address, such as a firm record, while alternate records (represented as "A") are individual delivery points. Base records are generally preferred over alternate records.
|
|
1363
|
+
* Government deliveries will only be listed on alternate records with the appropriate government building indicator (federal, state, or city) set.
|
|
1364
|
+
* @enum {string}
|
|
1365
|
+
*/
|
|
1366
|
+
base_alternate_code: "A" | "B" | "";
|
|
1367
|
+
/**
|
|
1368
|
+
* LACS Status Indicator
|
|
1369
|
+
* @description The Locatable Address Conversion Service (LACS) indicator describes records that have been converted to the LACS system (a product/system in a different USPS® product line that allows mailers to identify and convert a rural route address to a city-style address). Rural route and some city addresses are being modified to city-style addresses so that emergency services (e.g., ambulances, police) can find these addresses more efficiently.
|
|
1370
|
+
* - L = LACS address: The old (usually rural-route) address that has been converted for the LACS system.
|
|
1371
|
+
* - Blank = Not applicable
|
|
1372
|
+
* @enum {string}
|
|
1373
|
+
*/
|
|
1374
|
+
lacs_status_indicator: "" | "L";
|
|
1375
|
+
/**
|
|
1376
|
+
* Government Building Indicator
|
|
1377
|
+
* @description An alphabetic value that identifies the type of government agency at the delivery point and/or whether a firm is the only delivery at an address. For this purpose, "address" is defined as the complete delivery line (e.g., complete street address and, if included as part of the firm record, the secondary abbreviation and/or address secondary number).
|
|
1378
|
+
* - A = City government building—alternates only
|
|
1379
|
+
* - B = Federal government building—alternates only
|
|
1380
|
+
* - C = State government building—alternates only
|
|
1381
|
+
* - D = Firm only—base and alternates
|
|
1382
|
+
* - E = City government building and firm only—alternates only
|
|
1383
|
+
* - F = Federal government building and firm only—alternates only
|
|
1384
|
+
* - G = State government building and firm only—alternates only
|
|
1385
|
+
* @enum {string}
|
|
1386
|
+
*/
|
|
1387
|
+
government_building_indicator: "" | "A" | "B" | "C" | "D" | "E" | "F" | "G";
|
|
1388
|
+
/**
|
|
1389
|
+
* State Abbreviation
|
|
1390
|
+
* @description A 2-character abbreviation for the name of a state, U.S. territory, or armed forces ZIP Code designation. If APO/FPO/DPO, then the state abbreviation will be “AA,” “AE,” or “AP.”
|
|
1391
|
+
* @example NY
|
|
1392
|
+
*/
|
|
1393
|
+
state_abbreviation: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* State
|
|
1396
|
+
* @description Full name of a state, U.S. territory, or armed forces ZIP Code designation.
|
|
1397
|
+
* @example New York
|
|
1398
|
+
*/
|
|
1399
|
+
state: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* Municipality City State Key
|
|
1402
|
+
* @description Municipality City State Key. Currently blank.
|
|
1403
|
+
*/
|
|
1404
|
+
municipality_city_state_key: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Urbanization City State Key
|
|
1407
|
+
* @description An index to the City State file that provides the urbanization name for this delivery range.
|
|
1408
|
+
* @example V18475
|
|
1409
|
+
*/
|
|
1410
|
+
urbanization_city_state_key: string;
|
|
1411
|
+
/**
|
|
1412
|
+
* Preferred Last Line City State Key
|
|
1413
|
+
* @description In the Carrier Route, Five-Digit ZIP Code, Delivery Statistics, and ZIP + 4 products, an index to the City State product record that provides the preferred last-line name for this address range. In the City State product, the preferred last line city/state key contains the key value of a City State product record that has the default preferred or alternate preferred last-line key for a given ZIP Code.
|
|
1414
|
+
* @example V13916
|
|
1415
|
+
*/
|
|
1416
|
+
preferred_last_line_city_state_key: string;
|
|
1417
|
+
/**
|
|
1418
|
+
* County Name
|
|
1419
|
+
* @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.
|
|
1420
|
+
* @example SUFFOLK
|
|
1421
|
+
*/
|
|
1422
|
+
county: string;
|
|
1423
|
+
/**
|
|
1424
|
+
* City Name
|
|
1425
|
+
* @description A valid city name for mailing purposes; appears in the last line of an address on a mail piece.
|
|
1426
|
+
* @example HOLTSVILLE
|
|
1427
|
+
*/
|
|
1428
|
+
city: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* City State Name Abbreviation
|
|
1431
|
+
* @description A standard 13-character abbreviation for a city/state name. This field is only used for names that are greater than 13 characters in length and have a city/state mailing name indicator of "Y." If the field is longer than 13 characters and the city/state mailing name indicator is "N," the field will be blank.
|
|
1432
|
+
* @example W TOWNSHEND
|
|
1433
|
+
*/
|
|
1434
|
+
city_abbreviation: string;
|
|
1435
|
+
/**
|
|
1436
|
+
* Preferred Last Line City State Name
|
|
1437
|
+
* @description Field that contains the default preferred or alternate preferred last-line name for a ZIP Code.
|
|
1438
|
+
* @example AGUADA
|
|
1439
|
+
*/
|
|
1440
|
+
preferred_city: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* City State Name Facility Code
|
|
1443
|
+
* @description The type of locale identified in the city/state name. The facility may be a USPS facility, such as a post office, station, or branch, or it may be a non-postal place name. City/state name facility codes include the following:
|
|
1444
|
+
* - B = Branch
|
|
1445
|
+
* - C = Community post office (CPO)
|
|
1446
|
+
* - N = Non-postal community name, former USPS facility, or place name
|
|
1447
|
+
* - P = Post Office
|
|
1448
|
+
* - S = Station
|
|
1449
|
+
* - U = Urbanization
|
|
1450
|
+
* @enum {string}
|
|
1451
|
+
*/
|
|
1452
|
+
city_state_name_facility_code: "B" | "C" | "N" | "P" | "S" | "U" | "Y" | "";
|
|
1453
|
+
/**
|
|
1454
|
+
* ZIP Classification Code
|
|
1455
|
+
* @description A field that describes the type of ZIP area that a 5-digit ZIP Code serves, e.g., a single educational institution, post office boxes only, or a single address that has unusually high mail volume or many different addresses.
|
|
1456
|
+
* - M = Military ZIP Code
|
|
1457
|
+
* - P = ZIP Code having only Post Office Boxes
|
|
1458
|
+
* - U = Unique ZIP Code (ZIP assigned to a single organization)
|
|
1459
|
+
* - Blank = Standard ZIP with many addresses assigned to it
|
|
1460
|
+
* @enum {string}
|
|
1461
|
+
*/
|
|
1462
|
+
zip_classification_code: "" | "M" | "P" | "U";
|
|
1463
|
+
/**
|
|
1464
|
+
* City State Mailing Name Indicator
|
|
1465
|
+
* @description Specifies whether or not the city state name can be used as a last line of address on a mail piece.
|
|
1466
|
+
* - "Y = City/state name is a USPS-approved mailing name."
|
|
1467
|
+
* - "N = City/state name is not approved for mailing purposes."
|
|
1468
|
+
*/
|
|
1469
|
+
city_state_mailing_name_indicator: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* Carrier Route Rate Sortation and Merged 5-Digit Indicator
|
|
1472
|
+
* @description Identifies where automation Carrier Route rates are available and where the commingling of automation and non-automation mail, including Enhanced Carrier Routes and 5-digit presort, on the same pallet or in the same container is allowed.
|
|
1473
|
+
*/
|
|
1474
|
+
carrier_route_rate_sortation: string;
|
|
1475
|
+
/**
|
|
1476
|
+
* Finance Number
|
|
1477
|
+
* @description A code assigned to Postal Service facilities (primarily Post Offices) to collect cost and statistical data and compile revenue and expense data.
|
|
1478
|
+
*/
|
|
1479
|
+
finance_number: string | number;
|
|
1480
|
+
/**
|
|
1481
|
+
* Congressional District Number
|
|
1482
|
+
* @description A standard value identifying a geographic area within the United States served by a member of the U.S. House of Representatives. If Army/Air Force (APO), Fleet Post Office (FPO), or Diplomatic/Defense Post Office (DPO), this field will be blank. If there is only one member of Congress within a state, the code will be "AL" (at large).
|
|
1483
|
+
*/
|
|
1484
|
+
congressional_district_number: string | number;
|
|
1485
|
+
/**
|
|
1486
|
+
* County Number
|
|
1487
|
+
* @description The Federal Information Processing Standard (FIPS) code assigned to a given county or parish within a state. In Alaska, it identifies a region within the state. If APO/FPO/DPO, and the record type is “S,” “H,” or “F,” the county number will be blank.
|
|
1488
|
+
*/
|
|
1489
|
+
county_number: string | number;
|
|
1490
|
+
/**
|
|
1491
|
+
* United States Postal Service Address
|
|
1492
|
+
* @description Standard USA Address
|
|
1493
|
+
*/
|
|
1494
|
+
UspsAddress: {
|
|
1495
|
+
id: components["schemas"]["ID"];
|
|
1496
|
+
dataset: components["schemas"]["usps_dataset"];
|
|
1497
|
+
country?: components["schemas"]["usps_country"];
|
|
1498
|
+
country_iso: components["schemas"]["usps_country_iso"];
|
|
1499
|
+
primary_number: components["schemas"]["primary_number"];
|
|
1500
|
+
secondary_number: components["schemas"]["secondary_number"];
|
|
1501
|
+
plus_4_code: components["schemas"]["plus_4_code"];
|
|
1502
|
+
line_1: components["schemas"]["line_1"];
|
|
1503
|
+
line_2: components["schemas"]["line_2"];
|
|
1504
|
+
last_line: components["schemas"]["last_line"];
|
|
1505
|
+
zip_code: components["schemas"]["zip_code"];
|
|
1506
|
+
zip_plus_4_code: components["schemas"]["zip_plus_4_code"];
|
|
1507
|
+
update_key_number: components["schemas"]["update_key_number"];
|
|
1508
|
+
record_type_code: components["schemas"]["record_type_code"];
|
|
1509
|
+
carrier_route_id: components["schemas"]["carrier_route_id"];
|
|
1510
|
+
street_pre_directional_abbreviation: components["schemas"]["street_pre_directional_abbreviation"];
|
|
1511
|
+
street_name: components["schemas"]["street_name"];
|
|
1512
|
+
street_suffix_abbreviation: components["schemas"]["street_suffix_abbreviation"];
|
|
1513
|
+
street_post_directional_abbreviation: components["schemas"]["street_post_directional_abbreviation"];
|
|
1514
|
+
building_or_firm_name: components["schemas"]["building_or_firm_name"];
|
|
1515
|
+
address_secondary_abbreviation: components["schemas"]["address_secondary_abbreviation"];
|
|
1516
|
+
base_alternate_code: components["schemas"]["base_alternate_code"];
|
|
1517
|
+
lacs_status_indicator: components["schemas"]["lacs_status_indicator"];
|
|
1518
|
+
government_building_indicator: components["schemas"]["government_building_indicator"];
|
|
1519
|
+
state_abbreviation: components["schemas"]["state_abbreviation"];
|
|
1520
|
+
state: components["schemas"]["state"];
|
|
1521
|
+
municipality_city_state_key: components["schemas"]["municipality_city_state_key"];
|
|
1522
|
+
urbanization_city_state_key: components["schemas"]["urbanization_city_state_key"];
|
|
1523
|
+
preferred_last_line_city_state_key: components["schemas"]["preferred_last_line_city_state_key"];
|
|
1524
|
+
county: components["schemas"]["county"];
|
|
1525
|
+
city: components["schemas"]["city"];
|
|
1526
|
+
city_abbreviation: components["schemas"]["city_abbreviation"];
|
|
1527
|
+
preferred_city: components["schemas"]["preferred_city"];
|
|
1528
|
+
city_state_name_facility_code: components["schemas"]["city_state_name_facility_code"];
|
|
1529
|
+
zip_classification_code: components["schemas"]["zip_classification_code"];
|
|
1530
|
+
city_state_mailing_name_indicator: components["schemas"]["city_state_mailing_name_indicator"];
|
|
1531
|
+
carrier_route_rate_sortation: components["schemas"]["carrier_route_rate_sortation"];
|
|
1532
|
+
finance_number: components["schemas"]["finance_number"];
|
|
1533
|
+
congressional_district_number: components["schemas"]["congressional_district_number"];
|
|
1534
|
+
county_number: components["schemas"]["county_number"];
|
|
1535
|
+
};
|
|
1536
|
+
/**
|
|
1537
|
+
* Global Address
|
|
1538
|
+
* @description Global (non-US) Address in the US address format
|
|
1539
|
+
*/
|
|
1540
|
+
UsaGlobalAddress: {
|
|
1541
|
+
id: components["schemas"]["ID"];
|
|
1542
|
+
/** @enum {undefined} */
|
|
1543
|
+
dataset: components["schemas"]["Dataset"];
|
|
1544
|
+
country?: components["schemas"]["Country"];
|
|
1545
|
+
country_iso: components["schemas"]["CountryISO"];
|
|
1546
|
+
/**
|
|
1547
|
+
* @description Not available for non-US addresses
|
|
1548
|
+
* @enum {string}
|
|
1549
|
+
*/
|
|
1550
|
+
primary_number: "";
|
|
1551
|
+
/**
|
|
1552
|
+
* @description Not available for non-US addresses
|
|
1553
|
+
* @enum {string}
|
|
1554
|
+
*/
|
|
1555
|
+
secondary_number: "";
|
|
1556
|
+
/**
|
|
1557
|
+
* @description Not available for non-US addresses
|
|
1558
|
+
* @enum {string}
|
|
1559
|
+
*/
|
|
1560
|
+
plus_4_code: "";
|
|
1561
|
+
/** @description First line of address */
|
|
1562
|
+
line_1: string;
|
|
1563
|
+
/** @description Second line of address */
|
|
1564
|
+
line_2: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* @description Not available for non-US addresses
|
|
1567
|
+
* @enum {string}
|
|
1568
|
+
*/
|
|
1569
|
+
last_line: "";
|
|
1570
|
+
/** @description Partial postcode of address */
|
|
1571
|
+
zip_code: string;
|
|
1572
|
+
/** @description Full postal code of address */
|
|
1573
|
+
zip_plus_4_code: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* @description Not available for non-US addresses
|
|
1576
|
+
* @enum {string}
|
|
1577
|
+
*/
|
|
1578
|
+
update_key_number: "";
|
|
1579
|
+
/**
|
|
1580
|
+
* @description Not available for non-US addresses
|
|
1581
|
+
* @enum {string}
|
|
1582
|
+
*/
|
|
1583
|
+
record_type_code: "";
|
|
1584
|
+
/**
|
|
1585
|
+
* @description Not available for non-US addresses
|
|
1586
|
+
* @enum {string}
|
|
1587
|
+
*/
|
|
1588
|
+
carrier_route_id: "";
|
|
1589
|
+
/**
|
|
1590
|
+
* @description Not available for non-US addresses
|
|
1591
|
+
* @enum {string}
|
|
1592
|
+
*/
|
|
1593
|
+
street_pre_directional_abbreviation: "";
|
|
1594
|
+
/**
|
|
1595
|
+
* @description Not available for non-US addresses
|
|
1596
|
+
* @enum {string}
|
|
1597
|
+
*/
|
|
1598
|
+
street_name: "";
|
|
1599
|
+
/**
|
|
1600
|
+
* @description Not available for non-US addresses
|
|
1601
|
+
* @enum {string}
|
|
1602
|
+
*/
|
|
1603
|
+
street_suffix_abbreviation: "";
|
|
1604
|
+
/**
|
|
1605
|
+
* @description Not available for non-US addresses
|
|
1606
|
+
* @enum {string}
|
|
1607
|
+
*/
|
|
1608
|
+
street_post_directional_abbreviation: "";
|
|
1609
|
+
/**
|
|
1610
|
+
* @description Not available for non-US addresses
|
|
1611
|
+
* @enum {string}
|
|
1612
|
+
*/
|
|
1613
|
+
building_or_firm_name: "";
|
|
1614
|
+
/**
|
|
1615
|
+
* @description Not available for non-US addresses
|
|
1616
|
+
* @enum {string}
|
|
1617
|
+
*/
|
|
1618
|
+
address_secondary_abbreviation: "";
|
|
1619
|
+
/**
|
|
1620
|
+
* @description Not available for non-US addresses
|
|
1621
|
+
* @enum {string}
|
|
1622
|
+
*/
|
|
1623
|
+
base_alternate_code: "";
|
|
1624
|
+
/**
|
|
1625
|
+
* @description Not available for non-US addresses
|
|
1626
|
+
* @enum {string}
|
|
1627
|
+
*/
|
|
1628
|
+
lacs_status_indicator: "";
|
|
1629
|
+
/**
|
|
1630
|
+
* @description Not available for non-US addresses
|
|
1631
|
+
* @enum {string}
|
|
1632
|
+
*/
|
|
1633
|
+
government_building_indicator: "";
|
|
1634
|
+
/** @description State or province */
|
|
1635
|
+
state: string;
|
|
1636
|
+
/** @description Code of state or province (if available) */
|
|
1637
|
+
state_abbreviation: string;
|
|
1638
|
+
/**
|
|
1639
|
+
* @description Not available for non-US addresses
|
|
1640
|
+
* @enum {string}
|
|
1641
|
+
*/
|
|
1642
|
+
municipality_city_state_key: "";
|
|
1643
|
+
/**
|
|
1644
|
+
* @description Not available for non-US addresses
|
|
1645
|
+
* @enum {string}
|
|
1646
|
+
*/
|
|
1647
|
+
urbanization_city_state_key: "";
|
|
1648
|
+
/**
|
|
1649
|
+
* @description Not available for non-US addresses
|
|
1650
|
+
* @enum {string}
|
|
1651
|
+
*/
|
|
1652
|
+
preferred_last_line_city_state_key: "";
|
|
1653
|
+
/** @description County name */
|
|
1654
|
+
county: string;
|
|
1655
|
+
/** @description City name */
|
|
1656
|
+
city: string;
|
|
1657
|
+
/** @description City name abbreviation (if available) */
|
|
1658
|
+
city_abbreviation: string;
|
|
1659
|
+
/**
|
|
1660
|
+
* @description Not available for non-US addresses
|
|
1661
|
+
* @enum {string}
|
|
1662
|
+
*/
|
|
1663
|
+
preferred_city: "";
|
|
1664
|
+
/**
|
|
1665
|
+
* @description Not available for non-US addresses
|
|
1666
|
+
* @enum {string}
|
|
1667
|
+
*/
|
|
1668
|
+
city_state_name_facility_code: "";
|
|
1669
|
+
/**
|
|
1670
|
+
* @description Not available for non-US addresses
|
|
1671
|
+
* @enum {string}
|
|
1672
|
+
*/
|
|
1673
|
+
zip_classification_code: "";
|
|
1674
|
+
/**
|
|
1675
|
+
* @description Not available for non-US addresses
|
|
1676
|
+
* @enum {string}
|
|
1677
|
+
*/
|
|
1678
|
+
city_state_mailing_name_indicator: "";
|
|
1679
|
+
/**
|
|
1680
|
+
* @description Not available for non-US addresses
|
|
1681
|
+
* @enum {string}
|
|
1682
|
+
*/
|
|
1683
|
+
carrier_route_rate_sortation: "";
|
|
1684
|
+
/**
|
|
1685
|
+
* @description Not available for non-US addresses
|
|
1686
|
+
* @enum {string}
|
|
1687
|
+
*/
|
|
1688
|
+
finance_number: "";
|
|
1689
|
+
/**
|
|
1690
|
+
* @description Not available for non-US addresses
|
|
1691
|
+
* @enum {string}
|
|
1692
|
+
*/
|
|
1693
|
+
congressional_district_number: "";
|
|
1694
|
+
/**
|
|
1695
|
+
* @description Not available for non-US addresses
|
|
1696
|
+
* @enum {string}
|
|
1697
|
+
*/
|
|
1698
|
+
county_number: "";
|
|
1699
|
+
};
|
|
1700
|
+
/** Address Resolution Response (USA) */
|
|
1701
|
+
UsaResolveAddressResponse: {
|
|
1702
|
+
/**
|
|
1703
|
+
* Format: int32
|
|
1704
|
+
* @enum {integer}
|
|
1705
|
+
*/
|
|
1706
|
+
code: 2000;
|
|
1707
|
+
/** @enum {string} */
|
|
1708
|
+
message: "Success";
|
|
1709
|
+
result: components["schemas"]["UspsAddress"] | components["schemas"]["UsaGlobalAddress"];
|
|
1710
|
+
};
|
|
1711
|
+
/** Address Search Response */
|
|
1712
|
+
AddressResponse: {
|
|
1713
|
+
/**
|
|
1714
|
+
* Format: int32
|
|
1715
|
+
* @enum {integer}
|
|
1716
|
+
*/
|
|
1717
|
+
code: 2000;
|
|
1718
|
+
/** @enum {string} */
|
|
1719
|
+
message: "Success";
|
|
1720
|
+
result: {
|
|
1721
|
+
/** @description List of matching addresses */
|
|
1722
|
+
hits: (components["schemas"]["PafAddress"] | components["schemas"]["MrAddress"] | components["schemas"]["NybAddress"])[];
|
|
1723
|
+
/** Format: int32 */
|
|
1724
|
+
total: number;
|
|
1725
|
+
/**
|
|
1726
|
+
* Format: int32
|
|
1727
|
+
* @default 10
|
|
1728
|
+
* @example 10
|
|
1729
|
+
*/
|
|
1730
|
+
limit: number;
|
|
1731
|
+
/** Format: int32 */
|
|
1732
|
+
page: number;
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
/**
|
|
1736
|
+
* Licensee
|
|
1737
|
+
* @description Licensee object which can be defined by user
|
|
1738
|
+
*/
|
|
1739
|
+
LicenseeEditable: {
|
|
1740
|
+
/**
|
|
1741
|
+
* @description Licensee individual or organisation name
|
|
1742
|
+
* @example Qwerty Widgets Limited
|
|
1743
|
+
*/
|
|
1744
|
+
name?: string;
|
|
1745
|
+
/**
|
|
1746
|
+
* @description Licensee's first, second and third line address as well as post town concatenated by commas
|
|
1747
|
+
* @example 12 High Street, Manchester
|
|
1748
|
+
*/
|
|
1749
|
+
address?: string;
|
|
1750
|
+
/**
|
|
1751
|
+
* @description Licensee's postcode
|
|
1752
|
+
* @example ID1 1QD
|
|
1753
|
+
*/
|
|
1754
|
+
postcode?: string;
|
|
1755
|
+
/** @description A list of allowed URLs. An empty list means that whitelisting is disabled */
|
|
1756
|
+
whitelist?: string[];
|
|
1757
|
+
daily?: {
|
|
1758
|
+
/**
|
|
1759
|
+
* Format: int32
|
|
1760
|
+
* @description The maximum number of lookups this licensee can perform in a day. `null` indicates the limit is not active
|
|
1761
|
+
* @example 10000
|
|
1762
|
+
*/
|
|
1763
|
+
limit?: number;
|
|
1764
|
+
};
|
|
1765
|
+
};
|
|
1766
|
+
/** Licensee */
|
|
1767
|
+
Licensee: components["schemas"]["LicenseeEditable"] & ({
|
|
1768
|
+
/**
|
|
1769
|
+
* @description An immutable ID provided for every licensee. Primarily used for paginated list requests.
|
|
1770
|
+
*
|
|
1771
|
+
* @example 56a11209ebe230380bf104c3
|
|
1772
|
+
*/
|
|
1773
|
+
id: string;
|
|
1774
|
+
/**
|
|
1775
|
+
* @description Uniquely identifies a licensee for a key.
|
|
1776
|
+
*
|
|
1777
|
+
* Required to perform paid lookups for a specific licensee. Typically begins `sk_`.
|
|
1778
|
+
*
|
|
1779
|
+
* @example sl_ijoiqsxeQgXW2gkiE0X94
|
|
1780
|
+
*/
|
|
1781
|
+
key: string;
|
|
1782
|
+
/**
|
|
1783
|
+
* @description Timestamp for when the licensee was created
|
|
1784
|
+
* @example 2016-01-21T17:14:49.971Z
|
|
1785
|
+
*/
|
|
1786
|
+
createdAt: string;
|
|
1787
|
+
daily: {
|
|
1788
|
+
/**
|
|
1789
|
+
* Format: int32
|
|
1790
|
+
* @description The number lookups performed by the licensee on the day represented b `licesees.daily.updatedAt`
|
|
1791
|
+
* @example 232
|
|
1792
|
+
*/
|
|
1793
|
+
count: number;
|
|
1794
|
+
/**
|
|
1795
|
+
* @description The timestamp when the limit was last used.
|
|
1796
|
+
* @example 2016-08-05T16:43:28.865Z
|
|
1797
|
+
*/
|
|
1798
|
+
updatedAt: string;
|
|
1799
|
+
};
|
|
1800
|
+
} & {
|
|
1801
|
+
name: unknown;
|
|
1802
|
+
address: unknown;
|
|
1803
|
+
postcode: unknown;
|
|
1804
|
+
whitelist: unknown;
|
|
1805
|
+
});
|
|
1806
|
+
/** Licensee List Response */
|
|
1807
|
+
LicenseesResponse: {
|
|
1808
|
+
/** @description List of licensees */
|
|
1809
|
+
result: {
|
|
1810
|
+
licensees?: components["schemas"]["Licensee"][];
|
|
1811
|
+
/** @description Returns true if there are more licensees listed after the maximum number of results as implied by `limit` */
|
|
1812
|
+
hasMore?: boolean;
|
|
1813
|
+
};
|
|
1814
|
+
/** @enum {string} */
|
|
1815
|
+
message: "Success";
|
|
1816
|
+
/**
|
|
1817
|
+
* Format: int32
|
|
1818
|
+
* @enum {integer}
|
|
1819
|
+
*/
|
|
1820
|
+
code: 2000;
|
|
1821
|
+
};
|
|
1822
|
+
/** Licensee Response */
|
|
1823
|
+
LicenseeResponse: {
|
|
1824
|
+
result: components["schemas"]["Licensee"];
|
|
1825
|
+
/**
|
|
1826
|
+
* Format: int32
|
|
1827
|
+
* @enum {integer}
|
|
1828
|
+
*/
|
|
1829
|
+
code: 2000;
|
|
1830
|
+
/** @enum {string} */
|
|
1831
|
+
message: "Success";
|
|
1832
|
+
};
|
|
1833
|
+
/** Config Object */
|
|
1834
|
+
Config: {
|
|
1835
|
+
/**
|
|
1836
|
+
* @description Timestamp for when the config was created
|
|
1837
|
+
* @example 2016-01-21T17:14:49.971Z
|
|
1838
|
+
*/
|
|
1839
|
+
updatedAt: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* @description Timestamp for when the config was updated
|
|
1842
|
+
* @example 2016-01-21T17:14:49.971Z
|
|
1843
|
+
*/
|
|
1844
|
+
createdAt: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* @description A unique name to identify the configuration payload
|
|
1847
|
+
* @example woocommerce
|
|
1848
|
+
*/
|
|
1849
|
+
name: string;
|
|
1850
|
+
/**
|
|
1851
|
+
* @description A serialised payload of up to `4096` characters
|
|
1852
|
+
* @example {
|
|
1853
|
+
* "removeOrganisation": false
|
|
1854
|
+
* }
|
|
1855
|
+
*/
|
|
1856
|
+
payload: string;
|
|
1857
|
+
};
|
|
1858
|
+
/** Config List Response */
|
|
1859
|
+
ConfigsResponse: {
|
|
1860
|
+
/** @description List of configurations */
|
|
1861
|
+
result: {
|
|
1862
|
+
configs: components["schemas"]["Config"][];
|
|
1863
|
+
};
|
|
1864
|
+
/** @enum {string} */
|
|
1865
|
+
message: "Success";
|
|
1866
|
+
/**
|
|
1867
|
+
* Format: int32
|
|
1868
|
+
* @enum {integer}
|
|
1869
|
+
*/
|
|
1870
|
+
code: 2000;
|
|
1871
|
+
};
|
|
1872
|
+
/** Bad Request Error Response */
|
|
1873
|
+
BadRequestResponse: components["schemas"]["ErrorResponse"] & {
|
|
1874
|
+
/**
|
|
1875
|
+
* Format: int32
|
|
1876
|
+
* @description `400X` type error response code
|
|
1877
|
+
*/
|
|
1878
|
+
code: number;
|
|
1879
|
+
/** @description Bad request error description */
|
|
1880
|
+
message: string;
|
|
1881
|
+
errors?: {
|
|
1882
|
+
/**
|
|
1883
|
+
* @description Indicates location of error in request query or URL parameter
|
|
1884
|
+
* @example should have required property 'type'
|
|
1885
|
+
*/
|
|
1886
|
+
message: string;
|
|
1887
|
+
/**
|
|
1888
|
+
* @description Indicates location of error in request query or URL parameter
|
|
1889
|
+
* @example .query.type
|
|
1890
|
+
*/
|
|
1891
|
+
path: string;
|
|
1892
|
+
/** @example required.openapi.validation */
|
|
1893
|
+
errorCode?: string;
|
|
1894
|
+
}[];
|
|
1895
|
+
};
|
|
1896
|
+
/** Unauthorized Request Error Response */
|
|
1897
|
+
UnauthorizedResponse: components["schemas"]["ErrorResponse"] & {
|
|
1898
|
+
/**
|
|
1899
|
+
* Format: int32
|
|
1900
|
+
* @description `401X` type error response code
|
|
1901
|
+
*/
|
|
1902
|
+
code: number;
|
|
1903
|
+
/** @description Unauthorized request error description */
|
|
1904
|
+
message: string;
|
|
1905
|
+
};
|
|
1906
|
+
/**
|
|
1907
|
+
* New Config Object
|
|
1908
|
+
* @description Required configuration object parameters
|
|
1909
|
+
*/
|
|
1910
|
+
ConfigNewParam: {
|
|
1911
|
+
/**
|
|
1912
|
+
* @description A unique name to identify the configuration payload
|
|
1913
|
+
* @example woocommerce
|
|
1914
|
+
*/
|
|
1915
|
+
name: string;
|
|
1916
|
+
/**
|
|
1917
|
+
* @description A serialised payload of up to `4096` characters
|
|
1918
|
+
* @example {
|
|
1919
|
+
* "removeOrganisation": false
|
|
1920
|
+
* }
|
|
1921
|
+
*/
|
|
1922
|
+
payload: string;
|
|
1923
|
+
};
|
|
1924
|
+
/** Config Response */
|
|
1925
|
+
ConfigResponse: {
|
|
1926
|
+
result: components["schemas"]["Config"];
|
|
1927
|
+
/**
|
|
1928
|
+
* Format: int32
|
|
1929
|
+
* @enum {integer}
|
|
1930
|
+
*/
|
|
1931
|
+
code: 2000;
|
|
1932
|
+
/** @enum {string} */
|
|
1933
|
+
message: "Success";
|
|
1934
|
+
};
|
|
1935
|
+
/**
|
|
1936
|
+
* Configuration Name
|
|
1937
|
+
* @description User provided configuration object name
|
|
1938
|
+
* @example idpc-be
|
|
1939
|
+
*/
|
|
1940
|
+
ConfigParam: string;
|
|
1941
|
+
/** Not Found Response */
|
|
1942
|
+
NotFoundResponse: components["schemas"]["ErrorResponse"] & {
|
|
1943
|
+
/**
|
|
1944
|
+
* Format: int32
|
|
1945
|
+
* @description `404X` type error response code
|
|
1946
|
+
*/
|
|
1947
|
+
code: number;
|
|
1948
|
+
/** @description Resource not found error description */
|
|
1949
|
+
message: string;
|
|
1950
|
+
};
|
|
1951
|
+
/**
|
|
1952
|
+
* Update Config Object
|
|
1953
|
+
* @description Config object update parameters
|
|
1954
|
+
*/
|
|
1955
|
+
ConfigUpdateParam: {
|
|
1956
|
+
/**
|
|
1957
|
+
* @description A serialised payload of up to `4096` characters
|
|
1958
|
+
* @example {
|
|
1959
|
+
* "removeOrganisation": false
|
|
1960
|
+
* }
|
|
1961
|
+
*/
|
|
1962
|
+
payload?: string;
|
|
1963
|
+
};
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
export interface operations {
|
|
1967
|
+
/**
|
|
1968
|
+
* Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.
|
|
1969
|
+
*
|
|
1970
|
+
* The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like [Postcode Lookup](/postcode-lookup).
|
|
1971
|
+
*
|
|
1972
|
+
* ## Postcode Not Found
|
|
1973
|
+
*
|
|
1974
|
+
* Lookup balance is unaffected by invalid postcodes. The API returns a `404` response with response body:
|
|
1975
|
+
*
|
|
1976
|
+
* ```json
|
|
1977
|
+
* {
|
|
1978
|
+
* "code": 4040,
|
|
1979
|
+
* "message": "Postcode not found",
|
|
1980
|
+
* "suggestions": ["SW1A 0AA"]
|
|
1981
|
+
* }
|
|
1982
|
+
* ```
|
|
1983
|
+
*
|
|
1984
|
+
* ### Suggestions
|
|
1985
|
+
*
|
|
1986
|
+
* If a postcode cannot be found, the API will provide up to 5 closest matching postcodes. Common errors will be corrected first (e.g. mixing up `O` and `0` or `I` and `1`).
|
|
1987
|
+
*
|
|
1988
|
+
* If the suggestion list is small (fewer than 3), there is a high probability the correct postcode is there. You may notify the user or immediately trigger new searches.
|
|
1989
|
+
*
|
|
1990
|
+
* The suggestion list will be empty if the postcode has deviated too far from a valid postcode format.
|
|
1991
|
+
*
|
|
1992
|
+
* ## Multiple Residence
|
|
1993
|
+
*
|
|
1994
|
+
* A small number of postcodes will return more than 100 premises. These may require pagination. Use `page` to paginate the result set.
|
|
1995
|
+
*/
|
|
1996
|
+
Postcodes: {
|
|
1997
|
+
parameters: {
|
|
1998
|
+
path: {
|
|
1999
|
+
/** Postcode to retrieve */
|
|
2000
|
+
postcode: components["schemas"]["Postcode"];
|
|
2001
|
+
};
|
|
2002
|
+
query: {
|
|
2003
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2004
|
+
filter?: components["schemas"]["FilterParam"];
|
|
2005
|
+
page?: components["schemas"]["PageParam"];
|
|
2006
|
+
};
|
|
2007
|
+
};
|
|
2008
|
+
responses: {
|
|
2009
|
+
/** Success */
|
|
2010
|
+
200: {
|
|
2011
|
+
content: {
|
|
2012
|
+
"application/json": components["schemas"]["PostcodeResponse"];
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
/** Postcode Not Found */
|
|
2016
|
+
404: {
|
|
2017
|
+
content: {
|
|
2018
|
+
"application/json": components["schemas"]["PostcodeNotFoundResponse"];
|
|
2019
|
+
};
|
|
2020
|
+
};
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2023
|
+
/**
|
|
2024
|
+
* Returns an address as identified by its Unique Delivery Point Reference Number (UDPRN).
|
|
2025
|
+
*
|
|
2026
|
+
* You may find it useful to store UDPRN information as it can be used to retrieve the most recent information for an address. It can also be used to test for a deleted address.
|
|
2027
|
+
*
|
|
2028
|
+
* UDPRNs are an eight digit unique numeric code (e.g. 25962203) for any premise on the Postcode Address File. It's essentially a unique identifier for every address in the UK that Royal Mail has in its database.
|
|
2029
|
+
*
|
|
2030
|
+
* ## Testing
|
|
2031
|
+
*
|
|
2032
|
+
* To test your implementation of our API we have a range of test UDPRNs that yield both successful and unsuccessful responses to your request.
|
|
2033
|
+
*
|
|
2034
|
+
* They are the following:
|
|
2035
|
+
*
|
|
2036
|
+
* - `0` Returns a successful UDPRN lookup response
|
|
2037
|
+
* `2000`
|
|
2038
|
+
* - `-1` Returns "UDPRN not found", error `4044`
|
|
2039
|
+
* - `-2` Returns "no lookups remaining", error `4020`
|
|
2040
|
+
* - `-3` Returns "daily (or individual) lookup limit breached",
|
|
2041
|
+
* error `4021`
|
|
2042
|
+
*
|
|
2043
|
+
* Test 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.
|
|
2044
|
+
*/
|
|
2045
|
+
UDPRN: {
|
|
2046
|
+
parameters: {
|
|
2047
|
+
path: {
|
|
2048
|
+
/** UDPRN to be retrieved */
|
|
2049
|
+
udprn: string;
|
|
2050
|
+
};
|
|
2051
|
+
query: {
|
|
2052
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2053
|
+
filter?: components["schemas"]["FilterParam"];
|
|
2054
|
+
};
|
|
2055
|
+
};
|
|
2056
|
+
responses: {
|
|
2057
|
+
/** Success */
|
|
2058
|
+
200: {
|
|
2059
|
+
content: {
|
|
2060
|
+
"application/json": components["schemas"]["UDPRNResponse"];
|
|
2061
|
+
};
|
|
2062
|
+
};
|
|
2063
|
+
/** Resource not found */
|
|
2064
|
+
404: {
|
|
2065
|
+
content: {
|
|
2066
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2067
|
+
};
|
|
2068
|
+
};
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
/**
|
|
2072
|
+
* Returns a multiple occupancy address identifited via its UMPRN (Multiple Residence Unique ID).
|
|
2073
|
+
*
|
|
2074
|
+
* UMPRNs are a unique numeric code for any Multiple Residence household on the optional Multiple Residence dataset.
|
|
2075
|
+
*
|
|
2076
|
+
* ## Testing
|
|
2077
|
+
*
|
|
2078
|
+
* To test your implementation of our API we have a range of test UMPRNs that yield both successful and unsuccessful responses to your request. They are the following
|
|
2079
|
+
*
|
|
2080
|
+
* - `0` Returns a successful UMPRN lookup response `2000`
|
|
2081
|
+
* - `-1` Returns "UMPRN not found", error `4044`
|
|
2082
|
+
* - `-2` Returns "no lookups remaining", error `4020`
|
|
2083
|
+
* - `-3` Returns "daily (or individual) lookup limit breached", error `4021`
|
|
2084
|
+
*
|
|
2085
|
+
* Test 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.
|
|
2086
|
+
*
|
|
2087
|
+
* ### Pricing
|
|
2088
|
+
*
|
|
2089
|
+
* Per lookup charges apply. Empty responses are not charged.
|
|
2090
|
+
*/
|
|
2091
|
+
UMPRN: {
|
|
2092
|
+
parameters: {
|
|
2093
|
+
path: {
|
|
2094
|
+
/** UMPRN to be retrieved */
|
|
2095
|
+
umprn: string;
|
|
2096
|
+
};
|
|
2097
|
+
query: {
|
|
2098
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2099
|
+
filter?: components["schemas"]["FilterParam"];
|
|
2100
|
+
};
|
|
2101
|
+
};
|
|
2102
|
+
responses: {
|
|
2103
|
+
/** Success */
|
|
2104
|
+
200: {
|
|
2105
|
+
content: {
|
|
2106
|
+
"application/json": components["schemas"]["UMPRNResponse"];
|
|
2107
|
+
};
|
|
2108
|
+
};
|
|
2109
|
+
/** Resource not found */
|
|
2110
|
+
404: {
|
|
2111
|
+
content: {
|
|
2112
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2117
|
+
/**
|
|
2118
|
+
* Returns public information on key. Currently only returns whether the key is currently useable via the `available` property. Use this to discover if the key is useable before making further requests.
|
|
2119
|
+
*
|
|
2120
|
+
* You may pass both API Keys (beginning `ak_`) and Sub-licensed Keys (beginning `sl_`).
|
|
2121
|
+
* ## Testing
|
|
2122
|
+
*
|
|
2123
|
+
* To test your implementation of our API, you may use the following test keys.
|
|
2124
|
+
*
|
|
2125
|
+
* - **iddqd** Availability will return as `true`
|
|
2126
|
+
* - **idkfa** Availability will return as `false`
|
|
2127
|
+
*/
|
|
2128
|
+
KeyAvailability: {
|
|
2129
|
+
parameters: {
|
|
2130
|
+
path: {
|
|
2131
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
responses: {
|
|
2135
|
+
/** Success */
|
|
2136
|
+
200: {
|
|
2137
|
+
content: {
|
|
2138
|
+
"application/json": components["schemas"]["ApiKeyResponse"];
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
/** Invalid Key */
|
|
2142
|
+
404: {
|
|
2143
|
+
content: {
|
|
2144
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
2148
|
+
};
|
|
2149
|
+
/** Returns private data on the key including remaining lookups, available datasets and usage limits. */
|
|
2150
|
+
KeyDetails: {
|
|
2151
|
+
parameters: {
|
|
2152
|
+
path: {
|
|
2153
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2154
|
+
};
|
|
2155
|
+
query: {
|
|
2156
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2157
|
+
};
|
|
2158
|
+
};
|
|
2159
|
+
responses: {
|
|
2160
|
+
/** Success */
|
|
2161
|
+
200: {
|
|
2162
|
+
content: {
|
|
2163
|
+
"application/json": components["schemas"]["ApiKeyDetailsResponse"];
|
|
2164
|
+
};
|
|
2165
|
+
};
|
|
2166
|
+
/** Resource not found */
|
|
2167
|
+
404: {
|
|
2168
|
+
content: {
|
|
2169
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2170
|
+
};
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
};
|
|
2174
|
+
/**
|
|
2175
|
+
* Reports the number of lookups consumed on a key for a range of days.
|
|
2176
|
+
*
|
|
2177
|
+
* A 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.
|
|
2178
|
+
*/
|
|
2179
|
+
KeyUsage: {
|
|
2180
|
+
parameters: {
|
|
2181
|
+
path: {
|
|
2182
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2183
|
+
};
|
|
2184
|
+
query: {
|
|
2185
|
+
/** A start date/time in the form of a UNIX Timestamp in milliseconds, e.g. `1418556452651`. If no start time is provided, the start time will be assigned to a time 21 days prior to the end time. */
|
|
2186
|
+
start?: components["schemas"]["StartParam"];
|
|
2187
|
+
/** An end date/time in the form of a UNIX Timestamp in milliseconds, e.g. `1418556452651`. If no end time is provided, the current time will be used. */
|
|
2188
|
+
end?: components["schemas"]["EndParam"];
|
|
2189
|
+
tags?: components["schemas"]["TagsParam"];
|
|
2190
|
+
/** Sublicensed keys only. This will restrict the analysed dataset to a specific licensee. */
|
|
2191
|
+
licensee?: components["schemas"]["LicenseeParam"];
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
responses: {
|
|
2195
|
+
/** Success */
|
|
2196
|
+
200: {
|
|
2197
|
+
content: {
|
|
2198
|
+
"application/json": components["schemas"]["ApiKeyUsageResponse"];
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
2201
|
+
};
|
|
2202
|
+
};
|
|
2203
|
+
/**
|
|
2204
|
+
* Reports lookup information on a key for paid lookups.
|
|
2205
|
+
*
|
|
2206
|
+
* This method requires a `user_token`, which can be found on your [accounts page](https://ideal-postcodes.co.uk/account).
|
|
2207
|
+
*
|
|
2208
|
+
* A 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.
|
|
2209
|
+
*
|
|
2210
|
+
* ## Download Usage History (CSV)
|
|
2211
|
+
*
|
|
2212
|
+
* `GET /keys/:key/lookups`
|
|
2213
|
+
*
|
|
2214
|
+
* Returns a CSV download of lookups performed and associated information.
|
|
2215
|
+
*
|
|
2216
|
+
* Note 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.
|
|
2217
|
+
*
|
|
2218
|
+
* ## Data Redaction
|
|
2219
|
+
*
|
|
2220
|
+
* Personally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.
|
|
2221
|
+
*
|
|
2222
|
+
* By default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.
|
|
2223
|
+
*
|
|
2224
|
+
* You may prevent PII collection altogether by setting the interval to `0` days.
|
|
2225
|
+
*/
|
|
2226
|
+
KeyLogs: {
|
|
2227
|
+
parameters: {
|
|
2228
|
+
path: {
|
|
2229
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2230
|
+
};
|
|
2231
|
+
query: {
|
|
2232
|
+
/** An start date/time in the form of a UNIX Timestamp in milliseconds, e.g. `1418556452651`. If no start time is provided, the start time will be assigned to a time 21 days prior to the end time. */
|
|
2233
|
+
start?: components["schemas"]["StartParam"];
|
|
2234
|
+
/** An end date/time in the form of a UNIX Timestamp in milliseconds, e.g. `1418556452651`. If no end time is provided, the current time will be used. */
|
|
2235
|
+
end?: components["schemas"]["EndParam"];
|
|
2236
|
+
/** Sublicensed keys only. This will restrict the analysed dataset to a specific licensee. */
|
|
2237
|
+
licensee?: components["schemas"]["LicenseeParam"];
|
|
2238
|
+
};
|
|
2239
|
+
};
|
|
2240
|
+
responses: {
|
|
2241
|
+
/** Success */
|
|
2242
|
+
200: {
|
|
2243
|
+
content: {
|
|
2244
|
+
"text/csv": string;
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
/**
|
|
2250
|
+
* The address autocomplete API returns a list of address suggestions that match the query ordered by relevance score.
|
|
2251
|
+
*
|
|
2252
|
+
* This API can be used to power realtime address finders, also known as address autofill or address autocomplete.
|
|
2253
|
+
*
|
|
2254
|
+
* If you wish to quickly add address autocompletion to your address forms, see [Address Finder](/address-finder) and [associated demos](/address-finder-demo).
|
|
2255
|
+
*
|
|
2256
|
+
* ## Implementing Address Autocomplete
|
|
2257
|
+
*
|
|
2258
|
+
* Retrieving addresses using Address Autocomplete is a 2 step process.
|
|
2259
|
+
*
|
|
2260
|
+
* 1. Retrieve partial address suggestions via `/autocomplete/addresses`
|
|
2261
|
+
* 2. Retrieve the entire address by following the URL provided by the suggestion
|
|
2262
|
+
*
|
|
2263
|
+
* Step 2 will decrement your lookup balance.
|
|
2264
|
+
*
|
|
2265
|
+
* Please note, this API is not intended to be a free standalone resource.
|
|
2266
|
+
*
|
|
2267
|
+
* ## Filters
|
|
2268
|
+
*
|
|
2269
|
+
* You can strictly narrow your result by adding filters to your querystring which correspond with an address attribute.
|
|
2270
|
+
*
|
|
2271
|
+
* For instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.
|
|
2272
|
+
*
|
|
2273
|
+
* If a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.
|
|
2274
|
+
*
|
|
2275
|
+
* You 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.
|
|
2276
|
+
*
|
|
2277
|
+
* All filters can accept multiple terms unless stated otherwise below.
|
|
2278
|
+
*
|
|
2279
|
+
* Multiple 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.
|
|
2280
|
+
*
|
|
2281
|
+
* A maximum of **10** terms are allowed across all filters.
|
|
2282
|
+
*
|
|
2283
|
+
* ## Biases
|
|
2284
|
+
*
|
|
2285
|
+
* You can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.
|
|
2286
|
+
*
|
|
2287
|
+
* Biased searches, unlike filtered searches, also allow unmatched addresses to appear. These will rank lower.
|
|
2288
|
+
*
|
|
2289
|
+
* For instance, can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.
|
|
2290
|
+
*
|
|
2291
|
+
* No bias effect applies to bias terms that are invalid.
|
|
2292
|
+
* e.g. `bias_postcode=SW1A2AAA`
|
|
2293
|
+
*
|
|
2294
|
+
* You 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>.
|
|
2295
|
+
*
|
|
2296
|
+
* All biases can accept multiple terms unless stated otherwise below.
|
|
2297
|
+
*
|
|
2298
|
+
* A combined maximum of **5** terms are allowed across all biases.
|
|
2299
|
+
*
|
|
2300
|
+
* ## Suggestion Format
|
|
2301
|
+
*
|
|
2302
|
+
* The 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.
|
|
2303
|
+
*
|
|
2304
|
+
* ## Rate Limiting
|
|
2305
|
+
*
|
|
2306
|
+
* You 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.
|
|
2307
|
+
*
|
|
2308
|
+
* | Header | Description |
|
|
2309
|
+
* | ----------------------- | -------------------------------------------------------------------------------------- |
|
|
2310
|
+
* | `X-RateLimit-Limit` | The maximum number of requests that can be made in 5 minutes |
|
|
2311
|
+
* | `X-RateLimit-Remaining` | The remaining requests within the current rate limit window |
|
|
2312
|
+
* | `X-RateLimit-Reset` | The time when the rate limit window resets in Unix Time (seconds) or UTC Epoch seconds |
|
|
2313
|
+
*
|
|
2314
|
+
* ## Pricing
|
|
2315
|
+
*
|
|
2316
|
+
* This API currently does not affect your balance. However, resolving a suggestion into a full address requires a paid request.
|
|
2317
|
+
*
|
|
2318
|
+
* Please 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.
|
|
2319
|
+
*/
|
|
2320
|
+
AddressAutocomplete: {
|
|
2321
|
+
parameters: {
|
|
2322
|
+
query: {
|
|
2323
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2324
|
+
/** Specifies the address you wish to query. Query can be shortened to `q=` */
|
|
2325
|
+
query?: string;
|
|
2326
|
+
context?: components["schemas"]["Context"];
|
|
2327
|
+
/** Limits number of address suggestions unless a postcode is detected. In this instance entire list of addreses for that postcode is returned. */
|
|
2328
|
+
limit?: components["schemas"]["LimitParam"];
|
|
2329
|
+
postcode_outward?: components["schemas"]["PostcodeOutwardParam"];
|
|
2330
|
+
postcode?: components["schemas"]["PostcodeParam"];
|
|
2331
|
+
postcode_area?: components["schemas"]["PostcodeAreaParam"];
|
|
2332
|
+
postcode_sector?: components["schemas"]["PostcodeSectorParam"];
|
|
2333
|
+
post_town?: components["schemas"]["PostTownParam"];
|
|
2334
|
+
uprn?: components["schemas"]["UPRNParam"];
|
|
2335
|
+
country?: components["schemas"]["CountryParam"];
|
|
2336
|
+
postcode_type?: components["schemas"]["PostcodeTypeParam"];
|
|
2337
|
+
su_organisation_indicator?: components["schemas"]["SmallUserParam"];
|
|
2338
|
+
box?: components["schemas"]["BoxParam"];
|
|
2339
|
+
bias_postcode_outward?: components["schemas"]["BiasPostcodeOutwardParam"];
|
|
2340
|
+
bias_postcode?: components["schemas"]["BiasPostcodeParam"];
|
|
2341
|
+
bias_postcode_area?: components["schemas"]["BiasPostcodeAreaParam"];
|
|
2342
|
+
bias_postcode_sector?: components["schemas"]["BiasPostcodeSectorParam"];
|
|
2343
|
+
bias_post_town?: components["schemas"]["BiasPosttownParam"];
|
|
2344
|
+
bias_thoroughfare?: components["schemas"]["BiasThoroughfareParam"];
|
|
2345
|
+
bias_country?: components["schemas"]["BiasCountryParam"];
|
|
2346
|
+
bias_lonlat?: components["schemas"]["BiasLonLatParam"];
|
|
2347
|
+
bias_ip?: components["schemas"]["BiasIpParam"];
|
|
2348
|
+
};
|
|
2349
|
+
};
|
|
2350
|
+
responses: {
|
|
2351
|
+
/** Success */
|
|
2352
|
+
200: {
|
|
2353
|
+
headers: {
|
|
2354
|
+
/** The maximum number of requests that can be made in 5 minutes */
|
|
2355
|
+
"X-RateLimit-Limit"?: number;
|
|
2356
|
+
/** The remaining requests within the current rate limit window */
|
|
2357
|
+
"X-RateLimit-Remaining"?: number;
|
|
2358
|
+
/** The time when the rate limit window resets in Unix Time (seconds) or UTC Epoch seconds. */
|
|
2359
|
+
"X-RateLimit-Reset"?: number;
|
|
2360
|
+
};
|
|
2361
|
+
content: {
|
|
2362
|
+
"application/json": components["schemas"]["AutocompleteResponse"];
|
|
2363
|
+
};
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
};
|
|
2367
|
+
/**
|
|
2368
|
+
* Resolves an address autocompletion by its address ID.
|
|
2369
|
+
*
|
|
2370
|
+
* Resolved addresses (including global addresses) are returned in a UK format (up to 3 address lines) using UK nomenclature (like postcode and county).
|
|
2371
|
+
*/
|
|
2372
|
+
Resolve: {
|
|
2373
|
+
parameters: {
|
|
2374
|
+
path: {
|
|
2375
|
+
/** ID of address suggestion */
|
|
2376
|
+
address: string;
|
|
2377
|
+
};
|
|
2378
|
+
query: {
|
|
2379
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2380
|
+
};
|
|
2381
|
+
};
|
|
2382
|
+
responses: {
|
|
2383
|
+
/** Success */
|
|
2384
|
+
200: {
|
|
2385
|
+
content: {
|
|
2386
|
+
"application/json": components["schemas"]["GbrResolveAddressResponse"];
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2389
|
+
/** Resource not found */
|
|
2390
|
+
404: {
|
|
2391
|
+
content: {
|
|
2392
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2393
|
+
};
|
|
2394
|
+
};
|
|
2395
|
+
};
|
|
2396
|
+
};
|
|
2397
|
+
/**
|
|
2398
|
+
* Resolves an address autocompletion by its address ID.
|
|
2399
|
+
*
|
|
2400
|
+
* Resolved addresses (including global addresses) are returned in a US format (up to 2 address lines) using US nomenclature (like zipcode, state and city).
|
|
2401
|
+
*/
|
|
2402
|
+
ResolveUsa: {
|
|
2403
|
+
parameters: {
|
|
2404
|
+
path: {
|
|
2405
|
+
/** ID of address suggestion */
|
|
2406
|
+
address: string;
|
|
2407
|
+
};
|
|
2408
|
+
query: {
|
|
2409
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2410
|
+
};
|
|
2411
|
+
};
|
|
2412
|
+
responses: {
|
|
2413
|
+
/** Success */
|
|
2414
|
+
200: {
|
|
2415
|
+
content: {
|
|
2416
|
+
"application/json": components["schemas"]["UsaResolveAddressResponse"];
|
|
2417
|
+
};
|
|
2418
|
+
};
|
|
2419
|
+
/** Resource not found */
|
|
2420
|
+
404: {
|
|
2421
|
+
content: {
|
|
2422
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2423
|
+
};
|
|
2424
|
+
};
|
|
2425
|
+
};
|
|
2426
|
+
};
|
|
2427
|
+
/**
|
|
2428
|
+
* 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).
|
|
2429
|
+
*
|
|
2430
|
+
* If 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.
|
|
2431
|
+
*
|
|
2432
|
+
* This API is designed as a multi-purpose tool for generating address lists, cleansing and wholesale data extraction according to specific parameters.
|
|
2433
|
+
*
|
|
2434
|
+
* For address autocomplete, see our address finder API - which is designed for speed and address completion.
|
|
2435
|
+
*
|
|
2436
|
+
* ## Filters
|
|
2437
|
+
*
|
|
2438
|
+
* You can strictly narrow your result by adding filters to your query string which correspond with an address attribute.
|
|
2439
|
+
*
|
|
2440
|
+
* For instance, you can restrict to postcode `SW1A 2AA` by appending `postcode=sw1a2aa`.
|
|
2441
|
+
*
|
|
2442
|
+
* If a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty result set is returned and no lookup is incurred.
|
|
2443
|
+
*
|
|
2444
|
+
* You 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.
|
|
2445
|
+
*
|
|
2446
|
+
* All filters can accept multiple terms unless stated otherwise below.
|
|
2447
|
+
*
|
|
2448
|
+
* Multiple 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.
|
|
2449
|
+
*
|
|
2450
|
+
* A combined maximum of 5 terms are allowed across all filters.
|
|
2451
|
+
*
|
|
2452
|
+
* ## Biases
|
|
2453
|
+
*
|
|
2454
|
+
* You can boost certain addresses results that correspond with a certain address attribute. All bias searches are prefixed with `bias_`.
|
|
2455
|
+
*
|
|
2456
|
+
* Biased searches, unlike filtered searches, also allow unmatched addresses to appear . These will rank lower.
|
|
2457
|
+
*
|
|
2458
|
+
* For instance, you can boost addresses with postcode areas `SW` and `SE` by appending `bias_postcode_area=SW,SE`.
|
|
2459
|
+
*
|
|
2460
|
+
* If a bias term is invalid, e.g. `bias_postcode=SW1A2AAA` no bias effect is applied.
|
|
2461
|
+
*
|
|
2462
|
+
* You 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`.
|
|
2463
|
+
*
|
|
2464
|
+
* All biases can accept multiple terms unless stated otherwise below.
|
|
2465
|
+
*
|
|
2466
|
+
* A combined maximum of 5 terms are allowed across all biases.
|
|
2467
|
+
*
|
|
2468
|
+
* ## Search by Postcode and Building Name or Number
|
|
2469
|
+
*
|
|
2470
|
+
* Search 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`.
|
|
2471
|
+
*
|
|
2472
|
+
* The advantage of using filters is a postcode mismatch does not result in a lookup as no results are returned.
|
|
2473
|
+
*
|
|
2474
|
+
* #### Search By UPRN
|
|
2475
|
+
*
|
|
2476
|
+
* Search by UPRN using the `uprn` filter and excluding the query argument. E.g. `/v1/addresses?uprn=100`.
|
|
2477
|
+
*
|
|
2478
|
+
* ## Testing
|
|
2479
|
+
*
|
|
2480
|
+
* - **ID1 1QD** Returns a successful query response `2000`
|
|
2481
|
+
* - **ID1 KFA** Returns an empty query response `2000`
|
|
2482
|
+
* - **ID1 CLIP** Returns "no lookups remaining" error `4020`
|
|
2483
|
+
* - **ID1 CHOP** Returns "daily (or individual) lookup limit breached" error `4021`
|
|
2484
|
+
*
|
|
2485
|
+
* Test 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.
|
|
2486
|
+
*/
|
|
2487
|
+
Addresses: {
|
|
2488
|
+
parameters: {
|
|
2489
|
+
query: {
|
|
2490
|
+
api_key: components["schemas"]["ApiKeyParam"];
|
|
2491
|
+
/** Specifies the address you wish to query. Query can be shortened to `q=` */
|
|
2492
|
+
query?: string;
|
|
2493
|
+
limit?: components["schemas"]["LimitParam"];
|
|
2494
|
+
page?: components["schemas"]["PageParam"];
|
|
2495
|
+
filter?: components["schemas"]["FilterParam"];
|
|
2496
|
+
postcode_outward?: components["schemas"]["PostcodeOutwardParam"];
|
|
2497
|
+
postcode?: components["schemas"]["PostcodeParam"];
|
|
2498
|
+
postcode_area?: components["schemas"]["PostcodeAreaParam"];
|
|
2499
|
+
postcode_sector?: components["schemas"]["PostcodeSectorParam"];
|
|
2500
|
+
post_town?: components["schemas"]["PostTownParam"];
|
|
2501
|
+
uprn?: components["schemas"]["UPRNParam"];
|
|
2502
|
+
country?: components["schemas"]["CountryParam"];
|
|
2503
|
+
postcode_type?: components["schemas"]["PostcodeTypeParam"];
|
|
2504
|
+
su_organisation_indicator?: components["schemas"]["SmallUserParam"];
|
|
2505
|
+
box?: components["schemas"]["BoxParam"];
|
|
2506
|
+
bias_postcode_outward?: components["schemas"]["BiasPostcodeOutwardParam"];
|
|
2507
|
+
bias_postcode?: components["schemas"]["BiasPostcodeParam"];
|
|
2508
|
+
bias_postcode_area?: components["schemas"]["BiasPostcodeAreaParam"];
|
|
2509
|
+
bias_postcode_sector?: components["schemas"]["BiasPostcodeSectorParam"];
|
|
2510
|
+
bias_post_town?: components["schemas"]["BiasPosttownParam"];
|
|
2511
|
+
bias_thoroughfare?: components["schemas"]["BiasThoroughfareParam"];
|
|
2512
|
+
bias_country?: components["schemas"]["BiasCountryParam"];
|
|
2513
|
+
bias_lonlat?: components["schemas"]["BiasLonLatParam"];
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
responses: {
|
|
2517
|
+
/** Success */
|
|
2518
|
+
200: {
|
|
2519
|
+
content: {
|
|
2520
|
+
"application/json": components["schemas"]["AddressResponse"];
|
|
2521
|
+
};
|
|
2522
|
+
};
|
|
2523
|
+
};
|
|
2524
|
+
};
|
|
2525
|
+
/** Returns a list of licensees for a key. */
|
|
2526
|
+
ListLicensees: {
|
|
2527
|
+
parameters: {
|
|
2528
|
+
path: {
|
|
2529
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2530
|
+
};
|
|
2531
|
+
query: {
|
|
2532
|
+
/** Specify ID of the licensee after which you would like to list results */
|
|
2533
|
+
starting_after?: number;
|
|
2534
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2535
|
+
/** Specify the maximum number of results to return per page. Default and maximum is `100`. */
|
|
2536
|
+
limit?: components["schemas"]["LimitParam"];
|
|
2537
|
+
/** Filter result by licensee name. Query can be shortened to `q=` */
|
|
2538
|
+
query?: string;
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
responses: {
|
|
2542
|
+
/** Success */
|
|
2543
|
+
200: {
|
|
2544
|
+
content: {
|
|
2545
|
+
"application/json": components["schemas"]["LicenseesResponse"];
|
|
2546
|
+
};
|
|
2547
|
+
};
|
|
2548
|
+
};
|
|
2549
|
+
};
|
|
2550
|
+
/** Create a licensee for the specified API Key. */
|
|
2551
|
+
CreateLicensee: {
|
|
2552
|
+
parameters: {
|
|
2553
|
+
path: {
|
|
2554
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2555
|
+
};
|
|
2556
|
+
query: {
|
|
2557
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2558
|
+
};
|
|
2559
|
+
};
|
|
2560
|
+
responses: {
|
|
2561
|
+
/** Success */
|
|
2562
|
+
200: {
|
|
2563
|
+
content: {
|
|
2564
|
+
"application/json": components["schemas"]["LicenseeResponse"];
|
|
2565
|
+
};
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
requestBody: {
|
|
2569
|
+
content: {
|
|
2570
|
+
"application/json": components["schemas"]["LicenseeEditable"];
|
|
2571
|
+
};
|
|
2572
|
+
};
|
|
2573
|
+
};
|
|
2574
|
+
/** Returns licensee information as identified by the licensee key. */
|
|
2575
|
+
RetrieveLicensee: {
|
|
2576
|
+
parameters: {
|
|
2577
|
+
path: {
|
|
2578
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2579
|
+
licensee: components["schemas"]["LicenseeParam"];
|
|
2580
|
+
};
|
|
2581
|
+
query: {
|
|
2582
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2583
|
+
};
|
|
2584
|
+
};
|
|
2585
|
+
responses: {
|
|
2586
|
+
/** Success */
|
|
2587
|
+
200: {
|
|
2588
|
+
content: {
|
|
2589
|
+
"application/json": components["schemas"]["LicenseeResponse"];
|
|
2590
|
+
};
|
|
2591
|
+
};
|
|
2592
|
+
};
|
|
2593
|
+
};
|
|
2594
|
+
/** Update Licensee */
|
|
2595
|
+
UpdateLicensee: {
|
|
2596
|
+
parameters: {
|
|
2597
|
+
path: {
|
|
2598
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2599
|
+
licensee: components["schemas"]["LicenseeParam"];
|
|
2600
|
+
};
|
|
2601
|
+
query: {
|
|
2602
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2603
|
+
};
|
|
2604
|
+
};
|
|
2605
|
+
responses: {
|
|
2606
|
+
/** Success */
|
|
2607
|
+
200: {
|
|
2608
|
+
content: {
|
|
2609
|
+
"application/json": components["schemas"]["LicenseeResponse"];
|
|
2610
|
+
};
|
|
2611
|
+
};
|
|
2612
|
+
};
|
|
2613
|
+
requestBody: {
|
|
2614
|
+
content: {
|
|
2615
|
+
"application/json": components["schemas"]["LicenseeEditable"];
|
|
2616
|
+
};
|
|
2617
|
+
};
|
|
2618
|
+
};
|
|
2619
|
+
/** Cancels a licensee key. This renders a licensee unusable. This action can be reversed if you get in contact with us. */
|
|
2620
|
+
DeleteLicensee: {
|
|
2621
|
+
parameters: {
|
|
2622
|
+
path: {
|
|
2623
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2624
|
+
licensee: components["schemas"]["LicenseeParam"];
|
|
2625
|
+
};
|
|
2626
|
+
query: {
|
|
2627
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2628
|
+
};
|
|
2629
|
+
};
|
|
2630
|
+
responses: {
|
|
2631
|
+
/** Success */
|
|
2632
|
+
200: {
|
|
2633
|
+
content: {
|
|
2634
|
+
"application/json": {
|
|
2635
|
+
result: {
|
|
2636
|
+
/**
|
|
2637
|
+
* Format: int32
|
|
2638
|
+
* @example 1
|
|
2639
|
+
*/
|
|
2640
|
+
deleted: number;
|
|
2641
|
+
};
|
|
2642
|
+
/**
|
|
2643
|
+
* Format: int32
|
|
2644
|
+
* @enum {integer}
|
|
2645
|
+
*/
|
|
2646
|
+
code: 2000;
|
|
2647
|
+
/** @enum {string} */
|
|
2648
|
+
message: "Success";
|
|
2649
|
+
};
|
|
2650
|
+
};
|
|
2651
|
+
};
|
|
2652
|
+
};
|
|
2653
|
+
};
|
|
2654
|
+
/** Lists configurations associated with a key */
|
|
2655
|
+
ListConfigs: {
|
|
2656
|
+
parameters: {
|
|
2657
|
+
path: {
|
|
2658
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2659
|
+
};
|
|
2660
|
+
query: {
|
|
2661
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2662
|
+
};
|
|
2663
|
+
};
|
|
2664
|
+
responses: {
|
|
2665
|
+
/** Success */
|
|
2666
|
+
200: {
|
|
2667
|
+
content: {
|
|
2668
|
+
"application/json": components["schemas"]["ConfigsResponse"];
|
|
2669
|
+
};
|
|
2670
|
+
};
|
|
2671
|
+
/** Bad Request */
|
|
2672
|
+
400: {
|
|
2673
|
+
content: {
|
|
2674
|
+
"application/json": components["schemas"]["BadRequestResponse"];
|
|
2675
|
+
};
|
|
2676
|
+
};
|
|
2677
|
+
/** Unauthorized Request */
|
|
2678
|
+
401: {
|
|
2679
|
+
content: {
|
|
2680
|
+
"application/json": components["schemas"]["UnauthorizedResponse"];
|
|
2681
|
+
};
|
|
2682
|
+
};
|
|
2683
|
+
};
|
|
2684
|
+
};
|
|
2685
|
+
/** Create a config */
|
|
2686
|
+
CreateConfig: {
|
|
2687
|
+
parameters: {
|
|
2688
|
+
path: {
|
|
2689
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2690
|
+
};
|
|
2691
|
+
query: {
|
|
2692
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
responses: {
|
|
2696
|
+
/** Success */
|
|
2697
|
+
200: {
|
|
2698
|
+
content: {
|
|
2699
|
+
"application/json": components["schemas"]["ConfigResponse"];
|
|
2700
|
+
};
|
|
2701
|
+
};
|
|
2702
|
+
/** Bad Request */
|
|
2703
|
+
400: {
|
|
2704
|
+
content: {
|
|
2705
|
+
"application/json": components["schemas"]["BadRequestResponse"];
|
|
2706
|
+
};
|
|
2707
|
+
};
|
|
2708
|
+
/** Unauthorized Request */
|
|
2709
|
+
401: {
|
|
2710
|
+
content: {
|
|
2711
|
+
"application/json": components["schemas"]["UnauthorizedResponse"];
|
|
2712
|
+
};
|
|
2713
|
+
};
|
|
2714
|
+
};
|
|
2715
|
+
requestBody: {
|
|
2716
|
+
content: {
|
|
2717
|
+
"application/json": components["schemas"]["ConfigNewParam"];
|
|
2718
|
+
};
|
|
2719
|
+
};
|
|
2720
|
+
};
|
|
2721
|
+
/** Retrieve config object by name */
|
|
2722
|
+
RetrieveConfig: {
|
|
2723
|
+
parameters: {
|
|
2724
|
+
path: {
|
|
2725
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2726
|
+
config: components["schemas"]["ConfigParam"];
|
|
2727
|
+
};
|
|
2728
|
+
};
|
|
2729
|
+
responses: {
|
|
2730
|
+
/** Success */
|
|
2731
|
+
200: {
|
|
2732
|
+
content: {
|
|
2733
|
+
"application/json": components["schemas"]["ConfigResponse"];
|
|
2734
|
+
};
|
|
2735
|
+
};
|
|
2736
|
+
/** Bad Request */
|
|
2737
|
+
400: {
|
|
2738
|
+
content: {
|
|
2739
|
+
"application/json": components["schemas"]["BadRequestResponse"];
|
|
2740
|
+
};
|
|
2741
|
+
};
|
|
2742
|
+
/** Not Found */
|
|
2743
|
+
404: {
|
|
2744
|
+
content: {
|
|
2745
|
+
"application/json": components["schemas"]["NotFoundResponse"];
|
|
2746
|
+
};
|
|
2747
|
+
};
|
|
2748
|
+
};
|
|
2749
|
+
};
|
|
2750
|
+
/** Updates configuration object */
|
|
2751
|
+
UpdateConfig: {
|
|
2752
|
+
parameters: {
|
|
2753
|
+
path: {
|
|
2754
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2755
|
+
config: components["schemas"]["ConfigParam"];
|
|
2756
|
+
};
|
|
2757
|
+
query: {
|
|
2758
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2759
|
+
};
|
|
2760
|
+
};
|
|
2761
|
+
responses: {
|
|
2762
|
+
/** Success */
|
|
2763
|
+
200: {
|
|
2764
|
+
content: {
|
|
2765
|
+
"application/json": components["schemas"]["ConfigResponse"];
|
|
2766
|
+
};
|
|
2767
|
+
};
|
|
2768
|
+
/** Bad Request */
|
|
2769
|
+
400: {
|
|
2770
|
+
content: {
|
|
2771
|
+
"application/json": components["schemas"]["BadRequestResponse"];
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
/** Unauthorized Request */
|
|
2775
|
+
401: {
|
|
2776
|
+
content: {
|
|
2777
|
+
"application/json": components["schemas"]["UnauthorizedResponse"];
|
|
2778
|
+
};
|
|
2779
|
+
};
|
|
2780
|
+
/** Not Found */
|
|
2781
|
+
404: {
|
|
2782
|
+
content: {
|
|
2783
|
+
"application/json": components["schemas"]["NotFoundResponse"];
|
|
2784
|
+
};
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
requestBody: {
|
|
2788
|
+
content: {
|
|
2789
|
+
"application/json": components["schemas"]["ConfigUpdateParam"];
|
|
2790
|
+
};
|
|
2791
|
+
};
|
|
2792
|
+
};
|
|
2793
|
+
/** Permanently deletes a configuration object. */
|
|
2794
|
+
DeleteConfig: {
|
|
2795
|
+
parameters: {
|
|
2796
|
+
path: {
|
|
2797
|
+
key: components["schemas"]["ApiKeyParam"];
|
|
2798
|
+
config: components["schemas"]["ConfigParam"];
|
|
2799
|
+
};
|
|
2800
|
+
query: {
|
|
2801
|
+
user_token: components["schemas"]["UserTokenParam"];
|
|
2802
|
+
};
|
|
2803
|
+
};
|
|
2804
|
+
responses: {
|
|
2805
|
+
/** Success */
|
|
2806
|
+
200: {
|
|
2807
|
+
content: {
|
|
2808
|
+
"application/json": {
|
|
2809
|
+
result: {
|
|
2810
|
+
/**
|
|
2811
|
+
* Format: int32
|
|
2812
|
+
* @example 1
|
|
2813
|
+
*/
|
|
2814
|
+
deleted: number;
|
|
2815
|
+
};
|
|
2816
|
+
/**
|
|
2817
|
+
* Format: int32
|
|
2818
|
+
* @enum {integer}
|
|
2819
|
+
*/
|
|
2820
|
+
code: 2000;
|
|
2821
|
+
/** @enum {string} */
|
|
2822
|
+
message: "Success";
|
|
2823
|
+
};
|
|
2824
|
+
};
|
|
2825
|
+
};
|
|
2826
|
+
/** Bad Request */
|
|
2827
|
+
400: {
|
|
2828
|
+
content: {
|
|
2829
|
+
"application/json": components["schemas"]["BadRequestResponse"];
|
|
2830
|
+
};
|
|
2831
|
+
};
|
|
2832
|
+
/** Unauthorized Request */
|
|
2833
|
+
401: {
|
|
2834
|
+
content: {
|
|
2835
|
+
"application/json": components["schemas"]["UnauthorizedResponse"];
|
|
2836
|
+
};
|
|
2837
|
+
};
|
|
2838
|
+
/** Not Found */
|
|
2839
|
+
404: {
|
|
2840
|
+
content: {
|
|
2841
|
+
"application/json": components["schemas"]["NotFoundResponse"];
|
|
2842
|
+
};
|
|
2843
|
+
};
|
|
2844
|
+
};
|
|
2845
|
+
};
|
|
2846
|
+
}
|
|
2847
|
+
export interface external {
|
|
2848
|
+
}
|