Skip to main content

Bulk write attributes across multiple resources of the same type

POST 

/v2/attributes/:resourceType/bulk

Create, update, or delete attributes for many resources (products, categories, clusters, companies, contacts, or customers) in a single atomic transaction.

Each item in the array targets one resource (identified by either classId or a nested source: { id, name } pair) and carries its own array of attribute operations. Items using source are resolved to numeric ids server-side via the upstream resource service before the write runs. Items whose source cannot be resolved are returned as IGNORED responses while the rest of the batch proceeds.

Resolved items are committed in a single all-or-nothing transaction — if any single attribute operation fails, no changes are persisted for the resolved set in the batch.

The maximum number of attribute operations per request (sum of every attributes[] across all items) is governed by the BULK_MAX_ATTRIBUTES env var (default: 2000). Requests over the limit are rejected with HTTP 400 and a message that echoes the configured limit and the received count, so callers can pre-chunk their payloads. The limit is on operations, not resources — 500 products × 8 attributes each (4000 ops) split into 2 requests of 2000 ops each, but 100 products × 50 attributes each (5000 ops) also needs splitting.

Use this endpoint from product / user / category bulk-import flows to collapse what would otherwise be N per-item attribute service calls into one batched request per chunk.

Request

Responses

Successfully completed multi-resource bulk attribute operations