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:
| Field | Description | Rules |
|---|---|---|
id | Unique identifier | Auto-generated or custom. Immutable after creation. |
name | Display name | Required. Max 255 characters. |
description | Optional description | Max 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:
| Field | Description | Rules |
|---|---|---|
id | Unique identifier | Auto-generated or custom. Immutable after creation. |
name | Display name | Required. Max 255 characters. |
description | Optional description | Max 10,000 characters. |
createdAt | Creation timestamp | Read-only. |
updatedAt | Last update timestamp | Read-only. |
Tip: There is no system-default shipping type. All shipping types are created explicitly by the operator.
Key Endpoints
| Action | Method | Path | OperationId | Response |
|---|---|---|---|---|
| Create a shipping zone | POST | /v1/shipping-zones | ADM-SHIPPING-ZONE-100 | 201 Created |
| Update a shipping zone | PUT | /v1/shipping-zones/{id} | ADM-SHIPPING-ZONE-200 | 204 No Content |
| Delete a shipping zone | DELETE | /v1/shipping-zones/{id} | ADM-SHIPPING-ZONE-300 | 204 No Content |
| List shipping zones | GET | /v1/shipping-zones | ADM-SHIPPING-ZONE-550 | 200 OK |
| Get a shipping zone by ID | GET | /v1/shipping-zones/{id} | ADM-SHIPPING-ZONE-500 | 200 OK |
| Add locations to a zone | PATCH | /v1/shipping-zones/{shippingZoneId}/locations | ADM-SHIPPING-ZONE-210 | 204 No Content |
| Remove locations from a zone | DELETE | /v1/shipping-zones/{shippingZoneId}/locations | ADM-SHIPPING-ZONE-350 | 204 No Content |
| List the locations of a zone | GET | /v1/shipping-zones/{shippingZoneId}/locations | ADM-SHIPPING-ZONE-551 | 200 OK |
| Create a shipping type | POST | /v1/shipping-types | ADM-SHIPPING-TYPE-100 | 201 Created |
| Update a shipping type | PUT | /v1/shipping-types/{id} | ADM-SHIPPING-TYPE-200 | 204 No Content |
| Delete a shipping type | DELETE | /v1/shipping-types/{id} | ADM-SHIPPING-TYPE-350 | 204 No Content |
| Get a shipping type by ID | GET | /v1/shipping-types/{id} | ADM-SHIPPING-TYPE-500 | 200 OK |
| List shipping types | GET | /v1/shipping-types | ADM-SHIPPING-TYPE-550 | 200 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/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Custom identifier. Auto-generated if omitted. Immutable after creation. Must be unique. |
name | string | Yes | Display name of the zone (max 255 characters) |
description | string | No | Description 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
| HTTP | Code | Description |
|---|---|---|
| 400 | F-E-010 | Name or description exceeds maximum length |
| 400 | F-E-012 | Invalid ID format |
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 409 | F-E-003 | A shipping zone with this ID already exists |
| 422 | F-E-001 | Name 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/jsonPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Identifier of the shipping zone |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Updated display name (1–255 characters) |
description | string | No | Updated 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
| HTTP | Code | Description |
|---|---|---|
| 400 | F-E-010 | Name or description exceeds maximum length |
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping zone not found |
| 422 | F-E-001 | Name 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Identifier of the shipping zone to delete |
Response — 204 No Content
No response body.
Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping zone not found |
| 409 | F-E-042 | Shipping 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/jsonPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
shippingZoneId | string | Yes | Identifier of the shipping zone |
Request Body
The request body is an array of location objects. Each location has:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | country or department |
countryCode | string | Yes | ISO 3166-1 alpha-2 country code (e.g. FR, DE, US) |
excludedDepartments | string[] | No | Only for type: country with countryCode: FR. List of French department codes to exclude. |
Rules
departmenttype is only allowed forcountryCode: "FR". Using it for any other country returnsF-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
| HTTP | Code | Description |
|---|---|---|
| 400 | F-E-012 | department type used for a non-FR country |
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping 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/jsonPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
shippingZoneId | string | Yes | Identifier 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
| HTTP | Code | Description |
|---|---|---|
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping 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
| Parameter | Type | Required | Description |
|---|---|---|---|
shippingZoneId | string | Yes | Identifier 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
| HTTP | Code | Description |
|---|---|---|
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping 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
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (0-based). Default: 0 |
size | integer | No | Number of items per page. Default: 20 |
sort | string | No | Format: field:direction. Sortable fields: name, createdAt, updatedAt. Default: createdAt:desc. Invalid sort entries are silently ignored. |
search | string | No | Free-text search matched against both name and externalId (OR logic, case- and accent-insensitive). Replaces the former name parameter. |
createdAtFrom | datetime | No | Filter by creation date (inclusive, from) |
createdAtTo | datetime | No | Filter by creation date (inclusive, to) |
updatedAtFrom | datetime | No | Filter by update date (inclusive, from) |
updatedAtTo | datetime | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Functional 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
| HTTP | Code | Description |
|---|---|---|
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping zone not found |
Creating a Shipping Type
POST /v1/shipping-types
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Custom identifier. Auto-generated if omitted. Immutable after creation. Must be unique. |
name | string | Yes | Display name of the shipping type (max 255 characters) |
description | string | No | Description 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
| HTTP | Code | Description |
|---|---|---|
| 400 | F-E-010 | Name or description exceeds maximum length |
| 400 | F-E-012 | Invalid ID format |
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 409 | F-E-003 | A shipping type with this ID already exists |
| 422 | F-E-001 | Name 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Functional 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
| HTTP | Code | Description |
|---|---|---|
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping 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
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (0-based). Default: 0 |
size | integer | No | Number of items per page. Default: 20 |
sort | string | No | Format: field:direction. Sortable fields: name, createdAt, updatedAt. Default: createdAt:desc |
search | string | No | Free-text search matched against both name and externalId (OR logic, case- and accent-insensitive). Replaces the former name parameter. |
createdAtFrom | datetime | No | Filter by creation date (inclusive, from) |
createdAtTo | datetime | No | Filter by creation date (inclusive, to) |
updatedAtFrom | datetime | No | Filter by update date (inclusive, from) |
updatedAtTo | datetime | No | Filter 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/jsonPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Identifier of the shipping type |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Updated display name (1–255 characters) |
description | string | No | Updated 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
| HTTP | Code | Description |
|---|---|---|
| 400 | F-E-010 | Name or description exceeds maximum length |
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping type not found |
| 422 | F-E-001 | Name 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Identifier of the shipping type to delete |
Response — 204 No Content
No response body.
Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | F-E-032 | Missing or invalid authentication token |
| 403 | F-E-030 | Caller is not OPERATOR |
| 404 | F-E-002 | Shipping type not found |
| 409 | F-E-042 | Shipping 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
- 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. - Plan your zone structure — define your geographical zones before setting up shipping rules. Restructuring later requires recreating zones.
- Keep names clear for checkout — shipping type names may be displayed to customers during checkout. Use clear, business-friendly labels.
Common Mistakes
| Mistake | Consequence | How to avoid |
|---|---|---|
Providing a duplicate id | 409 Conflict error | Ensure IDs are unique across all shipping zones (or types) |
Omitting name in the request body | 422 validation error | name is always required |
Exceeding max length on name or description | 400 error | Keep name under 255 characters and description under 10,000 |
Trying to update the id after creation | id is immutable | Plan your identifiers before creating the resource |
Using department type for a non-FR country | 400 error (F-E-012) | Department-level locations are only supported for France |
| Deleting a shipping type still used in the price matrix | 409 Conflict (F-E-042) | Remove all associated price matrix lines before deleting the type |
| Deleting a shipping zone still used in the price matrix | 409 Conflict (F-E-042) | Remove all associated price matrix lines before deleting the zone |
Related Documentation
Updated 28 days ago

