Skip to main content

updateBrand

Requires permission products:brand:update.

Updates a brand. Changing the code to one already used by another brand is refused. Needs the brands update permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation UpdateBrand($id: ID!, $updateBrandInput: UpdateBrandInput!) {
updateBrand(id: $id, updateBrandInput: $updateBrandInput) {
id
code
name
createdAt
deletedAt
deletedBy
products {
id
name
status
createdAt
basePrice
baseUOMId
}
}
}

Variables:

{
"id": "id",
"updateBrandInput": {}
}

Response:

{
"data": {
"updateBrand": {
"id": "id",
"code": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string",
"products": [
{
"id": "id",
"name": "string",
"status": "ACTIVE",
"createdAt": "2025-01-15T00:00:00Z",
"basePrice": 0,
"baseUOMId": "id"
}
]
}
}
}
updateBrand(
id: ID!
updateBrandInput: UpdateBrandInput!
): Brand!

Arguments​

updateBrand.id ● ID! non-null scalar​

The ID of the brand.

updateBrand.updateBrandInput ● UpdateBrandInput! non-null input​

The fields to change on the brand.

Type​

Brand object​

A brand products are made or sold under.