put
https://example.com/v1/operations//lines
Adds one or more variants to a specific Operation with optional quantity constraints.
Feature flag
- Requires
OPERATIONSto be active.
Access control
- OPERATOR: can add variants to any Operation.
- ACCOUNT: can add variants only to Operations they own (ownerId = customerUserId) and if they have the
OPERATIONS_ADD_VARIANTSright.
Store scoping
- Effective store is the
dj-storeheader if provided, otherwise the tenant default store. - ACCOUNT must be attached to the effective store; otherwise 403.
Quantity rules
minQuantityis optional and can be 0.maxQuantityis optional. If provided, it must be greater than or equal tominQuantity.recommendedQuantityis optional. If provided, it must be betweenminQuantityandmaxQuantity(ifmaxQuantityis defined).
Other constraints
- A variant cannot be added more than once to the same Operation.
- Only Operations in
DRAFTstatus can accept new variants.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
204Variants successfully added to the Operation.
400Invalid payload.
- Field
minQuantitymust be lower than or equal tomaxQuantity - Field
recommendedQuantitymust be betweenminQuantityandmaxQuantity - One or more fields are missing or invalid
401Authentication error.
403Forbidden.
- Unauthorized client value (unexpected
dj-client) - Access denied (missing
OPERATIONS_ADD_VARIANTS, not owner, or not attached to the effective store) - Invalid status (only DRAFT operations can be updated)
- Feature disabled
404Operation or Variant not found.
500Unexpected server error.
