Skip to main content

The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Country

Multiple access scopes needed — refer to each endpoint for access scope requirements.
Important

The REST Country API is deprecated as of version 2024-07.

Please refer to the documentation for each individual endpoint and the developer changelog for more information.

The Country resource represents the tax rates applied to orders from the different countries where a shop sells its products.

Merchants select the countries where they sell their products when they set up their shipping zones and rates on the Shipping page of the Shopify admin. After adding a country to a shipping zone, store owners can then verify and adjust tax rates for each country on the Taxes page.

The Country resource lets you access the countries and tax rates set up by the merchant. The countries list includes a default entry called Rest of World, which represents all non-specified countries.

You can use the Country resource to modify the sales tax rate for a country or sub-region to account for surtaxes or exemptions that apply to the store.

For more information on managing tax rates for sub-regions of a country, such as states or provinces, see the Province resource.

Caution

As of version 2020-10, you can no longer create or update custom tax values for the Country resource.

Was this section helpful?
#

Endpoints


Anchor to

The Country resource

Anchor to

Properties


code
deprecated

The two-letter country code (ISO 3166-1 alpha-2 format).


id
deprecated

The ID for the country. The ID for a country is unique across all Shopify stores. The ID for a country in one shop will be different from the same country in another shop.


name
deprecated

The full name of the country in English.


provinces
deprecated

The sub-regions of a country, such as its provinces or states. Each sub-region has the following properties:

Show provinces properties
  • code: The two letter province or state code.
  • country_id: The ID for the country to which this sub-region belongs.
  • id: The ID for the particular sub-region.
  • name: The name of the sub-region.
  • tax: The tax value in decimal format.
  • tax_name: The name of the tax as it is referred to in the applicable sub-region. For example, in Canada, the sales tax in the province Ontario is referred to as HST.
  • tax_type: The tax type. Valid values: null, normal, or harmonized. If the value is harmonized, then the tax is compounded of the provincial and federal sales taxes.
  • tax_percentage: The tax value in percent format.

tax
deprecated

The national sales tax rate applied to orders made by customers from that country.


Was this section helpful?
{}

The Country resource

{
"code": "CA",
"id": 879921427,
"name": "Canada",
"provinces": [
{
"code": "ON",
"country_id": 879921427,
"id": 205434194,
"name": "Ontario",
"tax": 0.13,
"tax_name": "HST",
"tax_type": "harmonized",
"tax_percentage": 13
}
],
"tax": 0.05
}

Anchor to POST request, Creates a country
post
Creates a country
deprecated

Requires shipping access scope.
Important

This endpoint is deprecated as of 2024-07.

Caution

As of version 2020-10, the tax field is deprecated.

Creates a country.

Anchor to Parameters of Creates a countryParameters


api_version
string
required

Was this section helpful?

Anchor to post-countries-examplesExamples

Create a country using Shopify's tax rate for it

Request body
country
Country resource
Show country properties
country.code:"FR"
deprecated

The two-letter country code (ISO 3166-1 alpha-2 format).

Create a country using a custom tax rate

Request body
country
Country resource
Show country properties
country.code:"FR"
deprecated

The two-letter country code (ISO 3166-1 alpha-2 format).

country.tax:0.2
deprecated

The national sales tax rate applied to orders made by customers from that country.

Was this section helpful?
post

/admin/api/2025-07/countries.json

curl -d '{"country":{"code":"FR"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2025-07/countries.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 201 Created
{
"country": {
"id": 980881733,
"name": "France",
"code": "FR",
"tax_name": "TVA",
"tax": 0.2,
"provinces": []
}
}

Anchor to GET request, Retrieves a list of countries
get
Retrieves a list of countries
deprecated

Important

This endpoint is deprecated as of version 2024-07.

Please see the Countries in shipping zone API for a GraphQL alternative.

Retrieves a list of countries.


api_version
string
required

fields

Show only certain fields, specified by a comma-separated list of field names.


since_id

Restrict results to after the specified ID.


Was this section helpful?

Retrieve all countries

Retrieve all countries after the specified ID

Query parameters
since_id=359115488

Restrict results to after the specified ID.

Was this section helpful?
get

/admin/api/2025-07/countries.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/countries.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"countries": [
{
"id": 879921427,
"name": "Canada",
"code": "CA",
"tax_name": "GST",
"tax": 0.05,
"provinces": [
{
"id": 205434194,
"country_id": 879921427,
"name": "Alberta",
"code": "AB",
"tax_name": null,
"tax_type": null,
"shipping_zone_id": null,
"tax": 0.08,
"tax_percentage": 8
},
{
"id": 170405627,
"country_id": 879921427,
"name": "British Columbia",
"code": "BC",
"tax_name": null,
"tax_type": null,
"shipping_zone_id": null,
"tax": 0.07,
"tax_percentage": 7
},
{
"id": 342345110,
"country_id": 879921427,
"name": "Manitoba",

Anchor to GET request, Retrieves a specific country
get
Retrieves a specific country
deprecated

Important

This endpoint is deprecated as of version 2024-07.

Please see the Countries in shipping zone API for a GraphQL alternative.

Retrieves a specific country


api_version
string
required

country_id
string
required

fields

Show only certain fields, specified by a comma-separated list of field names.


Was this section helpful?

Retrieve a specific country by its ID

Path parameters
country_id=879921427
string
required
Was this section helpful?
get

/admin/api/2025-07/countries/879921427.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/countries/879921427.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"country": {
"id": 879921427,
"name": "Canada",
"code": "CA",
"tax_name": "GST",
"tax": 0.05,
"provinces": [
{
"id": 205434194,
"country_id": 879921427,
"name": "Alberta",
"code": "AB",
"tax_name": null,
"tax_type": null,
"shipping_zone_id": null,
"tax": 0.08,
"tax_percentage": 8
},
{
"id": 170405627,
"country_id": 879921427,
"name": "British Columbia",
"code": "BC",
"tax_name": null,
"tax_type": null,
"shipping_zone_id": null,
"tax": 0.07,
"tax_percentage": 7
},
{
"id": 342345110,
"country_id": 879921427,
"name": "Manitoba",
"code": "MB",

Anchor to GET request, Retrieves a count of countries
get
Retrieves a count of countries
deprecated

Important

This endpoint is deprecated as of 2024-07.

Please see the Countries in shipping zone API for a GraphQL alternative.

Retrieves a count of countries.


api_version
string
required

Was this section helpful?

Count all countries

Was this section helpful?
get

/admin/api/2025-07/countries/count.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/countries/count.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"count": 3
}

Anchor to PUT request, Updates an existing country
put
Updates an existing country
deprecated

Requires shipping access scope.
Important

This endpoint is deprecated as of 2024-07.

Please see the Countries in shipping zone API for a GraphQL alternative.

Caution

As of version 2020-10, the tax field is deprecated.

Updates an existing country.


api_version
string
required

country_id
string
required

Was this section helpful?

Update a country's tax rate

Path parameters
country_id=879921427
string
required
Request body
country
Country resource
Show country properties
country.id:879921427
deprecated

The ID for the country. The ID for a country is unique across all Shopify stores. The ID for a country in one shop will be different from the same country in another shop.

country.tax:0.05
deprecated

The national sales tax rate applied to orders made by customers from that country.

Was this section helpful?
put

/admin/api/2025-07/countries/879921427.json

curl -d '{"country":{"id":879921427,"tax":0.05}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2025-07/countries/879921427.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 200 OK
{
"country": {
"id": 879921427,
"name": "Canada",
"code": "CA",
"tax_name": "GST",
"tax": 0.05,
"provinces": [
{
"country_id": 879921427,
"tax_name": "Tax",
"id": 205434194,
"name": "Alberta",
"code": "AB",
"tax_type": null,
"shipping_zone_id": null,
"tax": 0.08,
"tax_percentage": 8
},
{
"country_id": 879921427,
"tax_name": "Tax",
"id": 170405627,
"name": "British Columbia",
"code": "BC",
"tax_type": null,
"shipping_zone_id": null,
"tax": 0.07,
"tax_percentage": 7
},
{
"country_id": 879921427,
"tax_name": "Tax",
"id": 342345110,
"name": "Manitoba",

Anchor to DELETE request, Deletes a country
del
Deletes a country
deprecated

Requires shipping access scope.
Important

This endpoint is deprecated as of version 2024-07.


api_version
string
required

country_id
string
required

Was this section helpful?

Delete a country

Path parameters
country_id=879921427
string
required
Was this section helpful?
del

/admin/api/2025-07/countries/879921427.json

curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2025-07/countries/879921427.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{}