Skip to main content

autoConfigureTax

Requires the permissions products:tax:create and settings:tenant:update.

Sets up tax for a country in one step: adds the country's standard tax rates and creates its standard tax groups. Needs both the tax create and the tenant settings update permissions.

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 AutoConfigureTax($countryCode: String!) {
autoConfigureTax(countryCode: $countryCode) {
defaultSalesTaxGroupId
groupsCreated
ratesCreated
success
taxSystemType
}
}

Variables:

{
"countryCode": "string"
}

Response:

{
"data": {
"autoConfigureTax": {
"defaultSalesTaxGroupId": "string",
"groupsCreated": 0,
"ratesCreated": 0,
"success": true,
"taxSystemType": "string"
}
}
}
autoConfigureTax(
countryCode: String!
currency: String
): AutoConfigureTaxResult!

Arguments​

autoConfigureTax.countryCode ● String! non-null scalar​

The country to set up tax for.

autoConfigureTax.currency ● String scalar​

The currency code to configure the country's tax with. Omit it to use the organization's.

Type​

AutoConfigureTaxResult object​

The result of setting up tax automatically for an organization.