Logistic Families

This guide explains how to create and manage logistic families via the Back-office and DJUST API.

Introduction

Logistic families allow operators to categorize products according to their shipping and handling constraints. For example, you can create families for fragile items, oversized goods, hazardous materials, or standard parcels. These categories are then used by the delivery module to apply appropriate shipping rules and carrier selection.


Managing Logistic Families from the Back-Office

Most operators manage logistic families directly from the DJUST Back-Office. The API described below performs the same actions and is intended for integrators.

ℹ️

A system-managed "Default" logistic family exists on every tenant. It cannot be renamed, edited, or deleted — it acts as the fallback for products whose classification category is not attached to any custom family.

Where to find it

Settings →Shipping fee management → Logistic families

List view

The list view displays all existing logistic families with:

  • Search — free-text on name and id (case- and accent-insensitive)
  • Sorting — by name, creation date (createdAt), or last update (updatedAt)
  • Columns — Name (with the external ID as a secondary line), Description, Linked (number of classification categories attached to the family)
  • Row actions — Edit, Delete (delete disabled for the Default family)

Filters

Refine the list with the filter panel:

FilterTypeDescription
Classification categoryMulti-selectShow only families that include one of the selected classification categories.
Created afterDateShow only families created on or after the selected date.
Updated afterDateShow only families updated on or after the selected date.

Creating a logistic family

Click Create logistic family and fill in the form:

FieldRequiredNotes
External IDNoCustom identifier. Auto-generated if left blank. Immutable after creation. Must be unique.
NameYesDisplay name.
DescriptionNoAdditional context describing the shipping constraints associated with the family.
Classification categoriesNoMulti-select of the classification categories that belong to this family. Categories already attached to another family are silently reassigned on save (see below).

Attaching classification categories

Classification categories are attached to a logistic family exclusively from the family's create/edit modal — the reverse operation (attaching from the classification page) is not available in the Back-Office.

Each classification category can belong to only one logistic family at a time. When you attach a category already assigned to another custom family, the Back-Office displays a warning identifying the family that will lose the category, then silently moves it on save.

Categories not explicitly attached to any custom family remain in the "Default" logistic family.


Editing a logistic family

Open a family to edit its Name, Description, or Classification categories. The External ID is locked once created. The Default family cannot be edited.


Deleting a logistic family

Deletion is blocked if the family is still referenced in the shipping price matrix. The Back-Office displays an error and lists the associated price rows. Remove them first, then retry the deletion.

The Default family cannot be deleted. When a custom family is deleted, its attached categories are automatically reassigned to the Default family.

⚠️

Warning:

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


Logistic Families on Orders

Cart Split at Checkout

At checkout, the cart is split into logistic orders based on the triplet (supplier, shipping delay, logistic family). A cart that mixes several logistic families for the same supplier and the same shipping delay therefore produces one logistic order per family.

The family of each line is resolved from the classification of its product, with a fallback to the "Default" logistic family when no explicit attachment exists.

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 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;

  A["🧾 Cart at checkout"]:::sys
  B{{"📦 Group by<br>supplier + shipping delay<br>+ logistic family"}}:::decision
  C["✅ Logistic order<br>Family A"]:::place
  D["✅ Logistic order<br>Family B"]:::place

  A --> B
  B --> C
  B --> D

  style A rx:8,ry:8
  style C rx:8,ry:8
  style D rx:8,ry:8

Logistic Family Fields on Order Responses

The consultation responses of a logistic order (both Front Office and Back Office) carry the resolved family at the root level:

FieldTypeDescription
logisticFamilyIdstringIdentifier of the logistic family applied to the logistic order
logisticFamilyNamestringDisplay name of the logistic family
  • These fields are always returned, whether or not the shipping module is enabled.
  • Commercial orders — which may regroup several logistic families — are not enriched with these fields.
  • Logistic orders created before this capability remain fully functional; the fields are optional and backward-compatible (they may be null on legacy orders without a family).

Key Endpoints

ActionMethodPathOperationIdResponse
Create a logistic familyPOST/v1/logistic-familiesADM-LOGISTIC-FAMILY-100201 Created
List logistic familiesGET/v1/logistic-familiesADM-LOGISTIC-FAMILY-550200 OK
Get a logistic family by IDGET/v1/logistic-families/{id}ADM-LOGISTIC-FAMILY-500200 OK
Update a logistic familyPUT/v1/logistic-families/{id}ADM-LOGISTIC-FAMILY-200204 No Content
Delete a logistic familyDELETE/v1/logistic-families/{id}ADM-LOGISTIC-FAMILY-300204 No Content
Attach classification categoriesPATCH/v1/logistic-families/{logisticFamilyId}/classification-categoriesADM-LOGISTIC-FAMILY-210200 OK
Replace classification categoriesPUT/v1/logistic-families/{logisticFamilyId}/classification-categoriesADM-LOGISTIC-FAMILY-230204 No Content
Detach classification categoriesDELETE/v1/logistic-families/{logisticFamilyId}/classification-categoriesADM-LOGISTIC-FAMILY-350204 No Content
List classification categoriesGET/v1/logistic-families/{logisticFamilyId}/classification-categoriesADM-LOGISTIC-FAMILY-551200 OK
Get family assignments for classificationsGET/v1/logistic-families/assignmentsADM-LOGISTIC-FAMILY-560200 OK

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


Creating a Logistic Family

POST /v1/logistic-families
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 family
descriptionstringNoDescription of the family

Example

{
  "id": "fragile-items",
  "name": "Fragile Items",
  "description": "Products requiring careful handling and special packaging"
}

Response — 201 Created

{
  "id": "fragile-items"
}

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 logistic family with this ID already exists
422F-E-001Name is absent, null, empty, or whitespace-only

Updating a Logistic Family

Updates apply a full replacement of the modifiable fields (name and description). The id is immutable and cannot be changed.

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

Request Body

FieldTypeRequiredDescription
namestringYesUpdated display name
descriptionstringNoUpdated description

Example

{
  "name": "Fragile & Delicate Items",
  "description": "Products requiring careful handling, special packaging, and temperature control"
}

Response — 204 No Content

No response body.


Retrieving a Logistic Family

GET /v1/logistic-families/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
idstringYesFunctional identifier of the logistic family

Response — 200 OK

{
  "id": "fragile-items",
  "name": "Fragile Items",
  "description": "Products requiring careful handling and special packaging",
  "system": false,
  "classificationCategoriesCount": 3,
  "createdAt": "2026-03-05T10:30:00Z",
  "updatedAt": "2026-03-05T10:30:00Z"
}

Errors

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

Deleting a Logistic Family

Permanently deletes a logistic family. All classification categories attached to this family are automatically reassigned to the "Default" logistic family.

DELETE /v1/logistic-families/{id}
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Path Parameters

ParameterTypeRequiredDescription
idstringYesExternal ID of the logistic family

Rules

  • The Default logistic family cannot be deleted — the request returns 403.
  • Deletion is blocked if the family is still referenced in the shipping price matrix. Remove those price lines first.

Response — 204 No Content

No response body.

Errors

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

You cannot delete a logistic family that is still referenced in the shipping price matrix, nor the system-managed Default family.

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


Listing Logistic Families

Retrieve a paginated list of logistic families with optional filters and sorting.

GET /v1/logistic-families
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (0-based). Default: 0
sizeintegerNoNumber of items per page. Default: 20. Min: 1. Max: 100
sortstringNoFormat: field:direction (e.g. name:asc)
searchstringNoFree-text search matched against both name and externalId (partial match, OR logic, case- and accent-insensitive). Replaces the former name parameter.
classificationCategoryIdsstringNoComma-separated classification category IDs to filter by
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": "fragile-items",
      "name": "Fragile Items",
      "description": "Products requiring careful handling and special packaging",
      "system": false,
      "classificationCategoriesCount": 3,
      "createdAt": "2026-03-05T10:30:00Z",
      "updatedAt": "2026-03-05T10:30:00Z"
    },
    {
      "id": "default",
      "name": "Default",
      "description": null,
      "system": true,
      "classificationCategoriesCount": 12,
      "createdAt": "2026-01-10T08:00:00Z",
      "updatedAt": "2026-01-10T08:00:00Z"
    }
  ],
  "number": 0,
  "size": 20,
  "numberOfElements": 2,
  "first": true,
  "last": true,
  "empty": false
}

Tip:
The system flag identifies the system-managed "Default" family (true), and classificationCategoriesCount gives the number of classification categories attached to each family without additional lookups.

Errors

HTTPCodeDescription
400F-E-010size exceeds the maximum (100)
400F-E-008size is less than 1 or page is negative
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR

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


Attaching Classification Categories

Attach one or more classification categories to a logistic family using their external IDs. This determines which shipping rules apply to products in those categories.

PATCH /v1/logistic-families/{logisticFamilyId}/classification-categories
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
classificationCategoryIdsstring[]YesList of classification category external IDs to attach

Rules

  • A classification category can only belong to one logistic family at a time. If a category is already attached to another custom family, it is automatically reassigned and a F_W_038 warning is emitted.
  • Sending an empty array or null for classificationCategoryIds is accepted and returns 200 OK with an empty warnings array.
  • Identifiers must be external IDs of classification categories.

Example

{
  "classificationCategoryIds": ["CAT-FRAGILE", "CAT-GLASS"]
}

Response — 200 OK

The response contains a warnings array. A warning is emitted only for categories that were reassigned from a previous non-system family. Categories that were previously unattached (or attached to the Default family) do not generate a warning.

{
  "warnings": [
    {
      "classificationCategoryId": "CAT-FRAGILE",
      "code": "F_W_038",
      "message": "Category CAT-FRAGILE has been moved from logistic family bulky-items to logistic family fragile-items.",
      "previousLogisticFamilyId": "bulky-items"
    }
  ]
}

Empty when no reassignment occurred:

{ "warnings": [] }

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Logistic family or classification category not found

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


Replacing Classification Categories

Replaces the entire list of classification categories attached to a logistic family. This is a full replacement — categories not included in the request that were previously attached to this family fall back to the "Default" logistic family.

PUT /v1/logistic-families/{logisticFamilyId}/classification-categories
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
classificationCategoryIdsstring[]YesThe new complete list of classification category external IDs to attach.

Rules

  • Categories previously attached to this family and not included in the request are automatically reassigned to the Default family.
  • Categories currently attached to another custom family and included in the request are silently reassigned to this family.
  • Sending an empty array [] detaches all categories — they all fall back to the Default family.

Example

{
  "classificationCategoryIds": ["CAT-FRAGILE", "CAT-GLASS", "CAT-CERAMIC"]
}

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Logistic family or classification category not found

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


Detaching Classification Categories

Detach one or more classification categories from a logistic family. Detached categories fall back to the "Default" logistic family.

DELETE /v1/logistic-families/{logisticFamilyId}/classification-categories
dj-client: OPERATOR
dj-api-key: {{apiKey}}
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
classificationCategoryIdsstring[]YesList of classification category external IDs to detach

Example

{
  "classificationCategoryIds": ["CAT-GLASS"]
}

Response — 204 No Content

No response body.

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Logistic family or classification category not found

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


Listing Classification Categories of a Logistic Family

Retrieve the classification categories currently attached to a logistic family. The response is paginated using the standard DJUST pagination parameters (page, size).

By default, when no explicit category attachment has been made, all tenant classification categories are implicitly associated with the "Default" logistic family. This endpoint returns them all in that case.

The id field returned for each category corresponds to the external ID of the classification category.

GET /v1/logistic-families/{logisticsFamilyId}/classification-categories
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (0-based). Default: 0
sizeintegerNoNumber of items per page. Default: 20. Min: 1. Max: 100.
searchstringNoPartial, case- and accent-insensitive search on the classification category name or id (external ID).

Response — 200 OK

{
  "content": [
    { "id": "cat-001", "name": "Verres et cristaux" },
    { "id": "cat-002", "name": "Porcelaine" }
  ],
  "numberOfElements": 2,
  "number": 0,
  "size": 20,
  "first": true,
  "last": true,
  "empty": false
}

Errors

HTTPCodeDescription
400F-E-010size exceeds the maximum (100)
400F-E-008size is less than 1 or page is negative
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR
404F-E-002Logistic family not found

Getting Logistic Family Assignments for Classifications

Query which logistic family is currently assigned to a set of classification categories. This is useful for displaying current assignments in a UI or for checking before reassigning a category.

GET /v1/logistic-families/assignments?classificationCategoryIds=cat-001,cat-002
dj-client: OPERATOR
dj-api-key: {{apiKey}}

Query Parameters

ParameterTypeRequiredDescription
classificationCategoryIdsstring (comma-separated)YesList of classification category IDs to look up

Rules

  • Every classification always has a logistic family (at minimum the system default) — the response is never null for a known category.
  • Unknown classification IDs are silently omitted from the response (Tolerant Reader pattern).
  • The logisticFamily.system flag indicates whether the assigned family is the system-managed default (true) or a custom family (false).
  • This endpoint is not paginated — it returns all results in a single response.

Response — 200 OK

{
  "assignments": [
    {
      "classificationCategoryId": "cat-001",
      "logisticFamily": {
        "id": "fragile-items",
        "name": "Fragile Items",
        "system": false
      }
    },
    {
      "classificationCategoryId": "cat-002",
      "logisticFamily": {
        "id": "default",
        "name": "Default",
        "system": true
      }
    }
  ]
}

Tip:
Use this endpoint as a pre-check before reassigning a category. If a category is already attached to a non-system family different from your target, you may want to warn the user before proceeding.

Errors

HTTPCodeDescription
401F-E-032Missing or invalid authentication token
403F-E-030Caller is not OPERATOR or missing LOGISTIC_FAMILY_READ permission

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 logistic family<br>POST /v1/logistic-families"]:::create
  B["📦 Family available"]:::place
  F["📘 Check current assignments<br>GET .../assignments"]:::read
  C["🔗 Attach categories<br>PATCH .../classification-categories"]:::add
  D["🔄 Update family<br>PUT /v1/logistic-families/id"]:::update
  E["📘 List categories<br>GET .../classification-categories"]:::read

  A --> B --> F --> C
  B --> D --> B
  B --> E

  style A 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
  style F rx:8,ry:8

Best Practices

  1. Use meaningful custom IDs — if you provide a custom id, make it descriptive and consistent (e.g. fragile-items, oversized-goods). Once created, the ID cannot be changed.
  2. Plan your family structure — define your logistic families before attaching categories. Rethinking the structure later requires reassigning categories.
  3. Do not modify the Default family — it is system-managed and serves as the fallback for unassigned products.

Common Mistakes

MistakeConsequenceHow to avoid
Trying to modify the Default familyRequest will be rejectedThe Default family is system-managed and cannot be updated
Expecting category attachment on creationCategories are not linked automaticallyUse ADM-LOGISTIC-FAMILY-210 to attach categories after creating the family
Attaching a category already assigned to another familyThe category is silently reassigned to the new familyVerify current assignments before attaching if you need to preserve existing links
Sending id in an update requestThe id field is immutableOnly send name and description in the update body
Using a duplicate custom ID409 Conflict or validation errorEnsure IDs are unique across all logistic families
Trying to delete the Default family403 (F-E-030)The Default family is system-managed and cannot be deleted
Deleting a logistic family still referenced in the price matrix409 Conflict (F-E-042)Remove the associated price matrix lines before deleting the family



Did this page help you?