Taxes
Calculate totals for a set of lines
Compute subtotal, VAT, surcharge, retention and grand total for an array of line items with quantity, price, discount and tax rates. Returns the document totals plus the per-line breakdown.
post/companies/{company}/taxes/calculate-totals
Request
- Base URL: https://api.factuarea.com/v1
- URL: https://api.factuarea.com/v1/companies/{company}/taxes/calculate-totals
- 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
Response
Example response
{
"data": {
"subtotal": "250.00",
"total_vat": "52.50",
"total_surcharge": "0.00",
"total_retention": "15.00",
"total": "287.50",
"lines": [
{
"subtotal": "100.00",
"vat_amount": "21.00",
"surcharge_amount": "0.00",
"retention_amount": "0.00",
"total": "121.00"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.