Skip to content

Catalog Attribute — Delete

Deletes a user-defined attribute. Equivalent to DELETE /api/admin/catalog/attributes/{id}.

Prerequisites

The example uses an illustrative id value. Replace it with the id of a attribute that exists in your store — use the adminAttributes query to discover valid ids.

Operation

OperationTypePurpose
deleteAdminAttributeMutationDelete a user-defined attribute

Errors

Each failure returns an errors[] entry:

ConditionMessage
System attribute (is_user_defined = 0)System attributes cannot be deleted.
Attribute is referenced by one or more attribute familiesAttribute is part of one or more attribute families. Remove it from those families first.
Unknown idAttribute not found.

For bulk deletion, use createAdminAttributeMassDelete.

Released under the MIT License.