Look up the nearest postcode
GET
/geocode/nearest
const url = 'https://example.com/geocode/nearest';const options = { method: 'GET', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”latitude
number | null
longitude
number | null
Responses
Section titled “Responses”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
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}