Existing Casafari API · API v1 · References
Get zipcode boundary by zipcode and country code
https://api.casafari.com/v1/references/zipcode-boundarySend 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: POST /api/v1/references/zipcode-boundary.
Description
Get zipcode boundary by zipcode and country code.
Request body
Content type application/json. Optional. Type: object.
zip_codestringrequiredcountry_codestringrequiredES FR DE RE GP MQ GY YT AD MCExample request
Placeholders only: replace the token and the values with your own.
curl -X POST "https://api.casafari.com/v1/references/zipcode-boundary" \
-H "Authorization: Token $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"zip_code": "36116",
"country_code": "ES"
}'Responses
200
Type: object.
Show the response shape (4 fields)
zip_codestringrequiredboundaryobject[][]required2 properties
latitudenumberrequiredlongitudenumberrequiredExample from the API description (long arrays shortened)
{
"zip_code": "36116",
"boundary": [
[
{
"latitude": 42.59448,
"longitude": -8.3877
},
{
"latitude": 42.58795,
"longitude": -8.38622
}
]
]
}401 Unauthorized
Type: object.
Show the response shape (1 fields)
detailstring403 Forbidden
Type: object.
Show the response shape (1 fields)
detailstring