Locations

Retrieve a location

Changed on

Retrieve 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 URL
    https://api.easybroker.com/v1
  • URL
    https://api.easybroker.com/v1/locations
  • Auth
    API 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

namestring
full_namestring
typestring

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