Skip to main content

Get Shipping Zone

This endpoint retrieves detailed information about a specific shipping zone, identified by its unique ID.

Endpoint

  • URL: /shippingZone/{id}
  • Method: GET

Replace {id} with the specific shipping zone ID you want to retrieve.

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Path Parameters

ParameterTypeDescription
idstringThe unique identifier of the shipping zone to fetch.

Request Headers

HeaderTypeDescription
accessTokenstringAccess token for authentication. (required)

Sample Request

curl --location '<BASE-URL>/shippingZone/66d36af6d1fc2890ebc32e0b' \
--header 'accessToken: <ACCESS-TOKEN>'

Response

  • Status Code: 200 OK

Sample Response Body

{
"success": true,
"data": {
"name": "CA",
"active": true,
"type": "country",
"country": {
"name": "United States",
"countryCode": "US"
},
"states": [],
"zipcodes": [],
"shippingMethods": [],
"createdAt": "2024-08-31T19:11:50.883Z",
"updatedAt": "2024-08-31T19:12:01.794Z",
"__v": 0,
"id": "66d36af6d1fc2890ebc32e0b"
}
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the request was successful.
dataobjectAn object containing the details about the shipping zone. See Shipping Zone Details for more information.

Shipping Zone Details

The data object includes the following fields:

FieldTypeDescription
namestringName of the shipping zone.
activebooleanIndicates if the shipping zone is active.
typestringThe type of the zone (e.g., country).
countryobjectContains details of the country associated with the zone. See Country Object.
statesarrayList of associated states within the zone.
zipcodesarrayList of associated zip codes within the zone.
shippingMethodsarrayDetails of shipping methods available within the zone.
createdAtstringDate and time when the zone was created (ISO 8601 format).
updatedAtstringDate and time when the zone was last updated (ISO format).
__vnumberVersion key for internal use.
idstringUnique identifier of the shipping zone.

Country Object

The country object within the data field includes:

FieldTypeDescription
namestringName of the country.
countryCodestringISO country code.

Notes

  • Ensure the accessToken is valid and passed in the header to authorize the request.
  • This endpoint retrieves information specific to one shipping zone based on the provided ID.
  • The states, zipcodes, and shippingMethods arrays may be empty if no specific details are associated with the zone at the time of the request.