Skip to content

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

EndpointMethod
/api/admin/catalog/attributes/mass-deletePOST

Request body

FieldTypeRequiredNotes
indicesinteger[]yesAttribute ids to delete.

Response

200 OK:

json
{
  "deleted": [24, 31],
  "message": "Attributes deleted successfully."
}

Errors

HTTPCause
401 UnauthorizedMissing or invalid Bearer token
422 Unprocessable EntityOne 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] where 9999 does not exist deletes id 24 and reports "deleted": [24].
  • For single-attribute deletion, use DELETE /api/admin/catalog/attributes/{id}.

Released under the MIT License.