Locations
Retrieve a location
Changed onRetrieve a location name and the children of a given location <neighborhood, city, state>. If no parameter provided, the states from the country registered in your account will be returned. Send postal_code instead of query to retrieve the city a postal code belongs to together with its neighborhoods mapped to that postal code.
get/locations
Request
- Base URLhttps://api.easybroker.com/v1
- URLhttps://api.easybroker.com/v1/locations
- AuthAPI key in header X-Authorization
Query parameters
querystring
Location to find
postal_codestring
Postal code to find. Returns the city it belongs to with the neighborhoods mapped to that postal code as its localities. Takes precedence over query. Some neighborhoods don't have a postal code mapped yet, so a 404 doesn't mean the location doesn't exist: search it by name with query instead.
Response
Successful location list request
Example response
{
"name": "Monterrey",
"full_name": "Monterrey, Nuevo León",
"type": "City",
"localities": [
{
"name": "Alamos Corregidora",
"full_name": "Alamos Corregidora, Monterrey, Nuevo León",
"type": "Neighborhood"
}
]
}Changes
- info
added the new optional
queryrequest parameterpostal_code
- info