List Hacienda v4.4 IVA tariff options with labels
const url = 'https://api.emite.cr/v1/catalogs/iva-tariffs';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.emite.cr/v1/catalogs/iva-tariffsEvery IVA tax and tariff combination of Hacienda v4.4 (tax code CodigoImpuestoType plus tariff CodigoTarifaIVAType), with a Spanish label and note, in display order — so a client can show "IVA general 13%" instead of a raw 08. An option's taxCode, taxRateCode and taxRate are the values for an item's defaultTaxCode, defaultTaxRateCode and defaultTaxRate. Public (no credentials) and cacheable for a day.
Responses
Section titled “Responses”object
Every option in display order: standard, then transitorio, special and none.
object
Stable option id (use as <option value>).
Human-readable label (Spanish).
Section of the picker the option belongs to:
standard: the IVA rates in force (tax code01).transitorio: the transitional rates05(0%),06(4%) and07(8%), which Hacienda reserves for credit and debit notes.special: special IVA regimes, tax code07(special calculation) or08(used goods, by factor).none: no default tax; the tax is chosen on each invoice line.
Tax code (CodigoImpuestoType): 01 IVA, 07 IVA with a special calculation, 08 used-goods IVA; null for the none option ("no default tax").
IVA rate code (CodigoTarifaIVAType); set only when taxCode is 01.
Rate percentage; null for the special regimes and for none.
Extra input the form asks for: rate (tax code 07, the rate is typed in), factor (tax code 08, the defaultTaxFactor), or null.
Spanish note on who uses the option and when, suitable as helper text.
Example
{ "options": [ { "id": "iva-13", "label": "IVA general 13%", "group": "standard", "taxCode": "01", "taxRateCode": "08", "taxRate": 13, "inputType": "rate", "description": "Tarifa estándar — la mayoría de bienes y servicios." } ]}