🚀 VaultsPay API v1 is live. See what's new →
UsersLocation Data — List States by Country

Location Data — List States by Country

Returns a list of all states or provinces belonging to a specific country. You must provide the countryId as a path parameter. This endpoint is typically used to populate state dropdowns when creating addresses or profiles.

Limitations: The list is static and based on predefined data; no filters or pagination are supported.

GET{gateway}/us/api/v1/states/{countryId}

Payload

AttributeTypeDescriptionRequired
countryIdIntegerID of the country for which states or provinces are to be fetched. Passed as a path parameter.Yes

Response

AttributeTypeDescription
dataArray<Object>List of state or province objects.
data[].idIntegerState ID.
data[].nameStringState or province name.
data[].latitudeStringLatitude of the state’s approximate center.
data[].longitudeStringLongitude of the state’s approximate center.
data[].countryIdIntegerID of the associated country.
200 — SUCCESS
{
  "data": [
    {
      "id": 3172,
      "name": "Azad Kashmir",
      "latitude": "33.92590550",
      "longitude": "73.78103340",
      "countryId": 167
    },
    {
      "id": 3174,
      "name": "Balochistan",
      "latitude": "28.49073320",
      "longitude": "65.09577920",
      "countryId": 167
    }
  ]
}
400 — FAILED
{
  "code": 1401,
  "message": "Invalid or missing countryId parameter.",
  "type": "BAD_REQUEST"
}