Query tax codes for VAT/GST calculations.
query GetTaxCode($id: ID) {
TaxCode(id: $id) {
id
label
active
integration_pennylane { id }
tax_rates { id }
purchase_account
sales_account
}
}
query TaxCodes(
$where: QueryTaxCodesWhereWhereConditions,
$orderBy: [QueryTaxCodesOrderByOrderByClause!],
$search: String
) {
TaxCodes(
where: $where
orderBy: $orderBy
search: $search
) {
paginatorInfo {
total
count
currentPage
perPage
}
data {
id
label
active
purchase_account
sales_account
}
}
}
{
"where": {
"AND": [
{ "column": "ACTIVE", "operator": "EQ", "value": true }
]
},
"orderBy": [
{ "column": "LABEL", "order": "ASC" }
],
"search": "VAT"
}
| Field | Type | Description |
|---|
id | Int | Unique identifier of the tax code. |
label | String | Label of the tax code. |
active | Boolean | Whether the tax code is active. |
integration_pennylane | Integration | Linked accounting integration (Pennylane). |
tax_rates | [TaxRate] | Linked tax rates. |
purchase_account | String | Purchase account code. |
sales_account | String | Sales account code. |
You can create filters based on following fields
| id - Int |
|---|
Example: { "column": "ID", "operator": "EQ", "value": 100012 } |
| label - String |
|---|
Example: { "column": "LABEL", "operator": "LIKE", "value": "%VAT%" } |
| active - Boolean |
|---|
Example: { "column": "ACTIVE", "operator": "EQ", "value": true } |
| company_id - ID |
|---|
Example: { "column": "COMPANY_ID", "operator": "EQ", "value": 100001 } |
You can sort data based on following fields: id, label, active
query SortTaxCodes(
$where: QueryTaxCodesWhereWhereConditions
) {
TaxCodes(
where: $where
orderBy: [{ column: LABEL, order: ASC }]
) {
id
label
active
}
}
{
"data": {
"TaxCodes": [
{ "id": 100001, "label": "VAT 20%", "active": true },
{ "id": 100002, "label": "VAT 10%", "active": true }
]
}
}