ADM-OPERATION-251 - Add accounts to a PRIVATE Operation

Adds one or more accounts to a PRIVATE Operation to control visibility.

Feature flag

  • Requires OPERATIONS_ENABLED to be active.

Access control

  • OPERATOR: can add any account to any PRIVATE Operation.
  • ACCOUNT (FOC): can add accounts only on Operations they own (ownerId = customerUserId) and if they have the OPERATIONS_ADD_ACCOUNTS permission.

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.

Constraints

  • Only DRAFT Operations are editable.
  • Only PRIVATE Operations accept account associations.
  • Request body must be a non-empty array of accountExternalId strings.
  • Already linked accounts are ignored.
  • Unknown accounts are ignored.
  • If none of the provided IDs are valid, the API returns 404.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Operation identifier to add accounts to

Body Params

Non-empty array of account external identifiers to add

accountIds
array of strings
required

Non-empty array of account external identifiers to add

accountIds*
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

Accounts successfully processed

400

Invalid payload.

  • Request body must be a non-empty array of strings
  • Wrong format for one or more items
401

Unauthorized. Missing or invalid authentication token.

403

Forbidden.
— Unexpected value for field dj-client, must be one of [OPERATOR, ACCOUNT].
— Permission denied. Caller is not allowed to modify this Operation (missing OPERATIONS_ADD_ACCOUNTS right, not owner, or not attached to store).
— Only DRAFT operations can be updated.
— Operation type must be PRIVATE to manage account associations.
— Feature Flag disabled for this feature.

404

Not found.

  • Operation not found
  • None of the provided accountExternalIds exist for this Operation.
500

Unexpected server error.

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