Catalog Attribute Options — Create / Update / Delete
CRUD for individual options on select, multiselect, and checkbox attributes. Options for other attribute types do not exist (the attribute payload returns options: null).
Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/admin/catalog/attributes/{attributeId}/options | POST | Add a new option |
/api/admin/catalog/attributes/{attributeId}/options/{optionId} | PUT | Partially update an option |
/api/admin/catalog/attributes/{attributeId}/options/{optionId} | DELETE | Remove an option |
Both {attributeId} and {optionId} are constrained to digits (\d+).
Request body — Create / Update
| Field | Type | Required | Notes |
|---|---|---|---|
admin_name | string | yes (create) / no (update) | Internal admin label. |
sort_order | integer | no | Display order. |
swatch_value | string|null | no | Hex color for color swatches, image path for image swatches, display text for text swatches. |
translations | object | no | Map of locale → { label }. Merges per-locale on update. |
Response
- Create —
201 Createdwith the full attribute detail (same shape asGET /api/admin/catalog/attributes/{id}). - Update —
200 OKwith the full attribute detail. - Delete —
200 OKwith{ "message": "..." }.
Errors
| HTTP | Cause |
|---|---|
401 Unauthorized | Missing or invalid Bearer token |
404 Not Found | Unknown attributeId or optionId |
409 Conflict | (delete only) Option is referenced by product attribute values |
422 Unprocessable Entity | (create) Attribute type does not support options, or admin_name missing |
Notes
- The delete-409 message names the dependency count:
This option is used by N product(s) and cannot be deleted. - For bulk attribute changes, supply the full
optionsarray on the Update Attribute endpoint — that replaces the whole option set in one call.

