Taxes

Update a tax

Partial update of a tax owned by your company. System taxes (is_system=true) respond 422 system_tax_immutable_field when a definition field changes; any other change to the global catalog (for example is_active) responds 403 global_tax_read_only. default_for_documents is accepted on any visible tax and writes your company's defaults only.

patch/companies/{company}/taxes/{tax}

Request

  • Base URL: https://api.factuarea.com/v1
  • URL: https://api.factuarea.com/v1/companies/{company}/taxes/{tax}
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

companystring uuid required

Public identifier (UUID v7) of the company. Get it from GET /v1/me (data.scope[].id).

taxstring uuid required

Public identifier (UUID v7) of the tax.

Headers

Idempotency-Keystring
Example:01928f10-7c0e-7c4a-9b7d-2f8a6e3c1d4b

Client-generated opaque key (up to 255 characters; UUID v7 recommended) that makes retries safe: the first response is cached and replayed for repeats without re-executing the mutation. Reusing a key with a different body returns 422 idempotency_key_reused; the values of secret fields (password, secret…) count as part of the body, so retrying with a corrected secret under the same key is a different request, never the replay of the earlier answer. See the Idempotency guide.

Factuarea-Versionstring date
Example:2026-06-01

Pin the API version (YYYY-MM-DD, Stripe-style date versioning) for this request; omit to use the key's pinned version, or the latest if none. Unsupported version → 400 unsupported_api_version; malformed → 400 parameter_invalid_format. The effective version is echoed in the Factuarea-Version response header. See the Versioning guide.

Request body

namestring
codestring
ratenumber
applies_to'sale' | 'purchase' | 'both'
countrystring nullable
descriptionstring nullable
is_activeboolean
customer_visible_labelstring nullable

Custom label for this tax shown to the customer on documents (e.g. "IVA 21% incluido"). Up to 200 characters.

external_referencestring nullable
valid_fromstring date nullable
valid_untilstring date nullable

End date of the tax validity window (YYYY-MM-DD). Must be on or after valid_from.

reverse_chargeboolean
country_aeat_zone'peninsula' | 'canarias' | 'ceuta' | 'melilla' | 'null' nullable
linked_surcharge_taxes_idstring nullable

FK to the linked equivalence-surcharge tax; null unlinks it. UUID v7 value referencing the Factuarea catalog plus your company's own taxes.

metadataMetadata nullable

A free map of up to 50 key→value pairs for storing arbitrary structured data (values are strings up to 500 characters). Unlike custom_fields — an ordered list of typed {field, value} pairs with display semantics, present on the six document resources — metadata is an unordered map for opaque integration data; a document may carry both. The master resources (Client, Supplier) have no custom_fields, so their metadata doubles as the custom-fields store.

Reserved keys (read-only). When the system auto-issues an invoice from a payment correlation (Stripe/GoCardless/MONEI), it writes stripe_subscription_id, stripe_invoice_id, billing_reason, period_start and period_end into that invoice metadata automatically. Do not set or overwrite them by hand — the platform owns them and a manual value may be replaced when the correlation runs.

Example request

{
  "metadata": {
    "erp_code": "IVA-GEN",
    "ledger_account": "477000"
  }
}

Response

Example response

{
  "data": {
    "id": "01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f",
    "object": "tax",
    "name": "IVA general 21%",
    "code": "IVA21",
    "rate": 21,
    "type": "vat",
    "applies_to": "both",
    "country": "ES",
    "is_default": true,
    "is_active": true,
    "is_system": true,
    "ownership": "global",
    "description": "IVA general aplicable en territorio peninsular y Baleares.",
    "default_for_documents": {
      "invoice": true,
      "quote": true,
      "delivery_note": true,
      "proforma": true,
      "purchase_invoice": true,
      "recurring_invoice": true
    },
    "customer_visible_label": "IVA 21%",
    "external_reference": "S1",
    "valid_from": "2012-09-01",
    "country_aeat_zone": "peninsula",
    "indirect_tax_regime": "iva",
    "linked_surcharge_taxes_id": "01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10",
    "metadata": {
      "erp_code": "IVA-GEN",
      "ledger_account": "477000"
    },
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.