deleteSKUPattern
Requires permission products:product:update.
Deletes a SKU pattern. SKUs already generated from it are not changed. 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:
- GraphQL
- cURL
mutation DeleteSKUPattern($id: ID!) {
deleteSKUPattern(id: $id) {
id
name
createdAt
brandId
categoryId
deletedAt
brand {
id
code
name
createdAt
deletedAt
deletedBy
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation DeleteSKUPattern($id: ID!) {\n deleteSKUPattern(id: $id) {\n id\n name\n createdAt\n brandId\n categoryId\n deletedAt\n brand {\n id\n code\n name\n createdAt\n deletedAt\n deletedBy\n }\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"deleteSKUPattern": {
"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"
}
}
}
}
deleteSKUPattern(
id: ID!
): SKUPattern!
Arguments
deleteSKUPattern.id ● ID! non-null scalar
The ID of the SKU pattern.
Type
SKUPattern object
A rule that builds SKUs from placeholders such as brand, category and a running number.