Resolve an exoneration authorization document by its number
const url = 'https://api.emite.cr/v1/hacienda/exoneracion/AL-00460853-20';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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/hacienda/exoneracion/AL-00460853-20 \ --header 'Authorization: Bearer <token>'Proxies https://api.hacienda.go.cr/fe/ex?autorizacion=AL-XXXXXXXX-XX and normalizes the response. Result is cached for 1h. Used by the invoice form to pre-fill the <Exoneracion> block on a line. NOTE: Hacienda does NOT publish revocation status; the only authoritative signal is an ATV rejection on submit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
AL-00460853-20Authorization number in AL-XXXXXXXX-XX format (case-insensitive).
Responses
Section titled “Responses”object
Number of the authorization as Hacienda publishes it (AL-XXXXXXXX-XX): the value for numeroDocumento in a line tax's exoneracion.
Identification number of the beneficiary of the exoneration, as Hacienda publishes it: the receiver of an invoice that applies this exoneration is the one identified with this number.
Percentage points of IVA the authorization exonerates (13 for the whole general rate): the value for tarifaExonerada in a line tax's exoneracion. For codes 04 and 11 Hacienda rejects a document that exonerates more.
When the authorization was issued, an ISO 8601 date-time without a time zone, as Hacienda publishes it: the value for fechaEmision in a line tax's exoneracion, which Hacienda checks for codes 04 and 11.
When the authorization expires, an ISO 8601 date-time without a time zone, as Hacienda publishes it. For codes 04 and 11 Hacienda rejects a document that applies an authorization no longer in force.
Whether the authorization has expired, worked out by the server from fechaVencimiento (a device's wrong clock cannot change it). Hacienda's service does not report revocations: a revoked authorization reads as current here until Hacienda rejects a document that uses it.
Kind of exoneration document, as Hacienda publishes it: codigo, from the Anexo nota 10.1 catalog, is the value for tipoDocumento in a line tax's exoneracion; descripcion is Hacienda's name for it.
object
Code from the Anexo nota 10.1 catalog: the value for tipoDocumento in a line tax's exoneracion.
Hacienda's name for the kind of document.
Code of the institution that issued the authorization, from the Anexo nota 23 catalog: the value for nombreInstitucion in a line tax's exoneracion.
Name of the issuing institution, as Hacienda publishes it.
Whether the authorization covers only the CABYS codes listed in cabys. For code 04 Hacienda rejects an exonerated line whose CABYS code the authorization does not include.
The CABYS codes the authorization covers when poseeCabys is true; empty otherwise.
Example
{ "numeroDocumento": "AL-00460853-20", "identificacion": "401760738", "porcentajeExoneracion": 13, "fechaEmision": "2020-12-15T00:00:00", "fechaVencimiento": "2025-12-15T00:00:00", "isExpired": false, "tipoDocumento": { "codigo": "04", "descripcion": "Exenciones Dirección General de Hacienda" }, "codigoInstitucion": "01", "nombreInstitucion": "Ministerio de Hacienda", "poseeCabys": true, "cabys": [ "7211200000100" ]}Authorization number does not match the expected format.
Hacienda does not recognize the authorization number.