Appearance
getStates ​
Retrieves a list of states/territories that relate to a given country.
Request ​
http
GET /rest/refdata/statesQuery Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
isoCode | string | Yes | 2-character ISO country code (from getCountries) |
Example ​
http
GET /rest/refdata/states?isoCode=AUResponse ​
200 OK ​
json
[
{
"stateCode": "ACT",
"stateName": "Australian Capital Territory"
},
{
"stateCode": "NSW",
"stateName": "New South Wales"
},
{
"stateCode": "NT",
"stateName": "Northern Territory"
}
]| Field | Type | Description |
|---|---|---|
stateCode | string | State/territory code |
stateName | string | Full state/territory name |
Errors ​
| Exception | Cause |
|---|---|
WSInvalidParameterException | Missing or invalid isoCode |
WSRefDataServiceException | Service error while fetching states |
Version ​
Check the current data version for a given country:
http
GET /rest/refdata/states/versionjson
{ "version": 1 }