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.

KeyDescriptionExample
product_idProduct ID. See product reference section.6
hostcountryidHost country ID (See Host Country Index endpoint) 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:

KeyDescriptionExample
idHost Country ID.1
is_disabledBoolean value that determines if the associated host country is disabled.false
country_stateSee country states reference below.

Country States

KeyDescriptionExample
code2 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
idHost country state ID1
country_id2 letter code for country in ISO 3166-1 standard.US
nameState nameOhio

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

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"}}]}