Existing Casafari API · API v1 · References
Get location by passed coordinates
https://api.casafari.com/v1/references/locations/by-coordinatesSend Authorization: Token $CASAFARI_TOKEN with your existing API token; see where to get it.
The same path under /api, signed in with a bearer token, is in the REST API reference: GET /api/v1/references/locations/by-coordinates.
Description
Returns a location for the given coordinates with user restrictions.
Query parameters
latitudenumberrequiredlongitudenumberrequiredlangstringExample request
Placeholders only: replace the token and the values with your own.
curl "https://api.casafari.com/v1/references/locations/by-coordinates?latitude=<latitude>&longitude=<longitude>" \
-H "Authorization: Token $CASAFARI_TOKEN"Responses
200
Type: object.
Show the response shape (10 fields)
location_idintegerrequirednamestringrequiredparent_idintegerrequiredadministrative_levelstringrequiredlocations_structureobject[]required5 properties
location_idintegerrequirednamestringrequiredadministrative_levelstringrequiredzip_codesstring[]levelintegerrequiredExample from the API description (long arrays shortened)
{
"location_id": 1615,
"name": "São Gonçalo de Lagos",
"parent_id": 1611,
"administrative_level": "Freguesia",
"locations_structure": [
{
"location_id": 499,
"name": "Portugal",
"administrative_level": "País",
"zip_codes": [],
"level": 1
},
{
"location_id": 1597,
"name": "Faro",
"administrative_level": "Distrito",
"zip_codes": [],
"level": 2
}
]
}401 Unauthorized
Type: object.
Show the response shape (1 fields)
detailstring403 Forbidden
Type: object.
Show the response shape (1 fields)
detailstring