Tax Rates Mutations

CreateTaxRate

Create a tax rate

Parameters

input - TaxRateInput
Data of the tax rate
mutation CreateTaxRate($input: TaxRateInput!) {
  CreateTaxRate(input: $input) {
    id
    label
    rate
    active
  }
}
{
  "input": {
    "label": "Reduced VAT",
    "rate": 5.5
  }
}
{
  "data": {
    "CreateTaxRate": {
      "id": 100120,
      "label": "Reduced VAT",
      "rate": 5.5,
      "active": true
    }
  }
}

UpdateTaxRate

Update a tax rate

Parameters

id - ID
Id of the tax rate
input - TaxRateInput
Data of the tax rate
mutation UpdateTaxRate($id: ID!, $input: TaxRateInput!) {
  UpdateTaxRate(id: $id, input: $input) {
    id
    label
    rate
    active
  }
}
{
  "id": 100120,
  "input": {
    "rate": 6.0
  }
}
{
  "data": {
    "UpdateTaxRate": {
      "id": 100120,
      "label": "Reduced VAT",
      "rate": 6.0,
      "active": true
    }
  }
}

DeleteTaxRate

Delete a tax rate

Parameters

id - ID
Id of the tax rate
mutation DeleteTaxRate($id: ID!) {
  DeleteTaxRate(id: $id)
}
{
  "id": 100120
}
{
  "data": { "DeleteTaxRate": true }
}

DisableTaxRate

Disable a tax rate

Parameters

id - ID
Id of the tax rate
mutation DisableTaxRate($id: ID!) {
  DisableTaxRate(id: $id) {
    id
    active
  }
}
{
  "id": 100120
}
{
  "data": {
    "DisableTaxRate": {
      "id": 100120,
      "active": false
    }
  }
}

EnableTaxRate

Enable a tax rate

Parameters

id - ID
Id of the tax rate
mutation EnableTaxRate($id: ID!) {
  EnableTaxRate(id: $id) {
    id
    active
  }
}
{
  "id": 100120
}
{
  "data": {
    "EnableTaxRate": {
      "id": 100120,
      "active": true
    }
  }
}

TaxRateInput data type

id - ID
Identifier (optional)
label - String
Label/name of the tax rate
rate - Float
Tax rate percentage or decimal

Note

  • Mutations return the created/updated TaxRate object or boolean true for deletions.