@addresszen/openapi 2.0.2 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.yaml CHANGED
@@ -1,11 +1,11 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
- version: 2.0.0
3
+ version: 3.1.0
4
4
  license:
5
5
  name: AGPLv3
6
6
  url: https://opensource.org/licenses/AGPL-3.0
7
- title: API Reference - Ideal Postcodes
8
- termsOfService: https://terms.ideal-postcodes.co.uk
7
+ title: API Reference - AddressZen
8
+ termsOfService: https://terms.addresszen.com
9
9
  description: >
10
10
  # Getting Started
11
11
 
@@ -60,7 +60,7 @@ info:
60
60
 
61
61
  ```
62
62
 
63
- api.ideal-postcodes.co.uk/v1/autocomplete/addresses?api_key=iddqd&q=parkside
63
+ api.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=parkside
64
64
 
65
65
  ```
66
66
 
@@ -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,49 @@ 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: |
404
+ description: >
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
+
389
410
  <SchemaDefinition schemaRef="#/components/schemas/PafAddress" />
390
- - name: suggestion
391
- x-displayName: Global Address Suggestion
411
+ - name: ecaf_address
412
+ x-displayName: IE Address
392
413
  description: >
393
- <SchemaDefinition schemaRef="#/components/schemas/GlobalAddressSuggestion"
394
- />
414
+ Standard Republic of Ireland Address format as reported by the Eircode
415
+ ECAF file.
416
+
417
+
418
+ <SchemaDefinition schemaRef="#/components/schemas/EcafAddress" />
419
+ - name: ecad_address
420
+ x-displayName: IE Address (ECAD)
421
+ description: |
422
+ ECAF file including additional data for each address.
423
+
424
+ <SchemaDefinition schemaRef="#/components/schemas/EcadAddress" />
395
425
  x-tagGroups:
396
426
  - name: Address Search
397
427
  tags:
@@ -404,9 +434,11 @@ x-tagGroups:
404
434
  - Configs
405
435
  - name: Models
406
436
  tags:
437
+ - suggestion
407
438
  - usps_address
408
439
  - uk_address
409
- - suggestion
440
+ - ecaf_address
441
+ - ecad_address
410
442
  paths:
411
443
  /postcodes/{postcode}:
412
444
  get:
@@ -472,11 +504,10 @@ paths:
472
504
  style: simple
473
505
  explode: false
474
506
  schema:
475
- $ref: '#/components/schemas/Postcode'
507
+ $ref: '#/components/schemas/paf_postcode'
476
508
  - name: api_key
477
509
  in: query
478
510
  style: form
479
- required: true
480
511
  explode: false
481
512
  schema:
482
513
  $ref: '#/components/schemas/ApiKeyParam'
@@ -501,6 +532,12 @@ paths:
501
532
  application/json:
502
533
  schema:
503
534
  $ref: '#/components/schemas/PostcodeResponse'
535
+ '400':
536
+ description: Bad Request
537
+ content:
538
+ application/json:
539
+ schema:
540
+ $ref: '#/components/schemas/BadRequestResponse'
504
541
  '404':
505
542
  description: Postcode Not Found
506
543
  content:
@@ -511,12 +548,12 @@ paths:
511
548
  - lang: http
512
549
  label: URL
513
550
  source: |
514
- https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA?api_key=iddqd
551
+ https://api.addresszen.com/v1/postcodes/SW1A2AA?api_key=iddqd
515
552
  - lang: cURL
516
553
  label: CLI
517
554
  source: |
518
555
  curl -G -k \
519
- --url 'https://api.ideal-postcodes.co.uk/v1/postcodes/SW1A2AA' \
556
+ --url 'https://api.addresszen.com/v1/postcodes/SW1A2AA' \
520
557
  --d "api_key=iddqd"
521
558
  /udprn/{udprn}:
522
559
  get:
@@ -573,7 +610,6 @@ paths:
573
610
  type: string
574
611
  - name: api_key
575
612
  in: query
576
- required: true
577
613
  style: form
578
614
  explode: false
579
615
  schema:
@@ -602,11 +638,11 @@ paths:
602
638
  - lang: http
603
639
  label: URL
604
640
  source: |
605
- https://api.ideal-postcodes.co.uk/v1/udprn/0?api_key=iddqd
641
+ https://api.addresszen.com/v1/udprn/0?api_key=iddqd
606
642
  - lang: cURL
607
643
  label: CLI
608
644
  source: |
609
- curl -k -G https://api.ideal-postcodes.co.uk/v1/udprn/0 \
645
+ curl -k -G https://api.addresszen.com/v1/udprn/0 \
610
646
  -d "api_key=iddqd"
611
647
  /umprn/{umprn}:
612
648
  get:
@@ -660,7 +696,6 @@ paths:
660
696
  schema:
661
697
  type: string
662
698
  - name: api_key
663
- required: true
664
699
  in: query
665
700
  style: form
666
701
  explode: false
@@ -690,11 +725,11 @@ paths:
690
725
  - lang: http
691
726
  label: URL
692
727
  source: |
693
- https://api.ideal-postcodes.co.uk/v1/umprn/0?api_key=iddqdmr
728
+ https://api.addresszen.com/v1/umprn/0?api_key=iddqdmr
694
729
  - lang: cURL
695
730
  label: CLI
696
731
  source: |
697
- curl -k -G https://api.ideal-postcodes.co.uk/v1/umprn/0 \
732
+ curl -k -G https://api.addresszen.com/v1/umprn/0 \
698
733
  -d "api_key=iddqdmr"
699
734
  /keys/{key}:
700
735
  get:
@@ -763,7 +798,6 @@ paths:
763
798
  - name: user_token
764
799
  in: query
765
800
  style: form
766
- required: true
767
801
  explode: false
768
802
  schema:
769
803
  $ref: '#/components/schemas/UserTokenParam'
@@ -844,15 +878,21 @@ paths:
844
878
  application/json:
845
879
  schema:
846
880
  $ref: '#/components/schemas/ApiKeyUsageResponse'
881
+ '400':
882
+ description: Bad Request
883
+ content:
884
+ application/json:
885
+ schema:
886
+ $ref: '#/components/schemas/BadRequestResponse'
847
887
  x-codeSamples:
848
888
  - lang: http
849
889
  label: URL
850
890
  source: >
851
- https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage?user_token=my_secret_token
891
+ https://api.addresszen.com/v1/keys/iddqd/usage?user_token=my_secret_token
852
892
  - lang: cURL
853
893
  label: CLI
854
894
  source: |
855
- curl -k -G https://api.ideal-postcodes.co.uk/v1/keys/iddqd/usage \
895
+ curl -k -G https://api.addresszen.com/v1/keys/iddqd/usage \
856
896
  -d "user_token=my_secret_token"
857
897
  /keys/{key}/lookups:
858
898
  get:
@@ -865,7 +905,7 @@ paths:
865
905
 
866
906
 
867
907
  This method requires a `user_token`, which can be found on your
868
- [accounts page](https://ideal-postcodes.co.uk/account).
908
+ [accounts page](https://addresszen.com/account).
869
909
 
870
910
 
871
911
  A maximum interval of 90 days can be provided for analysis. If no start
@@ -958,15 +998,21 @@ paths:
958
998
  schema:
959
999
  type: string
960
1000
  description: Success
1001
+ '400':
1002
+ description: Bad Request
1003
+ content:
1004
+ application/json:
1005
+ schema:
1006
+ $ref: '#/components/schemas/BadRequestResponse'
961
1007
  x-codeSamples:
962
1008
  - lang: http
963
1009
  label: URL
964
1010
  source: >
965
- https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups?user_token=my_secret_token
1011
+ https://api.addresszen.com/v1/keys/iddqd/lookups?user_token=my_secret_token
966
1012
  - lang: cURL
967
1013
  label: CLI
968
1014
  source: |
969
- curl -k -G https://api.ideal-postcodes.co.uk/v1/keys/iddqd/lookups \
1015
+ curl -k -G https://api.addresszen.com/v1/keys/iddqd/lookups \
970
1016
  -d "user_token=my_secret_token"
971
1017
  /autocomplete/addresses:
972
1018
  get:
@@ -975,28 +1021,27 @@ paths:
975
1021
  summary: Find Address
976
1022
  description: >
977
1023
  The address autocomplete API returns a list of address suggestions that
978
- match the query ordered by relevance score.
1024
+ match the query ordered by relevance.
979
1025
 
980
1026
 
981
1027
  This API can be used to power realtime address finders, also known as
982
1028
  address autofill or address autocomplete.
983
1029
 
984
1030
 
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).
1031
+ Consider using our Address Autocomplete JavaScript libraries to add
1032
+ address lookup to a form in moments.
988
1033
 
989
1034
 
990
1035
  ## Implementing Address Autocomplete
991
1036
 
992
1037
 
993
- Retrieving addresses using Address Autocomplete is a 2 step process.
1038
+ Rapid address autocompletion using our Address Autocomplete API is a 2
1039
+ step process.
994
1040
 
995
1041
 
996
1042
  1. Retrieve partial address suggestions via `/autocomplete/addresses`
997
1043
 
998
- 2. Retrieve the entire address by following the URL provided by the
999
- suggestion
1044
+ 2. Retrieve the entire address with the ID provided in the suggestion
1000
1045
 
1001
1046
 
1002
1047
  Step 2 will decrement your lookup balance.
@@ -1009,11 +1054,8 @@ paths:
1009
1054
 
1010
1055
 
1011
1056
  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`.
1057
+ querystring. For instance, you can restrict to postcode `SW1A 2AA` by
1058
+ appending `postcode=sw1a2aa`.
1017
1059
 
1018
1060
 
1019
1061
  If a filter term is invalid, e.g. `postcode=SW1A2AAA`, then an empty
@@ -1022,17 +1064,17 @@ paths:
1022
1064
 
1023
1065
  You can also scope using multiple terms for the same filter with a comma
1024
1066
  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.
1067
+ codes: `postcode_outward=e1,e2,e3`. Multiple terms are `OR`'ed, i.e. the
1068
+ matching result sets are combined.
1027
1069
 
1028
1070
 
1029
1071
  All filters can accept multiple terms unless stated otherwise below.
1030
1072
 
1031
1073
 
1032
- Multiple filters can also be combined. E.g. Restrict results to small
1033
- user organisations in the N postcode area:
1074
+ Filters can also be combined. E.g. Restrict results to small user
1075
+ organisations in the N postcode area:
1034
1076
  `su_organisation_indicator=Y&postcode_area=n`. Multiple filters are
1035
- <code>AND</code>'ed, i.e. each additional filter narrows the result set.
1077
+ `AND`'ed, i.e. each additional filter narrows the result set.
1036
1078
 
1037
1079
 
1038
1080
  A maximum of **10** terms are allowed across all filters.
@@ -1041,21 +1083,20 @@ paths:
1041
1083
  ## Biases
1042
1084
 
1043
1085
 
1044
- You can boost certain addresses results that correspond with a certain
1045
- address attribute. All bias searches are prefixed with `bias_`.
1086
+ You can boost certain addresses results that match specific address
1087
+ criteria. All bias searches are prefixed with `bias_`.
1046
1088
 
1047
1089
 
1048
- Biased searches, unlike filtered searches, also allow unmatched
1049
- addresses to appear. These will rank lower.
1090
+ Biasing (unlike filtering) also allow unmatched addresses to appear with
1091
+ lower precedence.
1050
1092
 
1051
1093
 
1052
1094
  For instance, can boost addresses with postcode areas `SW` and `SE` by
1053
1095
  appending `bias_postcode_area=SW,SE`.
1054
1096
 
1055
1097
 
1056
- No bias effect applies to bias terms that are invalid.
1057
-
1058
- e.g. `bias_postcode=SW1A2AAA`
1098
+ No bias effect applies to bias terms that are invalid. e.g.
1099
+ `bias_postcode=SW1A2AAA`
1059
1100
 
1060
1101
 
1061
1102
  You may scope using multiple terms for the same bias with a comma
@@ -1119,7 +1160,6 @@ paths:
1119
1160
  - name: api_key
1120
1161
  in: query
1121
1162
  style: form
1122
- required: true
1123
1163
  explode: false
1124
1164
  schema:
1125
1165
  $ref: '#/components/schemas/ApiKeyParam'
@@ -1287,16 +1327,22 @@ paths:
1287
1327
  application/json:
1288
1328
  schema:
1289
1329
  $ref: '#/components/schemas/AutocompleteResponse'
1330
+ '400':
1331
+ description: Bad Request
1332
+ content:
1333
+ application/json:
1334
+ schema:
1335
+ $ref: '#/components/schemas/BadRequestResponse'
1290
1336
  x-codeSamples:
1291
1337
  - lang: http
1292
1338
  label: URL
1293
1339
  source: >
1294
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing
1340
+ https://api.addresszen.com/v1/autocomplete/addresses?api_key=iddqd&q=10%20downing
1295
1341
  - lang: cURL
1296
1342
  label: CLI
1297
1343
  source: >
1298
1344
  curl -k -G
1299
- 'https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses' \
1345
+ 'https://api.addresszen.com/v1/autocomplete/addresses' \
1300
1346
  -d 'api_key=iddqd' \
1301
1347
  --data-urlencode 'query=10 downing'
1302
1348
  /autocomplete/addresses/{address}/gbr:
@@ -1323,7 +1369,6 @@ paths:
1323
1369
  type: string
1324
1370
  - name: api_key
1325
1371
  in: query
1326
- required: true
1327
1372
  style: form
1328
1373
  explode: false
1329
1374
  schema:
@@ -1346,12 +1391,12 @@ paths:
1346
1391
  - lang: http
1347
1392
  label: URL
1348
1393
  source: >
1349
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1394
+ https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1350
1395
  - lang: cURL
1351
1396
  label: CLI
1352
1397
  source: >
1353
1398
  curl -k -G
1354
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1399
+ https://api.addresszen.com/v1/autocomplete/addresses/paf_23747771/gbr?api_key=iddqd
1355
1400
  \
1356
1401
  -d "api_key=iddqd"
1357
1402
  /autocomplete/addresses/{address}/usa:
@@ -1378,7 +1423,6 @@ paths:
1378
1423
  type: string
1379
1424
  - name: api_key
1380
1425
  in: query
1381
- required: true
1382
1426
  style: form
1383
1427
  explode: false
1384
1428
  schema:
@@ -1401,12 +1445,12 @@ paths:
1401
1445
  - lang: http
1402
1446
  label: URL
1403
1447
  source: >
1404
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1448
+ https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1405
1449
  - lang: cURL
1406
1450
  label: CLI
1407
1451
  source: >
1408
1452
  curl -k -G
1409
- https://api.ideal-postcodes.co.uk/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1453
+ https://api.addresszen.com/v1/autocomplete/addresses/usps_Z222446599|1||1101/usa?api_key=iddqd
1410
1454
  \
1411
1455
  -d "api_key=iddqd"
1412
1456
  /addresses:
@@ -1434,6 +1478,14 @@ paths:
1434
1478
  for speed and address completion.
1435
1479
 
1436
1480
 
1481
+ ## Reverse Geocoding
1482
+
1483
+
1484
+ Return a list of addresses around a point using the lon= and lat=
1485
+ querystring arguments. Addresses will be sorted in order of distance to
1486
+ the point. The search radius is 100m.
1487
+
1488
+
1437
1489
  ## Filters
1438
1490
 
1439
1491
 
@@ -1568,6 +1620,18 @@ paths:
1568
1620
  explode: false
1569
1621
  schema:
1570
1622
  $ref: '#/components/schemas/FilterParam'
1623
+ - name: lon
1624
+ in: query
1625
+ style: form
1626
+ explode: false
1627
+ schema:
1628
+ $ref: '#/components/schemas/AddressLongitudeParam'
1629
+ - name: lat
1630
+ in: query
1631
+ style: form
1632
+ explode: false
1633
+ schema:
1634
+ $ref: '#/components/schemas/AddressLatitudeParam'
1571
1635
  - name: postcode_outward
1572
1636
  in: query
1573
1637
  style: form
@@ -1683,15 +1747,27 @@ paths:
1683
1747
  application/json:
1684
1748
  schema:
1685
1749
  $ref: '#/components/schemas/AddressResponse'
1750
+ '400':
1751
+ description: Bad Request
1752
+ content:
1753
+ application/json:
1754
+ schema:
1755
+ $ref: '#/components/schemas/BadRequestResponse'
1756
+ '404':
1757
+ description: Postcode Not Found
1758
+ content:
1759
+ application/json:
1760
+ schema:
1761
+ $ref: '#/components/schemas/PostcodeNotFoundResponse'
1686
1762
  x-codeSamples:
1687
1763
  - lang: http
1688
1764
  label: URL
1689
1765
  source: >
1690
- https://api.ideal-postcodes.co.uk/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london
1766
+ https://api.addresszen.com/v1/addresses?api_key=iddqd&query=10%20downing%20street%20london
1691
1767
  - lang: cURL
1692
1768
  label: CLI
1693
1769
  source: |
1694
- curl -k -G 'https://api.ideal-postcodes.co.uk/v1/addresses' \
1770
+ curl -k -G 'https://api.addresszen.com/v1/addresses' \
1695
1771
  -d 'api_key=iddqd' \
1696
1772
  --data-urlencode 'query=10 downing street london'
1697
1773
  /keys/{key}/licensees:
@@ -1721,7 +1797,6 @@ paths:
1721
1797
  format: int32
1722
1798
  - name: user_token
1723
1799
  in: query
1724
- required: true
1725
1800
  style: form
1726
1801
  explode: false
1727
1802
  schema:
@@ -1749,6 +1824,12 @@ paths:
1749
1824
  application/json:
1750
1825
  schema:
1751
1826
  $ref: '#/components/schemas/LicenseesResponse'
1827
+ '400':
1828
+ description: Bad Request
1829
+ content:
1830
+ application/json:
1831
+ schema:
1832
+ $ref: '#/components/schemas/BadRequestResponse'
1752
1833
  post:
1753
1834
  tags:
1754
1835
  - Licensees
@@ -1765,7 +1846,6 @@ paths:
1765
1846
  $ref: '#/components/schemas/ApiKeyParam'
1766
1847
  - name: user_token
1767
1848
  in: query
1768
- required: true
1769
1849
  style: form
1770
1850
  explode: false
1771
1851
  schema:
@@ -1783,6 +1863,12 @@ paths:
1783
1863
  application/json:
1784
1864
  schema:
1785
1865
  $ref: '#/components/schemas/LicenseeResponse'
1866
+ '400':
1867
+ description: Bad Request
1868
+ content:
1869
+ application/json:
1870
+ schema:
1871
+ $ref: '#/components/schemas/BadRequestResponse'
1786
1872
  /keys/{key}/licensees/{licensee}:
1787
1873
  get:
1788
1874
  tags:
@@ -1807,7 +1893,6 @@ paths:
1807
1893
  $ref: '#/components/schemas/LicenseeParam'
1808
1894
  - name: user_token
1809
1895
  in: query
1810
- required: true
1811
1896
  style: form
1812
1897
  explode: false
1813
1898
  schema:
@@ -1820,6 +1905,12 @@ paths:
1820
1905
  application/json:
1821
1906
  schema:
1822
1907
  $ref: '#/components/schemas/LicenseeResponse'
1908
+ '400':
1909
+ description: Bad Request
1910
+ content:
1911
+ application/json:
1912
+ schema:
1913
+ $ref: '#/components/schemas/BadRequestResponse'
1823
1914
  delete:
1824
1915
  tags:
1825
1916
  - Licensees
@@ -1845,7 +1936,6 @@ paths:
1845
1936
  $ref: '#/components/schemas/LicenseeParam'
1846
1937
  - name: user_token
1847
1938
  in: query
1848
- required: true
1849
1939
  style: form
1850
1940
  explode: false
1851
1941
  schema:
@@ -1882,6 +1972,12 @@ paths:
1882
1972
  type: string
1883
1973
  enum:
1884
1974
  - Success
1975
+ '400':
1976
+ description: Bad Request
1977
+ content:
1978
+ application/json:
1979
+ schema:
1980
+ $ref: '#/components/schemas/BadRequestResponse'
1885
1981
  put:
1886
1982
  tags:
1887
1983
  - Licensees
@@ -1905,7 +2001,6 @@ paths:
1905
2001
  $ref: '#/components/schemas/LicenseeParam'
1906
2002
  - name: user_token
1907
2003
  in: query
1908
- required: true
1909
2004
  style: form
1910
2005
  explode: false
1911
2006
  schema:
@@ -1923,6 +2018,12 @@ paths:
1923
2018
  application/json:
1924
2019
  schema:
1925
2020
  $ref: '#/components/schemas/LicenseeResponse'
2021
+ '400':
2022
+ description: Bad Request
2023
+ content:
2024
+ application/json:
2025
+ schema:
2026
+ $ref: '#/components/schemas/BadRequestResponse'
1926
2027
  /keys/{key}/configs:
1927
2028
  get:
1928
2029
  tags:
@@ -1940,7 +2041,6 @@ paths:
1940
2041
  $ref: '#/components/schemas/ApiKeyParam'
1941
2042
  - name: user_token
1942
2043
  in: query
1943
- required: true
1944
2044
  style: form
1945
2045
  explode: false
1946
2046
  schema:
@@ -1980,7 +2080,6 @@ paths:
1980
2080
  $ref: '#/components/schemas/ApiKeyParam'
1981
2081
  - name: user_token
1982
2082
  in: query
1983
- required: true
1984
2083
  style: form
1985
2084
  explode: false
1986
2085
  schema:
@@ -2075,7 +2174,6 @@ paths:
2075
2174
  $ref: '#/components/schemas/ConfigParam'
2076
2175
  - name: user_token
2077
2176
  in: query
2078
- required: true
2079
2177
  style: form
2080
2178
  explode: false
2081
2179
  schema:
@@ -2153,7 +2251,6 @@ paths:
2153
2251
  $ref: '#/components/schemas/ConfigParam'
2154
2252
  - name: user_token
2155
2253
  in: query
2156
- required: true
2157
2254
  style: form
2158
2255
  explode: false
2159
2256
  schema:
@@ -2191,7 +2288,11 @@ paths:
2191
2288
  $ref: '#/components/schemas/NotFoundResponse'
2192
2289
  components:
2193
2290
  schemas:
2194
- Postcode:
2291
+ ecaf:
2292
+ $ref: '#/components/schemas/EcafAddress'
2293
+ ecad:
2294
+ $ref: '#/components/schemas/EcadAddress'
2295
+ paf_postcode:
2195
2296
  title: Postcode
2196
2297
  type: string
2197
2298
  description: Correctly formatted postcode. Capitalised and spaced.
@@ -2230,7 +2331,147 @@ components:
2230
2331
  minimum: 0
2231
2332
  default: 0
2232
2333
  example: 0
2233
- PostcodeOutward:
2334
+ ID:
2335
+ title: ID
2336
+ type: string
2337
+ description: Global unique internally generated identifier for an address
2338
+ example: paf_8387729
2339
+ paf_dataset:
2340
+ title: Dataset
2341
+ type: string
2342
+ description: Indicates the provenance of an address
2343
+ paf_country_iso:
2344
+ title: ISO Country Code (3)
2345
+ type: string
2346
+ description: |2
2347
+ 3 letter country code (ISO 3166-1)
2348
+ paf_country_iso_2:
2349
+ title: ISO Country Code (2)
2350
+ type: string
2351
+ description: |2
2352
+ 2 letter country code (ISO 3166-1)
2353
+ paf_country:
2354
+ title: Country
2355
+ type: string
2356
+ description: |2
2357
+ Full country names (ISO 3166)
2358
+ example: England
2359
+ paf_language:
2360
+ title: Language
2361
+ type: string
2362
+ description: |
2363
+ Language represented by 2 letter ISO Code (639-1)
2364
+ paf_line1:
2365
+ title: Line 1
2366
+ type: string
2367
+ description: >-
2368
+ First Address Line. Often contains premise and thoroughfare information.
2369
+ In the case of a commercial premise, the first line is always the full
2370
+ name of the registered organisation. Never empty.
2371
+ example: Prime Minister &amp; First Lord of Treasury
2372
+ paf_line2:
2373
+ title: Line 2
2374
+ type: string
2375
+ description: >-
2376
+ Second Address Line. Often contains thoroughfare and locality
2377
+ information. May be empty
2378
+ example: 10 Downing Street
2379
+ paf_line3:
2380
+ title: Line 3
2381
+ type: string
2382
+ description: Third address line. May be empty.
2383
+ example: ''
2384
+ paf_post_town:
2385
+ title: Post Town
2386
+ type: string
2387
+ description: >-
2388
+ A Post Town is mandatory for delivery of mail to a Delivery Point. This
2389
+ is not necessarily the nearest town geographically, but a routing
2390
+ instruction to the Royal Mail delivery office sorting mail for that
2391
+ Delivery Point. A Post Town will always be present in every address, and
2392
+ for some Localities the Post Town will be the only locality element
2393
+ present.
2394
+ maxLength: 30
2395
+ example: London
2396
+ paf_county:
2397
+ title: County
2398
+ type: string
2399
+ description: >-
2400
+ Since postal, administrative or traditional counties may not apply to
2401
+ some addresses, the county field is designed to return whatever county
2402
+ data is available. Normally, the postal county is returned. If this is
2403
+ not present, the county field will fall back to the administrative
2404
+ county. If the administrative county is also not present, the county
2405
+ field will fall back to the traditional county. May be empty in cases
2406
+ where no administrative, postal or traditional county present.
2407
+ example: London
2408
+ paf_uprn:
2409
+ title: Unique Property Reference Number
2410
+ type: string
2411
+ description: >-
2412
+ UPRN stands for Unique Property Reference Number and is maintained by
2413
+ the Ordnance Survey (OS). Local governments in the UK have allocated a
2414
+ unique number for each land or property.
2415
+
2416
+
2417
+ Up to 12 digits in length.
2418
+
2419
+
2420
+ Multiple Residence premises currently share the same UPRN as the parent
2421
+ premise.
2422
+
2423
+
2424
+ May not be available for a small number of Great Britain addresses due
2425
+ to longer update cycles for Ordnance Survey's AddressBase datasets.
2426
+ Returns empty string "" in these instances.
2427
+
2428
+
2429
+ Although UPRN takes an integer format, we encode and transmit this data
2430
+ as strings. As a 12 digit number, the UPRN can exceed the maximum safe
2431
+ integer `Number.MAX_SAFE_INTEGER` in most browsers causing this
2432
+ datapoint to be corrupted.
2433
+
2434
+
2435
+ Take special care when storing UPRN. As a 12 digit identifier, you will
2436
+ need 64 bits to encode every possible UPRN value. This means
2437
+ applications like Excel will corrupt cells containing UPRN values.
2438
+ paf_udprn:
2439
+ title: Unique Delivery Point Reference Number (UDPRN)
2440
+ type: integer
2441
+ format: int32
2442
+ description: >-
2443
+ UDPRN stands for ‘Unique Delivery Point Reference Number’. Royal Mail
2444
+ assigns a unique UDPRN code for each premise on PAF. Simple, unique
2445
+ reference number for each Delivery Point. Unlikely to be reused when an
2446
+ address expires.
2447
+
2448
+
2449
+ Up to 8-digit numeric code.
2450
+
2451
+
2452
+ A new UDPRN is automatically assigned to each new Delivery Point added
2453
+ to PAF.
2454
+ example: 23747771
2455
+ paf_umprn:
2456
+ title: UMPRN
2457
+ description: >-
2458
+ A small minority of individual premises (as identified by a UDPRN) may
2459
+ have multiple occupants behind the same letterbox. These are known as
2460
+ Multiple Residence occupants and can be queried via the Multiple
2461
+ Residence dataset. Simple, unique reference number for each Multiple
2462
+ Residence occupant.
2463
+
2464
+
2465
+ Note: this will be an empty string `""` when not used.
2466
+ oneOf:
2467
+ - type: string
2468
+ description: If premise is not multiple occupancy, this will be an empty string
2469
+ - type: number
2470
+ description: If premise is multiple occupancy, this will be an integer
2471
+ example: 983729
2472
+ minimum: 0
2473
+ maximum: 99999999
2474
+ paf_postcode_outward:
2234
2475
  title: Postcode Outward
2235
2476
  type: string
2236
2477
  description: >-
@@ -2242,30 +2483,21 @@ components:
2242
2483
  maxLength: 4
2243
2484
  minLength: 2
2244
2485
  example: SW1A
2245
- PostcodeInward:
2486
+ paf_postcode_inward:
2246
2487
  title: Postcode Inward
2247
2488
  type: string
2248
2489
  description: >-
2249
- The second part of a postcode is known as the inward Code. e.g. The
2250
- inward code of ID1 1QD is 1QD. This part is one number followed by two
2251
- letters. The number identifies the sector in the postal district. The
2252
- letters then define one or more properties in that sector.
2490
+ The second part of a postcode is known as the inward code. e.g. The
2491
+ inward code of ID1 1QD is 1QD.
2492
+
2493
+
2494
+ The number identifies the sector in the postal district. The number is
2495
+ followed by 2 letters. The letters then define one or more properties in
2496
+ that sector.
2253
2497
  maxLength: 3
2254
2498
  minLength: 3
2255
2499
  example: 2AA
2256
- PostTown:
2257
- title: Post Town
2258
- type: string
2259
- description: >-
2260
- A Post Town is mandatory for delivery of mail to a Delivery Point. This
2261
- is not necessarily the nearest town geographically, but a routing
2262
- instruction to the Royal Mail delivery office sorting mail for that
2263
- Delivery Point. A Post Town will always be present in every address, and
2264
- for some Localities the Post Town will be the only locality element
2265
- present.
2266
- maxLength: 30
2267
- example: London
2268
- DependantLocality:
2500
+ paf_dependant_locality:
2269
2501
  title: Dependant Locality
2270
2502
  type: string
2271
2503
  description: >-
@@ -2275,7 +2507,7 @@ components:
2275
2507
  find 1 Back Lane in Huddersfield we see that there are three.
2276
2508
  maxLength: 35
2277
2509
  example: ''
2278
- DoubleDependantLocality:
2510
+ paf_double_dependant_locality:
2279
2511
  title: Double Dependant Locality
2280
2512
  type: string
2281
2513
  description: >-
@@ -2284,7 +2516,7 @@ components:
2284
2516
  exists twice in the same locality.
2285
2517
  maxLength: 35
2286
2518
  example: ''
2287
- Thoroughfare:
2519
+ paf_thoroughfare:
2288
2520
  title: Thoroughfare
2289
2521
  type: string
2290
2522
  description: >-
@@ -2295,7 +2527,7 @@ components:
2295
2527
  the road.
2296
2528
  maxLength: 80
2297
2529
  example: Downing Street
2298
- DependantThoroughfare:
2530
+ paf_dependant_thoroughfare:
2299
2531
  title: Dependant Thoroughfare
2300
2532
  type: string
2301
2533
  description: >-
@@ -2304,21 +2536,28 @@ components:
2304
2536
  indentify a delivery point.
2305
2537
  maxLength: 80
2306
2538
  example: ''
2307
- BuildingNumber:
2539
+ paf_building_number:
2308
2540
  title: Building Number
2309
2541
  type: string
2310
2542
  description: Number to identify premise on a thoroughfare or dependant thoroughfare.
2311
2543
  maxLength: 4
2312
2544
  example: '10'
2313
- BuildingName:
2545
+ paf_building_name:
2314
2546
  title: Building Name
2315
2547
  type: string
2316
- description: >-
2317
- Name of residential or commercial premise. E.g. The Manor, 1-2, A, 12A,
2318
- K, Victoria House
2548
+ description: |-
2549
+ Name of residential or commercial premise.
2550
+
2551
+ Examples:
2552
+ - The Manor
2553
+ - 1-2
2554
+ - A
2555
+ - 12A
2556
+ - K
2557
+ - Victoria House
2319
2558
  maxLength: 50
2320
2559
  example: ''
2321
- SubBuildingName:
2560
+ paf_sub_building_name:
2322
2561
  title: Sub-Building Name
2323
2562
  type: string
2324
2563
  description: >-
@@ -2326,8 +2565,8 @@ components:
2326
2565
  or business units. Cannot be present without either building_name or
2327
2566
  building_number. E.g. Flat 1, A, 10B
2328
2567
  maxLength: 30
2329
- example: ''
2330
- POBox:
2568
+ example: Flat 1
2569
+ paf_pobox:
2331
2570
  title: PO Box
2332
2571
  type: string
2333
2572
  description: >-
@@ -2336,8 +2575,8 @@ components:
2336
2575
  occasionally consist of a combination of numbers and letters. PO Box
2337
2576
  Numbers are only allocated to Large Users.
2338
2577
  maxLength: 6
2339
- example: HK860
2340
- DepartmentName:
2578
+ example: '100'
2579
+ paf_department_name:
2341
2580
  title: Department Name
2342
2581
  type: string
2343
2582
  description: >-
@@ -2345,69 +2584,41 @@ components:
2345
2584
  organisation.
2346
2585
  maxLength: 60
2347
2586
  example: ''
2348
- OrganisationName:
2587
+ paf_organisation_name:
2349
2588
  title: Organisation Name
2350
2589
  type: string
2351
2590
  description: >-
2352
2591
  Used to supplment Organisation Name to identify a deparment within the
2353
- organisation.
2592
+ organisation
2354
2593
  maxLength: 60
2355
2594
  example: Prime Minister &amp; First Lord Of The Treasury
2356
- UDPRN:
2357
- title: Unique Delivery Point Reference Number (UDPRN)
2358
- type: integer
2359
- format: int32
2360
- description: >-
2361
- UDPRN stands for ‘Unique Delivery Point Reference Number’. Royal Mail
2362
- assigns a unique UDPRN code for each premise on PAF. Simple, unique
2363
- reference number for each Delivery Point. Unlikely to be reused when an
2364
- address expires. Up to 8-digit numeric code. A new UDPRN is
2365
- automatically assigned to each new Delivery Point added to PAF.
2366
- example: 23747771
2367
- UMPRN:
2368
- title: UMPRN
2369
- description: >-
2370
- A small minority of individual premises (as identified by a UDPRN) may
2371
- have multiple occupants behind the same letterbox. These are known as
2372
- Multiple Residence occupants and can be queried via the Multiple
2373
- Residence dataset. Simple, unique reference number for each Multiple
2374
- Residence occupant. 8-character numeric code. Note: this will be an
2375
- empty string `""` when not used for legacy reasons
2376
- oneOf:
2377
- - type: string
2378
- description: If premise is not multiple occupancy, this will be an empty string
2379
- enum:
2380
- - ''
2381
- - type: number
2382
- description: If premise is multiple occupancy, this will be an integer
2383
- example: 983729
2384
- minimum: 0
2385
- maximum: 99999999
2386
- PostcodeType:
2387
- title: Postcode Type
2388
- enum:
2389
- - S
2390
- - L
2391
- type: string
2595
+ paf_postcode_type:
2596
+ title: Postcode Type
2597
+ enum:
2598
+ - S
2599
+ - L
2600
+ type: string
2392
2601
  description: >-
2393
2602
  This indicates the type of user. It can only take the values 'S' or 'L'
2394
2603
  indicating small or large respectively. Large User Postcodes. These are
2395
2604
  assigned to one single address either due to the large volume of mail
2396
2605
  received at that address, or because a PO Box or Selectapost service has
2397
2606
  been set up. Small User Postcodes. These identify a group of Delivery
2398
- Points. On average there are 15 Delivery Points per Postcode. However
2399
- this can vary between 1 and, in some cases, 100. There will never be
2400
- more than 100 Delivery Points on a Postcode.
2401
- example: S
2402
- SuOrganisationIndicator:
2607
+ Points.
2608
+
2609
+
2610
+ On average there are 15 Delivery Points per Postcode. However this can
2611
+ vary between 1 and, in some cases, 100. There will never be more than
2612
+ 100 Delivery Points on a Postcode.
2613
+ paf_su_organisation_indicator:
2403
2614
  title: Small User Organisation Indicator
2404
2615
  type: string
2405
2616
  description: >-
2406
2617
  Small User Organisation Indicator can have the values 'Y' or space. A
2407
2618
  value of 'Y' indicates that a Small User Organisation is present at this
2408
2619
  address.
2409
- example: ''
2410
- DeliveryPointSuffix:
2620
+ example: 'Y'
2621
+ paf_delivery_point_suffix:
2411
2622
  title: Delivery Point Suffix
2412
2623
  type: string
2413
2624
  description: >-
@@ -2417,29 +2628,9 @@ components:
2417
2628
  deleted from PAF the DPS may be reused (although they aren’t reused
2418
2629
  until all remaining Delivery Points in the range have been allocated).
2419
2630
  The DPS for a Large User is always '1A' as each Large User has its own
2420
- Postcode. E.g. 2B
2631
+ Postcode.
2421
2632
  example: 1A
2422
- Line1:
2423
- title: Line 1
2424
- type: string
2425
- description: >-
2426
- First Address Line. Often contains premise and thoroughfare information.
2427
- In the case of a commercial premise, the first line is always the full
2428
- name of the registered organisation. Never empty.
2429
- example: Prime Minister &amp; First Lord of Treasury
2430
- Line2:
2431
- title: Line 2
2432
- type: string
2433
- description: >-
2434
- Second Address Line. Often contains thoroughfare and locality
2435
- information. May be empty.
2436
- example: 10 Downing Street
2437
- Line3:
2438
- title: Line 3
2439
- type: string
2440
- description: Third address line. May be empty.
2441
- example: ''
2442
- Premise:
2633
+ paf_premise:
2443
2634
  title: Premise
2444
2635
  type: string
2445
2636
  description: >-
@@ -2454,78 +2645,63 @@ components:
2454
2645
  using our address lines data.
2455
2646
  maxLength: 84
2456
2647
  example: '10'
2457
- Country:
2458
- title: Country
2459
- type: string
2460
- description: >-
2461
- The country for which the postcode belongs to. May be empty for a small
2462
- number of addresses.
2463
- example: England
2464
- County:
2465
- title: County
2466
- type: string
2467
- description: >-
2468
- Since postal, administrative or traditional counties may not apply to
2469
- some addresses, the county field is designed to return whatever county
2470
- data is available. Normally, the postal county is returned. If this is
2471
- not present, the county field will fall back to the administrative
2472
- county. If the administrative county is also not present, the county
2473
- field will fall back to the traditional county. May be empty in cases
2474
- where no administrative, postal or traditional county present.
2475
- example: London
2476
- AdministrativeCounty:
2648
+ paf_administrative_county:
2477
2649
  title: Administrative County
2478
2650
  type: string
2479
2651
  description: >-
2480
2652
  The current administrative county to which the postcode has been
2481
- assigned. A Unitary Authority name, where one is present. If there is no
2482
- Unitary Authority, the County name is used. This information is not
2483
- static, because County boundaries may change due to administrative
2484
- changes. Data source: ONS. May be empty.
2653
+ assigned.
2654
+
2655
+
2656
+ A Unitary Authority name, where one is present. If there is no Unitary
2657
+ Authority, the County name is used. This information is not static,
2658
+ because County boundaries may change due to administrative changes. Data
2659
+
2660
+
2661
+ source: ONS
2485
2662
  example: ''
2486
- PostalCounty:
2663
+ paf_postal_county:
2487
2664
  title: Postal County
2488
2665
  type: string
2489
2666
  description: >-
2490
2667
  Postal counties were used for the distribution of mail before the
2491
2668
  Postcode system was introduced in the 1970s. The Former Postal County
2492
- was the Administrative County at the time. This data rarely changes.
2493
- Data source: Royal Mail. May be empty.
2669
+ was the Administrative County at the time. This data rarely changes. May
2670
+ be empty.
2494
2671
  example: London
2495
- TraditionalCounty:
2672
+ paf_traditional_county:
2496
2673
  title: Traditional County
2497
2674
  type: string
2498
2675
  description: >-
2499
2676
  Traditional counties are provided by the Association of British
2500
- Counties. It’s historical data, and can date from the 1800s. Data
2501
- source: Royal Mail. May be empty.
2677
+ Counties. It is historical data, and can date from the 1800s. May be
2678
+ empty.
2502
2679
  example: Greater London
2503
- District:
2680
+ paf_district:
2504
2681
  title: District
2505
2682
  type: string
2506
2683
  description: >-
2507
2684
  The current district/unitary authority to which the postcode has been
2508
- assigned. Data source: ONS
2685
+ assigned.
2509
2686
  example: Westminster
2510
- Ward:
2687
+ paf_ward:
2511
2688
  title: Ward
2512
2689
  type: string
2513
2690
  description: >-
2514
2691
  The current administrative/electoral area to which the postcode has been
2515
- assigned. May be empty for a small number of addresses. Data source: ONS
2692
+ assigned. May be empty for a small number of addresses.
2516
2693
  example: St. James'
2517
2694
  Longitude:
2518
2695
  title: Longitude
2519
- description: >-
2520
- The longitude of the postcode (WGS84/ETRS89). Accurate at the postcode
2521
- level Can be a positive or negative decimal. E.g. -0.1283983 Returns an
2522
- empty string if no location data is available. Otherwise, a number is
2523
- returned
2696
+ description: |-
2697
+ The longitude of the postcode (WGS84/ETRS89).
2698
+
2699
+ Can be a positive or negative decimal. E.g. -0.1283983
2700
+
2701
+ Returns an empty string if no location data is available.
2524
2702
  oneOf:
2525
2703
  - type: string
2526
2704
  description: Empty string `""` if not available
2527
- enum:
2528
- - ''
2529
2705
  - type: number
2530
2706
  description: Represents longitude
2531
2707
  example: 0.002823
@@ -2533,16 +2709,15 @@ components:
2533
2709
  maximum: 180
2534
2710
  Latitude:
2535
2711
  title: Longitude
2536
- description: >-
2537
- The latitude of the postcode (WGS84/ETRS89). Accurate at the postcode
2538
- level Can be a positive or negative decimal. E.g. 51.5083983 Returns an
2539
- empty string if no location data is available. Otherwise a number is
2540
- returned.
2712
+ description: |-
2713
+ The latitude of the postcode (WGS84/ETRS89).
2714
+
2715
+ Can be a positive or negative decimal. E.g. `51.5083983`.
2716
+
2717
+ Returns an empty string if no location data is available.
2541
2718
  oneOf:
2542
2719
  - type: string
2543
2720
  description: Empty string `""` if not available
2544
- enum:
2545
- - ''
2546
2721
  - type: number
2547
2722
  description: Represents latitude
2548
2723
  example: 52.938278
@@ -2552,86 +2727,51 @@ components:
2552
2727
  title: Eastings
2553
2728
  description: >-
2554
2729
  Eastings reference using the [Ordnance Survey National Grid reference
2555
- system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid)
2730
+ system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid).
2731
+
2732
+
2556
2733
  Northern Ireland Eastings uses the [Irish Grid Reference
2557
- System](https://en.wikipedia.org/wiki/Irish_grid_reference_system)
2558
- Metres from origin. E.g. 550458 Returns an empty string if no location
2559
- data is available. Otherwise a number is returned
2734
+ System](https://en.wikipedia.org/wiki/Irish_grid_reference_system).
2735
+
2736
+
2737
+ Metres from origin. E.g. `550458`
2738
+
2739
+
2740
+ Returns an empty string if no location data is available. Otherwise a
2741
+ number is returned.
2560
2742
  oneOf:
2561
2743
  - type: string
2562
2744
  description: Empty string `""` if not available
2563
- enum:
2564
- - ''
2565
2745
  - type: number
2566
2746
  description: Metres offset east from origin
2567
2747
  example: 9382
2568
2748
  minimum: 0
2569
2749
  maximum: 999999
2570
2750
  Northings:
2571
- title: Eastings
2751
+ title: Northings
2572
2752
  description: >-
2573
2753
  Northings reference using the [Ordnance Survey National Grid reference
2574
2754
  system](https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid)
2755
+
2756
+
2575
2757
  Northern Ireland Northings uses the [Irish Grid Reference
2576
2758
  System](https://en.wikipedia.org/wiki/Irish_grid_reference_system)
2577
- Metres from origin. E.g. 180458 Returns an empty string if no location
2578
- data is available. Otherwise a number is returned
2759
+
2760
+
2761
+ Metres from origin. E.g. `180458`
2762
+
2763
+
2764
+ Returns an empty string if no location data is available. Otherwise a
2765
+ number is returned
2579
2766
  oneOf:
2580
2767
  - type: string
2581
2768
  description: Empty string `""` if not available
2582
- enum:
2583
- - ''
2584
2769
  - type: number
2585
2770
  description: Metres offset north from origin
2586
2771
  example: 123932
2587
2772
  minimum: 0
2588
2773
  maximum: 999999
2589
- UPRN:
2590
- title: Unique Delivery Point Reference Number (UDPRN)
2591
- type: string
2592
- description: >-
2593
- UPRN stands for Unique Property Reference Number and is maintained by
2594
- the Ordnance Survey (OS). Local governments in the UK have allocated a
2595
- unique number for each land or property. See our UPRN guide for more
2596
- information. Up to 12 digits in length. Multiple Residence premises
2597
- currently share the same UPRN as the parent premise. May not be
2598
- available for a small number of Great Britain addresses due to longer
2599
- update cycles for Ordnance Survey's AddressBase datasets. Returns empty
2600
- string "" in these instances. Although UPRN takes an integer format, we
2601
- encode and transmit this data as strings. As a 12 digit number, the UPRN
2602
- can exceed the maximum safe integer (Number.MAX_SAFE_INTEGER) in most
2603
- browsers causing this datapoint to be corrupted. Take special care when
2604
- storing UPRN. As a 12 digit identifier, you will need 64 bits to encode
2605
- every possible UPRN value.
2606
- ID:
2607
- title: ID
2608
- type: string
2609
- description: Global unique internally generated identifier for an address.
2610
- example: paf_8387729
2611
- Dataset:
2612
- title: Dataset
2613
- type: string
2614
- description: Indicates the provenance of an address
2615
- enum:
2616
- - paf
2617
- - mr
2618
- - nyb
2619
- - usps
2620
- CountryISO:
2621
- title: ISO Country Code
2622
- type: string
2623
- description: 3 letter ISO country code
2624
- enum:
2625
- - GBR
2626
- - IMN
2627
- - JEY
2628
- - GGY
2629
- - USA
2630
- - PRI
2631
- - GUM
2632
- PafAddress:
2633
- title: Postcode Address File Address
2634
- description: Standard UK Address.
2774
+ PafBase:
2635
2775
  required:
2636
2776
  - postcode
2637
2777
  - postcode_outward
@@ -2668,70 +2808,90 @@ components:
2668
2808
  - northings
2669
2809
  - uprn
2670
2810
  - county
2811
+ - county_code
2671
2812
  - id
2672
2813
  - dataset
2673
2814
  - country_iso
2815
+ - country_iso_2
2816
+ - language
2674
2817
  properties:
2818
+ id:
2819
+ $ref: '#/components/schemas/ID'
2820
+ dataset:
2821
+ $ref: '#/components/schemas/paf_dataset'
2822
+ country_iso:
2823
+ $ref: '#/components/schemas/paf_country_iso'
2824
+ country_iso_2:
2825
+ $ref: '#/components/schemas/paf_country_iso_2'
2826
+ country:
2827
+ $ref: '#/components/schemas/paf_country'
2828
+ language:
2829
+ $ref: '#/components/schemas/paf_language'
2830
+ line_1:
2831
+ $ref: '#/components/schemas/paf_line1'
2832
+ line_2:
2833
+ $ref: '#/components/schemas/paf_line2'
2834
+ line_3:
2835
+ $ref: '#/components/schemas/paf_line3'
2836
+ post_town:
2837
+ $ref: '#/components/schemas/paf_post_town'
2675
2838
  postcode:
2676
- $ref: '#/components/schemas/Postcode'
2839
+ $ref: '#/components/schemas/paf_postcode'
2840
+ county:
2841
+ $ref: '#/components/schemas/paf_county'
2842
+ county_code:
2843
+ title: County Code
2844
+ type: string
2845
+ description: Short code representing the county or province. May be empty (`""`)
2846
+ example: ''
2847
+ uprn:
2848
+ $ref: '#/components/schemas/paf_uprn'
2849
+ udprn:
2850
+ $ref: '#/components/schemas/paf_udprn'
2851
+ umprn:
2852
+ $ref: '#/components/schemas/paf_umprn'
2677
2853
  postcode_outward:
2678
- $ref: '#/components/schemas/PostcodeOutward'
2854
+ $ref: '#/components/schemas/paf_postcode_outward'
2679
2855
  postcode_inward:
2680
- $ref: '#/components/schemas/PostcodeInward'
2681
- post_town:
2682
- $ref: '#/components/schemas/PostTown'
2856
+ $ref: '#/components/schemas/paf_postcode_inward'
2683
2857
  dependant_locality:
2684
- $ref: '#/components/schemas/DependantLocality'
2858
+ $ref: '#/components/schemas/paf_dependant_locality'
2685
2859
  double_dependant_locality:
2686
- $ref: '#/components/schemas/DoubleDependantLocality'
2860
+ $ref: '#/components/schemas/paf_double_dependant_locality'
2687
2861
  thoroughfare:
2688
- $ref: '#/components/schemas/Thoroughfare'
2862
+ $ref: '#/components/schemas/paf_thoroughfare'
2689
2863
  dependant_thoroughfare:
2690
- $ref: '#/components/schemas/DependantThoroughfare'
2864
+ $ref: '#/components/schemas/paf_dependant_thoroughfare'
2691
2865
  building_number:
2692
- $ref: '#/components/schemas/BuildingNumber'
2866
+ $ref: '#/components/schemas/paf_building_number'
2693
2867
  building_name:
2694
- $ref: '#/components/schemas/BuildingName'
2868
+ $ref: '#/components/schemas/paf_building_name'
2695
2869
  sub_building_name:
2696
- $ref: '#/components/schemas/SubBuildingName'
2870
+ $ref: '#/components/schemas/paf_sub_building_name'
2697
2871
  po_box:
2698
- $ref: '#/components/schemas/POBox'
2872
+ $ref: '#/components/schemas/paf_pobox'
2699
2873
  department_name:
2700
- $ref: '#/components/schemas/DepartmentName'
2874
+ $ref: '#/components/schemas/paf_department_name'
2701
2875
  organisation_name:
2702
- $ref: '#/components/schemas/OrganisationName'
2703
- udprn:
2704
- $ref: '#/components/schemas/UDPRN'
2705
- umprn:
2706
- $ref: '#/components/schemas/UMPRN'
2876
+ $ref: '#/components/schemas/paf_organisation_name'
2707
2877
  postcode_type:
2708
- $ref: '#/components/schemas/PostcodeType'
2878
+ $ref: '#/components/schemas/paf_postcode_type'
2709
2879
  su_organisation_indicator:
2710
- $ref: '#/components/schemas/SuOrganisationIndicator'
2880
+ $ref: '#/components/schemas/paf_su_organisation_indicator'
2711
2881
  delivery_point_suffix:
2712
- $ref: '#/components/schemas/DeliveryPointSuffix'
2713
- line_1:
2714
- $ref: '#/components/schemas/Line1'
2715
- line_2:
2716
- $ref: '#/components/schemas/Line2'
2717
- line_3:
2718
- $ref: '#/components/schemas/Line3'
2882
+ $ref: '#/components/schemas/paf_delivery_point_suffix'
2719
2883
  premise:
2720
- $ref: '#/components/schemas/Premise'
2721
- country:
2722
- $ref: '#/components/schemas/Country'
2723
- county:
2724
- $ref: '#/components/schemas/County'
2884
+ $ref: '#/components/schemas/paf_premise'
2725
2885
  administrative_county:
2726
- $ref: '#/components/schemas/AdministrativeCounty'
2886
+ $ref: '#/components/schemas/paf_administrative_county'
2727
2887
  postal_county:
2728
- $ref: '#/components/schemas/PostalCounty'
2888
+ $ref: '#/components/schemas/paf_postal_county'
2729
2889
  traditional_county:
2730
- $ref: '#/components/schemas/TraditionalCounty'
2890
+ $ref: '#/components/schemas/paf_traditional_county'
2731
2891
  district:
2732
- $ref: '#/components/schemas/District'
2892
+ $ref: '#/components/schemas/paf_district'
2733
2893
  ward:
2734
- $ref: '#/components/schemas/Ward'
2894
+ $ref: '#/components/schemas/paf_ward'
2735
2895
  longitude:
2736
2896
  $ref: '#/components/schemas/Longitude'
2737
2897
  latitude:
@@ -2740,45 +2900,189 @@ components:
2740
2900
  $ref: '#/components/schemas/Eastings'
2741
2901
  northings:
2742
2902
  $ref: '#/components/schemas/Northings'
2743
- uprn:
2744
- $ref: '#/components/schemas/UPRN'
2745
- id:
2746
- $ref: '#/components/schemas/ID'
2747
- dataset:
2748
- $ref: '#/components/schemas/Dataset'
2749
- enum:
2750
- - paf
2751
- country_iso:
2752
- $ref: '#/components/schemas/CountryISO'
2753
- enum:
2754
- - GBR
2755
- - IMN
2756
- - JEY
2757
- - GGY
2903
+ PafAddress:
2904
+ title: Postcode Address File Address
2905
+ description: >-
2906
+ Standard UK Address. Also known as a Postcode Address File (PAF) address
2907
+ is defined by Royal Mail and updated on a daily cadence.
2908
+
2909
+
2910
+ A PAF Address represents a deliverable endpoint.
2911
+ allOf:
2912
+ - $ref: '#/components/schemas/PafBase'
2913
+ - type: object
2914
+ properties:
2915
+ country_iso:
2916
+ enum:
2917
+ - GBR
2918
+ - IMN
2919
+ - JEY
2920
+ - GGY
2921
+ dataset:
2922
+ type: string
2923
+ enum:
2924
+ - paf
2925
+ country_iso_2:
2926
+ enum:
2927
+ - GB
2928
+ - IM
2929
+ - JE
2930
+ - GG
2931
+ language:
2932
+ enum:
2933
+ - en
2934
+ country:
2935
+ enum:
2936
+ - England
2937
+ - Scotland
2938
+ - Wales
2939
+ - Northern Ireland
2940
+ - Jersey
2941
+ - Guernsey
2942
+ - Isle of Man
2758
2943
  MrAddress:
2759
2944
  title: Multiple Residence Address
2760
- description: >-
2761
- Subdivision of a Postcode Address File address. Does not have its own
2762
- delivery point.
2945
+ description: >
2946
+ Subdivision of a Postcode Address File address. Also known as a Multiple
2947
+ Residence or Multiple Occupancy address.
2948
+
2949
+
2950
+ A Multiple Residence address does not have its own deliverable endpoint.
2951
+ Instead it relies on the deliverable endpoint of a parent address, where
2952
+ the parent address can be found on the main Postcode Address File.
2763
2953
  allOf:
2764
- - $ref: '#/components/schemas/PafAddress'
2954
+ - $ref: '#/components/schemas/PafBase'
2765
2955
  - type: object
2766
2956
  properties:
2767
2957
  dataset:
2768
- $ref: '#/components/schemas/Dataset'
2769
2958
  enum:
2770
2959
  - mr
2960
+ country_iso:
2961
+ enum:
2962
+ - GBR
2963
+ - IMN
2964
+ - JEY
2965
+ - GGY
2966
+ country_iso_2:
2967
+ enum:
2968
+ - GB
2969
+ - IM
2970
+ - JE
2971
+ - GG
2972
+ language:
2973
+ enum:
2974
+ - en
2975
+ country:
2976
+ enum:
2977
+ - England
2978
+ - Scotland
2979
+ - Wales
2980
+ - Northern Ireland
2981
+ - Jersey
2982
+ - Guernsey
2983
+ - Isle of Man
2771
2984
  NybAddress:
2772
2985
  title: Not Yet Built Address
2773
- description: UK premise under construction
2986
+ description: |-
2987
+ A UK premise under construction and currently not occupied.
2988
+
2989
+ This dataset is updated by Royal Mail on a monthly cadence.
2774
2990
  allOf:
2775
- - $ref: '#/components/schemas/PafAddress'
2991
+ - $ref: '#/components/schemas/PafBase'
2776
2992
  - type: object
2777
2993
  properties:
2778
2994
  dataset:
2779
- $ref: '#/components/schemas/Dataset'
2780
2995
  enum:
2781
- - mr
2996
+ - nyb
2997
+ country_iso:
2998
+ enum:
2999
+ - GBR
3000
+ - IMN
3001
+ - JEY
3002
+ - GGY
3003
+ country_iso_2:
3004
+ enum:
3005
+ - GB
3006
+ - IM
3007
+ - JE
3008
+ - GG
3009
+ language:
3010
+ enum:
3011
+ - en
3012
+ country:
3013
+ enum:
3014
+ - England
3015
+ - Scotland
3016
+ - Wales
3017
+ - Northern Ireland
3018
+ - Jersey
3019
+ - Guernsey
3020
+ - Isle of Man
3021
+ PafAliasAddress:
3022
+ title: PAF Alias Address
3023
+ description: >-
3024
+ PAF Aliases addresses are alternate ways to present an address already
3025
+ found on PAF.
3026
+
3027
+
3028
+ Alias data is information the public chooses to use when addressing
3029
+ mail, but which isn’t actually required for delivery purposes. The
3030
+ Alias data contains records of alternative address details that are
3031
+ included in the address but not necessarily needed for delivery
3032
+ purposes.
3033
+ allOf:
3034
+ - $ref: '#/components/schemas/PafBase'
3035
+ - type: object
3036
+ properties:
3037
+ dataset:
3038
+ enum:
3039
+ - pafa
3040
+ country_iso:
3041
+ enum:
3042
+ - GBR
3043
+ - IMN
3044
+ - JEY
3045
+ - GGY
3046
+ country_iso_2:
3047
+ enum:
3048
+ - GB
3049
+ - IM
3050
+ - JE
3051
+ - GG
3052
+ language:
3053
+ enum:
3054
+ - en
3055
+ country:
3056
+ enum:
3057
+ - England
3058
+ - Scotland
3059
+ - Wales
3060
+ - Northern Ireland
3061
+ - Jersey
3062
+ - Guernsey
3063
+ - Isle of Man
3064
+ WelshPafAddress:
3065
+ title: Welsh PAF Address
3066
+ description: Welsh language alternative for a PAF Address
3067
+ allOf:
3068
+ - $ref: '#/components/schemas/PafBase'
3069
+ - type: object
3070
+ properties:
3071
+ dataset:
3072
+ enum:
3073
+ - pafw
3074
+ country_iso:
3075
+ enum:
3076
+ - GBR
3077
+ country_iso_2:
3078
+ enum:
3079
+ - GB
3080
+ language:
3081
+ enum:
3082
+ - cy
3083
+ country:
3084
+ enum:
3085
+ - Wales
2782
3086
  PostcodeResponse:
2783
3087
  title: Postcode Response
2784
3088
  type: object
@@ -2794,6 +3098,8 @@ components:
2794
3098
  - $ref: '#/components/schemas/PafAddress'
2795
3099
  - $ref: '#/components/schemas/MrAddress'
2796
3100
  - $ref: '#/components/schemas/NybAddress'
3101
+ - $ref: '#/components/schemas/PafAliasAddress'
3102
+ - $ref: '#/components/schemas/WelshPafAddress'
2797
3103
  description: All addresses listed at the postcode
2798
3104
  code:
2799
3105
  type: integer
@@ -2804,6 +3110,62 @@ components:
2804
3110
  type: string
2805
3111
  enum:
2806
3112
  - Success
3113
+ ErrorResponse:
3114
+ title: Basic Error Response
3115
+ type: object
3116
+ required:
3117
+ - code
3118
+ - message
3119
+ properties:
3120
+ code:
3121
+ type: integer
3122
+ description: >-
3123
+ API Response Code. Non `2xxx` code indicates a failure. This code
3124
+ will provide a more specific reason when a failure occurs and
3125
+ facilitates debugging.
3126
+ format: int32
3127
+ message:
3128
+ type: string
3129
+ description: Human readable error message supplied with every error response.
3130
+ BadRequestResponse:
3131
+ title: Bad Request Error Response
3132
+ allOf:
3133
+ - $ref: '#/components/schemas/ErrorResponse'
3134
+ - type: object
3135
+ required:
3136
+ - code
3137
+ - message
3138
+ properties:
3139
+ code:
3140
+ type: integer
3141
+ description: '`400X` type error response code'
3142
+ format: int32
3143
+ message:
3144
+ type: string
3145
+ description: Bad request error description
3146
+ errors:
3147
+ type: array
3148
+ items:
3149
+ type: object
3150
+ required:
3151
+ - path
3152
+ - message
3153
+ properties:
3154
+ message:
3155
+ type: string
3156
+ example: should have required property 'type'
3157
+ description: >-
3158
+ Indicates location of error in request query or URL
3159
+ parameter
3160
+ path:
3161
+ type: string
3162
+ example: .query.type
3163
+ description: >-
3164
+ Indicates location of error in request query or URL
3165
+ parameter
3166
+ errorCode:
3167
+ type: string
3168
+ example: required.openapi.validation
2807
3169
  PostcodeNotFoundResponse:
2808
3170
  title: Postcode Not Found
2809
3171
  type: object
@@ -2848,23 +3210,6 @@ components:
2848
3210
  type: string
2849
3211
  enum:
2850
3212
  - Success
2851
- ErrorResponse:
2852
- title: Basic Error Response
2853
- type: object
2854
- required:
2855
- - code
2856
- - message
2857
- properties:
2858
- code:
2859
- type: integer
2860
- description: >-
2861
- API Response Code. Non `2xxx` code indicates a failure. This code
2862
- will provide a more specific reason when a failure occurs and
2863
- facilitates debugging.
2864
- format: int32
2865
- message:
2866
- type: string
2867
- description: Human readable error message supplied with every error response.
2868
3213
  UMPRNResponse:
2869
3214
  title: UDPRN Response
2870
3215
  type: object
@@ -2885,12 +3230,62 @@ components:
2885
3230
  type: string
2886
3231
  enum:
2887
3232
  - Success
3233
+ AvailableContexts:
3234
+ title: Available Contexts
3235
+ type: array
3236
+ description: A list of available contexts for a key
3237
+ items:
3238
+ type: object
3239
+ properties:
3240
+ iso_3:
3241
+ type: string
3242
+ example: USA
3243
+ description: 3 letter ISO code
3244
+ iso_2:
3245
+ type: string
3246
+ example: US
3247
+ description: 2 letter ISO code
3248
+ description:
3249
+ type: string
3250
+ example: United States
3251
+ description: |
3252
+ Country descriptor to show in Address Finder
3253
+ emoji:
3254
+ type: string
3255
+ description: Emoji text icon
3256
+ example: 🇺🇸
3257
+ rgeo:
3258
+ type: boolean
3259
+ example: true
3260
+ description: |
3261
+ Indicates availability of reverse geolocation search
3262
+ Context:
3263
+ title: Context
3264
+ type: string
3265
+ description: Limits search results within a geographical boundary or country.
3266
+ NoContext:
3267
+ title: No Context Provided
3268
+ type: string
3269
+ enum:
3270
+ - ''
3271
+ description: Empty string if no context is provided or key check has failed
2888
3272
  ApiKey:
2889
3273
  title: Key
2890
3274
  type: object
2891
3275
  required:
2892
3276
  - available
3277
+ - context
3278
+ - contexts
2893
3279
  properties:
3280
+ contexts:
3281
+ $ref: '#/components/schemas/AvailableContexts'
3282
+ context:
3283
+ description: >
3284
+ Returns current context if it is in the list of available contexts
3285
+ for this key.
3286
+ oneOf:
3287
+ - $ref: '#/components/schemas/Context'
3288
+ - $ref: '#/components/schemas/NoContext'
2894
3289
  available:
2895
3290
  description: |
2896
3291
  Determines whether the key can be used by the requesting agent.
@@ -2931,7 +3326,7 @@ components:
2931
3326
 
2932
3327
 
2933
3328
  Your user token can be retrieved and managed from your [accounts
2934
- page](https://ideal-postcodes.co.uk/account).
3329
+ page](https://addresszen.com/account).
2935
3330
 
2936
3331
 
2937
3332
  Typically beings `uk_...`
@@ -3225,13 +3620,6 @@ components:
3225
3620
  type: string
3226
3621
  enum:
3227
3622
  - 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
3623
  LimitParam:
3236
3624
  title: Limit
3237
3625
  description: >
@@ -3370,53 +3758,51 @@ components:
3370
3758
  Biases search based on approximate geolocation of IP address.
3371
3759
  Set `bias_ip=true` to enable.
3372
3760
  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.
3761
+ AddressSuggestion:
3762
+ title: Address Suggestion
3763
+ description: Represents an address suggestion for any address in the world
3376
3764
  type: object
3377
3765
  required:
3378
3766
  - id
3379
3767
  - suggestion
3380
- - udprn
3381
3768
  - urls
3382
3769
  properties:
3383
3770
  id:
3384
3771
  $ref: '#/components/schemas/ID'
3385
3772
  suggestion:
3386
3773
  type: string
3387
- description: Address suggestion for your given query.
3774
+ description: Address Suggestion to be displayed to the user
3388
3775
  example: Flat 6, 12 Roskear, Camborne, TR14
3389
- udprn:
3390
- $ref: '#/components/schemas/UDPRN'
3391
3776
  urls:
3392
- required:
3393
- - udprn
3394
3777
  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
3778
+ UkAddressSuggestion:
3779
+ title: UK Address Suggestion
3780
+ description: >
3781
+ Represents a possible address given an autocomplete query.
3782
+
3783
+
3784
+ UK Address Suggestions will return a UDPRN attribute if it references a
3785
+ deliverable endpoint found on Royal Mail's Postcode Address File
3786
+ dataset.
3787
+
3788
+
3789
+ UK Address Suggestion will return a UMPRN if it references a multiple
3790
+ occupancy premise found on Royal Mail's Multiple Residence dataset.
3404
3791
  type: object
3405
3792
  required:
3406
3793
  - id
3407
3794
  - suggestion
3408
3795
  - udprn
3409
- - umprn
3410
3796
  - urls
3411
3797
  properties:
3412
3798
  id:
3413
3799
  $ref: '#/components/schemas/ID'
3414
3800
  suggestion:
3415
3801
  type: string
3416
- description: Address suggestion for your given query.
3802
+ description: Address suggestion for a given query.
3417
3803
  example: Flat 6, 12 Roskear, Camborne, TR14
3418
3804
  udprn:
3419
- $ref: '#/components/schemas/UDPRN'
3805
+ $ref: '#/components/schemas/paf_udprn'
3420
3806
  umprn:
3421
3807
  type: number
3422
3808
  format: int32
@@ -3425,10 +3811,9 @@ components:
3425
3811
  Residence household
3426
3812
  example: 51103417
3427
3813
  urls:
3428
- type: object
3429
3814
  required:
3430
3815
  - udprn
3431
- - umprn
3816
+ type: object
3432
3817
  properties:
3433
3818
  udprn:
3434
3819
  type: string
@@ -3442,34 +3827,6 @@ components:
3442
3827
  Optionally returned field, to retrieve the entire details for a
3443
3828
  suggested Multiple Residence household
3444
3829
  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
3830
  AutocompleteResponse:
3474
3831
  title: Address Autocomplete Response
3475
3832
  type: object
@@ -3487,10 +3844,8 @@ components:
3487
3844
  type: array
3488
3845
  items:
3489
3846
  oneOf:
3490
- - $ref: '#/components/schemas/PafSuggestion'
3491
- - $ref: '#/components/schemas/MrSuggestion'
3492
- - $ref: '#/components/schemas/NybSuggestion'
3493
- - $ref: '#/components/schemas/GlobalAddressSuggestion'
3847
+ - $ref: '#/components/schemas/AddressSuggestion'
3848
+ - $ref: '#/components/schemas/UkAddressSuggestion'
3494
3849
  code:
3495
3850
  type: integer
3496
3851
  format: int32
@@ -3500,6 +3855,84 @@ components:
3500
3855
  type: string
3501
3856
  enum:
3502
3857
  - Success
3858
+ Dataset:
3859
+ title: Dataset
3860
+ type: string
3861
+ description: |-
3862
+ Indicates the provenance of an address.
3863
+
3864
+ - `paf` (GBR) Postcode Address File
3865
+ - `mr` (GBR) Multiple Residence File
3866
+ - `nyb` (GBR) Not Yet Built File
3867
+ - `pafa` (GBR) Alias File
3868
+ - `pafw` (GBR) Welsh File
3869
+ - `ecaf` (IRL) Eircode ECAF
3870
+ - `ecad` (IRL) Eircode ECAD
3871
+ - `usps` (USA) USPS Zip+4
3872
+ enum:
3873
+ - paf
3874
+ - pafw
3875
+ - pafa
3876
+ - mr
3877
+ - nyb
3878
+ - usps
3879
+ - ecaf
3880
+ - ecad
3881
+ CountryISO:
3882
+ title: ISO Country Code (3)
3883
+ type: string
3884
+ description: |2
3885
+ 3 letter country code (ISO 3166-1)
3886
+ enum:
3887
+ - GBR
3888
+ - IMN
3889
+ - JEY
3890
+ - GGY
3891
+ - USA
3892
+ - PRI
3893
+ - GUM
3894
+ - IRL
3895
+ CountryISO2:
3896
+ title: ISO Country Code (2)
3897
+ type: string
3898
+ description: |2
3899
+ 2 letter country code (ISO 3166-1)
3900
+ enum:
3901
+ - GB
3902
+ - IM
3903
+ - JE
3904
+ - GG
3905
+ - US
3906
+ - PR
3907
+ - GU
3908
+ - IE
3909
+ Language:
3910
+ title: Language
3911
+ type: string
3912
+ description: |
3913
+ Language represented by 2 letter ISO Code (639-1)
3914
+ enum:
3915
+ - en
3916
+ - cy
3917
+ - ga
3918
+ Country:
3919
+ title: Country
3920
+ type: string
3921
+ description: |2
3922
+ Full country names (ISO 3166)
3923
+ example: England
3924
+ enum:
3925
+ - United States
3926
+ - Guam
3927
+ - Puerto Rico
3928
+ - England
3929
+ - Scotland
3930
+ - Wales
3931
+ - Northern Ireland
3932
+ - Jersey
3933
+ - Guernsey
3934
+ - Isle of Man
3935
+ - Ireland
3503
3936
  GbrGlobalAddress:
3504
3937
  title: Global Address
3505
3938
  description: Global (non-UK) address in the UK address format
@@ -3539,13 +3972,51 @@ components:
3539
3972
  - northings
3540
3973
  - uprn
3541
3974
  - county
3975
+ - county_code
3542
3976
  - id
3543
3977
  - dataset
3544
3978
  - country_iso
3979
+ - country_iso_2
3980
+ - language
3545
3981
  properties:
3982
+ id:
3983
+ $ref: '#/components/schemas/ID'
3984
+ dataset:
3985
+ $ref: '#/components/schemas/Dataset'
3986
+ country_iso:
3987
+ $ref: '#/components/schemas/CountryISO'
3988
+ country_iso_2:
3989
+ $ref: '#/components/schemas/CountryISO2'
3990
+ language:
3991
+ $ref: '#/components/schemas/Language'
3992
+ line_1:
3993
+ type: string
3994
+ description: First address line
3995
+ line_2:
3996
+ type: string
3997
+ description: Second address line
3998
+ line_3:
3999
+ type: string
4000
+ description: Third address line
3546
4001
  postcode:
3547
4002
  type: string
3548
- description: Postal or Zip Code
4003
+ description: Postal Code or Zip Code
4004
+ post_town:
4005
+ type: string
4006
+ description: Town or City
4007
+ county:
4008
+ type: string
4009
+ description: Province, state or county
4010
+ county_code:
4011
+ type: string
4012
+ description: Code or abbreviation associated with provice, state or county
4013
+ example: NY
4014
+ longitude:
4015
+ $ref: '#/components/schemas/Longitude'
4016
+ latitude:
4017
+ $ref: '#/components/schemas/Latitude'
4018
+ country:
4019
+ $ref: '#/components/schemas/Country'
3549
4020
  postcode_outward:
3550
4021
  type: string
3551
4022
  description: Not available for non-UK addresses
@@ -3556,40 +4027,69 @@ components:
3556
4027
  description: Not available for non-UK addresses
3557
4028
  enum:
3558
4029
  - ''
3559
- post_town:
3560
- type: string
3561
- description: Town or City
3562
4030
  dependant_locality:
3563
- $ref: '#/components/schemas/DependantLocality'
4031
+ type: string
4032
+ description: Not available for non-UK addresses
4033
+ enum:
4034
+ - ''
3564
4035
  double_dependant_locality:
3565
- $ref: '#/components/schemas/DoubleDependantLocality'
4036
+ type: string
4037
+ description: Not available for non-UK addresses
4038
+ enum:
4039
+ - ''
3566
4040
  thoroughfare:
3567
- $ref: '#/components/schemas/Thoroughfare'
4041
+ type: string
4042
+ description: Not available for non-UK addresses
4043
+ enum:
4044
+ - ''
3568
4045
  dependant_thoroughfare:
3569
- $ref: '#/components/schemas/DependantThoroughfare'
4046
+ type: string
4047
+ description: Not available for non-UK addresses
4048
+ enum:
4049
+ - ''
3570
4050
  building_number:
3571
- $ref: '#/components/schemas/BuildingNumber'
4051
+ type: string
4052
+ description: Not available for non-UK addresses
4053
+ enum:
4054
+ - ''
3572
4055
  building_name:
3573
- $ref: '#/components/schemas/BuildingName'
4056
+ type: string
4057
+ description: Not available for non-UK addresses
4058
+ enum:
4059
+ - ''
3574
4060
  sub_building_name:
3575
- $ref: '#/components/schemas/SubBuildingName'
4061
+ type: string
4062
+ description: Not available for non-UK addresses
4063
+ enum:
4064
+ - ''
4065
+ premise:
4066
+ type: string
4067
+ description: Not available for non-UK addresses
4068
+ enum:
4069
+ - ''
3576
4070
  po_box:
3577
4071
  type: string
3578
- description: PO Box
4072
+ description: Not available for non-UK addresses
4073
+ enum:
4074
+ - ''
3579
4075
  department_name:
3580
4076
  type: string
3581
- description: Department name at premise
4077
+ description: Not available for non-UK addresses
4078
+ enum:
4079
+ - ''
3582
4080
  organisation_name:
3583
4081
  type: string
3584
- description: Name of organisation at premise
4082
+ description: Not available for non-UK addresses
4083
+ enum:
4084
+ - ''
3585
4085
  udprn:
3586
4086
  type: string
3587
- description: Not available for non-UK addresses. See id for address identifier
4087
+ description: Not available for non-UK addresses. See `id` for address identifier
3588
4088
  enum:
3589
4089
  - ''
3590
4090
  umprn:
3591
4091
  type: string
3592
- description: Not available for non-UK addresses. See id for address identifier
4092
+ description: Not available for non-UK addresses. See `id` for address identifier
3593
4093
  enum:
3594
4094
  - ''
3595
4095
  postcode_type:
@@ -3607,19 +4107,6 @@ components:
3607
4107
  description: Not available for non-UK addresses
3608
4108
  enum:
3609
4109
  - ''
3610
- line_1:
3611
- $ref: '#/components/schemas/Line1'
3612
- line_2:
3613
- $ref: '#/components/schemas/Line2'
3614
- line_3:
3615
- $ref: '#/components/schemas/Line3'
3616
- premise:
3617
- $ref: '#/components/schemas/Premise'
3618
- country:
3619
- $ref: '#/components/schemas/Country'
3620
- county:
3621
- type: string
3622
- description: Province, state or county
3623
4110
  administrative_county:
3624
4111
  type: string
3625
4112
  description: Not available for non-UK addresses
@@ -3636,13 +4123,15 @@ components:
3636
4123
  enum:
3637
4124
  - ''
3638
4125
  district:
3639
- $ref: '#/components/schemas/District'
4126
+ type: string
4127
+ description: Not available for non-UK addresses
4128
+ enum:
4129
+ - ''
3640
4130
  ward:
3641
- $ref: '#/components/schemas/Ward'
3642
- longitude:
3643
- $ref: '#/components/schemas/Longitude'
3644
- latitude:
3645
- $ref: '#/components/schemas/Latitude'
4131
+ type: string
4132
+ description: Not available for non-UK addresses
4133
+ enum:
4134
+ - ''
3646
4135
  eastings:
3647
4136
  type: string
3648
4137
  description: Not available for non-UK addresses
@@ -3655,15 +4144,9 @@ components:
3655
4144
  - ''
3656
4145
  uprn:
3657
4146
  type: string
3658
- description: Not available for non-UK addresses. See id for address identifier
4147
+ description: Not available for non-UK addresses. See `id` for address identifier
3659
4148
  enum:
3660
4149
  - ''
3661
- id:
3662
- $ref: '#/components/schemas/ID'
3663
- dataset:
3664
- $ref: '#/components/schemas/Dataset'
3665
- country_iso:
3666
- $ref: '#/components/schemas/CountryISO'
3667
4150
  GbrResolveAddressResponse:
3668
4151
  title: Address Resolution Response (GBR)
3669
4152
  type: object
@@ -3685,6 +4168,8 @@ components:
3685
4168
  oneOf:
3686
4169
  - $ref: '#/components/schemas/PafAddress'
3687
4170
  - $ref: '#/components/schemas/MrAddress'
4171
+ - $ref: '#/components/schemas/WelshPafAddress'
4172
+ - $ref: '#/components/schemas/PafAliasAddress'
3688
4173
  - $ref: '#/components/schemas/NybAddress'
3689
4174
  - $ref: '#/components/schemas/GbrGlobalAddress'
3690
4175
  usps_dataset:
@@ -3696,19 +4181,37 @@ components:
3696
4181
  usps_country:
3697
4182
  title: Country
3698
4183
  type: string
3699
- description: Full country name associated with address
4184
+ description: |2
4185
+ Full country names (ISO 3166)
3700
4186
  enum:
3701
4187
  - United States
3702
4188
  - Guam
3703
4189
  - Puerto Rico
3704
4190
  usps_country_iso:
3705
- title: USPS ISO Country Codes
4191
+ title: ISO Country Code (3)
3706
4192
  type: string
3707
- description: 3 letter ISO country code associated with USA
4193
+ description: |2
4194
+ 3 letter country code (ISO 3166-1)
3708
4195
  enum:
3709
4196
  - USA
3710
4197
  - PRI
3711
4198
  - GUM
4199
+ usps_country_iso_2:
4200
+ title: ISO Country Code (2)
4201
+ type: string
4202
+ description: |2
4203
+ 2 letter country code (ISO 3166-1)
4204
+ enum:
4205
+ - US
4206
+ - PR
4207
+ - GU
4208
+ usps_language:
4209
+ title: Language
4210
+ type: string
4211
+ description: |
4212
+ Language represented by 2 letter ISO Code (639-1)
4213
+ enum:
4214
+ - en
3712
4215
  primary_number:
3713
4216
  title: Primary Number
3714
4217
  type: string
@@ -3740,10 +4243,10 @@ components:
3740
4243
  line is the firm or building name.
3741
4244
  example: 9450 Pinecroft Dr
3742
4245
  last_line:
3743
- title: TITLE
4246
+ title: Last Line
3744
4247
  type: string
3745
4248
  description: Last line of the address comprising of city, state, zip code and zip+4
3746
- example: GREENWICH, CT, 06830-1234
4249
+ example: Greenwich CT 06830-1234
3747
4250
  zip_code:
3748
4251
  title: ZIP Code
3749
4252
  type: string
@@ -3961,7 +4464,7 @@ components:
3961
4464
  description: >-
3962
4465
  The name of the county or parish in which the 5-digit ZIP Code resides.
3963
4466
  If APO/FPO/DPO, then the county name will be blank.
3964
- example: SUFFOLK
4467
+ example: Suffolk
3965
4468
  city:
3966
4469
  title: City Name
3967
4470
  type: string
@@ -4094,7 +4597,10 @@ components:
4094
4597
  required:
4095
4598
  - id
4096
4599
  - dataset
4600
+ - country
4097
4601
  - country_iso
4602
+ - country_iso_2
4603
+ - language
4098
4604
  - primary_number
4099
4605
  - secondary_number
4100
4606
  - plus_4_code
@@ -4140,6 +4646,10 @@ components:
4140
4646
  $ref: '#/components/schemas/usps_country'
4141
4647
  country_iso:
4142
4648
  $ref: '#/components/schemas/usps_country_iso'
4649
+ country_iso_2:
4650
+ $ref: '#/components/schemas/usps_country_iso_2'
4651
+ language:
4652
+ $ref: '#/components/schemas/usps_language'
4143
4653
  primary_number:
4144
4654
  $ref: '#/components/schemas/primary_number'
4145
4655
  secondary_number:
@@ -4218,7 +4728,10 @@ components:
4218
4728
  required:
4219
4729
  - id
4220
4730
  - dataset
4731
+ - country
4221
4732
  - country_iso
4733
+ - country_iso_2
4734
+ - language
4222
4735
  - primary_number
4223
4736
  - secondary_number
4224
4737
  - plus_4_code
@@ -4266,6 +4779,10 @@ components:
4266
4779
  $ref: '#/components/schemas/Country'
4267
4780
  country_iso:
4268
4781
  $ref: '#/components/schemas/CountryISO'
4782
+ country_iso_2:
4783
+ $ref: '#/components/schemas/CountryISO2'
4784
+ language:
4785
+ $ref: '#/components/schemas/Language'
4269
4786
  primary_number:
4270
4787
  type: string
4271
4788
  description: Not available for non-US addresses
@@ -4449,6 +4966,32 @@ components:
4449
4966
  oneOf:
4450
4967
  - $ref: '#/components/schemas/UspsAddress'
4451
4968
  - $ref: '#/components/schemas/UsaGlobalAddress'
4969
+ AddressLongitudeParam:
4970
+ title: Longitude
4971
+ type: number
4972
+ format: float
4973
+ description: >
4974
+ Longitude query for reverse geocoding.
4975
+
4976
+
4977
+ An accompanying latitude (lat=) query must be submitted for a valid
4978
+ reverse geocode query.
4979
+ minimum: -90
4980
+ maximum: 90
4981
+ example: -0.12767
4982
+ AddressLatitudeParam:
4983
+ title: Latitude
4984
+ type: number
4985
+ format: float
4986
+ description: >
4987
+ Latitude query for reverse geocoding.
4988
+
4989
+
4990
+ An accompanying longitude (lon=) query must be submitted for a valid
4991
+ reverse geocode query.
4992
+ minimum: -90
4993
+ maximum: 90
4994
+ example: 51.503541
4452
4995
  AddressResponse:
4453
4996
  title: Address Search Response
4454
4997
  type: object
@@ -4483,6 +5026,8 @@ components:
4483
5026
  - $ref: '#/components/schemas/PafAddress'
4484
5027
  - $ref: '#/components/schemas/MrAddress'
4485
5028
  - $ref: '#/components/schemas/NybAddress'
5029
+ - $ref: '#/components/schemas/WelshPafAddress'
5030
+ - $ref: '#/components/schemas/PafAliasAddress'
4486
5031
  total:
4487
5032
  minimum: 0
4488
5033
  maximum: 10000
@@ -4701,45 +5246,6 @@ components:
4701
5246
  format: int32
4702
5247
  enum:
4703
5248
  - 2000
4704
- BadRequestResponse:
4705
- title: Bad Request Error Response
4706
- allOf:
4707
- - $ref: '#/components/schemas/ErrorResponse'
4708
- - type: object
4709
- required:
4710
- - code
4711
- - message
4712
- properties:
4713
- code:
4714
- type: integer
4715
- description: '`400X` type error response code'
4716
- format: int32
4717
- message:
4718
- type: string
4719
- description: Bad request error description
4720
- errors:
4721
- type: array
4722
- items:
4723
- type: object
4724
- required:
4725
- - path
4726
- - message
4727
- properties:
4728
- message:
4729
- type: string
4730
- example: should have required property 'type'
4731
- description: >-
4732
- Indicates location of error in request query or URL
4733
- parameter
4734
- path:
4735
- type: string
4736
- example: .query.type
4737
- description: >-
4738
- Indicates location of error in request query or URL
4739
- parameter
4740
- errorCode:
4741
- type: string
4742
- example: required.openapi.validation
4743
5249
  UnauthorizedResponse:
4744
5250
  title: Unauthorized Request Error Response
4745
5251
  allOf:
@@ -4833,3 +5339,720 @@ components:
4833
5339
  minimum: 0
4834
5340
  maximum: 4096
4835
5341
  description: A serialised payload of up to `4096` characters
5342
+ EircBase:
5343
+ required:
5344
+ - id
5345
+ - dataset
5346
+ - country
5347
+ - country_iso
5348
+ - country_iso_2
5349
+ - language
5350
+ - longitude
5351
+ - latitude
5352
+ - department
5353
+ - organisation
5354
+ - sub_building_name
5355
+ - building_name
5356
+ - building_number
5357
+ - building_group
5358
+ - primary_thoroughfare
5359
+ - secondary_thoroughfare
5360
+ - primary_locality
5361
+ - secondary_locality
5362
+ - tertiary_locality
5363
+ - post_county
5364
+ - eircode
5365
+ - line_1
5366
+ - line_2
5367
+ - line_3
5368
+ - line_4
5369
+ - line_5
5370
+ - line_6
5371
+ - line_7
5372
+ - line_8
5373
+ - line_9
5374
+ - address_reference
5375
+ properties:
5376
+ id:
5377
+ $ref: '#/components/schemas/ID'
5378
+ dataset:
5379
+ type: string
5380
+ description: Source of address
5381
+ country_iso:
5382
+ description: |2
5383
+ 3 letter country code (ISO 3166-1)
5384
+ enum:
5385
+ - IRL
5386
+ country_iso_2:
5387
+ type: string
5388
+ description: |2
5389
+ 2 letter country code (ISO 3166-1)
5390
+ enum:
5391
+ - IE
5392
+ country:
5393
+ type: string
5394
+ description: |2
5395
+ Full country names (ISO 3166)
5396
+ enum:
5397
+ - Ireland
5398
+ language:
5399
+ enum:
5400
+ - en
5401
+ - ga
5402
+ description: |
5403
+ Language represented by 2 letter ISO Code (639-1)
5404
+ line_1:
5405
+ description: Address Line 1
5406
+ type: string
5407
+ maxLength: 200
5408
+ minLength: 0
5409
+ line_2:
5410
+ description: Address Line 2
5411
+ type: string
5412
+ maxLength: 200
5413
+ minLength: 0
5414
+ line_3:
5415
+ description: Address Line 3
5416
+ type: string
5417
+ maxLength: 200
5418
+ minLength: 0
5419
+ line_4:
5420
+ description: Address Line 4
5421
+ type: string
5422
+ maxLength: 200
5423
+ minLength: 0
5424
+ line_5:
5425
+ description: Address Line 5
5426
+ type: string
5427
+ maxLength: 200
5428
+ minLength: 0
5429
+ line_6:
5430
+ description: Address Line 6
5431
+ type: string
5432
+ maxLength: 200
5433
+ minLength: 0
5434
+ line_7:
5435
+ description: Address Line 7
5436
+ type: string
5437
+ maxLength: 200
5438
+ minLength: 0
5439
+ line_8:
5440
+ description: Address Line 8
5441
+ type: string
5442
+ maxLength: 200
5443
+ minLength: 0
5444
+ line_9:
5445
+ description: Address Line 9
5446
+ type: string
5447
+ maxLength: 200
5448
+ minLength: 0
5449
+ department:
5450
+ type: string
5451
+ maxLength: 60
5452
+ minLength: 0
5453
+ description: >-
5454
+ The department or division within an organisation. If the department
5455
+ element exists, then the organisation must also exist.
5456
+ example: Accounts Department
5457
+ organisation:
5458
+ type: string
5459
+ description: Organisation name
5460
+ maxLength: 60
5461
+ minLength: 0
5462
+ example: Oak Tree Limited
5463
+ sub_building_name:
5464
+ type: string
5465
+ example: Flat 1
5466
+ maxLength: 60
5467
+ minLength: 0
5468
+ description: >-
5469
+ The sub-building refers to an apartment, flat or unit within a
5470
+ building.
5471
+ building_name:
5472
+ type: string
5473
+ example: Rose Cottage
5474
+ maxLength: 60
5475
+ minLength: 0
5476
+ description: >-
5477
+ The name given to the building. Prepended by sub building, if any,
5478
+ when the sub building does not appear on a line to itself. The
5479
+ building name is omitted if it is the same as either the
5480
+ Organisation or Building Group.
5481
+ building_number:
5482
+ type: string
5483
+ example: 22
5484
+ maxLength: 40
5485
+ minLength: 0
5486
+ description: >-
5487
+ A number associated with the whole building. The building number may
5488
+ have a numeric and an alphanumeric component, which are concatenated
5489
+ e.g. 2A, or alternatively will have a simple building number or a
5490
+ complex building number. The building number always relates to the
5491
+ whole building and not a sub-unit within it.
5492
+
5493
+ A complex building number may be one of the following:
5494
+ - Dual. Two number separated by '/' e.g. 63/64 = 63, 64
5495
+ - Sequence. An odd or even sequence of numbers with lower and upper bound separated by an underscore '_' e.g. `1_5` = 1,3,5 and `2_6` = 2,4,6
5496
+ - Range. A range of consecutive numbers with lower and upper bound separated by a dash '-' e.g. `63-66` = 63, 64, 56, 66
5497
+ The building number never appears on a line by itself and can
5498
+ prepend Building Group, Primary Thoroughfare or Primary Locality.
5499
+ building_group:
5500
+ type: string
5501
+ maxLength: 60
5502
+ minLength: 0
5503
+ description: >-
5504
+ A building group is a collection of buildings with a collective
5505
+ name, located on or near the same thoroughfare.
5506
+ example: Marrian Terrace
5507
+ primary_thoroughfare:
5508
+ type: string
5509
+ maxLength: 40
5510
+ minLength: 0
5511
+ description: >-
5512
+ The name of the thoroughfare on which premises are located. It may
5513
+ appear on a line by itself or be appended to either a sub building
5514
+ or building number.
5515
+
5516
+
5517
+ Addresses with thoroughfares can sometimes have the thoroughfare
5518
+ excluded where a Building Group exists, such as a Retail Centre or
5519
+ Business Park, and the thoroughfare is not part of the Postal
5520
+ Address.
5521
+ example: Griffith Road
5522
+ secondary_thoroughfare:
5523
+ type: string
5524
+ maxLength: 40
5525
+ minLength: 0
5526
+ description: >-
5527
+ It is never present without a primary thoroughfare. The primary
5528
+ thoroughfare is dependent on the secondary thoroughfare and appears
5529
+ before the secondary thoroughfare in any address.
5530
+
5531
+
5532
+ Secondary thoroughfare are generally used to assist locating a
5533
+ primary thoroughfare.
5534
+ example: Navan Road
5535
+ primary_locality:
5536
+ type: string
5537
+ maxLength: 40
5538
+ minLength: 0
5539
+ description: >-
5540
+ First locality elements which can refer to areas, districts,
5541
+ industrial estates, towns, etc.
5542
+
5543
+
5544
+ The primary locality refers to the specific place the address is.
5545
+
5546
+
5547
+ In urban areas, the primary locality can be required to distinguish
5548
+ between two thoroughfares of the same name in the same district or
5549
+ town. Industrial estates with named thoroughfares are also held as
5550
+ localities. In rural areas the primary locality is generally a
5551
+ townland name.
5552
+ example: Cookstown Industrial Estate
5553
+ secondary_locality:
5554
+ type: string
5555
+ maxLength: 40
5556
+ minLength: 0
5557
+ description: >-
5558
+ Never present without a primary locality. The secondary locality has
5559
+ a wider geographic scope than the primary locality.
5560
+
5561
+
5562
+ It is the secondary locality therefore which differentiates
5563
+ addresses with the same primary locality name within the same
5564
+ county.
5565
+
5566
+
5567
+ Secondary localities are more likely to be required for rural
5568
+ addresses.
5569
+
5570
+
5571
+ Second locality elements which can refer to areas, districts,
5572
+ industrial estates, towns, etc
5573
+
5574
+
5575
+ The secondary locality helps identify where the primary locality is
5576
+ located.
5577
+ example: Manorhamilton
5578
+ tertiary_locality:
5579
+ type: string
5580
+ maxLength: 40
5581
+ minLength: 0
5582
+ example: Dublin 14
5583
+ description: >-
5584
+ Also known as the Post Town.
5585
+
5586
+
5587
+ The name of the post town associated with the premises for postal
5588
+ delivery purposes. This includes Dublin Postal Districts "Dublin 1"
5589
+ to "Dublin 24".
5590
+
5591
+
5592
+ The post town is a significant element of the Postal Address,
5593
+ however it is not always populated in an address. The official post
5594
+ office guide, Eolaí an Phoist4, describes post towns in the
5595
+ following manner:
5596
+
5597
+
5598
+ "A provincial postal address may include the name of a town or
5599
+ village several miles distant, with which the addressee has little
5600
+ or no connection, and, in some places, especially if this residence
5601
+ happens to be near a county boundary, the name of the neighbouring
5602
+ county instead of the county in which he actually resides. The
5603
+ explanation is that the main mail despatches have to be sent for
5604
+ more detailed sub division to certain centres known as POST TOWNS,
5605
+ chosen because of their accessibility and convenience."
5606
+ post_county:
5607
+ type: string
5608
+ maxLength: 30
5609
+ minLength: 0
5610
+ description: >-
5611
+ One of the 26 Counties in the Republic of Ireland. These counties
5612
+ are sub-national divisions used for the purposes of administrative,
5613
+ geographical and political demarcation. Post County is the County
5614
+ associated with the Post Town, not the geographic county in which
5615
+ the building is located. The Post County is normally used as part of
5616
+ the Postal Address with some exceptions e.g. Dublin Postal Districts
5617
+ where the Post County is not used and some Post Towns (e.g.
5618
+ Tipperary, Kildare, etc.) that have the same name as the Post
5619
+ County.
5620
+ example: Cork
5621
+ eircode:
5622
+ type: string
5623
+ maxLength: 60
5624
+ minLength: 0
5625
+ description: >-
5626
+ The seven character Eircode has an A65 F4E2 format. The Eircode is a
5627
+ mandatory address element. The last line of a Postal Address will
5628
+ contain the Eircode, displayed with a space. e.g. `A65 F4E2`.
5629
+
5630
+
5631
+ The Eircode is always the last line of a Postal Address generated
5632
+ within the state, e.g. if an address has four lines then the Eircode
5633
+ will be on its own on Address Line 5. For inbound international mail
5634
+ the country name IRELAND should be appended as the last line of the
5635
+ Postal Address.
5636
+ example: A65 R2AF
5637
+ address_reference:
5638
+ type: string
5639
+ maxLength: 16
5640
+ minLength: 0
5641
+ description: >-
5642
+ The address reference is the An Post GeoDirectory address reference
5643
+ identifier used by the Universal Service Provider.
5644
+ longitude:
5645
+ $ref: '#/components/schemas/Longitude'
5646
+ latitude:
5647
+ $ref: '#/components/schemas/Latitude'
5648
+ EcafAddress:
5649
+ title: Ireland ECAF Address
5650
+ description: >-
5651
+ ECAF is the Eircode Address File which contains one record for each
5652
+ Postal Address. English language and Irish language versions are
5653
+ available. It is distributed as a flat file, details of data provision
5654
+ and updates are provided in section 2.
5655
+ required:
5656
+ - ecaf_id
5657
+ allOf:
5658
+ - $ref: '#/components/schemas/EircBase'
5659
+ - type: object
5660
+ properties:
5661
+ dataset:
5662
+ type: string
5663
+ enum:
5664
+ - ecaf
5665
+ ecaf_id:
5666
+ type: string
5667
+ maxLength: 10
5668
+ minLength: 0
5669
+ description: >-
5670
+ The unique identifier in the ECAF is the `ecaf_id`. This unique
5671
+ identifier allows each address in the ECAF to be uniquely
5672
+ identified. It can also be used as index once the data has been
5673
+ imported into a relational database. This is a numeric field
5674
+ that can store values from 0 to 2,147,483,647. It is represented
5675
+ as a number up to 10 digits long. All other fields in ECAF are
5676
+ alphanumeric.
5677
+ EcadAddress:
5678
+ title: Ireland ECAD Address
5679
+ description: The ECAD contains additional data for each ECAF address.
5680
+ required:
5681
+ - organisation_id
5682
+ - address_point_id
5683
+ - building_id
5684
+ - building_group_id
5685
+ - primary_thoroughfare_id
5686
+ - secondary_thoroughfare_id
5687
+ - primary_locality_id
5688
+ - secondary_locality_id
5689
+ - post_town
5690
+ - post_town_id
5691
+ - post_county_id
5692
+ - nua
5693
+ - gaeltacht
5694
+ - address_type
5695
+ - building_address_type
5696
+ - building_group_address_type
5697
+ - primary_locality_address_type
5698
+ - secondary_locality_address_type
5699
+ - building_type
5700
+ - holiday_home
5701
+ - under_construction
5702
+ - building_use
5703
+ - vacant
5704
+ - org_vacant
5705
+ - nace_code
5706
+ - nace_category
5707
+ - local_authority
5708
+ - ded_id
5709
+ - small_area_id
5710
+ - townland_id
5711
+ - gaeltacht_id
5712
+ - postaim_presort_61
5713
+ - postaim_presort_152
5714
+ - publicity_post_zone
5715
+ allOf:
5716
+ - $ref: '#/components/schemas/EircBase'
5717
+ - type: object
5718
+ properties:
5719
+ dataset:
5720
+ type: string
5721
+ enum:
5722
+ - ecad
5723
+ ecad_id:
5724
+ type: string
5725
+ description: Unique 10 digit ECAD ID
5726
+ example: '17000000'
5727
+ minLength: 1
5728
+ maxLength: 10
5729
+ organisation_id:
5730
+ type: string
5731
+ description: Organisation ID
5732
+ example: '10098783'
5733
+ maxLength: 10
5734
+ minLength: 1
5735
+ address_point_id:
5736
+ type: string
5737
+ description: Address Point ID
5738
+ example: '10098783'
5739
+ maxLength: 10
5740
+ minLength: 1
5741
+ building_id:
5742
+ type: string
5743
+ description: Building ID
5744
+ example: '10098783'
5745
+ maxLength: 10
5746
+ minLength: 1
5747
+ building_group_id:
5748
+ type: string
5749
+ description: Building Group ID
5750
+ example: '10098783'
5751
+ primary_thoroughfare_id:
5752
+ type: string
5753
+ description: Primary Thoroughfare ID
5754
+ example: '10098783'
5755
+ maxLength: 10
5756
+ minLength: 1
5757
+ secondary_thoroughfare_id:
5758
+ type: string
5759
+ description: Secondary Thoroughfare ID
5760
+ example: '10098783'
5761
+ primary_locality_id:
5762
+ type: string
5763
+ description: Primary Locality ID
5764
+ example: '10098783'
5765
+ maxLength: 10
5766
+ minLength: 1
5767
+ secondary_locality_id:
5768
+ type: string
5769
+ description: Secondary Locality ID
5770
+ example: '10098783'
5771
+ post_town:
5772
+ type: string
5773
+ minLength: 0
5774
+ description: >-
5775
+ The post town is a significant element of the Postal Address,
5776
+ however it is not always populated in an address. The official
5777
+ post office guide, Eolaí an Phoist1, describes post towns in the
5778
+ following manner:
5779
+
5780
+
5781
+ "A provincial postal address may include the name of a town or
5782
+ village several miles distant, with which the addressee has
5783
+ little or no connection, and, in some places, especially if this
5784
+ residence happens to be near a county boundary, the name of the
5785
+ neighbouring county instead of the county in which he actually
5786
+ resides. The explanation is that the main mail despatches have
5787
+ to be sent for more detailed sub division to certain centres
5788
+ known as post towns, chosen because of their accessibility and
5789
+ convenience."
5790
+ post_town_id:
5791
+ type: string
5792
+ description: Post Town ID
5793
+ example: '10098783'
5794
+ maxLength: 10
5795
+ minLength: 1
5796
+ post_county_id:
5797
+ type: string
5798
+ description: Post County ID
5799
+ example: '10098783'
5800
+ maxLength: 10
5801
+ minLength: 1
5802
+ nua:
5803
+ type: boolean
5804
+ description: >-
5805
+ NUA means "non-unique address".
5806
+
5807
+
5808
+ The NUA field contains `true` when the address is a non-unique
5809
+ address, and `false` when it is a unique address.
5810
+
5811
+
5812
+ Ireland has a very high level of non-unique addresses (NUA),
5813
+ i.e. the address does not contain a unique building number or
5814
+ name. Approximately 35% of all Irish addresses are non-unique
5815
+ which equates to 600,000 addresses.
5816
+
5817
+
5818
+ The typical example of NUA addressing is where every address in
5819
+ a townland is the same. The way that post is delivered is by
5820
+ local knowledge of postal delivery personnel of which addressee
5821
+ lives in which house.
5822
+
5823
+
5824
+ N.B. For a NUA address, it is impossible to match to a unique
5825
+ record in the ECAD and assign an Eircode.
5826
+ gaeltacht:
5827
+ type: boolean
5828
+ description: >-
5829
+ Gaeltact refers to a district where the Irish government
5830
+ recognises that the Irish language is the predominant language.
5831
+
5832
+
5833
+ Returns `true` if address is in a Gaeltacht area and `false` if
5834
+ not.
5835
+ address_type:
5836
+ type: string
5837
+ minLength: 0
5838
+ description: >-
5839
+ Addresses points can assume one of the following values:
5840
+
5841
+
5842
+ - Residential Address Point. This type of address point has one
5843
+ residential addresses associated with it.
5844
+
5845
+ - Non-Residential Address Point. This type of address point has
5846
+ one or more non-residential address (business, club or other
5847
+ organisation) associated with it.
5848
+
5849
+ - Mixed Address Point. This is a special case where the
5850
+ residential and non residential addresses in the building are
5851
+ essentially the same address. The typical example is a farm
5852
+ house on an active farm. It is important to note that this is a
5853
+ special case. In general a building with both residential and
5854
+ non-residential addresses (e.g. an apartment over a shop) will
5855
+ receive two address points, one commercial and one residential,
5856
+ and hence two Eircodes.
5857
+
5858
+
5859
+ Buildings can contain multiple address points of type
5860
+ Residential and/or Non-Residential.
5861
+ building_address_type:
5862
+ description: >-
5863
+ The building type can assume one of the following values:
5864
+
5865
+
5866
+ - Single Occupancy Residential Building. This type of building
5867
+ contains one residential address.
5868
+
5869
+ - Multi Occupancy Residential Building. This type of building
5870
+ contains multiple residential addresses.
5871
+
5872
+ - Single Occupancy Non-Residential Building. This type of
5873
+ building contains one non-residential address (business, club or
5874
+ other organisation).
5875
+
5876
+ - Multi Occupancy Non-Residential Building. This type of
5877
+ building contains multiple non-residential addresses (business,
5878
+ club or other organisation).
5879
+
5880
+ - Multi Occupancy Mixed Use Building. This type of building
5881
+ contains multiple residential and non- residential addresses.
5882
+
5883
+
5884
+ Buildings can also have a more specific address types such as a
5885
+ Hospital, School, Shopping Centre, etc.
5886
+ type: string
5887
+ minLength: 0
5888
+ building_group_address_type:
5889
+ type: string
5890
+ minLength: 0
5891
+ description: >-
5892
+ The building group type can be:
5893
+
5894
+
5895
+ - Residential Building Group. This type of building group
5896
+ contains buildings with residential addresses only.
5897
+
5898
+ - Non-Residential Building Group This type of building group
5899
+ contains buildings with non-residential addresses (business,
5900
+ club or other organisation) only.
5901
+
5902
+ - Mixed Building Group. This type of building group contains
5903
+ buildings with residential and non-residential addresses. Can
5904
+ also have a more specific address type such as a Hospital,
5905
+ School, Shopping Centre, etc.
5906
+
5907
+
5908
+ Building groups can also have a more specific address type such
5909
+ as a Hospital, School, Shopping Centre, etc.
5910
+ primary_locality_address_type:
5911
+ type: string
5912
+ minLength: 0
5913
+ description: |-
5914
+ The locality type can be:
5915
+ - Rural Locality. This is generally a townland.
5916
+ - Industrial Estate. Industrial Estate, Industrial Park, Business Campus, etc.
5917
+ - Shopping District. Shopping Centre.
5918
+ - Housing Estate. Residential Housing Estate.
5919
+ - Village. Based on Census 2011 population < 1,500.
5920
+ - Town. Based on Census 2011 population > 1,500.
5921
+ - Urban Area. Wholly within a village/town/city e.g. Rathmines.
5922
+ - Suburban Locality. This is an area that is both rural and urban, as it is both a townland, and also an area name applied to houses in a town, as the town has extended partially into the townland.
5923
+
5924
+ Where the locality is also the post town, the type can be:
5925
+ - Village. Based on Census 2011 population < 1,500
5926
+ - Town. Based on Census 2011 population > 1,500
5927
+ - Postal District. Dublin 1 to 24
5928
+ - City. Dublin, Cork, Limerick, Galway or Waterford
5929
+ secondary_locality_address_type:
5930
+ type: string
5931
+ minLength: 0
5932
+ description: |-
5933
+ The locality type can be:
5934
+ - Rural Locality. This is generally a townland.
5935
+ - Industrial Estate. Industrial Estate, Industrial Park, Business Campus, etc.
5936
+ - Shopping District. Shopping Centre.
5937
+ - Housing Estate. Residential Housing Estate.
5938
+ - Village. Based on Census 2011 population < 1,500.
5939
+ - Town. Based on Census 2011 population > 1,500.
5940
+ - Urban Area. Wholly within a village/town/city e.g. Rathmines.
5941
+ - Suburban Locality. This is an area that is both rural and urban, as it is both a townland, and also an area name applied to houses in a town, as the town has extended partially into the townland.
5942
+
5943
+ Where the locality is also the post town, the type can be:
5944
+ - Village. Based on Census 2011 population < 1,500
5945
+ - Town. Based on Census 2011 population > 1,500
5946
+ - Postal District. Dublin 1 to 24
5947
+ - City. Dublin, Cork, Limerick, Galway or Waterford
5948
+ building_type:
5949
+ type: string
5950
+ minLength: 0
5951
+ description: >-
5952
+ Describes the type of building, e.g. detached, semi-detached,
5953
+ bungalow.
5954
+ holiday_home:
5955
+ enum:
5956
+ - 'N'
5957
+ - 'Y'
5958
+ - ''
5959
+ description: >-
5960
+ A Yes/No field, indicating whether or not the building is a
5961
+ holiday home.
5962
+ under_construction:
5963
+ enum:
5964
+ - 'N'
5965
+ - 'Y'
5966
+ - ''
5967
+ description: >-
5968
+ A Yes/No field, indicating whether or not the building is under
5969
+ construction.
5970
+ building_use:
5971
+ enum:
5972
+ - R
5973
+ - C
5974
+ - B
5975
+ - U
5976
+ description: |-
5977
+ Can be one of:
5978
+
5979
+ - `R` Residential
5980
+ - `C` Commercial
5981
+ - `B` Both
5982
+ - `U` Unknown
5983
+ vacant:
5984
+ description: A Yes/No field, indicating whether the building is vacant.
5985
+ enum:
5986
+ - 'Y'
5987
+ - 'N'
5988
+ - ''
5989
+ org_vacant:
5990
+ description: A Yes/No field, indicating whether the organisation is vacant.
5991
+ enum:
5992
+ - 'Y'
5993
+ - 'N'
5994
+ - ''
5995
+ nace_code:
5996
+ description: The NACE Code for the Category.
5997
+ type: string
5998
+ minLength: 0
5999
+ nace_category:
6000
+ description: Name of the NACE Category
6001
+ type: string
6002
+ minLength: 0
6003
+ local_authority:
6004
+ description: Name of local authority
6005
+ type: string
6006
+ minLength: 0
6007
+ ded_id:
6008
+ description: >-
6009
+ Unique Identifier for Electoral Divisions 2017 data.
6010
+
6011
+
6012
+ Note that this field is subject to breaking changes if a new
6013
+ generation of government data IDs is released. Currently this
6014
+ uses 2017 IDs. Contact us to be notified ahead of his change.
6015
+ type: string
6016
+ minLength: 0
6017
+ small_area_id:
6018
+ description: >-
6019
+ Unique Identifier for the Small Area 2017 data.
6020
+
6021
+
6022
+ Note that this field is subject to breaking changes if a new
6023
+ generation of government data IDs is released. Currently this
6024
+ uses 2017 IDs. Contact us to be notified ahead of his change.
6025
+ type: string
6026
+ minLength: 0
6027
+ townland_id:
6028
+ description: >-
6029
+ Unique Identifier for townland 2017 data.
6030
+
6031
+
6032
+ Note that this field is subject to breaking changes if a new
6033
+ generation of government data IDs is released. Currently this
6034
+ uses 2017 IDs. Contact us to be notified ahead of his change.
6035
+ type: string
6036
+ minLength: 0
6037
+ gaeltacht_id:
6038
+ description: >-
6039
+ Unique Identifier for the 7 Gaeltacht areas 2017 data.
6040
+
6041
+
6042
+ Note that this field is subject to breaking changes if a new
6043
+ generation of government data IDs is released. Currently this
6044
+ uses 2017 IDs. Contact us to be notified ahead of his change.
6045
+ type: string
6046
+ minLength: 0
6047
+ postaim_presort_61:
6048
+ description: An Post sorting information.
6049
+ type: string
6050
+ minLength: 0
6051
+ postaim_presort_152:
6052
+ description: An Post sorting information.
6053
+ type: string
6054
+ minLength: 0
6055
+ publicity_post_zone:
6056
+ description: An Post publicity post zone information.
6057
+ type: string
6058
+ minLength: 0