A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates.
Retrieve a list of shipping zones.
limit | integer [ 0 .. 1000 ] The collection items limit. |
offset | integer >= 0 The collection items offset. |
filter | string The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format. |
sort | Array of strings The collection items sort field and order (prefix with "-" for descending sort). |
q | string The partial search of the text fields. |
Organization-Id | string (ResourceId) <= 50 characters Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). |
Rate-Limit-Limit | integer The number of allowed requests in the current period. |
Rate-Limit-Remaining | integer The number of remaining requests in the current period. |
Rate-Limit-Reset | string The date in format defined by RFC 822 when the current period will reset. |
Pagination-Total | integer Total items count. |
Pagination-Limit | integer Items per page limit. |
Pagination-Offset | integer Pagination offset. |
id | string <= 50 characters The shipping zone identifier string. |
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. | |
isDefault | any Is this Shipping Zone default. |
createdTime | string <date-time> The shipping zone created time. |
updatedTime | string <date-time> The shipping zone updated time. |
Array of objects (SelfLink) non-empty The links related to resource. |
// all parameters are optional const firstCollection = await api.shippingZones.getAll(); // alternatively you can specify one or more of them const params = {limit: 20, offset: 100, sort: '-createdTime'}; const secondCollection = await api.shippingZones.getAll(params); // access the collection items, each item is a Member secondCollection.items.forEach(shippingZone => console.log(shippingZone.fields.name));
[- {
- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "name": "string",
- "countries": [
- "string"
], - "rates": [
- {
- "name": "string",
- "minOrderSubtotal": 0,
- "maxOrderSubtotal": 0,
- "price": 0,
- "currency": "USD",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
], - "isDefault": null,
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
]
Create a Shipping Zone.
Organization-Id | string (ResourceId) <= 50 characters Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). |
Shipping Zone resource.
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. |
Rate-Limit-Limit | integer The number of allowed requests in the current period. |
Rate-Limit-Remaining | integer The number of remaining requests in the current period. |
Rate-Limit-Reset | string The date in format defined by RFC 822 when the current period will reset. |
id | string <= 50 characters The shipping zone identifier string. |
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. | |
isDefault | any Is this Shipping Zone default. |
createdTime | string <date-time> The shipping zone created time. |
updatedTime | string <date-time> The shipping zone updated time. |
Array of objects (SelfLink) non-empty The links related to resource. |
{- "name": "string",
- "countries": [
- "string"
], - "rates": [
- {
- "name": "string",
- "minOrderSubtotal": 0,
- "maxOrderSubtotal": 0,
- "price": 0,
- "currency": "USD"
}
]
}
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "name": "string",
- "countries": [
- "string"
], - "rates": [
- {
- "name": "string",
- "minOrderSubtotal": 0,
- "maxOrderSubtotal": 0,
- "price": 0,
- "currency": "USD",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
], - "isDefault": null,
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
Retrieve a shipping zone with specified identifier string.
id required | string <= 50 characters ^[@~\-\.\w]+$ The resource identifier string. |
Organization-Id | string (ResourceId) <= 50 characters Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). |
Rate-Limit-Limit | integer The number of allowed requests in the current period. |
Rate-Limit-Remaining | integer The number of remaining requests in the current period. |
Rate-Limit-Reset | string The date in format defined by RFC 822 when the current period will reset. |
id | string <= 50 characters The shipping zone identifier string. |
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. | |
isDefault | any Is this Shipping Zone default. |
createdTime | string <date-time> The shipping zone created time. |
updatedTime | string <date-time> The shipping zone updated time. |
Array of objects (SelfLink) non-empty The links related to resource. |
const shippingZone = await api.shippingZones.get({id: 'foobar-001'}); console.log(shippingZone.fields.name);
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "name": "string",
- "countries": [
- "string"
], - "rates": [
- {
- "name": "string",
- "minOrderSubtotal": 0,
- "maxOrderSubtotal": 0,
- "price": 0,
- "currency": "USD",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
], - "isDefault": null,
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
Create a shipping zone with predefined identifier string.
id required | string <= 50 characters ^[@~\-\.\w]+$ The resource identifier string. |
Organization-Id | string (ResourceId) <= 50 characters Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). |
Shipping zone resource.
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. |
Rate-Limit-Limit | integer The number of allowed requests in the current period. |
Rate-Limit-Remaining | integer The number of remaining requests in the current period. |
Rate-Limit-Reset | string The date in format defined by RFC 822 when the current period will reset. |
id | string <= 50 characters The shipping zone identifier string. |
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. | |
isDefault | any Is this Shipping Zone default. |
createdTime | string <date-time> The shipping zone created time. |
updatedTime | string <date-time> The shipping zone updated time. |
Array of objects (SelfLink) non-empty The links related to resource. |
Rate-Limit-Limit | integer The number of allowed requests in the current period. |
Rate-Limit-Remaining | integer The number of remaining requests in the current period. |
Rate-Limit-Reset | string The date in format defined by RFC 822 when the current period will reset. |
id | string <= 50 characters The shipping zone identifier string. |
name required | string <= 255 characters The shipping zone name. |
countries | Array of strings Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping). This property can be empty or null to create a default shipping zone for countries that were not specified in other zones. |
Array of objects Price-based shipping rate instructions. | |
isDefault | any Is this Shipping Zone default. |
createdTime | string <date-time> The shipping zone created time. |
updatedTime | string <date-time> The shipping zone updated time. |
Array of objects (SelfLink) non-empty The links related to resource. |
{- "name": "string",
- "countries": [
- "string"
], - "rates": [
- {
- "name": "string",
- "minOrderSubtotal": 0,
- "maxOrderSubtotal": 0,
- "price": 0,
- "currency": "USD"
}
]
}
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "name": "string",
- "countries": [
- "string"
], - "rates": [
- {
- "name": "string",
- "minOrderSubtotal": 0,
- "maxOrderSubtotal": 0,
- "price": 0,
- "currency": "USD",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
], - "isDefault": null,
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
Delete a shipping zone with predefined identifier string.
id required | string <= 50 characters ^[@~\-\.\w]+$ The resource identifier string. |
Organization-Id | string (ResourceId) <= 50 characters Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). |
const request = await api.shippingZones.delete({id: 'my-second-key'}); // the request does not return any fields but // you can confirm the success using the status code console.log(request.response.status); // 204
{- "status": 400,
- "title": "string",
- "detail": "string",
- "error": "string"
}