Tax Rates Queries

Retrieve tax rates and their applicable percentages.

TaxRate — Returns a single tax rate based on the id provided

query GetTaxRate($id: ID) {
  TaxRate(id: $id) {
    id
    label
    rate
    active
  }
}
{
  "id": 100012
}

TaxRates — Returns a list of tax rates with filters, ordering, and search

query TaxRates(
  $orderBy: [QueryTaxRatesOrderByOrderByClause!],
  $where: QueryTaxRatesWhereWhereConditions,
  $search: String
) {
  TaxRates(
    orderBy: $orderBy
    where: $where
    search: $search
  ) {
    id
    label
    rate
    active
  }
}
{
  "where": {
    "AND": [
      { "column": "ACTIVE", "operator": "EQ", "value": true }
    ]
  },
  "orderBy": [
    { "column": "LABEL", "order": "ASC" }
  ],
  "search": "VAT or label"
}

Available fields

FieldTypeDescription
idIntUnique identifier of the tax rate.
labelStringLabel/name of the tax rate.
rateFloatTax rate percentage or decimal.
activeBooleanWhether the tax is active.
integrations[Integration]Linked external platforms.

Filters

You can create filters based on following fields:

id - Int
Example: { "column": "ID", "operator": "EQ", "value": 10001 }
label - String
Example: { "column": "LABEL", "operator": "LIKE", "value": "%VAT%" }
rate - Float
Example: { "column": "RATE", "operator": "GT", "value": 20 }
active - Boolean
Example: { "column": "ACTIVE", "operator": "EQ", "value": true }

Sorting

You can sort data based on following fields: id, label, rate, active

query SortTaxRates(
  $where: QueryTaxRatesWhereWhereConditions
) {
  TaxRates(
    where: $where
    orderBy: [{ column: RATE, order: DESC }]
  ) {
    id
    label
    rate
    active
  }
}

Example of data returned

{
  "data": {
    "TaxRates": [
      {
        "id": 100001,
        "label": "Standard VAT",
        "rate": 20.0,
        "active": true
      },
      {
        "id": 100002,
        "label": "Reduced VAT",
        "rate": 5.5,
        "active": true
      }
    ]
  }
}