Deleting Attributes

Inside this guide:
Introduction
Delete an Attribute
Next steps

Introduction

The deleteCoreProductAttribute mutation allows you to delete an Attribute.

Delete an Attribute

Constructing the mutation and input

We'll be using the API Console to save time having to authenticate. Copy and paste this into your API console query section to get started. Reminder that fields can be removed from the query if you don't want the API to return them.

POST /graphql
Query

mutation ($input: DeleteCoreProductAttributeInput!) {
    deleteCoreProductAttribute(input: $input) {
        errors {
            path
            message
        }
    }
}

Defining the variables

Copy and paste the block below into the query variables section of the API console and substitute the ATTRIBUTE_ID with the id of the attribute you want to delete.

Variables


{
  "input": {
    "id": ATTRIBUTE_ID
  }
}

Now press Execute Query (the play button) to send the request.

You should get back this response containing the attribute you updated.

JSON Response

{
  "data": {
    "deleteCoreProductAttribute": {
      "errors": null
    }
  }
}

Next Steps