Geo Locations
This document outlines the Geo Locations API, designed to provide geographical information based on country and state identifiers. It adheres to the OpenAPI Specification, ensuring standardized and accessible documentation for API endpoints.
Overview
The Geo Locations API offers two primary endpoints:
GET /v1/geo/{country}: Retrieves a list of states from the country.GET /v1/geo/{country}/{state}: Retrieves a list of cities from the state.
Endpoints
Get State List
- Endpoint:
GET /v1/geo/{country} - Description: This endpoint returns a list of states or regions within a specific country.
- Parameters:
country(path): The country's ISO 3166-1 alpha-2 code.
- Responses:
200 OK: Successfully retrieved the list of states.- Content-Type:
application/json 404 Not Found: The specified country was not found.
- Content-Type:
Get City List
- Endpoint:
GET /v1/geo/{country}/{state} - Description: Fetches a list of cities within a specific state or region of a country.
- Parameters:
country(path): The country's ISO 3166-1 alpha-2 code.state(path): The state or region identifier.
- Responses:
200 OK: Successfully retrieved the list of cities.- Content-Type:
application/json
- Content-Type:
404 Not Found: The specified state was not found within the country.