{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/postfinder-io/main/json-schema/postfinder-io-nearby-response-schema.json", "title": "NearbyResponse", "description": "The nearest places, nearest first.", "x-generated": "2026-10-02", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/postfinder-io-openapi.json#/components/schemas/NearbyResponse", "type": "object", "properties": { "data": { "type": "array", "description": "Up to 30 places within 50 km.", "items": { "$ref": "#/$defs/NearbyPlace" } }, "generated_at": { "type": "string", "description": "When the answer was made. Answers are cached at the edge, so it can be up to an hour old.", "format": "date-time" } }, "required": [ "data", "generated_at" ], "additionalProperties": false, "$defs": { "NearbyPlace": { "type": "object", "description": "A place, with where it sits and how far it is from the point asked about.", "properties": { "public_id": { "type": "string", "description": "The place's permanent id: minted once, never reused, and the stable end of its URL.", "pattern": "^[a-z2-7]{8}$" }, "slug": { "type": "string", "description": "The URL segment this row has on postfinder.io." }, "name": { "type": "string", "description": "The name on the door." }, "brand": { "type": "string", "description": "Which operator runs it, as a key: auspost, parcelpoint, nzpost." }, "category": { "type": "string", "description": "What kind of place it is.", "enum": [ "post-offices", "post-boxes", "express-post-boxes", "parcel-lockers", "drop-off-points", "collection-points" ] }, "address": { "type": "string", "description": "The street address, where the source gives one. Absent otherwise: most post boxes have none." }, "lat": { "type": "number", "description": "Latitude." }, "lng": { "type": "number", "description": "Longitude." }, "hours": { "type": "object", "description": "Opening hours as the source publishes them, with a tz, the source's own text, and a weekly map of day to open and close pairs. Open by design: sources carry extra keys (temporary closures, a counter's separate hatch hours) and a reader should keep what it does not know.", "additionalProperties": true }, "attributes": { "type": "object", "description": "Whatever else the source says: phone, services, what can be sent or collected. Open by design, because each source names its own keys; read the ones you need.", "additionalProperties": true }, "last_verified_at": { "type": "string", "description": "When a source last confirmed the record.", "format": "date-time" }, "closed_at": { "type": "string", "description": "When the place was recorded as closed. Only a place page shows a closed place.", "format": "date-time" }, "country": { "type": "string", "description": "Country slug." }, "region": { "type": "string", "description": "Region slug." }, "locality": { "type": "string", "description": "Suburb slug." }, "distance_km": { "type": "number", "description": "Straight line distance in kilometres." } }, "required": [ "public_id", "slug", "name", "brand", "category", "lat", "lng", "country", "region", "locality", "distance_km" ], "additionalProperties": false } } }