Update product category
Update details of existing product category
updateProductCategory
Updates an existing product category by ID. Only fields included in input are changed.
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 update |
input.name | String | Optional | Category name |
input.base_price | Float | Optional | Base price |
input.description | String | Optional | Category description |
input.custom_fields | JSON | Optional | Arbitrary additional data |
Example Payload
{
"query": "mutation ($id: ID!, $input: UpdateProductCategoryInput!) { updateProductCategory(id: $id, input: $input) { id name base_price updated_at } }",
"variables": {
"id": "01JNQX4KZB7WNVR3MPXT6A0DYE",
"input": {
"name": "Sensors & Actuators",
"base_price": 55.0
}
}
}
Response
Returns the updated ProductCategory object.
Example Response
{
"data": {
"updateProductCategory": {
"id": "01JNQX4KZB7WNVR3MPXT6A0DYE",
"name": "Sensors & Actuators",
"base_price": 55.0,
"updated_at": "2026-06-03 09:30:00"
}
}
}
Errors
Example Response
{
"errors": [
{
"message": "Unauthenticated."
}
]
}
Method
POSTPath
/graphql