Skip to main content

updateSKUPattern

Requires permission products:product:update.

Updates a SKU pattern. Any brand or category it is changed to must belong to the organization. Needs the products 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 UpdateSKUPattern($id: ID!, $updateSKUPatternInput: UpdateSKUPatternInput!) {
updateSKUPattern(id: $id, updateSKUPatternInput: $updateSKUPatternInput) {
id
name
createdAt
brandId
categoryId
deletedAt
brand {
id
code
name
createdAt
deletedAt
deletedBy
}
}
}

Variables:

{
"id": "id",
"updateSKUPatternInput": {}
}

Response:

{
"data": {
"updateSKUPattern": {
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"brandId": "id",
"categoryId": "id",
"deletedAt": "2025-01-15T00:00:00Z",
"brand": {
"id": "id",
"code": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string"
}
}
}
}
updateSKUPattern(
id: ID!
updateSKUPatternInput: UpdateSKUPatternInput!
): SKUPattern!

Arguments​

updateSKUPattern.id ● ID! non-null scalar​

The ID of the SKU pattern.

updateSKUPattern.updateSKUPatternInput ● UpdateSKUPatternInput! non-null input​

The fields to change.

Type​

SKUPattern object​

A rule that builds SKUs from placeholders such as brand, category and a running number.