# Mutations / Tax Rates

# Tax Rates

**Mutation**
## createTaxRate — Returns [TaxRate](/documentation/Objects/Tax-Rate#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**

```graphql
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](/documentation/Objects/Tax-Rate#TaxRate)

**Scopes required:** modify_tax_rates

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the tax rate to delete |

**Example Mutation**

```graphql
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!](/documentation/Types/UUID#UUID) | The id of the tax rate to be merged |
| destination | [ID](/documentation/Types/UUID#UUID) | 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**

```graphql
mutation MergeTaxRates($source: ID!) {
    mergeTaxRates(source: $source)
}

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

**Mutation**
## setDefaultTaxRate — Returns [TaxRate](/documentation/Objects/Tax-Rate#TaxRate)

**Scopes required:** modify_tax_rates

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID](/documentation/Types/UUID#UUID) | The ID of the tax rate to set as default |

**Example Mutation**

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

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

**Mutation**
## updateTaxRate — Returns [TaxRate](/documentation/Objects/Tax-Rate#TaxRate)

**Scopes required:** modify_tax_rates

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | 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**

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

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