Orders Import - API Connector - Overview
⚙️ Introduction
This job is designed to update Orders via the API Connector by connecting your system to DJUST in real-time. It allows you to update Order Logistics (status) and Order Lines by sending data in JSON format to DJUST’s backend.
Order Data ModelIn DJUST, an Order is composed of two key components:
- Order Logistic: A logical grouping of one or more Order Lines based on the supplier. An order may be splited into multiple logistics if products come from different suppliers.
- Order Line: Represents a single purchased product, including its offer and quantity
This structure allows DJUST to manage multi-supplier orders
✅ Prerequisites
Before updating an Order Status via the API Connector, you must define a status mapping to align your system's status values with those expected by DJUST.
This ensures that when a status like "SHIPPED"
or "DELIVERED"
is sent from your system, it is correctly interpreted and applied in DJUST.
Step 1 – Access the Data Hub
- Go to the Data Hub section in the DJUST back office.
- Click on Configure a new mapping.
- Select Order status as the mapping type.
Step 2 – Configure Status Mapping
- Fill in the mapping table by entering the status from your system and the corresponding DJUST status.
Step 3 – Save the Configuration
- Once all fields are filled in, click on Create to save the Order Status mapping.
Update and deleteOnce saved, you can still modify the mapping or delete it
📂 Accepted Payload Structure
The accepted payload format specifies the structure required to successfully update Orders through the API Connector. Adhering to this format ensures seamless integration between your system and DJUST.
Payload structure example
{
"elements": [
{
"orderReference": "168-123-1861251-1",
"orderStatus": "SHIPPED",
"orderLines": [
{
"orderLineId": "1234",
"orderLineExternalId": "4567",
"offerPriceExternalId": "8907",
"quantity": 3,
"orderLineStatus": "SHIPPED"
}
]
}
],
"paging": {
"pageNumber": 0,
"pageSize": 0,
"totalPages": 0,
"totalRecords": 0
}
}
📋 Fields
Field | Definition | Required for Order Line creation | Required for Order Line update | Editable | Default Value |
---|---|---|---|---|---|
| Unique identifier for the Order Logistic | ✅ | ✅ | ||
| Status of the Order Logistic | ✅ | |||
| Array of Order Lines within the Order | ✅ | ☑️ (if orderLines creation or update) | ||
| DJUST identifier of the Order Line | ☑️ (if orderLineExternalId is not provided) | |||
| Unique identifier for the Order Line | ☑️ (if orderLineId is not provided) | |||
| External identifier of the Offer Price | ✅ | |||
| Product gross amount | ✅ | ✅ | ||
| Quantity ordered | ✅ | ✅ |
✅ Required ☑️ Conditionally required
Offer Price External IdYou cannot use a same
offerPriceExternalId
to create multiple Order Lines per Order.Therefore, per Order, each Order Line must have a different
offerPriceExternalId
.
Required Custom FieldsCustom Fields that are required on DJUST must be provided in the API response
📌 Field validation rules
price
: must be a number greater than or equal to 0, and use a dot (.
) as decimal separator. Example:"price": 19.99
quantity
: must be a positive integer or zero. Example:"quantity": 3
🧠 Key Business Rules
- ✅ You can update the status of an existing Order Logistic.
- ✅ You can edit an existing Order Line only if the Order Logistic status is between
CREATED
andPARTIALLY_SHIPPED
. - ✅ You can add a new Order Line to an Order Logistic only if its status is between
CREATED
andPARTIALLY_SHIPPED
. - ❌
offerPriceExternalId
: does not determine the price of the product. It is used only to retrieve associated product information (e.g., SKU, product details) within DJUST - ❌ You cannot create a new Order Logistic via this job.
- ❌ You cannot delete an Order Logistic or an Order Line via this job.
- ❌ Orders originating from Mirakl cannot be updated using this job.
Best Practices✔️ Ensure the Order Status mapping is aligned with DJUST's expectations
✔️ Map the required Custom Fields
✔️ Follow data formatting guidelines for optimal import results
Updated 2 days ago