SnippetBox

Content

JSON
Raw URL

Retrieve a location

Documentation Index

Fetch the complete documentation index at: https://easybroker-staging.readme.io/llms.txt
Use this file to discover all available pages before exploring further.

Retrieve a location

Retrieve a location name and the childs of a given location <neighborhood, city, state>. If no parameter provided, the states from the country registered in your account will be returned.

OpenAPI definition

{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0",
    "title": "EasyBroker API",
    "description": "API for accessing and working with EasyBroker accounts. To get started click the Authorize button below and enter your API key."
  },
  "externalDocs": {
    "description": "View the getting started guide in Spanish",
    "url": "https://dev.easybroker.com/docs/api-de-easybroker"
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.stagingeb.com/v1",
      "description": "API URL"
    }
  ],
  "paths": {
    "/locations": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Retrieve a location",
        "description": "Retrieve a location name and the childs of a given location <neighborhood, city, state>.  If no parameter provided, the states from the country registered in your account will be returned.",
        "parameters": [
          {
            "$ref": "#/components/parameters/query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful location list request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "$ref": "#/components/responses/location_not_found"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "query": {
        "in": "query",
        "name": "query",
        "required": false,
        "description": "Location to find",
        "example": "Monterrey, Nuevo León",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "location_not_found": {
        "description": "No location was found with the provided query",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Not Found"
                }
              }
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "API key is missing or invalid",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Your API key is invalid"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "LocationList": {
        "properties": {
          "name": {
            "type": "string",
            "example": "Monterrey"
          },
          "full_name": {
            "type": "string",
            "example": "Monterrey, Nuevo León"
          },
          "type": {
            "type": "string",
            "example": "City"
          },
          "localities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Locality"
            }
          }
        }
      },
      "Locality": {
        "allOf": [
          {
            "properties": {
              "name": {
                "type": "string",
                "example": "Alamos Corregidora"
              },
              "full_name": {
                "type": "string",
                "example": "Alamos Corregidora, Monterrey, Nuevo León"
              },
              "type": {
                "type": "string",
                "example": "Neighborhood"
              }
            }
          }
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Authorization",
        "description": "You can find your API key in the general settings section of your EasyBroker account. It's only accessible for account administrators."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 142,
      "2": 110,
      "3": 111,
      "4": 217,
      "5": 194,
      "6": 135,
      "7": 0,
      "8": 24,
      "9": 185,
      "10": 196,
      "11": 37
    }
  }
}