{"openapi":"3.1.0","info":{"title":"NZ Address Lookup","description":"Address autocomplete and validation for New Zealand, backed by the LINZ NZ Addresses dataset. Attribution required: Sourced from LINZ. CC BY 4.0.","version":"2.0.0"},"paths":{"/api/address/suggestions":{"get":{"tags":["address"],"summary":"Suggestions","operationId":"suggestions_api_address_suggestions_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":200,"description":"Partial address","title":"Q"},"description":"Partial address"},{"name":"country","in":"query","required":false,"schema":{"type":"string","default":"nz","title":"Country"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":8,"title":"Limit"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AddressSuggestion"},"title":"Response Suggestions Api Address Suggestions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/metadata":{"get":{"tags":["address"],"summary":"Metadata","operationId":"metadata_api_address_metadata_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","description":"address_id from a suggestion","title":"Id"},"description":"address_id from a suggestion"},{"name":"country","in":"query","required":false,"schema":{"type":"string","default":"nz","title":"Country"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressMetadata"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","description":"Unauthenticated so a load balancer or uptime check can hit it.\n\nReports the build provenance of the loaded dataset, which is the only\nway to tell from outside how stale the LINZ extract has become.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}}},"components":{"schemas":{"AddressMetadata":{"properties":{"address":{"type":"string","title":"Address"},"suburb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suburb"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"}},"type":"object","required":["address"],"title":"AddressMetadata"},"AddressSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"address":{"type":"string","title":"Address"}},"type":"object","required":["id","address"],"title":"AddressSuggestion"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"address_count":{"type":"integer","title":"Address Count"},"data_built_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Built At"},"data_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source"},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["status","address_count","attribution"],"title":"HealthResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}