Skip to main content

createTaxRate

Requires permission products:tax:create.

Creates a tax rate. The code must not be used by another active tax rate; a clash is refused and names the rate that uses it. 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 CreateTaxRate($input: CreateTaxRateInput!) {
createTaxRate(input: $input) {
id
code
postalCode
name
groupName
type
}
}

Variables:

{
"input": {
"calculationMethod": "ADDITIVE",
"code": "string",
"country": "string",
"isActive": true,
"isDefault": true,
"jurisdiction": "CITY",
"name": "string",
"rate": 0,
"type": "CARBON_TAX"
}
}

Response:

{
"data": {
"createTaxRate": {
"id": "id",
"code": "string",
"postalCode": "string",
"name": "string",
"groupName": "string",
"type": "string"
}
}
}
createTaxRate(
input: CreateTaxRateInput!
): TaxRate!

Arguments​

createTaxRate.input ● CreateTaxRateInput! non-null input​

The tax rate's name, code, rate and where it applies.

Type​

TaxRate object​

A tax rate.