Skip to main content

Get Shipping Zone

Retrieves the details of a single shipping zone, including the countries, states or postal codes it covers and the shipping methods available in it.

HTTP Request​

  • URL: /shippingZone/{id}
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: READ_SHIPPINGZONE or READ_WRITE_SHIPPINGZONE

Path Parameters​

ParameterTypeDescription
idStringThe ID of the shipping zone to retrieve.

cURL Example​

curl --location '<BASE_URL>/shippingZone/66d36af6d1fc2890ebc32e0b' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The shipping zone was returned successfully.
  • 400 Bad Request: The access token is missing or invalid, does not have the required scope, or the shipping zone ID is not valid.

Sample JSON Response​

{
"success": true,
"data": {
"id": "66d36af6d1fc2890ebc32e0b",
"name": "Midwest",
"active": true,
"type": "state",
"country": [
{
"_id": "66d36af6d1fc2890ebc32e0c",
"name": "United States",
"countryCode": "US"
}
],
"states": [
{
"_id": "66d36af6d1fc2890ebc32e0d",
"name": "Illinois",
"stateCode": "IL"
},
{
"_id": "66d36af6d1fc2890ebc32e0e",
"name": "Wisconsin",
"stateCode": "WI"
}
],
"zipcodes": [],
"shippingMethods": [
{
"_id": "66d42cc091bfe4160114d152",
"shippingMethod": "663a0afe4587085935a4fa0f",
"type": "flatRate",
"name": "flat_rate",
"label": "Flat Rate",
"active": true,
"connected": true,
"setup": {
"rate": 9.99
},
"metaFields": []
}
],
"createdAt": "2024-08-31T19:11:50.883Z",
"updatedAt": "2024-09-01T08:58:40.202Z"
}
}

Response Details​

Shipping Zone Data​

FieldTypeDescription
idStringUnique identifier of the shipping zone.
nameStringName of the shipping zone.
activeBooleanWhether the shipping zone is active. Default is true.
typeStringWhat the zone covers: restOfWorld, country, state, zipCodes or zipcode.
countryArrayCountries in the zone. See below.
statesArrayStates in the zone, each with name and stateCode.
zipcodesArrayPostal codes in the zone, each with zipcode.
shippingMethodsArrayShipping methods available in the zone. See below.
createdAtStringDate and time the zone was created (ISO 8601).
updatedAtStringDate and time the zone was last updated (ISO 8601).

Country Object​

FieldTypeDescription
nameStringName of the country.
countryCodeStringTwo-letter country code.

Shipping Method Object​

FieldTypeDescription
_idStringUnique identifier of this shipping method in the zone.
shippingMethodStringID of the shipping method.
typeStringType of shipping method.
nameStringInternal name of the shipping method.
labelStringName shown to shoppers.
activeBooleanWhether the method is enabled in this zone. Default is true.
connectedBooleanWhether the shipping method is connected. Default is false.
setupObjectSettings for the shipping method. The fields depend on the method.
metaFieldsArrayCustom field values. See Metafields.

Notes​

  • If no shipping zone matches the ID, data is an empty object.