Host Country State
GET {{host_gateway}}/api/partner/product/{{api_product_id}}/host-countries/{{host_country_id}}/states
Get the country states available for the given country. If the state is disabled, it cannot be used.
Request URL Parameters
All the below are required.
Key | Description | Example |
---|---|---|
product_id | Product ID. See product reference section. | 6 |
hostcountryid | Host country ID (See Host Country Indexendpoint) or Country code in ISO 3166 alpha-2 format. | 6 or US |
Response Body Parameters
The response will be an array of objects. Each object will have the below parameters:
Key | Description | Example |
---|---|---|
id | Host Country ID. | 1 |
is_disabled | Boolean value that determines if the associated host country is disabled. | false |
country_state | See country states reference below. |
Country States
Key | Description | Example |
---|---|---|
code | 2 letter code for state in ISO 3166-2 standard. Can also be an empty string for non-applicable countries. https://www.iso.org/obp/ui/#iso:code:3166:US | OH |
id | Host country state ID | 1 |
country_id | 2 letter code for country in ISO 3166-1 standard. | US |
name | State name | Ohio |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"data":[{"id":11050,"is_disabled":false,"country_state":{"code":"NSW","id":91,"country_id":"AU","name":"New South Wales"}},{"id":11051,"is_disabled":false,"country_state":{"code":"VIC","id":92,"country_id":"AU","name":"Victoria"}},{"id":11052,"is_disabled":false,"country_state":{"code":"QLD","id":93,"country_id":"AU","name":"Queensland"}},{"id":11053,"is_disabled":false,"country_state":{"code":"WA","id":94,"country_id":"AU","name":"Western Australia"}},{"id":11054,"is_disabled":false,"country_state":{"code":"SA","id":95,"country_id":"AU","name":"South Australia"}},{"id":11055,"is_disabled":false,"country_state":{"code":"TAS","id":96,"country_id":"AU","name":"Tasmania"}}]}