Edit

[POST] .../v1/taxvat/edit

Updates a VAT rate. Use this method to update an existing custom VAT rate before it is used in new catalog or document workflows. The request requires id and name; value and enabled are optional patch fields and value 0 is valid while negative values are rejected. System VAT rate id=1 represents "Without VAT" and cannot be edited. A successful update writes an action-log entry, invalidates the VAT cache and fires the TaxVatEdited webhook event. The caller must have VAT edit permission. Missing body, invalid id, missing name, negative value, denied permission, system-rate edit attempts, missing or deleted records, no affected rows, database errors and action-log errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
enabled Boolean Optional Indicates whether the VAT rate is available for use. Null leaves the flag unchanged.
id Int64 Required VAT rate ID. System rate id=1 cannot be edited.
name String Required VAT rate name. Required by the current controller and limited to 50 characters.
value Decimal Optional VAT rate value. Optional; zero is allowed and negative values are rejected when sent.

Request Example

{
  "id": 4,
  "value": 12,
  "name": "12%",
  "enabled": true
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}