Update Product Attributes
PUT/api/products/:productId/attributes
Add or update attributes on a product. Syncs without detaching other existing attributes.
products:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Fields in attributes[]:
- id (required without name): attribute ID
- name (required without id): attribute name (max 255)
- value (nullable): attribute value
Option-list enforcement: when an attribute is option-typed and does not allow custom values, each submitted value must be one of its configured options; anything else is rejected with a 422 naming the attribute and the offending value. Matching is case-insensitive and accepted values are stored with the configured option casing (submitting 7 MIL stores 7 Mil). Multi-select values may be separated by newlines or commas and are stored newline-joined. Attributes that allow custom values, and attributes without an option list, accept any value.
Requires permission: products.manage_variants
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.