ORDER_UPDATE

This page describes how to update existing Internal Orders and their Order Lines via the API Connector, including status changes, price and quantity updates, and Custom Field values.

⚙️ Introduction

This job allows you to update Order Logistics (status) and Order Lines by sending data in JSON format to DJUST.

💡

Order Data Model

In 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

📌

Prerequisite — Order Status mapping

Before creating an ORDER_UPDATE job (ORDER_UPDATE_API_JSON_JOB), an Order Status mapping configuration must already exist on your tenant. In your DJUST back office, go to Data Hub > Mappings > Order Status and create/configure it.

If this configuration is missing, job creation is rejected with MAP0003 — Mapping configuration not found (type concerned: ORDER_STATUS_JOB). Once created, make sure the statuses are aligned with DJUST's expectations.


📂 Import model

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",
      "orderCustomField1": "value",
      "orderCustomField2": ["value1", "value2"],
      "orderLines": [
        {
          "orderLineId": "1234",
          "orderLineExternalId": "4567",
          "offerPriceExternalId": "8907",
          "quantity": 3,
          "orderLineStatus": "SHIPPED",
          "orderLineCustomField1": "value",
          "orderLineCustomField2": ["value1", "value2"]
        }
      ]
    }
  ],
  "paging": {
    "pageNumber": 0,
    "pageSize": 0,
    "totalPages": 0,
    "totalRecords": 0
  }
}

📋 Fields

FieldDefinitionRequired for Order Line creationRequired for Order Line updateEditableDefault Value
Order ReferenceUnique identifier for the Order Logistic
Order StatusStatus of the Order Logistic
Order LinesArray of Order Lines within the Order☑️ (if orderLines creation or update)
Order Line IdDJUST identifier of the Order Line☑️ (if orderLineExternalId is not provided)
Order Line External IdUnique identifier for the Order Line☑️ (if orderLineId is not provided)
Offer Price External IdExternal identifier of the Offer Price
PriceProduct gross amount
QuantityQuantity ordered

✅ Required ☑️ Conditionally required

⚠️

Offer Price External Id

You 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 Fields

Custom 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. Order lines are not required for status-only updates — a payload containing only the order identifier and the new status is sufficient. Existing lines, addresses, and custom fields are preserved.
  • ✅ You can edit an existing Order Line only if the Order Logistic status is between CREATED and PARTIALLY_SHIPPED.
  • ✅ You can add a new Order Line to an Order Logistic only if its status is between CREATED and PARTIALLY_SHIPPED.
  • ✅ You can create or update Custom Fields on Order Logistics and Order Lines regardless of the Order Logistic status — including SHIPPED, DELIVERED, or CANCELED. This allows you to enrich or correct business metadata at any point in the order lifecycle.
  • Offer Price Externa lId: 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


Did this page help you?