@bradleyhodges/addresskit 2.2.3
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/LICENSE +339 -0
- package/README.md +567 -0
- package/api/swagger-2.yaml +472 -0
- package/api/swagger.yaml +826 -0
- package/dist/api/swagger-2.yaml +472 -0
- package/dist/api/swagger.yaml +826 -0
- package/dist/cli.js +69272 -0
- package/package.json +107 -0
|
@@ -0,0 +1,826 @@
|
|
|
1
|
+
swagger: '2.0'
|
|
2
|
+
info:
|
|
3
|
+
description: |
|
|
4
|
+
Scalable address ingestion, validation, search, and autocomplete engine for Australian addresses.
|
|
5
|
+
|
|
6
|
+
This API conforms to the [JSON:API v1.1 specification](https://jsonapi.org/format/).
|
|
7
|
+
All responses use the `application/vnd.api+json` media type.
|
|
8
|
+
version: '2.0.0'
|
|
9
|
+
title: 'AddressKit'
|
|
10
|
+
contact:
|
|
11
|
+
name: 'AddressKit Support'
|
|
12
|
+
license:
|
|
13
|
+
name: 'MIT'
|
|
14
|
+
basePath: '/'
|
|
15
|
+
tags:
|
|
16
|
+
- name: address
|
|
17
|
+
description: Australian address lookup and autocomplete operations
|
|
18
|
+
schemes:
|
|
19
|
+
- 'https'
|
|
20
|
+
- 'http'
|
|
21
|
+
consumes:
|
|
22
|
+
- 'application/vnd.api+json'
|
|
23
|
+
produces:
|
|
24
|
+
- 'application/vnd.api+json'
|
|
25
|
+
paths:
|
|
26
|
+
/:
|
|
27
|
+
get:
|
|
28
|
+
summary: API Root
|
|
29
|
+
operationId: getApiRoot
|
|
30
|
+
x-swagger-router-controller: Default
|
|
31
|
+
x-root-rel: self
|
|
32
|
+
description: |
|
|
33
|
+
Returns a list of available APIs within the `Link` headers.
|
|
34
|
+
This endpoint serves as the HATEOAS entry point for API discoverability.
|
|
35
|
+
responses:
|
|
36
|
+
200:
|
|
37
|
+
description: successful operation
|
|
38
|
+
schema:
|
|
39
|
+
$ref: '#/definitions/Root'
|
|
40
|
+
headers:
|
|
41
|
+
link:
|
|
42
|
+
description: RFC 5988 Links for resource discovery
|
|
43
|
+
type: array
|
|
44
|
+
collectionFormat: csv
|
|
45
|
+
items:
|
|
46
|
+
type: string
|
|
47
|
+
pattern: '<(.*)>;(.*)'
|
|
48
|
+
link-template:
|
|
49
|
+
description: RFC 6570 Link Templates for parameterized endpoints
|
|
50
|
+
type: array
|
|
51
|
+
collectionFormat: csv
|
|
52
|
+
items:
|
|
53
|
+
type: string
|
|
54
|
+
pattern: '<(.*)>;(.*)'
|
|
55
|
+
503:
|
|
56
|
+
description: service unavailable
|
|
57
|
+
schema:
|
|
58
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
59
|
+
500:
|
|
60
|
+
description: unexpected error
|
|
61
|
+
schema:
|
|
62
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
63
|
+
/addresses:
|
|
64
|
+
get:
|
|
65
|
+
summary: Search Addresses (Autocomplete)
|
|
66
|
+
operationId: getAddresses
|
|
67
|
+
x-swagger-router-controller: Addresses
|
|
68
|
+
description: |
|
|
69
|
+
Searches for addresses matching the query string and returns lightweight
|
|
70
|
+
autocomplete suggestions optimized for typeahead UX.
|
|
71
|
+
|
|
72
|
+
Each result contains only the display text (SLA) and address ID. Use the
|
|
73
|
+
`/addresses/{addressId}` endpoint to retrieve full address details.
|
|
74
|
+
|
|
75
|
+
Results are paginated using JSON:API pagination parameters.
|
|
76
|
+
tags:
|
|
77
|
+
- address
|
|
78
|
+
parameters:
|
|
79
|
+
- name: q
|
|
80
|
+
in: query
|
|
81
|
+
description: |
|
|
82
|
+
Search query string. Supports fuzzy matching against single-line
|
|
83
|
+
addresses (SLA). Minimum 3 characters required.
|
|
84
|
+
type: string
|
|
85
|
+
minLength: 3
|
|
86
|
+
required: true
|
|
87
|
+
- name: page[number]
|
|
88
|
+
in: query
|
|
89
|
+
description: |
|
|
90
|
+
Page number for pagination (1-indexed). Defaults to 1.
|
|
91
|
+
type: integer
|
|
92
|
+
minimum: 1
|
|
93
|
+
required: false
|
|
94
|
+
- name: page[size]
|
|
95
|
+
in: query
|
|
96
|
+
description: |
|
|
97
|
+
Number of results per page. Defaults to 10, maximum 100.
|
|
98
|
+
type: integer
|
|
99
|
+
minimum: 1
|
|
100
|
+
maximum: 100
|
|
101
|
+
required: false
|
|
102
|
+
responses:
|
|
103
|
+
200:
|
|
104
|
+
description: successful query
|
|
105
|
+
schema:
|
|
106
|
+
$ref: '#/definitions/AddressAutocompleteDocument'
|
|
107
|
+
headers:
|
|
108
|
+
link:
|
|
109
|
+
description: RFC 5988 Links for pagination
|
|
110
|
+
type: array
|
|
111
|
+
collectionFormat: csv
|
|
112
|
+
items:
|
|
113
|
+
type: string
|
|
114
|
+
pattern: '<(.*)>;(.*)'
|
|
115
|
+
link-template:
|
|
116
|
+
description: RFC 6570 Link Templates
|
|
117
|
+
type: array
|
|
118
|
+
collectionFormat: csv
|
|
119
|
+
items:
|
|
120
|
+
type: string
|
|
121
|
+
pattern: '<(.*)>;(.*)'
|
|
122
|
+
400:
|
|
123
|
+
description: invalid query parameters
|
|
124
|
+
schema:
|
|
125
|
+
$ref: '#/definitions/JsonApiErrorDocument'
|
|
126
|
+
503:
|
|
127
|
+
description: service unavailable
|
|
128
|
+
schema:
|
|
129
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
130
|
+
504:
|
|
131
|
+
description: gateway timeout
|
|
132
|
+
schema:
|
|
133
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
134
|
+
500:
|
|
135
|
+
description: unexpected error
|
|
136
|
+
schema:
|
|
137
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
138
|
+
/addresses/{addressId}:
|
|
139
|
+
get:
|
|
140
|
+
summary: Get Address Details
|
|
141
|
+
operationId: getAddress
|
|
142
|
+
x-swagger-router-controller: Addresses
|
|
143
|
+
description: |
|
|
144
|
+
Returns comprehensive details about a specific address by its unique
|
|
145
|
+
G-NAF Persistent Identifier (PID).
|
|
146
|
+
|
|
147
|
+
The response includes:
|
|
148
|
+
- Single-line and multi-line address formats
|
|
149
|
+
- Fully structured address components (flat, level, street, locality, etc.)
|
|
150
|
+
- Geocoding information when available
|
|
151
|
+
tags:
|
|
152
|
+
- address
|
|
153
|
+
parameters:
|
|
154
|
+
- name: addressId
|
|
155
|
+
in: path
|
|
156
|
+
description: |
|
|
157
|
+
The unique G-NAF Persistent Identifier (PID) for the address.
|
|
158
|
+
Example: `GANT_718592778`
|
|
159
|
+
type: string
|
|
160
|
+
required: true
|
|
161
|
+
responses:
|
|
162
|
+
200:
|
|
163
|
+
description: successful query
|
|
164
|
+
schema:
|
|
165
|
+
$ref: '#/definitions/AddressDetailDocument'
|
|
166
|
+
headers:
|
|
167
|
+
link:
|
|
168
|
+
description: RFC 5988 Links
|
|
169
|
+
type: array
|
|
170
|
+
collectionFormat: csv
|
|
171
|
+
items:
|
|
172
|
+
type: string
|
|
173
|
+
pattern: '<(.*)>;(.*)'
|
|
174
|
+
ETag:
|
|
175
|
+
description: Entity tag for cache validation
|
|
176
|
+
type: string
|
|
177
|
+
404:
|
|
178
|
+
description: address not found
|
|
179
|
+
schema:
|
|
180
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
181
|
+
503:
|
|
182
|
+
description: service unavailable
|
|
183
|
+
schema:
|
|
184
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
185
|
+
500:
|
|
186
|
+
description: unexpected error
|
|
187
|
+
schema:
|
|
188
|
+
$ref: "#/definitions/JsonApiErrorDocument"
|
|
189
|
+
definitions:
|
|
190
|
+
# ============================================================================
|
|
191
|
+
# JSON:API Core Types
|
|
192
|
+
# ============================================================================
|
|
193
|
+
JsonApiVersion:
|
|
194
|
+
type: object
|
|
195
|
+
description: JSON:API implementation information
|
|
196
|
+
properties:
|
|
197
|
+
version:
|
|
198
|
+
type: string
|
|
199
|
+
example: "1.1"
|
|
200
|
+
description: JSON:API specification version
|
|
201
|
+
|
|
202
|
+
JsonApiLinks:
|
|
203
|
+
type: object
|
|
204
|
+
description: JSON:API links object for HATEOAS navigation
|
|
205
|
+
properties:
|
|
206
|
+
self:
|
|
207
|
+
type: string
|
|
208
|
+
description: Link to the current resource or page
|
|
209
|
+
example: /addresses?q=sydney
|
|
210
|
+
first:
|
|
211
|
+
type: string
|
|
212
|
+
description: Link to the first page of results
|
|
213
|
+
example: /addresses?q=sydney
|
|
214
|
+
prev:
|
|
215
|
+
type: string
|
|
216
|
+
description: Link to the previous page of results (null if on first page)
|
|
217
|
+
x-nullable: true
|
|
218
|
+
next:
|
|
219
|
+
type: string
|
|
220
|
+
description: Link to the next page of results (null if on last page)
|
|
221
|
+
x-nullable: true
|
|
222
|
+
last:
|
|
223
|
+
type: string
|
|
224
|
+
description: Link to the last page of results
|
|
225
|
+
example: /addresses?q=sydney&page[number]=5
|
|
226
|
+
describedby:
|
|
227
|
+
type: object
|
|
228
|
+
description: Link to API documentation
|
|
229
|
+
properties:
|
|
230
|
+
href:
|
|
231
|
+
type: string
|
|
232
|
+
example: /docs/#operations-addresses-getAddresses
|
|
233
|
+
title:
|
|
234
|
+
type: string
|
|
235
|
+
example: getAddresses API Docs
|
|
236
|
+
type:
|
|
237
|
+
type: string
|
|
238
|
+
example: text/html
|
|
239
|
+
|
|
240
|
+
JsonApiMeta:
|
|
241
|
+
type: object
|
|
242
|
+
description: Pagination and response metadata
|
|
243
|
+
properties:
|
|
244
|
+
total:
|
|
245
|
+
type: integer
|
|
246
|
+
description: Total number of resources matching the query
|
|
247
|
+
example: 42
|
|
248
|
+
page:
|
|
249
|
+
type: integer
|
|
250
|
+
description: Current page number (1-indexed)
|
|
251
|
+
example: 1
|
|
252
|
+
pageSize:
|
|
253
|
+
type: integer
|
|
254
|
+
description: Number of items per page
|
|
255
|
+
example: 10
|
|
256
|
+
totalPages:
|
|
257
|
+
type: integer
|
|
258
|
+
description: Total number of pages available
|
|
259
|
+
example: 5
|
|
260
|
+
responseTime:
|
|
261
|
+
type: integer
|
|
262
|
+
description: Query processing time in milliseconds
|
|
263
|
+
example: 45
|
|
264
|
+
|
|
265
|
+
JsonApiError:
|
|
266
|
+
type: object
|
|
267
|
+
description: JSON:API error object
|
|
268
|
+
properties:
|
|
269
|
+
status:
|
|
270
|
+
type: string
|
|
271
|
+
description: HTTP status code as a string
|
|
272
|
+
example: "404"
|
|
273
|
+
code:
|
|
274
|
+
type: string
|
|
275
|
+
description: Application-specific error code
|
|
276
|
+
example: RESOURCE_NOT_FOUND
|
|
277
|
+
title:
|
|
278
|
+
type: string
|
|
279
|
+
description: Short human-readable summary
|
|
280
|
+
example: Not Found
|
|
281
|
+
detail:
|
|
282
|
+
type: string
|
|
283
|
+
description: Detailed explanation of the error
|
|
284
|
+
example: The address with ID 'INVALID_123' does not exist.
|
|
285
|
+
source:
|
|
286
|
+
type: object
|
|
287
|
+
description: Error source information
|
|
288
|
+
properties:
|
|
289
|
+
pointer:
|
|
290
|
+
type: string
|
|
291
|
+
description: JSON Pointer to the request value that caused the error
|
|
292
|
+
parameter:
|
|
293
|
+
type: string
|
|
294
|
+
description: Query parameter that caused the error
|
|
295
|
+
|
|
296
|
+
JsonApiErrorDocument:
|
|
297
|
+
type: object
|
|
298
|
+
description: JSON:API error response document
|
|
299
|
+
required:
|
|
300
|
+
- errors
|
|
301
|
+
properties:
|
|
302
|
+
jsonapi:
|
|
303
|
+
$ref: '#/definitions/JsonApiVersion'
|
|
304
|
+
errors:
|
|
305
|
+
type: array
|
|
306
|
+
items:
|
|
307
|
+
$ref: '#/definitions/JsonApiError'
|
|
308
|
+
minItems: 1
|
|
309
|
+
meta:
|
|
310
|
+
type: object
|
|
311
|
+
description: Document-level metadata
|
|
312
|
+
properties:
|
|
313
|
+
retryAfter:
|
|
314
|
+
type: integer
|
|
315
|
+
description: Seconds to wait before retrying (for 503 responses)
|
|
316
|
+
example: 30
|
|
317
|
+
|
|
318
|
+
# ============================================================================
|
|
319
|
+
# Address Autocomplete Types
|
|
320
|
+
# ============================================================================
|
|
321
|
+
AddressAutocompleteAttributes:
|
|
322
|
+
type: object
|
|
323
|
+
description: Minimal address data for autocomplete suggestions
|
|
324
|
+
required:
|
|
325
|
+
- sla
|
|
326
|
+
- rank
|
|
327
|
+
properties:
|
|
328
|
+
sla:
|
|
329
|
+
type: string
|
|
330
|
+
description: Single-line address for display in autocomplete dropdown
|
|
331
|
+
example: LEVEL 25, TOWER 3, 300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
332
|
+
ssla:
|
|
333
|
+
type: string
|
|
334
|
+
description: Short single-line address (for unit addresses)
|
|
335
|
+
example: 25/300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
336
|
+
rank:
|
|
337
|
+
type: number
|
|
338
|
+
format: float
|
|
339
|
+
description: Relevance score normalized to 0-1 range (1 = best match)
|
|
340
|
+
minimum: 0
|
|
341
|
+
maximum: 1
|
|
342
|
+
example: 0.95
|
|
343
|
+
|
|
344
|
+
AddressAutocompleteResource:
|
|
345
|
+
type: object
|
|
346
|
+
description: JSON:API resource for an autocomplete suggestion
|
|
347
|
+
required:
|
|
348
|
+
- type
|
|
349
|
+
- id
|
|
350
|
+
- attributes
|
|
351
|
+
properties:
|
|
352
|
+
type:
|
|
353
|
+
type: string
|
|
354
|
+
enum: [address-suggestion]
|
|
355
|
+
description: Resource type identifier
|
|
356
|
+
example: address-suggestion
|
|
357
|
+
id:
|
|
358
|
+
type: string
|
|
359
|
+
description: Unique address identifier (G-NAF PID)
|
|
360
|
+
example: GANT_718592778
|
|
361
|
+
attributes:
|
|
362
|
+
$ref: '#/definitions/AddressAutocompleteAttributes'
|
|
363
|
+
links:
|
|
364
|
+
type: object
|
|
365
|
+
properties:
|
|
366
|
+
self:
|
|
367
|
+
type: string
|
|
368
|
+
description: Link to full address details
|
|
369
|
+
example: /addresses/GANT_718592778
|
|
370
|
+
|
|
371
|
+
AddressAutocompleteDocument:
|
|
372
|
+
type: object
|
|
373
|
+
description: JSON:API document containing autocomplete results
|
|
374
|
+
required:
|
|
375
|
+
- data
|
|
376
|
+
properties:
|
|
377
|
+
jsonapi:
|
|
378
|
+
$ref: '#/definitions/JsonApiVersion'
|
|
379
|
+
data:
|
|
380
|
+
type: array
|
|
381
|
+
items:
|
|
382
|
+
$ref: '#/definitions/AddressAutocompleteResource'
|
|
383
|
+
description: Array of autocomplete suggestion resources
|
|
384
|
+
links:
|
|
385
|
+
$ref: '#/definitions/JsonApiLinks'
|
|
386
|
+
meta:
|
|
387
|
+
$ref: '#/definitions/JsonApiMeta'
|
|
388
|
+
example:
|
|
389
|
+
jsonapi:
|
|
390
|
+
version: "1.1"
|
|
391
|
+
data:
|
|
392
|
+
- type: address-suggestion
|
|
393
|
+
id: GANT_718592778
|
|
394
|
+
attributes:
|
|
395
|
+
sla: LEVEL 25, TOWER 3, 300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
396
|
+
rank: 1
|
|
397
|
+
links:
|
|
398
|
+
self: /addresses/GANT_718592778
|
|
399
|
+
- type: address-suggestion
|
|
400
|
+
id: GANT_718592782
|
|
401
|
+
attributes:
|
|
402
|
+
sla: 109 KIRRIBILLI AV, KIRRIBILLI NSW 2061
|
|
403
|
+
rank: 0.85
|
|
404
|
+
links:
|
|
405
|
+
self: /addresses/GANT_718592782
|
|
406
|
+
links:
|
|
407
|
+
self: /addresses?q=barangaroo
|
|
408
|
+
first: /addresses?q=barangaroo
|
|
409
|
+
prev: null
|
|
410
|
+
next: /addresses?q=barangaroo&page[number]=2
|
|
411
|
+
last: /addresses?q=barangaroo&page[number]=5
|
|
412
|
+
meta:
|
|
413
|
+
total: 42
|
|
414
|
+
page: 1
|
|
415
|
+
pageSize: 10
|
|
416
|
+
totalPages: 5
|
|
417
|
+
|
|
418
|
+
# ============================================================================
|
|
419
|
+
# Address Detail Types
|
|
420
|
+
# ============================================================================
|
|
421
|
+
AddressNumberRange:
|
|
422
|
+
type: object
|
|
423
|
+
description: Number component with optional prefix and suffix
|
|
424
|
+
properties:
|
|
425
|
+
prefix:
|
|
426
|
+
type: string
|
|
427
|
+
maxLength: 3
|
|
428
|
+
example: RMB
|
|
429
|
+
number:
|
|
430
|
+
type: integer
|
|
431
|
+
example: 42
|
|
432
|
+
suffix:
|
|
433
|
+
type: string
|
|
434
|
+
maxLength: 2
|
|
435
|
+
example: A
|
|
436
|
+
|
|
437
|
+
AddressNumber:
|
|
438
|
+
type: object
|
|
439
|
+
description: Street number with optional range
|
|
440
|
+
allOf:
|
|
441
|
+
- $ref: '#/definitions/AddressNumberRange'
|
|
442
|
+
- type: object
|
|
443
|
+
properties:
|
|
444
|
+
last:
|
|
445
|
+
$ref: '#/definitions/AddressNumberRange'
|
|
446
|
+
description: End of number range (for "10-12 Smith St" style)
|
|
447
|
+
|
|
448
|
+
AddressFlat:
|
|
449
|
+
type: object
|
|
450
|
+
description: Flat/unit details
|
|
451
|
+
properties:
|
|
452
|
+
type:
|
|
453
|
+
type: object
|
|
454
|
+
properties:
|
|
455
|
+
name:
|
|
456
|
+
type: string
|
|
457
|
+
example: Unit
|
|
458
|
+
maxLength: 50
|
|
459
|
+
code:
|
|
460
|
+
type: string
|
|
461
|
+
example: U
|
|
462
|
+
maxLength: 7
|
|
463
|
+
prefix:
|
|
464
|
+
type: string
|
|
465
|
+
maxLength: 2
|
|
466
|
+
number:
|
|
467
|
+
type: integer
|
|
468
|
+
example: 12
|
|
469
|
+
suffix:
|
|
470
|
+
type: string
|
|
471
|
+
maxLength: 2
|
|
472
|
+
|
|
473
|
+
AddressLevel:
|
|
474
|
+
type: object
|
|
475
|
+
description: Building level/floor details
|
|
476
|
+
properties:
|
|
477
|
+
type:
|
|
478
|
+
type: object
|
|
479
|
+
properties:
|
|
480
|
+
name:
|
|
481
|
+
type: string
|
|
482
|
+
example: Level
|
|
483
|
+
maxLength: 50
|
|
484
|
+
code:
|
|
485
|
+
type: string
|
|
486
|
+
example: L
|
|
487
|
+
maxLength: 4
|
|
488
|
+
prefix:
|
|
489
|
+
type: string
|
|
490
|
+
maxLength: 2
|
|
491
|
+
number:
|
|
492
|
+
type: integer
|
|
493
|
+
example: 25
|
|
494
|
+
suffix:
|
|
495
|
+
type: string
|
|
496
|
+
maxLength: 2
|
|
497
|
+
|
|
498
|
+
AddressStreet:
|
|
499
|
+
type: object
|
|
500
|
+
description: Street details
|
|
501
|
+
properties:
|
|
502
|
+
name:
|
|
503
|
+
type: string
|
|
504
|
+
example: Barangaroo
|
|
505
|
+
maxLength: 100
|
|
506
|
+
type:
|
|
507
|
+
type: object
|
|
508
|
+
properties:
|
|
509
|
+
name:
|
|
510
|
+
type: string
|
|
511
|
+
example: Avenue
|
|
512
|
+
maxLength: 50
|
|
513
|
+
code:
|
|
514
|
+
type: string
|
|
515
|
+
example: AV
|
|
516
|
+
maxLength: 15
|
|
517
|
+
suffix:
|
|
518
|
+
type: object
|
|
519
|
+
properties:
|
|
520
|
+
name:
|
|
521
|
+
type: string
|
|
522
|
+
example: North
|
|
523
|
+
maxLength: 50
|
|
524
|
+
code:
|
|
525
|
+
type: string
|
|
526
|
+
example: N
|
|
527
|
+
maxLength: 15
|
|
528
|
+
|
|
529
|
+
AddressLocality:
|
|
530
|
+
type: object
|
|
531
|
+
description: Locality (suburb/town) details
|
|
532
|
+
properties:
|
|
533
|
+
name:
|
|
534
|
+
type: string
|
|
535
|
+
example: Barangaroo
|
|
536
|
+
maxLength: 100
|
|
537
|
+
class:
|
|
538
|
+
type: object
|
|
539
|
+
properties:
|
|
540
|
+
code:
|
|
541
|
+
type: string
|
|
542
|
+
example: G
|
|
543
|
+
maxLength: 1
|
|
544
|
+
name:
|
|
545
|
+
type: string
|
|
546
|
+
example: GAZETTED LOCALITY
|
|
547
|
+
maxLength: 50
|
|
548
|
+
|
|
549
|
+
AddressState:
|
|
550
|
+
type: object
|
|
551
|
+
description: Australian state/territory
|
|
552
|
+
properties:
|
|
553
|
+
name:
|
|
554
|
+
type: string
|
|
555
|
+
example: New South Wales
|
|
556
|
+
maxLength: 50
|
|
557
|
+
abbreviation:
|
|
558
|
+
type: string
|
|
559
|
+
example: NSW
|
|
560
|
+
maxLength: 3
|
|
561
|
+
|
|
562
|
+
AddressLotNumber:
|
|
563
|
+
type: object
|
|
564
|
+
description: Lot number for rural/unaddressed properties
|
|
565
|
+
properties:
|
|
566
|
+
prefix:
|
|
567
|
+
type: string
|
|
568
|
+
maxLength: 2
|
|
569
|
+
number:
|
|
570
|
+
type: string
|
|
571
|
+
maxLength: 5
|
|
572
|
+
suffix:
|
|
573
|
+
type: string
|
|
574
|
+
maxLength: 2
|
|
575
|
+
|
|
576
|
+
AddressGeocode:
|
|
577
|
+
type: object
|
|
578
|
+
description: Geographic coordinate for the address
|
|
579
|
+
properties:
|
|
580
|
+
latitude:
|
|
581
|
+
type: number
|
|
582
|
+
format: double
|
|
583
|
+
example: -33.85351875
|
|
584
|
+
longitude:
|
|
585
|
+
type: number
|
|
586
|
+
format: double
|
|
587
|
+
example: 150.8947369
|
|
588
|
+
isDefault:
|
|
589
|
+
type: boolean
|
|
590
|
+
description: Whether this is the default geocode for the address
|
|
591
|
+
example: true
|
|
592
|
+
reliability:
|
|
593
|
+
type: object
|
|
594
|
+
properties:
|
|
595
|
+
code:
|
|
596
|
+
type: integer
|
|
597
|
+
description: Reliability code (1=best, 6=worst)
|
|
598
|
+
example: 2
|
|
599
|
+
name:
|
|
600
|
+
type: string
|
|
601
|
+
example: WITHIN ADDRESS SITE BOUNDARY OR ACCESS POINT
|
|
602
|
+
type:
|
|
603
|
+
type: object
|
|
604
|
+
properties:
|
|
605
|
+
code:
|
|
606
|
+
type: integer
|
|
607
|
+
example: 2
|
|
608
|
+
name:
|
|
609
|
+
type: string
|
|
610
|
+
example: PROPERTY CENTROID
|
|
611
|
+
description:
|
|
612
|
+
type: string
|
|
613
|
+
description: Additional textual description
|
|
614
|
+
example: REAR
|
|
615
|
+
|
|
616
|
+
AddressGeoLevel:
|
|
617
|
+
type: object
|
|
618
|
+
description: Geocoding level achieved for this address
|
|
619
|
+
properties:
|
|
620
|
+
code:
|
|
621
|
+
type: integer
|
|
622
|
+
description: Binary indicator of geocoding level (0-7)
|
|
623
|
+
example: 7
|
|
624
|
+
name:
|
|
625
|
+
type: string
|
|
626
|
+
description: Human-readable geocoding level description
|
|
627
|
+
example: LOCALITY, STREET, ADDRESS
|
|
628
|
+
|
|
629
|
+
StructuredAddress:
|
|
630
|
+
type: object
|
|
631
|
+
description: Fully parsed address components
|
|
632
|
+
properties:
|
|
633
|
+
buildingName:
|
|
634
|
+
type: string
|
|
635
|
+
description: Building or property name
|
|
636
|
+
maxLength: 200
|
|
637
|
+
example: Tower 3
|
|
638
|
+
lotNumber:
|
|
639
|
+
$ref: '#/definitions/AddressLotNumber'
|
|
640
|
+
flat:
|
|
641
|
+
$ref: '#/definitions/AddressFlat'
|
|
642
|
+
level:
|
|
643
|
+
$ref: '#/definitions/AddressLevel'
|
|
644
|
+
number:
|
|
645
|
+
$ref: '#/definitions/AddressNumber'
|
|
646
|
+
street:
|
|
647
|
+
$ref: '#/definitions/AddressStreet'
|
|
648
|
+
locality:
|
|
649
|
+
$ref: '#/definitions/AddressLocality'
|
|
650
|
+
state:
|
|
651
|
+
$ref: '#/definitions/AddressState'
|
|
652
|
+
postcode:
|
|
653
|
+
type: string
|
|
654
|
+
pattern: '^\d{4}$'
|
|
655
|
+
example: '2000'
|
|
656
|
+
description: Australian 4-digit postcode
|
|
657
|
+
confidence:
|
|
658
|
+
type: integer
|
|
659
|
+
description: Address confidence score (0-2, higher = more confidence)
|
|
660
|
+
minimum: 0
|
|
661
|
+
maximum: 2
|
|
662
|
+
example: 2
|
|
663
|
+
|
|
664
|
+
AddressGeo:
|
|
665
|
+
type: object
|
|
666
|
+
description: Geocoding information for the address
|
|
667
|
+
properties:
|
|
668
|
+
level:
|
|
669
|
+
$ref: '#/definitions/AddressGeoLevel'
|
|
670
|
+
geocodes:
|
|
671
|
+
type: array
|
|
672
|
+
items:
|
|
673
|
+
$ref: '#/definitions/AddressGeocode'
|
|
674
|
+
description: Array of geocode points for this address
|
|
675
|
+
|
|
676
|
+
AddressDetailAttributes:
|
|
677
|
+
type: object
|
|
678
|
+
description: Complete address details including structured components
|
|
679
|
+
required:
|
|
680
|
+
- pid
|
|
681
|
+
- sla
|
|
682
|
+
- structured
|
|
683
|
+
properties:
|
|
684
|
+
pid:
|
|
685
|
+
type: string
|
|
686
|
+
description: G-NAF Persistent Identifier (unique address ID)
|
|
687
|
+
example: GANT_718592778
|
|
688
|
+
sla:
|
|
689
|
+
type: string
|
|
690
|
+
description: Single-line address for display
|
|
691
|
+
example: LEVEL 25, TOWER 3, 300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
692
|
+
ssla:
|
|
693
|
+
type: string
|
|
694
|
+
description: Short single-line address (for unit addresses)
|
|
695
|
+
example: 25/300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
696
|
+
mla:
|
|
697
|
+
type: array
|
|
698
|
+
items:
|
|
699
|
+
type: string
|
|
700
|
+
minItems: 2
|
|
701
|
+
maxItems: 4
|
|
702
|
+
description: Multi-line address for mailing labels
|
|
703
|
+
example:
|
|
704
|
+
- LEVEL 25
|
|
705
|
+
- TOWER 3
|
|
706
|
+
- 300 BARANGAROO AV
|
|
707
|
+
- BARANGAROO NSW 2000
|
|
708
|
+
smla:
|
|
709
|
+
type: array
|
|
710
|
+
items:
|
|
711
|
+
type: string
|
|
712
|
+
minItems: 2
|
|
713
|
+
maxItems: 4
|
|
714
|
+
description: Short multi-line address
|
|
715
|
+
structured:
|
|
716
|
+
$ref: '#/definitions/StructuredAddress'
|
|
717
|
+
geo:
|
|
718
|
+
$ref: '#/definitions/AddressGeo'
|
|
719
|
+
|
|
720
|
+
AddressDetailResource:
|
|
721
|
+
type: object
|
|
722
|
+
description: JSON:API resource for a detailed address
|
|
723
|
+
required:
|
|
724
|
+
- type
|
|
725
|
+
- id
|
|
726
|
+
- attributes
|
|
727
|
+
properties:
|
|
728
|
+
type:
|
|
729
|
+
type: string
|
|
730
|
+
enum: [address]
|
|
731
|
+
description: Resource type identifier
|
|
732
|
+
example: address
|
|
733
|
+
id:
|
|
734
|
+
type: string
|
|
735
|
+
description: Unique address identifier (G-NAF PID)
|
|
736
|
+
example: GANT_718592778
|
|
737
|
+
attributes:
|
|
738
|
+
$ref: '#/definitions/AddressDetailAttributes'
|
|
739
|
+
links:
|
|
740
|
+
type: object
|
|
741
|
+
properties:
|
|
742
|
+
self:
|
|
743
|
+
type: string
|
|
744
|
+
description: Self-referential link
|
|
745
|
+
example: /addresses/GANT_718592778
|
|
746
|
+
|
|
747
|
+
AddressDetailDocument:
|
|
748
|
+
type: object
|
|
749
|
+
description: JSON:API document containing detailed address information
|
|
750
|
+
required:
|
|
751
|
+
- data
|
|
752
|
+
properties:
|
|
753
|
+
jsonapi:
|
|
754
|
+
$ref: '#/definitions/JsonApiVersion'
|
|
755
|
+
data:
|
|
756
|
+
$ref: '#/definitions/AddressDetailResource'
|
|
757
|
+
links:
|
|
758
|
+
type: object
|
|
759
|
+
properties:
|
|
760
|
+
self:
|
|
761
|
+
type: string
|
|
762
|
+
example: /addresses/GANT_718592778
|
|
763
|
+
example:
|
|
764
|
+
jsonapi:
|
|
765
|
+
version: "1.1"
|
|
766
|
+
data:
|
|
767
|
+
type: address
|
|
768
|
+
id: GANT_718592778
|
|
769
|
+
attributes:
|
|
770
|
+
pid: GANT_718592778
|
|
771
|
+
sla: LEVEL 25, TOWER 3, 300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
772
|
+
ssla: 25/300 BARANGAROO AV, BARANGAROO NSW 2000
|
|
773
|
+
mla:
|
|
774
|
+
- LEVEL 25
|
|
775
|
+
- TOWER 3
|
|
776
|
+
- 300 BARANGAROO AV
|
|
777
|
+
- BARANGAROO NSW 2000
|
|
778
|
+
structured:
|
|
779
|
+
buildingName: Tower 3
|
|
780
|
+
level:
|
|
781
|
+
type:
|
|
782
|
+
name: Level
|
|
783
|
+
code: L
|
|
784
|
+
number: 25
|
|
785
|
+
number:
|
|
786
|
+
number: 300
|
|
787
|
+
street:
|
|
788
|
+
name: Barangaroo
|
|
789
|
+
type:
|
|
790
|
+
name: Avenue
|
|
791
|
+
code: AV
|
|
792
|
+
locality:
|
|
793
|
+
name: Barangaroo
|
|
794
|
+
class:
|
|
795
|
+
code: G
|
|
796
|
+
name: GAZETTED LOCALITY
|
|
797
|
+
state:
|
|
798
|
+
name: New South Wales
|
|
799
|
+
abbreviation: NSW
|
|
800
|
+
postcode: '2000'
|
|
801
|
+
confidence: 2
|
|
802
|
+
geo:
|
|
803
|
+
level:
|
|
804
|
+
code: 7
|
|
805
|
+
name: LOCALITY, STREET, ADDRESS
|
|
806
|
+
geocodes:
|
|
807
|
+
- latitude: -33.85351875
|
|
808
|
+
longitude: 150.8947369
|
|
809
|
+
isDefault: true
|
|
810
|
+
reliability:
|
|
811
|
+
code: 2
|
|
812
|
+
name: WITHIN ADDRESS SITE BOUNDARY OR ACCESS POINT
|
|
813
|
+
type:
|
|
814
|
+
code: 2
|
|
815
|
+
name: PROPERTY CENTROID
|
|
816
|
+
links:
|
|
817
|
+
self: /addresses/GANT_718592778
|
|
818
|
+
links:
|
|
819
|
+
self: /addresses/GANT_718592778
|
|
820
|
+
|
|
821
|
+
# ============================================================================
|
|
822
|
+
# Root Types
|
|
823
|
+
# ============================================================================
|
|
824
|
+
Root:
|
|
825
|
+
type: object
|
|
826
|
+
description: API root response (links provided in headers)
|