Taxes

Calculate a tax over a base amount

Apply the referenced tax to a base amount and return the breakdown: base, tax_rate, tax_amount, total_amount and the full tax object.

post/companies/{company}/taxes/calculate

Request

  • Base URL: https://api.factuarea.com/v1
  • URL: https://api.factuarea.com/v1/companies/{company}/taxes/calculate
  • 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).

Headers

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

basenumber required
taxes_idstring uuid required

Identifier (UUID v7) of the tax to apply, from the Factuarea catalog plus your company's own taxes. A well-formed but non-existent value returns 404 tax_not_found.

Response

Example response

{
  "data": {
    "base": "100.00",
    "tax_rate": 21,
    "tax_amount": "21.00",
    "total_amount": "121.00",
    "tax": {
      "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.