PriceRule API - Where to find values for the entitled_country_ids parameter

8 0 3


I'm trying to create discount codes via the API and I'm able to do so. However, when I create a shipping discount, I need to be able to limit it to free shipping only within the US. It looks like I should be able to accomplish that using this parameter "entitled_country_ids" according to the documentation found here:

However, I've been trying to find where I can locate a list of IDs that I can use. I can't seem to find it anywhere. I've tried calling support, but they have no idea. So I'm trying this forum here. Can anyone point me in the right direction? If not a list of ID's, I'd be happy with just the ID I can use for the United States. Thanks in advance.

Shopify Staff
Shopify Staff
750 86 163

Hey @Carlos_Rivera,

When using the REST API to set shipping entitlements for price rules, you can get the country id by making a GET call to /admin/api/2021-01/countries.json. Documentation for this endpoint can be found here.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog