ORDER
This page describes how to import and manage Orders in DJUST — create External Orders from your ERP, update Internal Orders and their lines, and synchronize order statuses via CSV or API Connector.
⚙️ Introduction
This job allows the creation and update of Orders via CSV import or API Connector.
You can:
- Create new External Orders
- Add Order Lines to existing Orders
- Update existing Order Lines
- Update the status of an Order
- Remove Order Lines
- Create or update Custom Fields on Order Logistics and Order Lines
- Set the shipping and billing addresses of an Order, field by field or by external identifier
Order Data ModelIn DJUST, an Order is composed of two key components:
- Order Logistic: A logical grouping of one or more Order Lines
- Order Line: Represents a single purchased product, including its offer and quantity
📂 Import model
CSV Structure
The CSV file must contain one row per Order Line. Multiple rows may belong to the same Order Logistic.
API Connector
The API Connector sends data as a JSON payload. The JSON must always be a list of objects, regardless of the use case (create, update, delete).
[
{
"orderExternalId": "string",
"orderReference": "string",
"orderStatus": "string",
"accountExternalId": "string",
"customerExternalId": "string",
"supplierExternalId": "string",
"shippingAddressFullName": "string",
"shippingAddressCountry": "string",
"shippingAddressStreetName": "string",
"shippingAddressCity": "string",
"shippingAddressZipCode": "string",
"shippingAddressState": "string",
"shippingAddressAdditional": "string",
"billingAddressFullName": "string",
"billingAddressCountry": "string",
"billingAddressStreetName": "string",
"billingAddressCity": "string",
"billingAddressZipCode": "string",
"billingAddressState": "string",
"billingAddressAdditional": "string",
"orderLines": [
{
"orderLineExternalId": "string",
"orderLineId": "string",
"offerPriceExternalId": "string",
"variantExternalId": "string",
"variantName": "string",
"variantDescription": "string",
"classificationExternalId": "string",
"orderLineQuantity": 0,
"netUnitPrice": 0,
"grossUnitPrice": 0,
"taxAmount": 0,
"markOrderLineForDeletion": false
}
]
}
]📋 Fields
| Field | Definition | Required for creation | Required for update | Editable | Default Value |
|---|---|---|---|---|---|
Order External Id | Unique external reference of the Order | ✅ | ☑️ (Unless Order Reference is provided) | ✅ (Only if the value is not yet set for Internal Orders) | |
Order Reference | Unique DJUST reference of the Order | ☑️ (Unless Order External Id is provided) | |||
Order Status | Represents the current state of the Order Logistic in its lifecycle. This status determines whether the order can still be modified | DRAFT_ORDER_ON_HOLD | |||
Order Line External Id | Unique external reference of the Order Line | ✅ | ☑️ (Unless Order Line Id is provided) | ✅ (Only if the value is not yet set for Internal Orders) | |
Order Line Id | Unique DJUST reference of the Order Line | ☑️ (Unless Order Line External Id is provided) | |||
Account External Id | Unique external reference of the Account provided in DJUST | ✅ | ☑️ (Only to create a new line) | ||
Customer External Id | Unique external reference of the Customer provided in DJUST | ✅ | If not provided, the order is linked with the first Customer User associated with the Account External Id | ||
Supplier External Id | Unique external reference of the Supplier provided in DJUST | ✅ | ☑️ (Only to create a new line) | ||
Order Line Quantity | The number of units ordered for the given product (Order Line) | ✅ | ☑️ (Only to create a new line) | ✅ | |
Net Unit Price | The unit price of the product excluding taxes | ☑️ (Unless Offer Price External Id is provided) | ☑️ (Unless Offer Price External Id is provided) | ✅ | |
Gross Unit Price | The unit price of the product including taxes | ✅ | |||
Tax Amount | The tax amount per unit | ✅ | |||
Offer Price External Id | External identifier of the offer price associated with the product. Used to retrieve product and pricing information configured in DJUST (such as variant, unit, tax rules, etc.) | ☑️ (Unless Variant External Id and/or Net Unit Price are provided) | ☑️ (Unless Variant External Id and/or Net Unit Price are provided) | ✅ | |
Variant External Id | External identifier of the product variant. If not found in DJUST, it will still be stored on the order line without triggering an error | ☑️ (Unless Offer Price External Id is provided) | ☑️ (Unless Offer Price External Id is provided) | ✅ (If both Offer Price External Id and Variant External Id are provided, the variant must exist in DJUST and be linked to the corresponding Offer Price External Id) | |
Variant Name | The display name of the product variant as provided by the source system. Stored on the order line for informational purposes, not matched against DJUST's product catalog. Especially useful when the referenced variant does not exist in DJUST | ✅ | The one associated with the Variant External Id | ||
Variant Description | A free-text description of the product variant, provided by the source system. Stored for informational purposes only, not validated against any product data in DJUST | ✅ | The one associated with the Variant External Id | ||
Classification External Id | Unique external reference of the Classification associated with the Variant External Id | The one associated with the Variant External Id | |||
Shipping Address Full Name | The full name of the recipient at the delivery address | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address Country | The country where the order should be delivered | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address Street Name | The street name and number of the delivery location | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address City | The city or locality of the delivery address | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address Zip Code | The postal or ZIP code of the delivery address | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address State | The region, province, or state of the delivery address (if applicable) | ✅ | The first Shipping Address associated with the Account | ||
Shipping Address (Additional) | Optional free-text field for any extra delivery information (e.g. door code, apartment number, delivery notes) | ✅ | The first Shipping Address associated with the Account | ||
Billing Address Full Name | The full name of the entity billed for the order | ☑️ (Required if any billing field is filled²) | ☑️ (Required if any billing field is filled²) | ✅ | The first Billing Address associated with the Account |
Billing Address Country | The country of the billing address | ☑️ (Required if any billing field is filled²) | ☑️ (Required if any billing field is filled²) | ✅ | The first Billing Address associated with the Account |
Billing Address Street Name | The street name and number of the billing address | ☑️ (Required if any billing field is filled²) | ☑️ (Required if any billing field is filled²) | ✅ | The first Billing Address associated with the Account |
Billing Address City | The city or locality of the billing address | ☑️ (Required if any billing field is filled²) | ☑️ (Required if any billing field is filled²) | ✅ | The first Billing Address associated with the Account |
Billing Address Zip Code | The postal or ZIP code of the billing address | ☑️ (Required if any billing field is filled²) | ☑️ (Required if any billing field is filled²) | ✅ | The first Billing Address associated with the Account |
Billing Address State | The region, province, or state of the billing address (if applicable) | ✅ | The first Billing Address associated with the Account | ||
Billing Address (Additional) | Optional free-text field for any extra billing information | ✅ | The first Billing Address associated with the Account | ||
Shipping Address External Id | External identifier of an existing shipping address of the tenant, used to attach it to the order instead of retyping it. File import only. Takes precedence over the detailed Shipping Address fields | ✅ | The first Shipping Address associated with the Account | ||
Billing Address External Id | External identifier of an existing billing address of the tenant, used to attach it to the order instead of retyping it. File import only. Takes precedence over the detailed Billing Address fields | ✅ | The first Billing Address associated with the Account | ||
Mark Order Line For Deletion | Boolean flag used to indicate that the order line should be removed from the order | ✅ | FALSE |
Conditionally required¹ If any
Shipping Addressfield is provided (includingStateandAdditional),
thenFull Name,Country,Street Name,CityandZip Codeall become required.
StateandAdditionalare never required on their own.² The same rule applies to the
Billing Addressfields, independently:
as soon as one of them is provided,Full Name,Country,Street Name,CityandZip Codeall become required.
A missing one rejects the line with the functional codeF-E-001.
The address fields are all optionalThe nine address fields above are optional and available in the ORDER import mapping, exactly like the
Shipping Addressfields. Without them, the import keeps its existing behaviour: first shipping address and first billing address of the customer account.
Order Identification
Each order must be identified using at least one of the following fields:
| Field | Description |
|---|---|
Order External Id | Unique external identifier of the order |
Order Reference | DJUST reference of the order |
If both are provided,
Order Referencetakes precedence.
Order External Idis mandatory when creating an order.
Order Referencecan only be used when updating an existing order.
Order Line Identification
Each order line must be identified using at least one of the following fields:
| Field | Description |
|---|---|
Order Line External Id | External identifier of the order line |
Order Line Id | Internal DJUST identifier of the order line |
To create a new line,
Order Line External Idis required.
To update an existing line, provide at least one of these fields.
🧠 Key Business Rules
Use cases and required fields
Create an External Order
Required fields: Order External Id, Account External Id, Customer External Id, Supplier External Id, Order Line External Id, Offer Price External Id (or Variant External Id), Order Line Quantity, Net Unit Price.
Update an External Order or its Lines
Required fields: Order External Id (or Order Reference), Order Line External Id (or Order Line Id).
Update an Internal Order
An Internal Order is an order created natively in DJUST (not imported from an external system). You can update it by providing Order Reference to identify it, along with the fields to update. Order External Id and Order Line External Id can be set on an Internal Order at any time.
Update an Order Status
Provide Order External Id (or Order Reference) and set Order Status to the desired target status.
Status updates are allowed regardless of the current status of the order, as long as the transition moves forward in the order lifecycle:
- ✅ Moving forward is accepted — e.g.
SHIPPED→COMPLETED. - ❌ Moving backward is rejected — e.g.
SHIPPED→DRAFT_ORDER.
This makes it possible to progress an order across several import files — for example, ship it in one file and complete it in a later one.
The order lifecycle sequence used as the reference for "forward" is described in Order lifecycle and statuses.
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 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 stop fill:#fee2e2,stroke:#ef4444,stroke-width:2px,color:#7f1d1d;
A[📦 Order Status<br>in the import file] --> B{Direction of the<br>transition}
B -->|Backward| S[⛔ Rejected<br>e.g. SHIPPED to DRAFT_ORDER]
B -->|Forward| C{Target is a<br>locking status}
C -->|Any other status| D[✅ Status updated]
C -->|SHIPPED or COMPLETED| E{Other operations<br>on the same order}
E -->|All succeeded| F[✅ Status updated<br>order lines locked]
E -->|At least one failed| G[⛔ Status not applied<br>error in the execution report]
class A sys
class B decision
class C decision
class E decision
class D place
class F place
class S stop
class G stop
style A rx:8,ry:8
style D rx:8,ry:8
style F rx:8,ry:8
style S rx:8,ry:8
style G rx:8,ry:8
Order lines are not required for status-only updates. A minimal payload containing only the order identifier and the new status is sufficient. When no order lines are provided, existing lines, addresses, and custom fields are preserved unchanged.
Locking statuses (SHIPPED,COMPLETED)Once an order reaches
SHIPPEDorCOMPLETED, its order lines can no longer be modified. To avoid locking an order with incomplete data, the transition to a locking status is applied only if all the other operations on the same order within the same import succeed — order field updates as well as order line operations (creation, update, deletion). If any of them fails, the status change is not applied and the execution report flags the error: fix the data and re-run the import.
If no order lines are provided and the referenced order does not exist, a validation error is returned.
Data format
Net Unit PriceandGross Unit Pricemust be numeric, using a dot (.) as decimal separator. Example:12.50Order Line Quantitymust be a positive integer. Example:3
Uniqueness
Order External IdandOrder Line External Idmust be unique across all orders.
Import execution order
The processing of imported data does not follow a strict FIFO order. If the same Order Line appears multiple times within a single import with different values, the final result may not reflect the last occurrence. Avoid sending duplicate Order Lines with conflicting updates within the same import execution.
Dependencies
- If both
Offer Price External IdandVariant External Idare provided, the variant must exist in DJUST and be linked to the provided offer. - If any shipping address field is provided (including
Shipping Address Stateor
Shipping Address (Additional)), thenFull Name,Country,Street Name,City
andZip Codeall become required. The imported address fully replaces the Account
address:StateorAdditionalalone cannot complement it. - The same rule applies to the billing address fields, independently from the shipping ones.
Providing onlyBilling Address City, for example, rejects the line withF-E-001. Shipping Address External IdandBilling Address External Idmust reference an address
that already exists in the tenant. An unknown identifier rejects the line.
Shipping and Billing Addresses
Both the shipping address and the billing address of an Order can be set from the import, at creation as well as on update. The two addresses are resolved independently, following the same three-level rule.
| Level | What is imported | Result |
|---|---|---|
| 1 | An Address External Id is provided | The existing address of the tenant carrying that external identifier is attached to the order. The detailed fields of that same address are ignored |
| 2 | At least one detailed address field is provided | The address is built from the imported values. Full Name, Country, Street Name, City and Zip Code are then all required |
| 3 | Nothing is provided | The first shipping address / first billing address of the customer account is used |
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[📦 Address columns<br>of the imported row]:::sys --> B{Address External Id<br>provided}
B -->|Yes| C{Known in<br>the tenant}
C -->|Yes| D[✅ Existing address attached<br>detailed fields ignored]:::place
C -->|No| E[⛔ Line rejected]:::stop
B -->|No| F{At least one<br>detailed field}
F -->|Yes| G{The five required<br>fields are filled}
G -->|Yes| H[✅ Address built<br>from the imported values]:::place
G -->|No| I[⛔ Line rejected<br>code F-E-001]:::stop
F -->|No| J[✅ First address<br>of the customer account]:::place
class B decision
class C decision
class F decision
class G decision
style A rx:8,ry:8
style D rx:8,ry:8
style E rx:8,ry:8
style H rx:8,ry:8
style I rx:8,ry:8
style J rx:8,ry:8
An imported address is a snapshotAn address built from the detailed fields is carried by the order alone: it is neither created in the address book nor attached to the customer account. Use
Shipping Address External IdorBilling Address External Idwhen the address is already referenced in DJUST and must stay linked to it.
The External Id wins over the detailed fieldsWhen both
Billing Address External IdandBilling Address *fields are present on the same row, the external identifier is applied and the detailed fields are ignored — the same goes for the shipping address. Do not rely on the detailed fields to "complete" an address designated by its external identifier.
TipIf an Account carries several billing addresses, target the expected one with
Billing Address External Id(its GLN, for instance) rather than relying on the order of the addresses linked to the Account.
Examples
A one-off billing address, imported field by field
[
{
"orderExternalId": "ERP-2026-00123",
"accountExternalId": "ACC-0042",
"supplierExternalId": "SUP-01",
"shippingAddressFullName": "ACME Retail — Warehouse North",
"shippingAddressCountry": "FR",
"shippingAddressStreetName": "12 rue des Lilas",
"shippingAddressCity": "Lille",
"shippingAddressZipCode": "59000",
"billingAddressFullName": "ACME Retail — Accounting",
"billingAddressCountry": "FR",
"billingAddressStreetName": "3 avenue de la Gare",
"billingAddressCity": "Paris",
"billingAddressZipCode": "75008",
"billingAddressAdditional": "Floor 4",
"orderLines": [
{
"orderLineExternalId": "ERP-2026-00123-1",
"offerPriceExternalId": "OP-RC-EX3A",
"orderLineQuantity": 3,
"netUnitPrice": 117.45
}
]
}
]Both addresses are built from the imported values and carried by the order. The customer account is left untouched.
Addresses designated by their external identifier (file import)
Order External Id | Shipping Address External Id | Billing Address External Id | Order Line External Id | … |
|---|---|---|---|---|
ERP-2026-00124 | 3012345000009 | 3012345000016 | ERP-2026-00124-1 | … |
Both GLNs must already exist in the tenant; otherwise the row is rejected.
Store View Assignment
When an External Order is created via import, it is automatically assigned to the default store view of the default store.
However, in a multi-store context, you can target a specific store by configuring the storeExternalIds parameter on the import job (via POST /v2/mapper/jobs or PUT /v1/mapper/jobs/{jobId}). When a store is configured on an Order import job, all imported orders are automatically assigned to the default store view of the specified store.
If the configured store does not exist or is no longer valid, the job creation or update is rejected with an HTTP400error. If the store becomes invalid after the job is created, the execution report will flag the error.
Update rules based on Order Logistic status
| Action | Allowed if Order Logistic status is… |
|---|---|
| Add an Order Line | Before or equal to PARTIALLY_SHIPPED |
| Update an existing Order Line | Before or equal to PARTIALLY_SHIPPED |
| Delete an Order Line | Before or equal to PARTIALLY_SHIPPED |
Set Order External Id | Always allowed (applies to Internal Orders) |
Set Order Line External Id | Always allowed (applies to Internal Orders) |
Change Order Status | Any current status — the transition must move forward in the lifecycle (no regression). See Update an Order Status for the locking-status rule |
Custom Fields on Order Logistics and Order Lines
You can create or update Custom Field values on Order Logistics and Order Lines through this import job. Custom Fields allow you to enrich orders with business-specific metadata such as invoice numbers, tracking codes, or internal references.
Custom Field updates on orders are allowed regardless of the Order Logistic status — including SHIPPED, COMPLETED, or CANCELED. This means you can enrich or correct metadata at any point in the order lifecycle without being blocked by the logistic progression.
Tip: Use Custom Fields to attach business metadata (e.g. invoice number, tracking code) that needs to be updated after the order has been shipped or delivered.
General requirements
- An Order must contain at least one Order Line when creating a new order. For status-only updates on existing orders, order lines can be omitted.
- An Order Line from an External Order can reference a product not imported in DJUST.
- An External Order must reference at least one Supplier and one Account existing in DJUST.
Best Practices✔️ Always use
Order External Idwhen creating orders from an external system.✔️ Ensure the mapping matches DJUST's fields before running the import.
✔️ Validate data format (prices, quantities) before upload.
✔️ Avoid duplicate Order Lines with conflicting values in the same import file.
✔️ Prefer
Shipping Address External Id/Billing Address External Idwhen the address is already known to DJUST, and the detailed fields only for one-off addresses.✔️ Send the five required fields (
Full Name,Country,Street Name,City,Zip Code) as soon as you fill one address field — a partial address rejects the line.
⚠️ Common mistakes
| Mistake | Symptom | Fix |
|---|---|---|
Filling only Billing Address City to correct a city | Line rejected with F-E-001 | Send the five required billing fields — an imported address replaces the whole address, it does not patch it |
Sending Billing Address External Id and the detailed billing fields | The detailed values are not applied | The external identifier takes precedence — send one or the other |
Using Billing Address External Id in an API Connector import | The field is not taken into account | The two Address External Id fields are available in file-type imports only |
| Expecting an imported address to appear on the customer account | The address is nowhere in the address book | An imported address is a snapshot carried by the order — use an external identifier to rely on an existing address |
| Referencing an unknown GLN | The row is rejected | Import the address in DJUST first, then reference it |
🧾 Error codes
For the full reference of functional codes, see Error / Warning codes.
The most relevant code when importing addresses is F-E-001 — a required field is missing or blank.
Updated about 1 month ago

