Skip to content

Find the postcode districts of a place

POST
/geocode/place-districts
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.

Media typeapplication/json
object
place
required
string
>= 1 characters <= 80 characters

Example generated

{
"place": "example"
}

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"
}