Skip to main content

Get All Shipping Zones

Retrieves a list of shipping zones, including the regions each zone covers and its shipping methods. Use the query parameters to page through the results.

HTTP Request​

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

Query Parameters​

ParameterTypeDescription
pageIntegerPage number to retrieve. Default is 1.
limitIntegerNumber of shipping zones per page. Default is 10.

cURL Example​

curl --location '<BASE_URL>/shippingZone/all?page=1&limit=10' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

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

Sample JSON Response​

{
"success": true,
"data": [
{
"_id": "66d36af6d1fc2890ebc32e0b",
"id": "66d36af6d1fc2890ebc32e0b",
"name": "Midwest",
"active": true,
"type": "state",
"country": [
{
"_id": "66d36af6d1fc2890ebc32e0c",
"name": "United States",
"countryCode": "US"
}
],
"states": [
{
"_id": "66d36af6d1fc2890ebc32e0d",
"name": "Illinois",
"stateCode": "IL"
}
],
"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"
}
],
"pagination": {
"page": 1,
"total": 1,
"count": 1
}
}

Response Details​

FieldTypeDescription
successBooleanWhether the request was successful.
dataArrayList of shipping zones.
paginationObjectPagination details. See below.

Shipping Zone Data​

Each shipping zone has the same fields as described in Get Shipping Zone.

Pagination Details​

FieldTypeDescription
pageIntegerCurrent page number.
totalIntegerTotal number of shipping zones.
countIntegerNumber of shipping zones returned on this page.