@addresszen/openapi 2.0.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.yaml CHANGED
@@ -1,6 +1,6 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
- version: 2.0.0
3
+ version: 3.0.0
4
4
  license:
5
5
  name: AGPLv3
6
6
  url: https://opensource.org/licenses/AGPL-3.0
@@ -71,7 +71,7 @@ info:
71
71
 
72
72
  ```
73
73
 
74
- Authorization: IDEALPOSTCODES api_key="iddqd" [other_key="foo"]
74
+ Authorization: api_key="iddqd" [other_key="foo"]
75
75
 
76
76
  ```
77
77
 
@@ -141,7 +141,7 @@ info:
141
141
  Requests that affect your balance may be annotated with arbitrary metadata.
142
142
  This data is stored along with your lookup history and can be queried at a
143
143
  later date via the API or the dashboard. We call the ability to label your
144
- requests [tagging](https://docs.ideal-postcodes.co.uk/docs/guides/tags).
144
+ requests [tagging](https://docs.addresszen.com/docs/guides/tags).
145
145
 
146
146
 
147
147
  # Response Codes
@@ -340,14 +340,14 @@ info:
340
340
  we aborted the request. You may retry the
341
341
  request. |
342
342
  contact:
343
- email: support@ideal-postcodes.co.uk
343
+ email: support@addresszen.com
344
344
  name: Support
345
- url: https://ideal-postcodes.co.uk/support
345
+ url: https://addresszen.com/support
346
346
  externalDocs:
347
347
  description: More on our APIs, libraries with guides and examples
348
- url: https://docs.ideal-postcodes.co.uk
348
+ url: https://docs.addresszen.com
349
349
  servers:
350
- - url: https://api.ideal-postcodes.co.uk/v1
350
+ - url: https://api.addresszen.com/v1
351
351
  description: API Server
352
352
  variables: {}
353
353
  tags:
@@ -379,19 +379,35 @@ tags:
379
379
 
380
380
  Useful if you need to configure your integration remotely rather than
381
381
  editing code in situ.
382
+ - name: suggestion
383
+ x-displayName: Address Suggestion
384
+ description: >
385
+ Address Suggestions are simple, human readable representations of an
386
+ address. This format is sufficient tfor a user to determine an address
387
+ match in an address autocomplete interface. A second request must be made
388
+ to the API to gather fully validated address.
389
+
390
+
391
+ See our Address Search APIs for more information on address
392
+ autocompletion.
393
+
394
+
395
+ <SchemaDefinition schemaRef="#/components/schemas/AddressSuggestion" />
382
396
  - name: usps_address
383
397
  x-displayName: US Address
384
398
  description: |
399
+ Standard US Address format as reported by USPS.
400
+
385
401
  <SchemaDefinition schemaRef="#/components/schemas/UspsAddress" />
386
402
  - name: uk_address
387
403
  x-displayName: UK Address
388
- description: |
389
- <SchemaDefinition schemaRef="#/components/schemas/PafAddress" />
390
- - name: suggestion
391
- x-displayName: Global Address Suggestion
392
404
  description: >
393
- <SchemaDefinition schemaRef="#/components/schemas/GlobalAddressSuggestion"
394
- />
405
+ Standard UK Address format as reported by Royal Mail's Postcode Address
406
+ File (PAF). PAF is the most complete and up-to-date address database in
407
+ the UK.
408
+
409
+
410
+ <SchemaDefinition schemaRef="#/components/schemas/PafAddress" />
395
411
  x-tagGroups:
396
412
  - name: Address Search
397
413
  tags:
@@ -476,7 +492,6 @@ paths:
476
492
  - name: api_key
477
493
  in: query
478
494
  style: form
479
- required: true
480
495
  explode: false
481
496
  schema:
482
497
  $ref: '#/components/schemas/ApiKeyParam'
@@ -511,12 +526,12 @@ paths:
511
526
  - lang: http
512
527
  label: URL
513
528
  source: |
514
- https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA?api_key=iddqd
529
+ https://api.addresszen.com/v1/postcodes/SW1A2AA?api_key=iddqd
515
530
  - lang: cURL
516
531
  label: CLI
517
532
  source: |
518
533
  curl -G -k \
519
- --url 'https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA' \
534
+ --url 'https://api.addresszen.com/v1/postcodes/SW1A2AA' \
520
535
  --d "api_key=iddqd"
521
536
  /udprn/{udprn}:
522
537
  get:
@@ -573,7 +588,6 @@ paths:
573
588
  type: string
574
589
  - name: api_key
575
590
  in: query
576
- required: true
577
591
  style: form
578
592
  explode: false
579
593
  schema:
@@ -602,11 +616,11 @@ paths:
602
616
  - lang: http
603
617
  label: URL
604
618
  source: |
605
- https://api.ideal-postcodes.co.uk/v1/udprn/0?api_key=iddqd
619
+ https://api.addresszen.com/v1/udprn/0?api_key=iddqd
606
620
  - lang: cURL
607
621
  label: CLI
608
622
  source: |
609
- curl -k -G https://api.ideal-postcodes.co.uk/v1/udprn/0 \
623
+ curl -k -G https://api.addresszen.com/v1/udprn/0 \
610
624
  -d "api_key=iddqd"
611
625
  /umprn/{umprn}:
612
626
  get:
@@ -660,7 +674,6 @@ paths:
660
674
  schema:
661
675
  type: string
662
676
  - name: api_key
663
- required: true
664
677
  in: query
665
678
  style: form
666
679
  explode: false
@@ -690,11 +703,11 @@ paths:
690
703
  - lang: http
691
704
  label: URL
692
705
  source: |
693
- https://api.ideal-postcodes.co.uk/v1/umprn/0?api_key=iddqdmr
706
+ https://api.addresszen.com/v1/umprn/0?api_key=iddqdmr
694
707
  - lang: cURL
695
708
  label: CLI
696
709
  source: |
697
- curl -k -G https://api.ideal-postcodes.co.uk/v1/umprn/0 \
710
+ curl -k -G https://api.addresszen.com/v1/umprn/0 \
698
711
  -d "api_key=iddqdmr"
699
712
  /keys/{key}:
700
713
  get:
@@ -763,7 +776,6 @@ paths:
763
776
  - name: user_token
764
777
  in: query
765
778
  style: form
766
- required: true
767
779
  explode: false
768
780
  schema:
769
781
  $ref: '#/components/schemas/UserTokenParam'
@@ -848,11 +860,11 @@ paths:
848
860
  - lang: http
849
861
  label: URL
850
862
  source: >
851
- https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage?user_token=my_secret_token
863
+ https://api.addresszen.com/v1/keys/iddqd/usage?user_token=my_secret_token
852
864
  - lang: cURL
853
865
  label: CLI
854
866
  source: |
855
- curl -k -G https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage \
867
+ curl -k -G https://api.addresszen.com/v1/keys/iddqd/usage \
856
868
  -d "user_token=my_secret_token"
857
869
  /keys/{key}/lookups:
858
870
  get:
@@ -865,7 +877,7 @@ paths:
865
877
 
866
878
 
867
879
  This method requires a `user_token`, which can be found on your
868
- [accounts page](https://ideal-postcodes.co.uk/account).
880
+ [accounts page](https://addresszen.com/account).
869
881
 
870
882
 
871
883
  A maximum interval of 90 days can be provided for analysis. If no start
@@ -962,11 +974,11 @@ paths:
962
974
  - lang: http
963
975
  label: URL
964
976
  source: >
965
- https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups?user_token=my_secret_token
977
+ https://api.addresszen.com/v1/keys/iddqd/lookups?user_token=my_secret_token
966
978
  - lang: cURL
967
979
  label: CLI
968
980
  source: |
969
- curl -k -G https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups \
981
+ curl -k -G https://api.addresszen.com/v1/keys/iddqd/lookups \
970
982
  -d "user_token=my_secret_token"
971
983
  /autocomplete/addresses:
972
984
  get:
@@ -975,28 +987,27 @@ paths:
975
987
  summary: Find Address
976
988
  description: >
977
989
  The address autocomplete API returns a list of address suggestions that
978
- match the query ordered by relevance score.
990
+ match the query ordered by relevance.
979
991
 
980
992
 
981
993
  This API can be used to power realtime address finders, also known as
982
994
  address autofill or address autocomplete.
983
995
 
984
996
 
985
- If you wish to quickly add address autocompletion to your address forms,
986
- see [Address Finder](/address-finder) and [associated
987
- demos](/address-finder-demo).
997
+ Consider using our Address Autocomplete JavaScript libraries to add
998
+ address lookup to a form in moments.
988
999
 
989
1000
 
990
1001
  ## Implementing Address Autocomplete
991
1002
 
992
1003
 
993
- Retrieving addresses using Address Autocomplete is a 2 step process.
1004
+ Rapid address autocompletion using our Address Autocomplete API is a 2
1005
+ step process.
994
1006
 
995
1007
 
996
1008
  1. Retrieve partial address suggestions via `/autocomplete/addresses`
997
1009
 
998
- 2. Retrieve the entire address by following the URL provided by the
999
- suggestion
1010
+ 2. Retrieve the entire address with the ID provided in the suggestion
1000
1011
 
1001
1012
 
1002
1013
  Step 2 will decrement your lookup balance.
@@ -1009,11 +1020,8 @@ paths:
1009
1020
 
1010
1021
 
1011
1022
  You can strictly narrow your result by adding filters to your
1012
- querystring which correspond with an address attribute.
1013
-
1014
-
1015
- For instance, you can restrict to postcode `SW1A 2AA` by appending
1016
- `postcode=sw1a2aa`.
1023
+ querystring. For instance, you can restrict to postcode `SW1A 2AA` by
1024
+ appending `postcode=sw1a2aa`.
1017
1025
 
1018
1026
 
1019
1027
  If a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty
@@ -1022,17 +1030,17 @@ paths:
1022
1030
 
1023
1031
  You can also scope using multiple terms for the same filter with a comma
1024
1032
  separated list of terms. E.g. Restrict results to E1, E2 and E3 outward
1025
- codes: `postcode_outward=e1,e2,e3`. Multiple terms are
1026
- <code>OR</code>'ed, i.e. the matching result sets are combined.
1033
+ codes: `postcode_outward=e1,e2,e3`. Multiple terms are `OR`'ed, i.e. the
1034
+ matching result sets are combined.
1027
1035
 
1028
1036
 
1029
1037
  All filters can accept multiple terms unless stated otherwise below.
1030
1038
 
1031
1039
 
1032
- Multiple filters can also be combined. E.g. Restrict results to small
1033
- user organisations in the N postcode area:
1040
+ Filters can also be combined. E.g. Restrict results to small user
1041
+ organisations in the N postcode area:
1034
1042
  `su_organisation_indicator=Y&postcode_area=n`. Multiple filters are
1035
- <code>AND</code>'ed, i.e. each additional filter narrows the result set.
1043
+ `AND`'ed, i.e. each additional filter narrows the result set.
1036
1044
 
1037
1045
 
1038
1046
  A maximum of **10** terms are allowed across all filters.
@@ -1041,21 +1049,20 @@ paths:
1041
1049
  ## Biases
1042
1050
 
1043
1051
 
1044
- You can boost certain addresses results that correspond with a certain
1045
- address attribute. All bias searches are prefixed with `bias_`.
1052
+ You can boost certain addresses results that match specific address
1053
+ criteria. All bias searches are prefixed with `bias_`.
1046
1054
 
1047
1055
 
1048
- Biased searches, unlike filtered searches, also allow unmatched
1049
- addresses to appear. These will rank lower.
1056
+ Biasing (unlike filtering) also allow unmatched addresses to appear with
1057
+ lower precedence.
1050
1058
 
1051
1059
 
1052
1060
  For instance, can boost addresses with postcode areas `SW` and `SE` by
1053
1061
  appending `bias_postcode_area=SW,SE`.
1054
1062
 
1055
1063
 
1056
- No bias effect applies to bias terms that are invalid.
1057
-
1058
- e.g. `bias_postcode=SW1A2AAA`
1064
+ No bias effect applies to bias terms that are invalid. e.g.
1065
+ `bias_postcode=SW1A2AAA`
1059
1066
 
1060
1067
 
1061
1068
  You may scope using multiple terms for the same bias with a comma
@@ -1119,7 +1126,6 @@ paths:
1119
1126
  - name: api_key
1120
1127
  in: query
1121
1128
  style: form
1122
- required: true
1123
1129
  explode: false
1124
1130
  schema:
1125
1131
  $ref: '#/components/schemas/ApiKeyParam'
@@ -1291,12 +1297,12 @@ paths:
1291
1297
  - lang: http
1292
1298
  label: URL
1293
1299
  source: >
1294
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing
1300
+ https://api.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing
1295
1301
  - lang: cURL
1296
1302
  label: CLI
1297
1303
  source: >
1298
1304
  curl -k -G
1299
- 'https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses' \
1305
+ 'https://api.addresszen.com/v1/autocomplete/addresses' \
1300
1306
  -d 'api_key=iddqd' \
1301
1307
  --data-urlencode 'query=10 downing'
1302
1308
  /autocomplete/addresses/{address}/gbr:
@@ -1323,7 +1329,6 @@ paths:
1323
1329
  type: string
1324
1330
  - name: api_key
1325
1331
  in: query
1326
- required: true
1327
1332
  style: form
1328
1333
  explode: false
1329
1334
  schema:
@@ -1346,12 +1351,12 @@ paths:
1346
1351
  - lang: http
1347
1352
  label: URL
1348
1353
  source: >
1349
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1354
+ https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1350
1355
  - lang: cURL
1351
1356
  label: CLI
1352
1357
  source: >
1353
1358
  curl -k -G
1354
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1359
+ https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1355
1360
  \
1356
1361
  -d "api_key=iddqd"
1357
1362
  /autocomplete/addresses/{address}/usa:
@@ -1378,7 +1383,6 @@ paths:
1378
1383
  type: string
1379
1384
  - name: api_key
1380
1385
  in: query
1381
- required: true
1382
1386
  style: form
1383
1387
  explode: false
1384
1388
  schema:
@@ -1401,12 +1405,12 @@ paths:
1401
1405
  - lang: http
1402
1406
  label: URL
1403
1407
  source: >
1404
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1408
+ https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1405
1409
  - lang: cURL
1406
1410
  label: CLI
1407
1411
  source: >
1408
1412
  curl -k -G
1409
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1413
+ https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1410
1414
  \
1411
1415
  -d "api_key=iddqd"
1412
1416
  /addresses:
@@ -1434,6 +1438,14 @@ paths:
1434
1438
  for speed and address completion.
1435
1439
 
1436
1440
 
1441
+ ## Reverse Geocoding
1442
+
1443
+
1444
+ Return a list of addresses around a point using the lon= and lat=
1445
+ querystring arguments. Addresses will be sorted in order of distance to
1446
+ the point. The search radius is 100m.
1447
+
1448
+
1437
1449
  ## Filters
1438
1450
 
1439
1451
 
@@ -1568,6 +1580,18 @@ paths:
1568
1580
  explode: false
1569
1581
  schema:
1570
1582
  $ref: '#/components/schemas/FilterParam'
1583
+ - name: lon
1584
+ in: query
1585
+ style: form
1586
+ explode: false
1587
+ schema:
1588
+ $ref: '#/components/schemas/AddressLongitudeParam'
1589
+ - name: lat
1590
+ in: query
1591
+ style: form
1592
+ explode: false
1593
+ schema:
1594
+ $ref: '#/components/schemas/AddressLatitudeParam'
1571
1595
  - name: postcode_outward
1572
1596
  in: query
1573
1597
  style: form
@@ -1687,11 +1711,11 @@ paths:
1687
1711
  - lang: http
1688
1712
  label: URL
1689
1713
  source: >
1690
- https://api.ideal-postcodes.co.uk/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london
1714
+ https://api.addresszen.com/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london
1691
1715
  - lang: cURL
1692
1716
  label: CLI
1693
1717
  source: |
1694
- curl -k -G 'https://api.ideal-postcodes.co.uk/v1/addresses' \
1718
+ curl -k -G 'https://api.addresszen.com/v1/addresses' \
1695
1719
  -d 'api_key=iddqd' \
1696
1720
  --data-urlencode 'query=10 downing street london'
1697
1721
  /keys/{key}/licensees:
@@ -1721,7 +1745,6 @@ paths:
1721
1745
  format: int32
1722
1746
  - name: user_token
1723
1747
  in: query
1724
- required: true
1725
1748
  style: form
1726
1749
  explode: false
1727
1750
  schema:
@@ -1765,7 +1788,6 @@ paths:
1765
1788
  $ref: '#/components/schemas/ApiKeyParam'
1766
1789
  - name: user_token
1767
1790
  in: query
1768
- required: true
1769
1791
  style: form
1770
1792
  explode: false
1771
1793
  schema:
@@ -1807,7 +1829,6 @@ paths:
1807
1829
  $ref: '#/components/schemas/LicenseeParam'
1808
1830
  - name: user_token
1809
1831
  in: query
1810
- required: true
1811
1832
  style: form
1812
1833
  explode: false
1813
1834
  schema:
@@ -1845,7 +1866,6 @@ paths:
1845
1866
  $ref: '#/components/schemas/LicenseeParam'
1846
1867
  - name: user_token
1847
1868
  in: query
1848
- required: true
1849
1869
  style: form
1850
1870
  explode: false
1851
1871
  schema:
@@ -1905,7 +1925,6 @@ paths:
1905
1925
  $ref: '#/components/schemas/LicenseeParam'
1906
1926
  - name: user_token
1907
1927
  in: query
1908
- required: true
1909
1928
  style: form
1910
1929
  explode: false
1911
1930
  schema:
@@ -1940,7 +1959,6 @@ paths:
1940
1959
  $ref: '#/components/schemas/ApiKeyParam'
1941
1960
  - name: user_token
1942
1961
  in: query
1943
- required: true
1944
1962
  style: form
1945
1963
  explode: false
1946
1964
  schema:
@@ -1980,7 +1998,6 @@ paths:
1980
1998
  $ref: '#/components/schemas/ApiKeyParam'
1981
1999
  - name: user_token
1982
2000
  in: query
1983
- required: true
1984
2001
  style: form
1985
2002
  explode: false
1986
2003
  schema:
@@ -2075,7 +2092,6 @@ paths:
2075
2092
  $ref: '#/components/schemas/ConfigParam'
2076
2093
  - name: user_token
2077
2094
  in: query
2078
- required: true
2079
2095
  style: form
2080
2096
  explode: false
2081
2097
  schema:
@@ -2153,7 +2169,6 @@ paths:
2153
2169
  $ref: '#/components/schemas/ConfigParam'
2154
2170
  - name: user_token
2155
2171
  in: query
2156
- required: true
2157
2172
  style: form
2158
2173
  explode: false
2159
2174
  schema:
@@ -2376,8 +2391,6 @@ components:
2376
2391
  oneOf:
2377
2392
  - type: string
2378
2393
  description: If premise is not multiple occupancy, this will be an empty string
2379
- enum:
2380
- - ''
2381
2394
  - type: number
2382
2395
  description: If premise is multiple occupancy, this will be an integer
2383
2396
  example: 983729
@@ -2524,8 +2537,6 @@ components:
2524
2537
  oneOf:
2525
2538
  - type: string
2526
2539
  description: Empty string `""` if not available
2527
- enum:
2528
- - ''
2529
2540
  - type: number
2530
2541
  description: Represents longitude
2531
2542
  example: 0.002823
@@ -2541,8 +2552,6 @@ components:
2541
2552
  oneOf:
2542
2553
  - type: string
2543
2554
  description: Empty string `""` if not available
2544
- enum:
2545
- - ''
2546
2555
  - type: number
2547
2556
  description: Represents latitude
2548
2557
  example: 52.938278
@@ -2560,8 +2569,6 @@ components:
2560
2569
  oneOf:
2561
2570
  - type: string
2562
2571
  description: Empty string `""` if not available
2563
- enum:
2564
- - ''
2565
2572
  - type: number
2566
2573
  description: Metres offset east from origin
2567
2574
  example: 9382
@@ -2579,8 +2586,6 @@ components:
2579
2586
  oneOf:
2580
2587
  - type: string
2581
2588
  description: Empty string `""` if not available
2582
- enum:
2583
- - ''
2584
2589
  - type: number
2585
2590
  description: Metres offset north from origin
2586
2591
  example: 123932
@@ -2614,6 +2619,8 @@ components:
2614
2619
  description: Indicates the provenance of an address
2615
2620
  enum:
2616
2621
  - paf
2622
+ - pafw
2623
+ - pafa
2617
2624
  - mr
2618
2625
  - nyb
2619
2626
  - usps
@@ -2631,7 +2638,12 @@ components:
2631
2638
  - GUM
2632
2639
  PafAddress:
2633
2640
  title: Postcode Address File Address
2634
- description: Standard UK Address.
2641
+ description: >
2642
+ Standard UK Address. Also known as a Postcode Address File (PAF) address
2643
+ is defined by Royal Mail and updated on a daily cadence.
2644
+
2645
+
2646
+ A PAF Address represents a deliverable endpoint.
2635
2647
  required:
2636
2648
  - postcode
2637
2649
  - postcode_outward
@@ -2757,9 +2769,14 @@ components:
2757
2769
  - GGY
2758
2770
  MrAddress:
2759
2771
  title: Multiple Residence Address
2760
- description: >-
2761
- Subdivision of a Postcode Address File address. Does not have its own
2762
- delivery point.
2772
+ description: >
2773
+ Subdivision of a Postcode Address File address. Also known as a Multiple
2774
+ Residence or Multiple Occupancy address.
2775
+
2776
+
2777
+ A Multiple Residence address does not have its own deliverable endpoint.
2778
+ Instead it relies on the deliverable endpoint of a parent address, where
2779
+ the parent address can be found on the main Postcode Address File.
2763
2780
  allOf:
2764
2781
  - $ref: '#/components/schemas/PafAddress'
2765
2782
  - type: object
@@ -2770,7 +2787,10 @@ components:
2770
2787
  - mr
2771
2788
  NybAddress:
2772
2789
  title: Not Yet Built Address
2773
- description: UK premise under construction
2790
+ description: |
2791
+ A UK premise under construction and currently not occupied.
2792
+
2793
+ This dataset is updated by Royal Mail on a monthly cadence.
2774
2794
  allOf:
2775
2795
  - $ref: '#/components/schemas/PafAddress'
2776
2796
  - type: object
@@ -2778,7 +2798,7 @@ components:
2778
2798
  dataset:
2779
2799
  $ref: '#/components/schemas/Dataset'
2780
2800
  enum:
2781
- - mr
2801
+ - nyb
2782
2802
  PostcodeResponse:
2783
2803
  title: Postcode Response
2784
2804
  type: object
@@ -2885,12 +2905,33 @@ components:
2885
2905
  type: string
2886
2906
  enum:
2887
2907
  - Success
2908
+ Context:
2909
+ title: Context
2910
+ type: string
2911
+ enum:
2912
+ - GBR
2913
+ - USA
2914
+ description: Limits search results within a geographical boundary or country.
2915
+ NoContext:
2916
+ title: No Context Provided
2917
+ type: string
2918
+ enum:
2919
+ - ''
2920
+ description: Empty string if no context is provided or key check has failed
2888
2921
  ApiKey:
2889
2922
  title: Key
2890
2923
  type: object
2891
2924
  required:
2892
2925
  - available
2926
+ - context
2893
2927
  properties:
2928
+ context:
2929
+ description: >
2930
+ Returns current context if it is in the list of available contexts
2931
+ for this key.
2932
+ oneOf:
2933
+ - $ref: '#/components/schemas/Context'
2934
+ - $ref: '#/components/schemas/NoContext'
2894
2935
  available:
2895
2936
  description: |
2896
2937
  Determines whether the key can be used by the requesting agent.
@@ -2931,7 +2972,7 @@ components:
2931
2972
 
2932
2973
 
2933
2974
  Your user token can be retrieved and managed from your [accounts
2934
- page](https://ideal-postcodes.co.uk/account).
2975
+ page](https://addresszen.com/account).
2935
2976
 
2936
2977
 
2937
2978
  Typically beings `uk_...`
@@ -3225,13 +3266,6 @@ components:
3225
3266
  type: string
3226
3267
  enum:
3227
3268
  - Success
3228
- Context:
3229
- title: Context
3230
- type: string
3231
- enum:
3232
- - gbr
3233
- - usa
3234
- description: Limits search results within a geographical boundary or country.
3235
3269
  LimitParam:
3236
3270
  title: Limit
3237
3271
  description: >
@@ -3370,50 +3404,48 @@ components:
3370
3404
  Biases search based on approximate geolocation of IP address.
3371
3405
  Set `bias_ip=true` to enable.
3372
3406
  example: bias_ip=true
3373
- PafSuggestion:
3374
- title: UK Postcode Address File Address Autocompletion Hit
3375
- description: Represents an address suggestion from the UK Postcode Address File.
3407
+ AddressSuggestion:
3408
+ title: Address Suggestion
3409
+ description: Represents an address suggestion for any address in the world
3376
3410
  type: object
3377
3411
  required:
3378
3412
  - id
3379
3413
  - suggestion
3380
- - udprn
3381
3414
  - urls
3382
3415
  properties:
3383
3416
  id:
3384
3417
  $ref: '#/components/schemas/ID'
3385
3418
  suggestion:
3386
3419
  type: string
3387
- description: Address suggestion for your given query.
3420
+ description: Address Suggestion to be displayed to the user
3388
3421
  example: Flat 6, 12 Roskear, Camborne, TR14
3389
- udprn:
3390
- $ref: '#/components/schemas/UDPRN'
3391
3422
  urls:
3392
- required:
3393
- - udprn
3394
3423
  type: object
3395
- properties:
3396
- udprn:
3397
- type: string
3398
- description: >-
3399
- URL to retrieve the entire details for a given address
3400
- suggestion by the UDPRN
3401
- example: /v1/udprn/50985827
3402
- MrSuggestion:
3403
- title: Multiple Residence Address Autocompletion Hit
3424
+ UkAddressSuggestion:
3425
+ title: UK Address Suggestion
3426
+ description: >
3427
+ Represents a possible address given an autocomplete query.
3428
+
3429
+
3430
+ UK Address Suggestions will return a UDPRN attribute if it references a
3431
+ deliverable endpoint found on Royal Mail's Postcode Address File
3432
+ dataset.
3433
+
3434
+
3435
+ UK Address Suggestion will return a UMPRN if it references a multiple
3436
+ occupancy premise found on Royal Mail's Multiple Residence dataset.
3404
3437
  type: object
3405
3438
  required:
3406
3439
  - id
3407
3440
  - suggestion
3408
3441
  - udprn
3409
- - umprn
3410
3442
  - urls
3411
3443
  properties:
3412
3444
  id:
3413
3445
  $ref: '#/components/schemas/ID'
3414
3446
  suggestion:
3415
3447
  type: string
3416
- description: Address suggestion for your given query.
3448
+ description: Address suggestion for a given query.
3417
3449
  example: Flat 6, 12 Roskear, Camborne, TR14
3418
3450
  udprn:
3419
3451
  $ref: '#/components/schemas/UDPRN'
@@ -3425,10 +3457,9 @@ components:
3425
3457
  Residence household
3426
3458
  example: 51103417
3427
3459
  urls:
3428
- type: object
3429
3460
  required:
3430
3461
  - udprn
3431
- - umprn
3462
+ type: object
3432
3463
  properties:
3433
3464
  udprn:
3434
3465
  type: string
@@ -3442,34 +3473,6 @@ components:
3442
3473
  Optionally returned field, to retrieve the entire details for a
3443
3474
  suggested Multiple Residence household
3444
3475
  example: /v1/umprn/51103417
3445
- NybSuggestion:
3446
- title: Not Yet Built Address Autocompletion Hit
3447
- allOf:
3448
- - $ref: '#/components/schemas/PafSuggestion'
3449
- GlobalAddressSuggestion:
3450
- title: Global Address Autocompletion Suggestion
3451
- description: Represents an address suggestion for any address in the world
3452
- type: object
3453
- required:
3454
- - id
3455
- - suggestion
3456
- - urls
3457
- properties:
3458
- id:
3459
- $ref: '#/components/schemas/ID'
3460
- suggestion:
3461
- type: string
3462
- description: Address Suggestion to be displayed to the user
3463
- example: Flat 6, 12 Roskear, Camborne, TR14
3464
- urls:
3465
- type: object
3466
- properties:
3467
- id:
3468
- type: string
3469
- description: >-
3470
- URL to retrieve the entire details for a given address
3471
- suggestion by the UDPRN
3472
- example: /v1/udprn/50985827
3473
3476
  AutocompleteResponse:
3474
3477
  title: Address Autocomplete Response
3475
3478
  type: object
@@ -3487,10 +3490,8 @@ components:
3487
3490
  type: array
3488
3491
  items:
3489
3492
  oneOf:
3490
- - $ref: '#/components/schemas/PafSuggestion'
3491
- - $ref: '#/components/schemas/MrSuggestion'
3492
- - $ref: '#/components/schemas/NybSuggestion'
3493
- - $ref: '#/components/schemas/GlobalAddressSuggestion'
3493
+ - $ref: '#/components/schemas/AddressSuggestion'
3494
+ - $ref: '#/components/schemas/UkAddressSuggestion'
3494
3495
  code:
3495
3496
  type: integer
3496
3497
  format: int32
@@ -3500,6 +3501,37 @@ components:
3500
3501
  type: string
3501
3502
  enum:
3502
3503
  - Success
3504
+ WelshPafAddress:
3505
+ title: Welsh PAF Address
3506
+ description: Welsh language alternative for a PAF Address
3507
+ allOf:
3508
+ - $ref: '#/components/schemas/PafAddress'
3509
+ - type: object
3510
+ properties:
3511
+ dataset:
3512
+ $ref: '#/components/schemas/Dataset'
3513
+ enum:
3514
+ - pafw
3515
+ PafAliasAddress:
3516
+ title: PAF Alias Address
3517
+ description: >
3518
+ PAF Aliases addresses are alternate ways to present an address already
3519
+ found on PAF.
3520
+
3521
+
3522
+ Alias data is information the public chooses to use when addressing
3523
+ mail, but which isn’t actually required for delivery purposes. The
3524
+ Alias data contains records of alternative address details that are
3525
+ included in the address but not necessarily needed for delivery
3526
+ purposes.
3527
+ allOf:
3528
+ - $ref: '#/components/schemas/PafAddress'
3529
+ - type: object
3530
+ properties:
3531
+ dataset:
3532
+ $ref: '#/components/schemas/Dataset'
3533
+ enum:
3534
+ - pafa
3503
3535
  GbrGlobalAddress:
3504
3536
  title: Global Address
3505
3537
  description: Global (non-UK) address in the UK address format
@@ -3685,6 +3717,8 @@ components:
3685
3717
  oneOf:
3686
3718
  - $ref: '#/components/schemas/PafAddress'
3687
3719
  - $ref: '#/components/schemas/MrAddress'
3720
+ - $ref: '#/components/schemas/WelshPafAddress'
3721
+ - $ref: '#/components/schemas/PafAliasAddress'
3688
3722
  - $ref: '#/components/schemas/NybAddress'
3689
3723
  - $ref: '#/components/schemas/GbrGlobalAddress'
3690
3724
  usps_dataset:
@@ -4449,6 +4483,32 @@ components:
4449
4483
  oneOf:
4450
4484
  - $ref: '#/components/schemas/UspsAddress'
4451
4485
  - $ref: '#/components/schemas/UsaGlobalAddress'
4486
+ AddressLongitudeParam:
4487
+ title: Longitude
4488
+ type: number
4489
+ format: float
4490
+ description: >
4491
+ Longitude query for reverse geocoding.
4492
+
4493
+
4494
+ An accompanying latitude (lat=) query must be submitted for a valid
4495
+ reverse geocode query.
4496
+ minimum: -90
4497
+ maximum: 90
4498
+ example: -0.12767
4499
+ AddressLatitudeParam:
4500
+ title: Latitude
4501
+ type: number
4502
+ format: float
4503
+ description: >
4504
+ Latitude query for reverse geocoding.
4505
+
4506
+
4507
+ An accompanying longitude (lon=) query must be submitted for a valid
4508
+ reverse geocode query.
4509
+ minimum: -90
4510
+ maximum: 90
4511
+ example: 51.503541
4452
4512
  AddressResponse:
4453
4513
  title: Address Search Response
4454
4514
  type: object
@@ -4483,6 +4543,8 @@ components:
4483
4543
  - $ref: '#/components/schemas/PafAddress'
4484
4544
  - $ref: '#/components/schemas/MrAddress'
4485
4545
  - $ref: '#/components/schemas/NybAddress'
4546
+ - $ref: '#/components/schemas/WelshPafAddress'
4547
+ - $ref: '#/components/schemas/PafAliasAddress'
4486
4548
  total:
4487
4549
  minimum: 0
4488
4550
  maximum: 10000