ORDER-223 - Synchronise a commercial order

Overview

Recalculates the lines of a commercial order against the current catalog, pricing and availability data, and writes the result.

This is not a dry run: the order is modified in place. The response carries warnings only, never the resulting lines: read them back with ORDER-561.

What is written

On each synchronised line: the quantity, the whole price block, the product and variant snapshots, the offer custom field snapshots, and the line custom fields when they are sent.

On the order: the synchronisation timestamp. Logistic orders left without any line are deleted, and the totals of the remaining ones are recomputed.

Shipping fees are recomputed only when the shipping matrix is active. The order status is never changed.

What the warnings cover

The warnings report a subset of what changes, not all of it. A value diff is reported for the quantity (F_W_029), the unit price (F_W_026), the currency (F_W_027) and the tax fields (F_W_028).

Every other price field (amounts excluding taxes, tax amounts, totals, packing information and order quantity bounds) is recalculated without any warning. An empty response therefore does not mean that nothing changed.

Lines that are not synchronised

A line carrying a blocking warning is left untouched: not corrected, not deleted, not partially written. The other lines of the same order are synchronised normally.

The request fails with 400 only when no line survives: OR0038 when every blocking warning is F_W_022 (stock), OR0039 when every blocking warning is F_W_020 (item per pack), OR0034 otherwise.

The commercial order must be editable and not validated, and must come from an order-based checkout.

User scoping

Only dj-client: ACCOUNT is allowed (customer users).

Store scoping

The store context is resolved from dj-store (when provided) or from the tenant default store.

dj-store-view may further refine the store view context when applicable.

Visibility

Access and visibility rules apply to the order and its content, including ownership/permissions and catalog visibility (eligible catalog views).

Real-Time Pricing tenants

Everything above describes the standard mode. When the tenant runs with Real-Time Pricing, pricing and availability come from an external system and the behaviour differs on three points:

  • the set of lines can change: a line may be added (F_W_031) or removed (F_W_032), which never happens in standard mode;
  • minimum, maximum and pack constraints are not enforced;
  • offer, offer stock, product and supplier status, and account eligibility are not checked. Catalog view visibility still applies.

Errors

This endpoint may return authentication, authorisation (permissions), validation, not found or conflict errors.

Standard Djust error codes apply.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique commercial order ID (REFERENCE only).
Business IDs or EXTERNAL_IDs are not supported for this path.

Headers
string
enum
required

Specifies the client type making the request.

  • OPERATOR: Platform operator user.

  • ACCOUNT: Customer account user.

  • SUPPLIER: Supplier managing orders.

Allowed:
string
required

API key required for authentication. Must be valid and linked to the requesting user.

string

(Optional) Store ID in multi-store environments.

string

(Optional) Store view ID in multi-store environments.

string

(Optional) Customer account ID in multi-account customer user.

Responses

401

Unauthorized (invalid or missing API key).

403

Forbidden. The caller is not allowed to synchronise this order.

404

Not found. The commercial order id does not exist.

409

Conflict. The order cannot be synchronised in its current state (e.g., already validated).

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json