- Home
- API Enriched
- Tenant And Identity
- countries
- List states.
List states.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/no_auth/countries/example/states/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Country code
2 characters country code as described in https://en.wikipedia.org/wiki/ISO_3166-1, column alpha-2
Prefix first two or more characters of the state you look for (can be upper or lower case)
Responses
Section titled “Responses”A successful response.
ListStatesResponse contains a list of states supported by the platform.
object
List of all states of a country supported by the platform.
CountryItem contains a single element of country list response.
object
Any additional information related to the state.
object
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)
Name of the state in the human readable form (can be used as a description)
Example
{ "error_code": "EUNKNOWN"}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example