appCreateTaxGroup
Requires permission products:tax:create.
Create a tax group from tax rates the same app created. ARC applies only the group's rates that match the delivery address. Needs write_tax_rates.
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 AppCreateTaxGroup($input: AppCreateTaxGroupInput!) {
appCreateTaxGroup(input: $input) {
id
code
name
createdAt
calculationMethod
description
taxRates {
id
createdAt
taxGroupId
taxRateId
updatedAt
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation AppCreateTaxGroup($input: AppCreateTaxGroupInput!) {\n appCreateTaxGroup(input: $input) {\n id\n code\n name\n createdAt\n calculationMethod\n description\n taxRates {\n id\n createdAt\n taxGroupId\n taxRateId\n updatedAt\n }\n }\n}",
"variables": {
"input": {
"calculationMethod": "ADDITIVE",
"code": "string",
"name": "string",
"taxRateIds": [
"id"
]
}
}
}
EOF
Variables:
{
"input": {
"calculationMethod": "ADDITIVE",
"code": "string",
"name": "string",
"taxRateIds": [
"id"
]
}
}
Response:
{
"data": {
"appCreateTaxGroup": {
"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"
}
]
}
}
}
appCreateTaxGroup(
input: AppCreateTaxGroupInput!
): TaxGroup!
Arguments
appCreateTaxGroup.input ● AppCreateTaxGroupInput! non-null input
The group's name, code and rates.
Type
TaxGroup object
A set of tax rates applied together.