Catalog Attribute — Mass Delete
Deletes multiple user-defined attributes in a single request. The whole batch is pre-validated before any row is touched — if any id is a system attribute, no row is deleted and the entire batch fails with 422.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/attributes/mass-delete | POST |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
indices | integer[] | yes | Attribute ids to delete. |
Response
200 OK:
json
{
"deleted": [24, 31],
"message": "Attributes deleted successfully."
}Errors
| HTTP | Cause |
|---|---|
401 Unauthorized | Missing or invalid Bearer token |
422 Unprocessable Entity | One or more ids in the batch are system attributes — whole batch refused |
Notes
- All-or-nothing semantics. A single bad id rejects the entire batch — no partial deletes.
- Unknown ids are silently skipped. Passing
[24, 9999]where9999does not exist deletes id24and reports"deleted": [24]. - For single-attribute deletion, use
DELETE /api/admin/catalog/attributes/{id}.

