Skip to content

Look up the nearest postcode

GET
/geocode/nearest
curl --request GET \
--url https://example.com/geocode/nearest \
--cookie bottle.session_token=<bottle.session_token>

For pointing at the map and saying the base is here. Answers with the nearest postcode and what it belongs to, or nothing out at sea.

latitude
number | null
>= -90 <= 90
longitude
number | null
>= -180 <= 180

The nearest place

Media typeapplication/json
object
postcode
required
string
latitude
required
number
longitude
required
number
adminDistrict
required
string | null
adminCounty
required
string | null
region
required
string | null
Example
{
"postcode": "KT1 2PS"
}

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

Not found

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}