-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
4244 lines (4148 loc) · 194 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: '3.0.3'
info:
title: Postcodes.io
version: '1.0.1'
description: |
Postcodes.io allows UK postcode data to be queried over a JSON HTTP API.
Postcodes.io is an open sourced project maintained by Ideal Postcodes.
It is a free resource, allowing developers to search, reverse geocode and extract UK postcode and associated data.
license:
name: MIT
contact:
name: Ideal Postcodes
url: https://postcodes.io/
x-logo:
url: 'https://stevegoossens.github.io/images/ideal-postcodes/logo-original.png'
backgroundColor: '#05326d'
altText: 'Ideal Postcodes logo'
servers:
- url: https://api.postcodes.io
description: Public API
components:
schemas:
Geolocation:
required:
- latitude
- longitude
properties:
latitude:
$ref: '#/components/schemas/latitude'
longitude:
$ref: '#/components/schemas/longitude'
filter:
$ref: '#/components/schemas/filter'
limit:
$ref: '#/components/schemas/limit'
radius:
$ref: '#/components/schemas/radius'
widesearch:
type: boolean
description: |
Search up to 20km radius, but subject to a maximum of 10 results
OutcodeData:
description: |
### Outcode Data (Ordnance Survey Postcode Directory Dataset)
Data returned by the `/outcodes` API
properties:
admin_county:
type: array
description: |
### County
The current counties under the outcode.
items:
$ref: '#/components/schemas/admin_county'
admin_district:
type: array
description: |
### District
The current district/unitary authorites under the outcode.
items:
$ref: '#/components/schemas/admin_district'
admin_ward:
type: array
description: |
### Ward
The current administrative/electoral areas under the outcode
items:
$ref: '#/components/schemas/admin_ward'
country:
type: array
description: |
### Country
The countries included in the outcode.
items:
$ref: '#/components/schemas/country'
eastings:
$ref: '#/components/schemas/eastings'
latitude:
$ref: '#/components/schemas/latitude_nullable'
longitude:
$ref: '#/components/schemas/longitude_nullable'
northings:
$ref: '#/components/schemas/northings'
outcode:
$ref: '#/components/schemas/outcode'
parish:
type: array
description: |
### Parish (England)/community (Wales)
The parishes included in the outcode.
items:
$ref: '#/components/schemas/parish'
parliamentary_constituency:
type: array
items:
$ref: '#/components/schemas/parliamentary_constituency'
PostcodeData:
description: |
### Postcode Data (Ordnance Survey Postcode Directory Dataset)
Data points returned by the `/postcodes` and `/outcodes` API
Note: Some fields may be null if not applicable or populated.
properties:
admin_county:
$ref: '#/components/schemas/admin_county'
admin_district:
$ref: '#/components/schemas/admin_district'
admin_ward:
$ref: '#/components/schemas/admin_ward'
ccg:
$ref: '#/components/schemas/ccg'
ced:
$ref: '#/components/schemas/ced'
codes:
description: |
### Returns an ID or Code associated with the postcode
Typically, these are a 9 character code known as an ONS Code or GSS Code. This is currently only available for districts, parishes, counties, CCGs, NUTS and wards.
properties:
admin_county:
$ref: '#/components/schemas/admin_county'
admin_district:
$ref: '#/components/schemas/admin_district'
admin_ward:
$ref: '#/components/schemas/admin_ward'
ccg:
$ref: '#/components/schemas/ccg'
ccg_id:
$ref: '#/components/schemas/ccg_code'
ced:
$ref: '#/components/schemas/ced'
lau2:
type: string
nullable: true
description: The LAU2 code associated with the postcode.
lsoa:
$ref: '#/components/schemas/lsoa'
msoa:
$ref: '#/components/schemas/msoa'
nuts:
type: string
nullable: true
description: The ITL code associated with the postcode.
parish:
$ref: '#/components/schemas/parish'
parliamentary_constituency:
$ref: '#/components/schemas/parliamentary_constituency'
pfa:
$ref: '#/components/schemas/pfa'
country:
$ref: '#/components/schemas/country'
date_of_introduction:
$ref: '#/components/schemas/date_of_introduction'
eastings:
$ref: '#/components/schemas/eastings'
european_electoral_region:
$ref: '#/components/schemas/european_electoral_region'
incode:
$ref: '#/components/schemas/incode'
latitude:
$ref: '#/components/schemas/latitude_nullable'
longitude:
$ref: '#/components/schemas/longitude_nullable'
lsoa:
$ref: '#/components/schemas/lsoa'
msoa:
$ref: '#/components/schemas/msoa'
nhs_ha:
$ref: '#/components/schemas/nhs_ha'
northings:
$ref: '#/components/schemas/northings'
nuts:
$ref: '#/components/schemas/nuts'
outcode:
$ref: '#/components/schemas/outcode'
parish:
$ref: '#/components/schemas/parish'
parliamentary_constituency:
$ref: '#/components/schemas/parliamentary_constituency'
pfa:
$ref: '#/components/schemas/pfa'
postcode:
$ref: '#/components/schemas/postcode'
primary_care_trust:
$ref: '#/components/schemas/primary_care_trust'
quality:
$ref: '#/components/schemas/quality'
region:
$ref: '#/components/schemas/region'
PostcodeDataReverseGeocoding:
allOf:
- $ref: '#/components/schemas/PostcodeData'
- properties:
distance:
type: number
format: float
description: |
Distance in metres from specified postode
ScottishPostcodeData:
description: |
### Scottish Postcode Data (Scottish Postcode Directory)
Data returned by the `/scotland/*` APIs
properties:
codes:
description: |
### Returns an ID or Code associated with the postcode
Typically, these are a 9 character code known as an ONS Code or GSS Code.
properties:
scottish_parliamentary_constituency:
$ref: '#/components/schemas/scottish_parliamentary_constituency'
postcode:
type: string
description: |
### Postcode
Royal Mail postcode.
scottish_parliamentary_constituency:
$ref: '#/components/schemas/scottish_parliamentary_constituency_nullable'
ServerResponseBody:
properties:
status:
type: integer
format: int32
description: HTTP Status Code
ServerErrorResponseBody:
allOf:
- $ref: '#/components/schemas/ServerResponseBody'
- properties:
error:
type: string
TerminatedPostcodeData:
description: |
### Terminated Postcode Data (Ordnance Survey Postcode Directory Dataset)
Data returned by the `/terminated_postcodes/*` APIs
properties:
latitude:
$ref: '#/components/schemas/latitude'
longitude:
$ref: '#/components/schemas/longitude'
month_terminated:
type: integer
format: int32
description: |
### Termination month
Month of termination of a postcode. 1-January, 2-February ... 12-December.
postcode:
type: string
description: |
### Postcode
All currently terminated postcodes within the United Kingdom, the Channel Islands and the Isle of Man, received every 3 months from Royal Mail. 2, 3 or 4-character outward code, single space and 3-character inward code.
year_terminated:
type: integer
format: int32
description: |
### Termination year
Year of termination of a postcode.
PlacesData:
description: |
### Places Data (Ordnance Survey Open Names Dataset)
Data returned by the /places API
Note: Some fields may be null if not applicable or populated.
properties:
code:
$ref: '#/components/schemas/code'
country:
type: string
description: |
### Country
OS Places relates to Great Britain only. i.e. `England`, `Scotland`, `Wales`.
county_unitary:
type: string
nullable: true
description: |
### Administrative Area
The name of the County (non-metropolitan or Metropolitan), Unitary Authority or Greater London Authority administrative area that the point geometry for feature is within or nearest to.
county_unitary_type:
type: string
nullable: true
description: |
### Administrative Area Type
Classifies the type of administrative unit.
district_borough:
type: string
nullable: true
description: |
### District or Borough
The name of the District, Metropolitan District or London Borough administrative unit that the point geometry for the feature is within.
district_borough_type:
type: string
nullable: true
description: |
### Borough Type
Classifies the type of administrative unit.
eastings:
type: integer
format: int32
description: |
### Eastings
The Ordnance Survey postcode grid reference Easting to 1 metre resolution; blank for postcodes in the Channel Islands and the Isle of Man.
latitude:
$ref: '#/components/schemas/latitude'
local_type:
type: string
description: |
### Local Type
The Ordnance Survey classification for the named place being represented by the specific feature, e.g. `City`, `Town`, `Village`, `Hamlet`, `Other Settlement`, `Suburban Area`.
longitude:
$ref: '#/components/schemas/longitude'
max_eastings:
$ref: '#/components/schemas/max_min_northings_max_min_eastings'
min_eastings:
$ref: '#/components/schemas/max_min_northings_max_min_eastings'
max_northings:
$ref: '#/components/schemas/max_min_northings_max_min_eastings'
min_northings:
$ref: '#/components/schemas/max_min_northings_max_min_eastings'
name_1:
type: string
description: |
### Name
The proper noun that applies to the real world entity. Names that are prefixed by the definite article are not formatted for alphabetical sorting, that is, ‘The Pennines’ not ‘Pennines, The’.
name_1_lang:
$ref: '#/components/schemas/name_lang'
name_2:
type: string
nullable: true
description: |
### Name (in case of multiple languages)
The proper noun that applies to the real world entity. Names that are prefixed by the definite article are not formatted for alphabetical sorting, that is, ‘The Pennines’ not ‘Pennines, The’.
name_2_lang:
$ref: '#/components/schemas/name_lang'
northings:
type: integer
format: int32
description: |
### Northings
The Ordnance Survey postcode grid reference Northing to 1 metre resolution; blank for postcodes in the Channel Islands and the Isle of Man.
outcode:
$ref: '#/components/schemas/outcode'
region:
type: string
description: |
### Region
The name of the European Region (was Government O ice Region) that the point geometry for the feature is within or nearest to.
admin_county:
type: string
nullable: true
description: |
### County
The current county to which the postcode has been assigned.
admin_district:
type: string
nullable: true
description: |
### District
The current district/unitary authority to which the postcode has been assigned.
admin_ward:
type: string
nullable: true
description: |
### Ward
The current administrative/electoral area to which the postcode has been assigned.
BulkPostcodeLookupResultItem:
required:
- query
- result
properties:
query:
$ref: '#/components/schemas/postcode'
result:
allOf:
- type: object
nullable: true
- $ref: '#/components/schemas/PostcodeData'
BulkReverseGeocodingResultItem:
required:
- query
- result
properties:
query:
$ref: '#/components/schemas/Geolocation'
result:
type: array
items:
allOf:
- type: object
nullable: true
- $ref: '#/components/schemas/PostcodeDataReverseGeocoding'
ccg:
type: string
nullable: true
description: |
### Sub ICB Location (LOC)/ Local Health Board (LHB)/ Community Health Partnership (CHP)/ Local Commissioning Group (LCG)/ Primary Healthcare Directorate (PHD)
The code for the Sub ICB Locations in England, LHBs in Wales, CHPs in Scotland, LCG in Northern Ireland and PHD in the Isle of Man; there are no equivalent areas in the Channel Islands. This was formerly Clinical Commissioning Group. From July 2022, CCGs were replaced by Sub-ICB locations.
ccg_code:
type: string
nullable: true
description: CCG Short Code. e.g. "07N".
ced:
type: string
nullable: true
description: |
### County Electoral District
The county electoral division code for each English postcode. Pseudo codes are included for the remainder of the UK. The field will be null for English postcodes with no grid reference. English county councils use county electoral divisions (CED) to elect councillors. These CEDs must be confined within district boundaries, but need not be based on whole electoral wards. The only exceptions are the Isles of Scilly and the Greater London Authority (GLA). CEDs do not exist within UAs.
code:
type: string
description: |
### code
A unique identifier that enables records to be identified easily. The identifier will be persistent for all LocalTypes except Section of Named Road and Section of Numbered Road.
country:
type: string
description: |
### Country
The country (i.e. one of the four constituent countries of the United Kingdom or the Channel Islands or the Isle of Man) to which each postcode is assigned.
date_of_introduction:
type: string
nullable: true
description: |
TODO: undocumented
eastings:
type: integer
format: int32
nullable: true
description: |
### Eastings
The Ordnance Survey postcode grid reference Easting to 1 metre resolution. Grid references for postcodes in Northern Ireland relate to the Irish Grid system. May be null if geolocation not available.
european_electoral_region:
type: string
nullable: true
description: |
### European Electoral Region
The European Electoral Region code for each postcode.
filter:
description: |
A comma separated whitelist of attributes to be returned in the result object(s), e.g. `filter=postcode,longitude,latitude`. `null` responses will continue to return `null`. If no attributes match the result object, an empty object is returned
type: string
incode:
type: string
description: |
### Inward Code
The inward part is the part of the postcode after the single space in the middle. It is three characters long. The inward code assists in the delivery of post within a postal district. Examples of inward codes include "0NY", "7GZ", "7HF", or "8JQ".
latitude_nullable:
type: number
format: double
nullable: true
description: |
### Latitude
The WGS84 latitude given the Postcode's national grid reference. May be null if geolocation not available.
latitude:
type: number
format: double
description: |
### Latitude
The WGS84 latitude given the Postcode's national grid reference.
limit:
type: integer
format: int32
description: |
Limits number of postcodes matches to return. Defaults to 10. Needs to be less than 100.
longitude:
type: number
format: double
description: |
### Longitude
The WGS84 longitude given the Postcode's national grid reference.
longitude_nullable:
type: number
format: double
nullable: true
description: |
### Longitude
The WGS84 longitude given the Postcode's national grid reference. May be null if geolocation not available.
lsoa:
type: string
nullable: true
description: |
### 2011 Census Lower Layer Super Output Area (LSOA)
The 2011 Census lower layer SOA code for England and Wales, SOA code for Northern Ireland and data zone code for Scotland.
max_min_northings_max_min_eastings:
type: integer
format: int32
description: |
### Maximum & Minimum, Northings & Eastings
Bounding box or Minimum Bounding Rectangle (MBR) for roads and settlements. For Settlements and Sections of Named and Numbered Roads, the MBR gives a representation of the extent of these features and is not snapped to the real world extent.
msoa:
type: string
nullable: true
description: |
### 2011 Census Middle Layer Super Output Area (MSOA)
The 2011 Census middle layer SOA (MSOA) code for England and Wales and intermediate zone for Scotland.
name_lang:
type: string
nullable: true
description: |
### Language of Name
The language type is only set where more than one name exists, e.g. cym (Welsh), eng (English), gla (Scottish Gaelic).
nhs_ha:
type: string
nullable: true
description: |
### Strategic Health Authority
The health area code for the postcode.
northings:
type: integer
format: int32
nullable: true
description: |
### Northings
The Ordnance Survey postcode grid reference Northing to 1 metre resolution. Grid references for postcodes in Northern Ireland relate to the Irish Grid system. May be null if geolocation not available.
nuts:
type: string
nullable: true
description: |
### International Terratorial Levels (ITL) (Former Nomenclature of Units for Territorial Statistics (NUTS)
The national LAU1-equivalent code for each postcode. Pseudo codes are included for Channel Islands and Isle of Man. The field will otherwise be blank for postcodes with no grid reference.
As of May 2021. NUTS has changed to International Territorial Levels (ITL). Postcodes.io will report ITL in `nuts` and `codes.nuts` to preserve backwards compatibility.
Following the UK's withdrawal from the EU, a new UK-managed international statistical geography - ITL (International Territorial Levels) - was introduced from 1st January 2021, replacing the former NUTS classification. They align with international standards, enabling comparability both over time and internationally. To ensure continued alignment, the ITLs mirror the NUTS system. They also follow a similar review timetable - every three years.
NUTS is a hierarchical classification of spatial units that provides a breakdown of the European Union’s territory for producing regional statistics that are comparable across the Union.
The ITL area classification in the UK comprises current national administrative and electoral areas, except in Scotland where some ITL areas comprise whole and/or part Local Enterprise Regions.
The ONSPD contains the LAU1 code (9-character LAD/UA code for England, Wales and Northern Ireland and 'S30' code for Scotland). A comprehensive lookup of LAU and ITL codes is included with the accompanying metadata.
outcode:
type: string
description: |
### Outward Code
The outward code is the part of the postcode before the single space in the middle. It is between two and four characters long. A few outward codes are non-geographic, not divulging where mail is to be sent. Examples of outward codes include "L1", "W1A", "RH1", "RH10" or "SE1P".
parish:
type: string
nullable: true
description: |
### Parish
The smallest type of administrative area in England is the parish (also known as 'civil parish'); the equivalent units in Wales are communities.
parliamentary_constituency:
type: string
nullable: true
description: |
### Westminster Parliamentary Constituency
The Westminster Parliamentary Constituency code for each postcode.
pfa:
type: string
description: |
TODO: undocumented
postcode:
type: string
description: |
### Postcode
All current (‘live’) postcodes within the United Kingdom, the Channel Islands and the Isle of Man, received monthly from Royal Mail. 2, 3 or 4-character outward code, single space and 3-character inward code.
primary_care_trust:
type: string
nullable: true
description: |
### Primary Care Trust (PCT)
The code for the Primary Care areas in England, LHBs in Wales, CHPs in Scotland, LCG in Northern Ireland and PHD in the Isle of Man; there are no equivalent areas in the Channel Islands. Care Trust/ Care Trust Plus (CT)/ local health board (LHB)/ community health partnership (CHP)/ local commissioning group (LCG)/ primary healthcare directorate (PHD).
quality:
type: integer
format: int32
description: |
### Positional Quality
Shows the status of the assigned grid reference.
- 1 = within the building of the matched address closest to the postcode mean
- 2 = as for status value 1, except by visual inspection of Landline maps (Scotland only)
- 3 = approximate to within 50m
- 4 = postcode unit mean (mean of matched addresses with the same postcode, but not snapped to a building)
- 5 = imputed by ONS, by reference to surrounding postcode grid references
- 6 = postcode sector mean, (mainly | PO Boxes)
- 8 = postcode terminated prior to Gridlink® initiative, last known ONS postcode grid reference1
- 9 = no grid reference available
query:
type: string
description: Postcode search (prefix match)
radius:
type: integer
format: int32
description: |
Limits number of postcodes matches to return. Defaults to 100m. Needs to be less than 2,000m.
region:
type: string
nullable: true
description: |
### Region
The Region code for each postcode. The nine GORs were abolished on 1 April 2011 and are now known as ‘Regions’. They were the primary statistical subdivisions of England and also the areas in which the Government Offices for the Regions fulfilled their role. Each GOR covered a number of local authorities.
scottish_parliamentary_constituency:
type: string
description: |
### Scottish Parliamentary Constituency
2014 Scottish Parliamentary Constituency.
scottish_parliamentary_constituency_nullable:
type: string
nullable: true
description: |
### Scottish Parliamentary Constituency
2014 Scottish Parliamentary Constituency.
paths:
/outcodes:
get:
operationId: outcodeReverseGeocoding
tags:
- Outcodes
summary: Outcode Reverse Geocoding
description: |
Returns nearest outcodes for a given longitude and latitude.
parameters:
- in: query
required: true
name: lon
schema:
$ref: '#/components/schemas/longitude'
- in: query
required: true
name: lat
schema:
$ref: '#/components/schemas/latitude'
- in: query
name: limit
required: false
schema:
type: integer
format: int32
description: |
Limits number of outcodes matches to return. Defaults to 10. Needs to be less than 100.
- in: query
name: radius
required: false
schema:
type: integer
format: int32
description: |
Limits number of outcodes matches to return. Defaults to 5000m. Needs to be less than 25,000m.
x-codeSamples:
- lang: JavaScript
label: '@stevegoossens/postcodes.io (JS/TS)'
source: |
const lon = -2.302836
const lat = 53.455654
const outcodeDataList = await postcodesIO
.outcodeReverseGeocoding(lon, lat)
- lang: JavaScript
label: '@stevegoossens/postcodes.io (JS/TS)'
source: |
const lon = -2.302836
const lat = 53.455654
const outcodeDataList = await postcodesIO
.outcodeReverseGeocoding(lon, lat, {limit: 3})
responses:
'200':
description: List of Outcode Data
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ServerResponseBody'
- properties:
result:
type: array
nullable: true
items:
$ref: '#/components/schemas/OutcodeData'
examples:
found:
summary: Found
value:
{
"status": 200,
"result": [
{
"outcode": "L16",
"longitude": -2.8875342145749,
"latitude": 53.39873448583,
"northings": 389468,
"eastings": 341084,
"admin_district": [
"Knowsley",
"Liverpool"
],
"parish": [
"Knowsley, unparished area",
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Woolton",
"Belle Vale",
"Roby",
"Greenbank",
"Church",
"Childwall"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Garston and Halewood",
"Liverpool, Riverside",
"Knowsley"
]
},
{
"outcode": "L15",
"longitude": -2.92057201265823,
"latitude": 53.3975726793249,
"northings": 389366,
"eastings": 338885,
"admin_district": [
"Liverpool"
],
"parish": [
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Picton",
"Greenbank",
"Church",
"Wavertree",
"Childwall"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Liverpool, Riverside"
]
},
{
"outcode": "L18",
"longitude": -2.90821618411553,
"latitude": 53.3805520054152,
"northings": 387462,
"eastings": 339683,
"admin_district": [
"Liverpool"
],
"parish": [
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Woolton",
"Allerton and Hunts Cross",
"Cressington",
"Mossley Hill",
"Greenbank",
"Church"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Garston and Halewood",
"Liverpool, Riverside"
]
},
{
"outcode": "L70",
"longitude": -2.9567696,
"latitude": 53.4040682666667,
"northings": 390122,
"eastings": 336487,
"admin_district": [
"Knowsley",
"Sefton",
"Liverpool"
],
"parish": [
"Knowsley, unparished area",
"Sefton, unparished area",
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Netherton and Orrell",
"Speke-Garston",
"Riverside",
"Central",
"Northwood"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Garston and Halewood",
"Liverpool, Riverside",
"Knowsley",
"Bootle"
]
},
{
"outcode": "L12",
"longitude": -2.89577164805414,
"latitude": 53.4349747614213,
"northings": 393506,
"eastings": 340587,
"admin_district": [
"Liverpool"
],
"parish": [
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Yew Tree",
"Croxteth",
"West Derby",
"Greenbank",
"Old Swan",
"Wavertree",
"Clubmoor",
"Childwall",
"Tuebrook and Stoneycroft",
"Knotty Ash"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Liverpool, Riverside",
"Liverpool, Walton",
"Liverpool, West Derby"
]
}
]
}
foundLimit3:
summary: Found (limit=3)
value:
{
"status": 200,
"result": [
{
"outcode": "L16",
"longitude": -2.8875342145749,
"latitude": 53.39873448583,
"northings": 389468,
"eastings": 341084,
"admin_district": [
"Knowsley",
"Liverpool"
],
"parish": [
"Knowsley, unparished area",
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Woolton",
"Belle Vale",
"Roby",
"Greenbank",
"Church",
"Childwall"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Garston and Halewood",
"Liverpool, Riverside",
"Knowsley"
]
},
{
"outcode": "L15",
"longitude": -2.92057201265823,
"latitude": 53.3975726793249,
"northings": 389366,
"eastings": 338885,
"admin_district": [
"Liverpool"
],
"parish": [
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Picton",
"Greenbank",
"Church",
"Wavertree",
"Childwall"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Liverpool, Riverside"
]
},
{
"outcode": "L18",
"longitude": -2.90821618411553,
"latitude": 53.3805520054152,
"northings": 387462,
"eastings": 339683,
"admin_district": [
"Liverpool"
],
"parish": [
"Liverpool, unparished area"
],
"admin_county": [],
"admin_ward": [
"Woolton",
"Allerton and Hunts Cross",
"Cressington",
"Mossley Hill",
"Greenbank",
"Church"
],
"country": [
"England"
],
"parliamentary_constituency": [
"Liverpool, Wavertree",
"Garston and Halewood",
"Liverpool, Riverside"
]
}
]
}
nonMatchingLonLat:
summary: Non-matching longitude/latitude
value:
status: 200
result: null
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ServerErrorResponseBody'
examples:
missingLatLon: