Delete product category
Delete product category by ID
deleteProductCategory
Deletes a product category by ID.
Method
POST
Path
/graphql
Authentication
Bearer Token
Request Body Schema
Content-type: application/json
Variables
| Name | Type | Required | Description |
|---|---|---|---|
id | ID | Required | The product category ID to delete |
Example Payload
{
"query": "mutation ($id: ID!) { deleteProductCategory(id: $id) { id name } }",
"variables": {
"id": "01JNQX4KZB7WNVR3MPXT6A0DYE"
}
}
Response
Returns the deleted ProductCategory object.
Example Response
{
"data": {
"deleteProductCategory": {
"id": "01JNQX4KZB7WNVR3MPXT6A0DYE",
"name": "Sensors & Actuators"
}
}
}
Errors
Example Response
{
"errors": [
{
"message": "Unauthenticated."
}
]
}
Method
POSTPath
/graphql