Shipping Zones and Types

Introduction

The DJUST delivery module allows operators to configure shipping rules based on geographical areas and delivery modes. Two foundational concepts support this configuration:

  • Shipping zones — geographical areas (e.g. "France Metropolitan", "EU", "North America") used to define where shipping rules apply.
  • Shipping types — delivery modes proposed to customers at checkout (e.g. "Express", "Standard", "Click & Collect").

Together with logistic families, these entities form the building blocks of DJUST shipping rule configuration.

This guide covers how to create, manage, and configure shipping zones and types via the DJUST API.


Key Concepts

Shipping Zones

A shipping zone represents a geographical area used to scope shipping pricing and rules. Each zone has:

FieldDescriptionRules
idUnique identifierAuto-generated or custom. Immutable after creation.
nameDisplay nameRequired. Max 255 characters.
descriptionOptional descriptionMax 10,000 characters.

A shipping zone can contain locations — countries and, for France, individual departments. This allows fine-grained geographical scoping per zone.

Shipping Types

A shipping type represents a delivery mode that can be proposed to customers. Each type has:

FieldDescriptionRules
idUnique identifierAuto-generated or custom. Immutable after creation.
nameDisplay nameRequired. Max 255 characters.
descriptionOptional descriptionMax 10,000 characters.
createdAtCreation timestampRead-only.
updatedAtLast update timestampRead-only.

Tip: There is no system-default shipping type. All shipping types are created explicitly by the operator.


Key Endpoints

ActionMethodPathOperationIdResponse
Create a shipping zonePOST/v1/shipping-zonesADM-SHIPPING-ZONE-100201 Created
Update a shipping zonePUT/v1/shipping-zones/{id}ADM-SHIPPING-ZONE-200204 No Content
Delete a shipping zoneDELETE/v1/shipping-zones/{id}ADM-SHIPPING-ZONE-300204 No Content
List shipping zonesGET/v1/shipping-zonesADM-SHIPPING-ZONE-550200 OK
Get a shipping zone by IDGET/v1/shipping-zones/{id}ADM-SHIPPING-ZONE-500200 OK
Add locations to a zonePATCH/v1/shipping-zones/{shippingZoneId}/locationsADM-SHIPPING-ZONE-210204 No Content
Remove locations from a zoneDELETE/v1/shipping-zones/{shippingZoneId}/locationsADM-SHIPPING-ZONE-350204 No Content
List the locations of a zoneGET/v1/shipping-zones/{shippingZoneId}/locationsADM-SHIPPING-ZONE-551200 OK
Create a shipping typePOST/v1/shipping-typesADM-SHIPPING-TYPE-100201 Created
Update a shipping typePUT/v1/shipping-types/{id}ADM-SHIPPING-TYPE-200204 No Content
Delete a shipping typeDELETE/v1/shipping-types/{id}ADM-SHIPPING-TYPE-350204 No Content
Get a shipping type by IDGET/v1/shipping-types/{id}ADM-SHIPPING-TYPE-500200 OK
List shipping typesGET/v1/shipping-typesADM-SHIPPING-TYPE-550200 OK

All endpoints require dj-client: OPERATOR and dj-api-key headers.


Creating a Shipping Zone

POST /v1/shipping-zones
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
idstringNoCustom identifier. Auto-generated if omitted. Immutable after creation. Must be unique.
namestringYesDisplay name of the zone (max 255 characters)
descriptionstringNoDescription of the zone (max 10,000 characters)

Example

{
  "id": "eu-west",
  "name": "EU West",
  "description": "Western European countries including France, Spain, Portugal, and Benelux"
}

Response — 201 Created

{
  "id": "eu-west"
}

Errors

HTTPCodeDescription
400F-E-010Name or description exceeds maximum length
400F-E-012Invalid ID format
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
409F-E-003A shipping zone with this ID already exists
422F-E-001Name is absent, null, empty, or whitespace-only

For the complete list of error codes, refer to Error / Warning codes.


Updating a Shipping Zone

Applies a full replacement of the modifiable fields (name and description). The id is immutable, and the zone's locations are not affected by this call — manage them with the dedicated locations endpoints.

PUT /v1/shipping-zones/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
idstringYesIdentifier of the shipping zone

Request Body

FieldTypeRequiredDescription
namestringYesUpdated display name (1–255 characters)
descriptionstringNoUpdated description (max 10,000 characters). Pass null or "" to clear.

Example

{
  "name": "EU West - Updated",
  "description": "Western European countries including France, Spain, Portugal, Benelux, and Ireland"
}

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
400F-E-010Name or description exceeds maximum length
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping zone not found
422F-E-001Name is absent, null, empty, or whitespace-only

Deleting a Shipping Zone

Permanently deletes a shipping zone. Deletion is blocked if any line of the shipping price matrix still references the zone — remove those price lines first.

DELETE /v1/shipping-zones/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
idstringYesIdentifier of the shipping zone to delete

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping zone not found
409F-E-042Shipping zone is still referenced in the shipping price matrix. Remove the associated price lines first.
⚠️

Warning: You must remove every shipping price matrix line referencing this zone before it can be deleted.

For the complete list of error codes, refer to Error / Warning codes.


Adding Locations to a Shipping Zone

After creating a shipping zone, you can define its geographical scope by adding locations — countries and, for France, individual departments.

PATCH /v1/shipping-zones/{shippingZoneId}/locations
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
shippingZoneIdstringYesIdentifier of the shipping zone

Request Body

The request body is an array of location objects. Each location has:

FieldTypeRequiredDescription
typestringYescountry or department
countryCodestringYesISO 3166-1 alpha-2 country code (e.g. FR, DE, US)
excludedDepartmentsstring[]NoOnly for type: country with countryCode: FR. List of French department codes to exclude.

Rules

  • department type is only allowed for countryCode: "FR". Using it for any other country returns F-E-012.
  • A country or department can only belong to one shipping zone at a time. If it is already assigned to another zone, it is automatically transferred to the new zone.
  • A zone can combine foreign countries and individual French departments.

Example

[
  {
    "type": "country",
    "countryCode": "DE"
  },
  {
    "type": "country",
    "countryCode": "FR",
    "excludedDepartments": ["971", "972", "973", "974", "976"]
  },
  {
    "type": "department",
    "countryCode": "FR"
  }
]

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
400F-E-012department type used for a non-FR country
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping zone not found

For the complete list of error codes, refer to Error / Warning codes.


Removing Locations from a Shipping Zone

Remove one or more locations (countries or departments) from an existing shipping zone.

DELETE /v1/shipping-zones/{shippingZoneId}/locations
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
shippingZoneIdstringYesIdentifier of the shipping zone

Request Body

The request body is an array of location objects to remove, using the same structure as when adding locations.

Example

[
  {
    "type": "country",
    "countryCode": "DE"
  }
]

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping zone not found

For the complete list of error codes, refer to Error / Warning codes.


Listing the Locations of a Shipping Zone

Retrieve the geographical scope currently attached to a shipping zone — the countries and, for France, the individual departments. Excluded departments are reported alongside the country they belong to.

GET /v1/shipping-zones/{shippingZoneId}/locations
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
shippingZoneIdstringYesIdentifier of the shipping zone

Response — 200 OK

{
  "locations": [
    {
      "type": "country",
      "countryCode": "DE"
    },
    {
      "type": "country",
      "countryCode": "FR",
      "excludedDepartments": ["971", "972", "973", "974", "976"]
    },
    {
      "type": "department",
      "countryCode": "FR",
      "departmentCode": "2A"
    }
  ]
}

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping zone not found

For the complete list of error codes, refer to Error / Warning codes.


Listing Shipping Zones

Retrieve a paginated list of shipping zones with optional filters and sorting.

GET /v1/shipping-zones
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (0-based). Default: 0
sizeintegerNoNumber of items per page. Default: 20
sortstringNoFormat: field:direction. Sortable fields: name, createdAt, updatedAt. Default: createdAt:desc. Invalid sort entries are silently ignored.
searchstringNoFree-text search matched against both name and externalId (OR logic, case- and accent-insensitive). Replaces the former name parameter.
createdAtFromdatetimeNoFilter by creation date (inclusive, from)
createdAtTodatetimeNoFilter by creation date (inclusive, to)
updatedAtFromdatetimeNoFilter by update date (inclusive, from)
updatedAtTodatetimeNoFilter by update date (inclusive, to)

Response — 200 OK

{
  "content": [
    {
      "id": "eu-west",
      "name": "EU West",
      "description": "Western European countries including France, Spain, Portugal, and Benelux",
      "locationCount": 5,
      "createdAt": "2026-06-01T10:00:00Z",
      "updatedAt": "2026-06-10T14:30:00Z"
    },
    {
      "id": "north-america",
      "name": "North America",
      "description": "US and Canada",
      "locationCount": 2,
      "createdAt": "2026-05-15T08:30:00Z",
      "updatedAt": "2026-05-15T08:30:00Z"
    }
  ],
  "totalElements": 2,
  "totalPages": 1,
  "number": 0,
  "size": 20
}

Retrieving a Shipping Zone

GET /v1/shipping-zones/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
idstringYesFunctional identifier of the shipping zone

Response — 200 OK

{
  "id": "eu-west",
  "name": "EU West",
  "description": "Western European countries including France, Spain, Portugal, and Benelux",
  "locationCount": 5,
  "createdAt": "2026-06-01T10:00:00Z",
  "updatedAt": "2026-06-10T14:30:00Z"
}

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping zone not found

Creating a Shipping Type

POST /v1/shipping-types
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
idstringNoCustom identifier. Auto-generated if omitted. Immutable after creation. Must be unique.
namestringYesDisplay name of the shipping type (max 255 characters)
descriptionstringNoDescription of the shipping type (max 10,000 characters)

Example

{
  "id": "express-24h",
  "name": "Express 24h",
  "description": "Next business day delivery for eligible items"
}

Response — 201 Created

{
  "id": "express-24h"
}

Errors

HTTPCodeDescription
400F-E-010Name or description exceeds maximum length
400F-E-012Invalid ID format
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
409F-E-003A shipping type with this ID already exists
422F-E-001Name is absent, null, empty, or whitespace-only

Retrieving a Shipping Type

GET /v1/shipping-types/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
idstringYesFunctional identifier of the shipping type

Response — 200 OK

{
  "id": "express-24h",
  "name": "Express 24h",
  "description": "Next business day delivery for eligible items",
  "createdAt": "2026-06-01T10:00:00Z",
  "updatedAt": "2026-06-01T10:00:00Z"
}

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping type not found

Listing Shipping Types

Retrieve a paginated list of shipping types with optional filters and sorting.

GET /v1/shipping-types
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (0-based). Default: 0
sizeintegerNoNumber of items per page. Default: 20
sortstringNoFormat: field:direction. Sortable fields: name, createdAt, updatedAt. Default: createdAt:desc
searchstringNoFree-text search matched against both name and externalId (OR logic, case- and accent-insensitive). Replaces the former name parameter.
createdAtFromdatetimeNoFilter by creation date (inclusive, from)
createdAtTodatetimeNoFilter by creation date (inclusive, to)
updatedAtFromdatetimeNoFilter by update date (inclusive, from)
updatedAtTodatetimeNoFilter by update date (inclusive, to)

Response — 200 OK

{
  "content": [
    {
      "id": "express-24h",
      "name": "Express 24h",
      "description": "Next business day delivery for eligible items",
      "createdAt": "2026-06-01T10:00:00Z",
      "updatedAt": "2026-06-01T10:00:00Z"
    },
    {
      "id": "standard",
      "name": "Standard Delivery",
      "description": "Delivery within 3-5 business days",
      "createdAt": "2026-05-15T08:30:00Z",
      "updatedAt": "2026-05-20T14:00:00Z"
    }
  ],
  "totalElements": 2,
  "totalPages": 1,
  "number": 0,
  "size": 20
}

Updating a Shipping Type

Applies a full replacement of the modifiable fields (name and description). The id is immutable.

PUT /v1/shipping-types/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
idstringYesIdentifier of the shipping type

Request Body

FieldTypeRequiredDescription
namestringYesUpdated display name (1–255 characters)
descriptionstringNoUpdated description (max 10,000 characters). Pass null or "" to clear.

Example

{
  "name": "Express 24h - Premium",
  "description": "Next business day delivery with premium packaging"
}

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
400F-E-010Name or description exceeds maximum length
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping type not found
422F-E-001Name is absent, null, empty, or whitespace-only

Deleting a Shipping Type

Permanently deletes a shipping type. Deletion is blocked if the shipping type is still referenced in the shipping price matrix.

DELETE /v1/shipping-types/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
idstringYesIdentifier of the shipping type to delete

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Shipping type not found
409F-E-042Shipping type is still referenced in the shipping price matrix. Remove associated price lines first.
⚠️

Warning: You must remove all shipping price matrix lines referencing this shipping type before it can be deleted.

For the complete list of error codes, refer to Error / Warning codes.


Typical Workflow

flowchart LR
  %% Styles (Readme)
  classDef create   fill:#e8f1ff,stroke:#2f6feb,stroke-width:2px,color:#0b3d91;
  classDef read     fill:#ede9fe,stroke:#7c3aed,stroke-width:2px,color:#1e1b4b;
  classDef update   fill:#e0f7fa,stroke:#06b6d4,stroke-width:2px,color:#0c4a6e;
  classDef add      fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#064e3b;
  classDef remove   fill:#fee2e2,stroke:#ef4444,stroke-width:2px,color:#7f1d1d;
  classDef decision fill:#fff4e5,stroke:#f59e0b,stroke-width:2px,color:#7a3e00;
  classDef place    fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d;
  classDef sys      fill:#f2f4f7,stroke:#475569,stroke-width:2px,color:#111827;
  classDef ok       fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#064e3b;
  classDef stop     fill:#fee2e2,stroke:#ef4444,stroke-width:2px,color:#7f1d1d;

  A["➕ Create shipping zones<br>POST /v1/shipping-zones"]:::create
  A2["📦 Add locations<br>PATCH .../locations"]:::add
  B["➕ Create shipping types<br>POST /v1/shipping-types"]:::create
  C["➕ Create logistic families<br>POST /v1/logistic-families"]:::create
  D["🔗 Attach categories<br>to logistic families"]:::add
  E["✅ Configure shipping<br>price matrix"]:::place

  A --> A2 --> E
  B --> E
  C --> D --> E

  style A rx:8,ry:8
  style A2 rx:8,ry:8
  style B rx:8,ry:8
  style C rx:8,ry:8
  style D rx:8,ry:8
  style E rx:8,ry:8

Best Practices

  1. Use meaningful custom IDs — if you provide a custom id, make it descriptive and consistent (e.g. eu-west, express-24h). Once created, the ID cannot be changed.
  2. Plan your zone structure — define your geographical zones before setting up shipping rules. Restructuring later requires recreating zones.
  3. Keep names clear for checkout — shipping type names may be displayed to customers during checkout. Use clear, business-friendly labels.

Common Mistakes

MistakeConsequenceHow to avoid
Providing a duplicate id409 Conflict errorEnsure IDs are unique across all shipping zones (or types)
Omitting name in the request body422 validation errorname is always required
Exceeding max length on name or description400 errorKeep name under 255 characters and description under 10,000
Trying to update the id after creationid is immutablePlan your identifiers before creating the resource
Using department type for a non-FR country400 error (F-E-012)Department-level locations are only supported for France
Deleting a shipping type still used in the price matrix409 Conflict (F-E-042)Remove all associated price matrix lines before deleting the type
Deleting a shipping zone still used in the price matrix409 Conflict (F-E-042)Remove all associated price matrix lines before deleting the zone

Related Documentation



Did this page help you?