{"openapi":"3.1.0","info":{"title":"Impuestos ES","version":"0.1.0","description":"Invoice taxes in Spain (mainland and Baleares): IVA 21/10/4/0 %, recargo de equivalencia 5,2/1,4/0,5 % and IRPF retention 15/7 % for professionals, computed in integer cents and rounded half up. The caller chooses the IVA rate; the API never classifies products. Rates checked against the consolidated BOE (Ley 37/1992 arts. 90, 91, 161; RIRPF art. 95) on 2026-11-21. Not tax advice. Paid routes need a LicenRoute licence (Authorization: Bearer bgat_…)."},"components":{"securitySchemes":{"licence":{"type":"http","scheme":"bearer","description":"LicenRoute licence key (bgat_…)"}}},"paths":{"/v1/tax":{"get":{"summary":"Rates, territory and sources","security":[{"licence":[]}],"responses":{"200":{"description":"Rates"},"400":{"description":"Invalid amount or rate; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/tax/invoice/{base}":{"get":{"summary":"Taxes of an invoice from its base","security":[{"licence":[]}],"parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{1,12}([.,]\\d{1,2})?$"},"example":"1000","description":"Euros, up to two decimals, no thousands separators"},{"name":"iva","in":"query","schema":{"type":"integer","enum":[21,10,4,0],"default":21},"description":"IVA rate chosen by the caller"},{"name":"recargo","in":"query","schema":{"type":"boolean","default":false},"description":"Apply recargo de equivalencia (only with IVA 21, 10 or 4)"},{"name":"irpf","in":"query","schema":{"type":"integer","enum":[0,7,15],"default":0},"description":"IRPF retention for professionals"}],"responses":{"200":{"description":"base, iva, recargo, irpf and total"},"400":{"description":"Invalid amount or rate; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/tax/from-total/{total}":{"get":{"summary":"Base and IVA from a total that includes IVA","security":[{"licence":[]}],"parameters":[{"name":"total","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{1,12}([.,]\\d{1,2})?$"},"example":"121","description":"Euros, up to two decimals, no thousands separators"},{"name":"iva","in":"query","schema":{"type":"integer","enum":[21,10,4,0],"default":21},"description":"IVA rate chosen by the caller"}],"responses":{"200":{"description":"total, base and iva"},"400":{"description":"Invalid amount or rate; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/health":{"get":{"summary":"Health check (free)","responses":{"200":{"description":"OK"}}}}}}