Shipping Zones

A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates. This API is deprecated, see Shipping rates.

Retrieve a list of shipping zonesDeprecated

Retrieve a list of shipping zones.

Request
Security:
query Parameters
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.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

A list of shipping zones was retrieved successfully.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

get/shipping-zones
Request samples
// 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));
Response samples
application/json
[
  • {
    }
]

Create a Shipping ZoneDeprecated

Create a Shipping Zone.

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

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.

Array
name
required
string <= 255 characters

The shipping rate name.

minOrderSubtotal
number <double>
Default: 0

Minimum order subtotal for which this shipping rate is applicable, defaults to 0.00.

maxOrderSubtotal
number <double>

Maximum order subtotal for which this shipping rate is applicable (NULL if no maximum).

price
required
number <double>

The shipping price - 0 is a valid value (for free).

currency
required
string 3 characters

ISO 4217 alphabetic currency code.

Responses
201

Shipping Zone was created.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

422

Invalid data was sent.

post/shipping-zones
Request samples
application/json
{
  • "name": "string",
  • "countries": [
    ],
  • "rates": [
    ]
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "countries": [
    ],
  • "rates": [
    ],
  • "isDefault": null,
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve a shipping zoneDeprecated

Retrieve a shipping zone with specified identifier string.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

Shipping zone was retrieved successfully.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

404

Resource was not found.

get/shipping-zones/{id}
Request samples
const shippingZone = await api.shippingZones.get({id: 'foobar-001'});
console.log(shippingZone.fields.name);
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "countries": [
    ],
  • "rates": [
    ],
  • "isDefault": null,
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Create a shipping zone with predefined IDDeprecated

Create a shipping zone with predefined identifier string.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

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.

Array
name
required
string <= 255 characters

The shipping rate name.

minOrderSubtotal
number <double>
Default: 0

Minimum order subtotal for which this shipping rate is applicable, defaults to 0.00.

maxOrderSubtotal
number <double>

Maximum order subtotal for which this shipping rate is applicable (NULL if no maximum).

price
required
number <double>

The shipping price - 0 is a valid value (for free).

currency
required
string 3 characters

ISO 4217 alphabetic currency code.

Responses
200

Shipping zone was updated.

201

Shipping zone was created.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

422

Invalid data was sent.

put/shipping-zones/{id}
Request samples
application/json
{
  • "name": "string",
  • "countries": [
    ],
  • "rates": [
    ]
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "countries": [
    ],
  • "rates": [
    ],
  • "isDefault": null,
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Delete a shipping zoneDeprecated

Delete a shipping zone with predefined identifier string.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204

Shipping zone was deleted.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

404

Resource was not found.

delete/shipping-zones/{id}
Request samples
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
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}