Update product
Update existing product
updateProduct
Updates an existing product 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 ID to update |
input.partnumber | String | Optional | Part number |
input.description | String | Optional | Product description |
input.model | String | Optional | Model identifier |
input.list_price | Float | Optional | List price |
input.msrp | Float | Optional | Manufacturer suggested retail price |
input.moq | Int | Optional | Minimum order quantity |
input.tariff_surcharge | Float | Optional | Tariff surcharge amount |
input.allow_tariff | Boolean | Optional | Whether a tariff surcharge applies |
input.other_details | JSON | Optional | Arbitrary additional data |
Example Payload
{
"query": "mutation ($id: ID!, $input: UpdateProductInput!) { updateProduct(id: $id, input: $input) { id partnumber description list_price updated_at } }",
"variables": {
"id": "2",
"input": {
"description": "Updated Widget Description",
"list_price": 89.99
}
}
}
Response
Returns the updated Product object.
Example Response
{
"data": {
"updateProduct": {
"id": "2",
"partnumber": "WIDGET-001",
"description": "Updated Widget Description",
"list_price": 89.99,
"updated_at": "2026-06-03 09:15:00"
}
}
}
Errors
Example Response
{
"errors": [
{
"message": "Unauthenticated."
}
]
}
Method
POSTPath
/graphql