Adds one or more variants to a specific Operation with optional quantity constraints.
Feature flag
- Requires OPERATIONS
to 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_VARIANTS
right.
Store scoping
- Effective store is the dj-store
header if provided, otherwise the tenant default store.
- ACCOUNT must be attached to the effective store; otherwise 403.
Quantity rules
- minQuantity
is optional and can be 0.
- maxQuantity
is optional. If provided, it must be greater than or equal to minQuantity
.
- recommendedQuantity
is optional. If provided, it must be between minQuantity
and maxQuantity
(if maxQuantity
is defined).
Other constraints
- A variant cannot be added more than once to the same Operation.
- Only Operations in DRAFT
status can accept new variants.
post https://api.djust.example.com/admin/operations//lines