ADM-OPERATION-250 - Add variants to an Operation

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.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the Operation

Body Params
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.

Responses
204

Variants successfully added to the Operation.

400

Invalid payload.

  • Field minQuantity must be lower than or equal to maxQuantity
  • Field recommendedQuantity must be between minQuantity and maxQuantity
  • One or more fields are missing or invalid
401

Authentication error.

403

Forbidden.

  • 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
404

Operation or Variant not found.

500

Unexpected server error.

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here!