Skip to content

List states.

GET
/no_auth/countries/{country_code}/states/{prefix}
curl --request GET \
--url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/no_auth/countries/example/states/example \
--header 'Authorization: <Authorization>'

Returns a list of known states of a country. List will be empty if country has no states.

Examples of this operation.

country_code
required
string

Country code 2 characters country code as described in https://en.wikipedia.org/wiki/ISO_3166-1, column alpha-2

prefix
required
string

Prefix first two or more characters of the state you look for (can be upper or lower case)

A successful response.

Media typeapplication/json
Country list response

ListStatesResponse contains a list of states supported by the platform.

object
error_code
string
default: EUNKNOWN
Allowed values: EUNKNOWN ETOKEN_OK ETOKEN_FAILED ETOKEN_NOTFOUND ETOKEN_USED ETOKEN_EXPIRED EUSER_OK EUSER_EXISTS EUSER_FAILED ECONTACT_VALIDATE_OK ECONTACT_EMPTY_COUNTRY ECONTACT_EMPTY_ZIP_CODE ECONTACT_UNKNOWN_COUNTRY ECONTACT_INVALID_ZIP EOK ENO_STATES ENO_CITIES
states
available states in a country

List of all states of a country supported by the platform.

Array<object>
Country item

CountryItem contains a single element of country list response.

object
additional_info
additional information

Any additional information related to the state.

object
state_code
state code

2 characters state code as described in https://en.wikipedia.org/wiki/ISO_3166-2:US/CA/IN, column code (excluding the leading country code)

string
<= 1024 characters
state_name
state name

Name of the state in the human readable form (can be used as a description)

string
<= 1024 characters
Example
{
"error_code": "EUNKNOWN"
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example