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.
