Tax Rates

Mutation

createTaxRate — Returns TaxRate

Scopes Required: modify_tax_rates

Arguments Type Description

name

String!

The name of the tax rate

amount

Float!

The tax rate percentage to apply

mdbId

Int

The master database reference for this tax rate

Example Mutation
mutation CreateTaxRate($name: String!, $amount: Float!) {
    createTaxRate(name: $name, amount: $amount) {
        id,
        name,
        amount,
        mdbId,
        isDefault
    }
}

# Example variables
{
    "name": "<NAME>",
    "amount": "<AMOUNT>"
}

Mutation

deleteTaxRate — Returns TaxRate

Scopes Required: modify_tax_rates

Arguments Type Description

id

ID!

The ID of the tax rate to delete

Example Mutation
mutation DeleteTaxRate($id: ID!) {
    deleteTaxRate(id: $id) {
        id,
        name,
        amount,
        mdbId,
        isDefault
    }
}

# Example variables
{
    "id": "<ID>"
}

Mutation

mergeTaxRates — Returns boolean

Scopes Required: modify_tax_rates

Arguments Type Description

source

ID!

The id of the tax rate to be merged

destination

ID

The id of the tax rate to merge into, if the source's tax rate amount is zero this can be null and the tax rate will be merged into Shopfront's predefined "No Tax" tax rate

Example Mutation
mutation MergeTaxRates($source: ID!) {
    mergeTaxRates(source: $source)
}

# Example variables
{
    "source": "<SOURCE>"
}

Mutation

setDefaultTaxRate — Returns TaxRate

Scopes Required: modify_tax_rates

Arguments Type Description

id

ID

The ID of the tax rate to set as default

Example Mutation
mutation SetDefaultTaxRate($id: ID) {
    setDefaultTaxRate(id: $id) {
        id,
        name,
        amount,
        mdbId,
        isDefault
    }
}

# Example variables
{
    "id": "<ID>"
}

Mutation

updateTaxRate — Returns TaxRate

Scopes Required: modify_tax_rates

Arguments Type Description

id

ID!

The ID of the tax rate to update

name

String

The name of the tax rate

amount

Float!

The percentage amount of the tax rate

mdbId

Int

The master database reference of the tax rate

Example Mutation
mutation UpdateTaxRate($id: ID!, $amount: Float!) {
    updateTaxRate(id: $id, amount: $amount) {
        id,
        name,
        amount,
        mdbId,
        isDefault
    }
}

# Example variables
{
    "id": "<ID>",
    "amount": "<AMOUNT>"
}