Update Tax Configuration
PATCH /accounting/tax-configurations/{id}
Group: Accounting › Tax Configurations · Operation ID: updateTaxConfiguration
Updates the tax configuration with the given identifier. Only the fields in the request body change.
Only the fields in the request body change. Omitting lines leaves every existing tax code unchanged. When lines is supplied it replaces the whole set: a line with an id updates that tax code, a line without one creates a tax code, and any existing line not in the array is deleted with its accounts. An id that names no configuration fails with NOT_FOUND. The response is empty. Read the updated record with GET accounting/tax-configurations/:id.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
Idempotency-Key |
header | string | no | An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored. |
id |
path | string | yes | The unique identifier for the tax configuration to update. |
Request body
Required, application/json: updateTaxConfigurationInput.
| Field | Type | Required | Description |
|---|---|---|---|
status |
string, one of "Active", "Inactive" |
no | The new status. Omit to leave it unchanged. |
taxRegime |
string, one of "EU_VAT", "India_GST", "Canada_GST", "Ghana_VAT", "SingleRate_GST" |
no | The new tax regime. Omit to leave it unchanged. |
lines |
array of object | no | The replacement set of tax codes. Omit to leave every existing tax code unchanged. When supplied it replaces the whole set: a line with an id updates that tax code, a line without one creates a tax code, and any existing line not in the array is deleted with its accounts. Must not be empty when supplied. |
lines[].id |
string | no | The unique identifier for an existing tax code line to update. Omit to create a new line. An id that does not belong to this configuration fails with LINE_NOT_FOUND. |
lines[].taxCode |
string | no | The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. |
lines[].title |
string | yes | The display title of the tax code. Must be unique within the configuration. |
lines[].comment |
string | no | A free-form note on when to use this tax code. |
lines[].vatDeclarationField |
string | no | The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Stored as free text and not evaluated. |
lines[].percentage |
string (decimal) | yes | The tax rate, as a decimal fraction. For example, 0.19 is 19%. Send 0 for a zero-rated or exempt code. |
lines[].rateType |
string, one of "Standard", "Reduced", "SuperReduced", "Zero", "Exempt" |
yes | The legal rate classification of the tax code. |
lines[].scope |
string, one of "Domestic", "IntraEU_B2B", "IntraEU_B2C", "ExtraEU_Goods", "ExtraEU_Services" |
yes | The territorial scope of the transaction. |
lines[].direction |
string, one of "Input", "Output" |
yes | Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales. |
lines[].isReverseCharge |
boolean | yes | Whether the recipient rather than the supplier accounts for the tax. When true, every account on the line must set reverseChargeCreditAccountId. |
lines[].isActive |
boolean | yes | Whether the tax code is offered for selection on new documents. |
lines[].accounts |
array of object | yes | The GL accounts this tax code books to, one entry per chart of accounts the entity books in. Must not be empty, including for exempt and zero-rated codes, which book a tax line at zero. |
lines[].accounts[].chartOfAccountsId |
string | yes | The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id. |
lines[].accounts[].accountId |
string | yes | The account the tax amount is booked to. See id on GET accounting/accounts/:id. |
lines[].accounts[].reverseChargeCreditAccountId |
string | no | The account credited with the offsetting tax amount. Required on reverse-charge lines, ignored otherwise. See id on GET accounting/accounts/:id. |
Example:
{
"status": "Inactive",
"taxRegime": "EU_VAT",
"lines": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"taxCode": "<taxCode>",
"title": "<title>",
"comment": "<comment>",
"vatDeclarationField": "<vatDeclarationField>",
"percentage": "19.99",
"rateType": "Standard",
"scope": "Domestic",
"direction": "Input",
"isReverseCharge": true,
"isActive": true,
"accounts": [
{
"chartOfAccountsId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reverseChargeCreditAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}
]
}
Response
200 Success
Response headers
Idempotency-Replayed— Present andtrueonly when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent asfalse.
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
NO_LINES |
400 |
LINE_NOT_FOUND |
400 |
DUPLICATE_LINE_TITLE |
400 |
DUPLICATE_TAX_CODE |
400 |
LINE_WITHOUT_ACCOUNTS |
400 |
MISSING_REVERSE_CHARGE_ACCOUNT |
400 |
CHART_OF_ACCOUNTS_NOT_FOUND |
400 |
ACCOUNT_NOT_FOUND |
400 |
REVERSE_CHARGE_ACCOUNT_NOT_FOUND |
400 |
IDEMPOTENCY_KEY_CONFLICT |
409 |
IDEMPOTENCY_PAYLOAD_MISMATCH |
422 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND, NO_LINES, LINE_NOT_FOUND, DUPLICATE_LINE_TITLE, DUPLICATE_TAX_CODE, LINE_WITHOUT_ACCOUNTS, MISSING_REVERSE_CHARGE_ACCOUNT, CHART_OF_ACCOUNTS_NOT_FOUND, ACCOUNT_NOT_FOUND, REVERSE_CHARGE_ACCOUNT_NOT_FOUND401— Missing or invalid access token403— Not authorized404— Not found409— The Idempotency-Key is still being processed by another request.422— The Idempotency-Key was already used with a different request payload.429— Too many requests500— Internal server error