ORDER-150 - Update commercial order lines

Add or update lines on an existing commercial order.


Scope

  • Front Office only; caller must be an ACCOUNT user.

Store scoping

  • Effective store is dj-store header if provided; otherwise the tenant default store.
  • Caller must be attached to the effective store; otherwise 403.

Operation context

  • If the order originates from an Operation (sourceType = OPERATION) and you are in a PARTIAL flow:
  • For a line whose variant belongs to the Operation, apply Operation constraints (visibility, dates, minQuantity / maxQuantity) alongside standard rules.
  • For a line whose variant does not belong to the Operation, apply standard rules only (no Operation constraints).
  • If none of the requested lines are eligible after applying all applicable constraints, the request fails with 422.

Response model

  • On success, returns an array of non-blocking warnings (may be empty) describing adjustments performed by the system (for example, quantity bounded to min/max).
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Commercial order reference

Body Params

List of line updates to apply on the order.

  • lineType controls whether id targets an Offer Price or a Product Variant.
  • lineIdType controls the id namespace. As of now, only EXTERNAL_ID is supported.
  • updateOrderCommercialLines contains the list of line updates to apply.
  • updateAction is one of ADD_QUANTITY (the default when omitted), REPLACE_QUANTITY or REMOVE_QUANTITY; the value is case sensitive and any other value, including add_quantity, produces a blocking warning whose code is null. quantity is 0 when omitted.
  • A strictly negative quantity produces F_W_017. REPLACE_QUANTITY with 0 on an existing line deletes it, in 200 and without any warning; on an offer absent from the order it produces F_W_021. When CART_LINES_0_QUANTITY_AUTHORIZED is enabled, the line is kept at 0 and a line may be created at 0.
  • Line-level custom fields are passed under the key customFields. Unknown keys — customFieldValues, for instance — are ignored: the request does not fail and the custom fields are not applied.
  • When the order comes from an Operation (PARTIAL flow), Operation min/max and visibility/date constraints apply to variants belonging to the Operation.
  • metadata allows passing extra pricing inputs from front to the Real-Time Pricing module (not persisted).
string

Identifier type for custom fields applied at line level.

string

Identifier type for the id field in updateOrderCommercialLines.
As of now, only EXTERNAL_ID is supported.

string

Target entity type for the id field in updateOrderCommercialLines.

metadata
object
updateOrderCommercialLines
array of objects
length between 0 and 1000

List of line updates to apply on the order, at most 1000 per call: above, 400 F_E_016.
An empty or omitted list produces a 400 OR0034 with an empty detail.

updateOrderCommercialLines
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.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication failed.

403

Forbidden. The caller is neither the customer user who created the order nor a user holding the ORDER_UPDATE_LINES_ON_ALL_ACCOUNT permission on the same customer account. A refusal tied to the Operation context is not a 403: it is reported as a blocking warning (F_W_035, F_W_036, F_W_037). The order status is checked first: on an already validated order, any caller gets a 400 (OR0033), not a 403.

404

Commercial order not found

500

Unexpected server error.

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