Tax Codes Mutations

CreateTaxCode

Create a tax code

Parameters

input - TaxCodeInput
Data of the tax code

Example

mutation CreateTaxCode($input: TaxCodeInput!) {
  CreateTaxCode(input: $input) {
    id
    label
    active
    purchase_account
    sales_account
    tax_rates {
      id
    }
  }
}
{
  "input": {
    "label": "VAT 20%",
    "tax_rates": [
      { "id": 3001 }
    ],
    "purchase_account": "445600",
    "sales_account": "445700"
  }
}

Returned data

{
  "data": {
    "CreateTaxCode": {
      "id": 100010,
      "label": "VAT 20%",
      "active": true,
      "purchase_account": "445600",
      "sales_account": "445700",
      "tax_rates": [
        { "id": 3001 }
      ]
    }
  }
}

UpdateTaxCode

Update a tax code

Parameters

id - ID
Id of the tax code
input - TaxCodeInput
Data of the tax code

Example

mutation UpdateTaxCode($id: ID!, $input: TaxCodeInput!) {
  UpdateTaxCode(id: $id, input: $input) {
    id
    label
    active
    purchase_account
    sales_account
    tax_rates {
      id
    }
  }
}
{
  "id": 100010,
  "input": {
    "label": "VAT 20%",
    "tax_rates": [
      { "id": 3001 }
    ],
    "purchase_account": "445600",
    "sales_account": "445700"
  }
}

Returned data

{
  "data": {
    "UpdateTaxCode": {
      "id": 100010,
      "label": "VAT 20%",
      "active": true,
      "purchase_account": "445600",
      "sales_account": "445700",
      "tax_rates": [
        { "id": 3001 }
      ]
    }
  }
}

DeleteTaxCode

Delete a tax code

Parameters

id - ID
Id of the tax code

Example

mutation DeleteTaxCode($id: ID!) {
  DeleteTaxCode(id: $id)
}
{
  "id": 100010
}

Returned data

{
  "data": {
    "DeleteTaxCode": true
  }
}

DisableTaxCode

Disable a tax code

Parameters

id - ID
Id of the tax code

Example

mutation DisableTaxCode($id: ID!) {
  DisableTaxCode(id: $id) {
    id
    active
  }
}
{
  "id": 100010
}

Returned data

{
  "data": {
    "DisableTaxCode": {
      "id": 100010,
      "active": false
    }
  }
}

EnableTaxCode

Enable a tax code

Parameters

id - ID
Id of the tax code

Example

mutation EnableTaxCode($id: ID!) {
  EnableTaxCode(id: $id) {
    id
    active
  }
}
{
  "id": 100010
}

Returned data

{
  "data": {
    "EnableTaxCode": {
      "id": 100010,
      "active": true
    }
  }
}

TaxCodeInput data type

id - ID
Optional identifier (used in certain operations)
label - String
Label of the tax code
tax_rates - [TaxRateInput]
Associated tax rates to link to this tax code
integrations - [IntegrationInput]
Linked integrations
purchase_account - String
Purchase account code tied to the tax code
sales_account - String
Sales account code tied to the tax code
deposit_account - String
Deposit account code tied to the tax code
notes - String
Notes for the tax code