Search…
⌃K
Links

Getting a site's authorized billing countries

Learn how to retrieve a site's authorized billing countries.
You can use the GET /sites/{siteId}/authorized-billing-countries resource to retrieve a list of all countries that are authorized to purchase products from your site. The list of authorized billing countries is configured in Global Commerce.
cURL
200 OK response
curl --location --request GET 'https://{host}/sites/{siteId}/authorized-billing-countries' \
--header 'Content-Type: application/json' \
--header 'authorization: bearer ***\
You will receive a 200 OK response. The response returns data by locale and country.
{  
"authorizedBillingCountries": [        
{          
"locale": "en_US",          
"countries": [            
{              
"displayName": "Taiwan",              
"countryCode": "TW"            
},            
{              
"displayName": "Japan",              
"countryCode": "JP"            
}          
]        
},           
]
}
To get the list of authorized billing countries by locale, add ?locale at the end of the request. For example:
cURL
200 OK response
curl --location --request GET 'https://{host}/sites/{siteId}/authorized-billing-countries?locale=en_US' \
--header 'Content-Type: application/json' \
--header 'authorization: bearer ***\
You will receive a 200 OK response.
{  
"authorizedBillingCountries": [        
{          
"locale": "en_US",          
"countries": [            
{              
"displayName": "Taiwan",              
"countryCode": "TW"            
},            
{              
"displayName": "Japan",              
"countryCode": "JP"            
}          
]        
},           
]
}