Find the postcode districts of a place
POST
/geocode/place-districts
const url = 'https://example.com/geocode/place-districts';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"place":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/geocode/place-districts \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "place": "example" }'The postcode districts a county, council or town touches, for the owner to review before adding them to a delivery area. Districts that reach beyond the place are marked as borders. Does not save or change anything.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
place
required
string
Example generated
{ "place": "example"}Responses
Section titled “Responses”The districts
Media typeapplication/json
object
place
required
string
lookupFailed
required
boolean
districts
required
Array<object>
object
district
required
string
border
required
boolean
alsoIn
required
Array<string>
Example generated
{ "place": "example", "lookupFailed": true, "districts": [ { "district": "example", "border": true, "alsoIn": [ "example" ] } ]}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}