Host Countries

GET {{host_gateway}}/api/partner/product/{{api_product_id}}/host-countries

Use this to receive the list of home countries allowed for this product. The aliases should map to the country name, as well as the alternative_names. It also provides a list of states, if applicable.

Request URL Parameters

All the below are required.

KeyDescriptionExample
product_idProduct ID. See product reference section.6

Response Body Parameters

The response will be an array of objects. Each object will have the below parameters:

KeyDescriptionExample
idHost country ID.1
codeCountry code in ISO 3166 alpha-2 format.US
nameCountry NameUnited States
is_disabledBoolean value that determines if the associated host country is disabled.false
aliasesArray of objects which contain abbreviated aliases for a country.[
{
alias: USA
}
],
alternative_namesArray of objects which contain alternative names for a country.[
{
name: Alabama
},
]
statesSee states reference below.

States

KeyDescriptionExample
idHost country state ID1
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
nameState nameOhio
is_disabledBoolean value that determines if the associated host country is disabled.false

RESPONSES

status: OK

{"data":[{"id":12637,"code":"AU","name":"Australia","is_disabled":false,"aliases":[],"alternative_names":[],"states":[{"id":11050,"code":"NSW","name":"New South Wales","is_disabled":0},{"id":11051,"code":"VIC","name":"Victoria","is_disabled":0},{"id":11052,"code":"QLD","name":"Queensland","is_disabled":0},{"id":11053,"code":"WA","name":"Western Australia","is_disabled":0},{"id":11054,"code":"SA","name":"South Australia","is_disabled":0},{"id":11055,"code":"TAS","name":"Tasmania","is_disabled":0}]}]}