Skip to main content

createTaxGroup

Requires permission products:tax:create.

Creates a tax group from existing tax rates. Every rate listed must exist, and the code must not be used by another tax group. Needs the tax create 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 CreateTaxGroup($input: CreateTaxGroupInput!) {
createTaxGroup(input: $input) {
id
code
name
createdAt
calculationMethod
description
taxRates {
id
createdAt
taxGroupId
taxRateId
updatedAt
}
}
}

Variables:

{
"input": {
"calculationMethod": "ADDITIVE",
"code": "string",
"isActive": true,
"name": "string",
"taxRateIds": [
"string"
]
}
}

Response:

{
"data": {
"createTaxGroup": {
"id": "id",
"code": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"calculationMethod": "string",
"description": "string",
"taxRates": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"taxGroupId": "string",
"taxRateId": "string",
"updatedAt": "2025-01-15T00:00:00Z"
}
]
}
}
}
createTaxGroup(
input: CreateTaxGroupInput!
): TaxGroup!

Arguments​

createTaxGroup.input ● CreateTaxGroupInput! non-null input​

The tax group's name, code and the tax rates it holds.

Type​

TaxGroup object​

A set of tax rates applied together.