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.
| Key | Description | Example |
|---|---|---|
| product_id | Product ID. See product reference section. | 6 |
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 |
| code | Country code in ISO 3166 alpha-2 format. | US |
| name | Country Name | United States |
| is_disabled | Boolean value that determines if the associated host country is disabled. | false |
| aliases | Array of objects which contain abbreviated aliases for a country. | [ { alias: USA } ], |
| alternative_names | Array of objects which contain alternative names for a country. | [ { name: Alabama }, ] |
| states | See states reference below. |
States
| Key | Description | Example |
|---|---|---|
| id | Host country state ID | 1 |
| 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 |
| name | State name | Ohio |
| is_disabled | Boolean 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}]}]}