See the Queries page for a presentation of this resource.
Create a tax code
GraphQL
mutation CreateTaxCode($input: TaxCodeInput!) {
CreateTaxCode(input: $input) {
id
label
active
purchase_account
sales_account
tax_rates {
id
}
}
}
Variables (JSON)
{
"input": {
"label": "VAT 20%",
"tax_rates": [
{ "id": 3001 }
],
"purchase_account": "445600",
"sales_account": "445700"
}
}
JSON
{
"data": {
"CreateTaxCode": {
"id": 100010,
"label": "VAT 20%",
"active": true,
"purchase_account": "445600",
"sales_account": "445700",
"tax_rates": [
{ "id": 3001 }
]
}
}
}
Update a tax code
id - ID Id of the tax code
GraphQL
mutation UpdateTaxCode($id: ID!, $input: TaxCodeInput!) {
UpdateTaxCode(id: $id, input: $input) {
id
label
active
purchase_account
sales_account
tax_rates {
id
}
}
}
Variables (JSON)
{
"id": 100010,
"input": {
"label": "VAT 20%",
"tax_rates": [
{ "id": 3001 }
],
"purchase_account": "445600",
"sales_account": "445700"
}
}
JSON
{
"data": {
"UpdateTaxCode": {
"id": 100010,
"label": "VAT 20%",
"active": true,
"purchase_account": "445600",
"sales_account": "445700",
"tax_rates": [
{ "id": 3001 }
]
}
}
}
Delete a tax code
id - ID Id of the tax code
GraphQL
mutation DeleteTaxCode($id: ID!) {
DeleteTaxCode(id: $id)
}
JSON
{
"data": {
"DeleteTaxCode": true
}
}
Disable a tax code
id - ID Id of the tax code
GraphQL
mutation DisableTaxCode($id: ID!) {
DisableTaxCode(id: $id) {
id
active
}
}
JSON
{
"data": {
"DisableTaxCode": {
"id": 100010,
"active": false
}
}
}
Enable a tax code
id - ID Id of the tax code
GraphQL
mutation EnableTaxCode($id: ID!) {
EnableTaxCode(id: $id) {
id
active
}
}
JSON
{
"data": {
"EnableTaxCode": {
"id": 100010,
"active": true
}
}
}
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
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