Get a received document with its lines + acceptance history
const url = 'https://api.emite.cr/v1/documents/received/example';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/documents/received/example \ --header 'Authorization: Bearer <token>'The document as parsed from the supplier's XML — parties, totals, lines and Hacienda's status — plus, in acceptances, every MensajeReceptor recorded for it (emitted from EmiteCR or imported), newest first, each with its own Hacienda status. canEmitAcceptance says whether a new acceptance, partial acceptance or rejection may be emitted: never for a tiquete (04), nor while an earlier message is in flight or was accepted. 404 RECEIVED_DOCUMENT_NOT_FOUND outside the company and environment.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
Id of the received document.
The 50-digit Hacienda clave of the document.
The supplier's 20-digit consecutive number; null when the XML has none.
Hacienda document type (TipoDocumento): 01 factura electrónica (invoice), 02 nota de débito (debit note), 03 nota de crédito (credit note), 04 tiquete electrónico (ticket), 08 factura electrónica de compra (purchase invoice), 09 factura electrónica de exportación (export invoice), 10 recibo electrónico de pago (payment receipt).
ISO 4217 currency of the document.
The document's FechaEmision; null when the XML has none.
Hacienda's verdict on the supplier's document, read from its MensajeHacienda when that XML was imported too: accepted, partial, rejected, or unknown for an unrecognized code. Null when it was not imported.
The detail of Hacienda's verdict on the document, when imported; null otherwise.
The company's response to the document: none — not answered yet; accepted; partial — partially accepted; rejected. It is set when the company sends its message (or one is imported) and goes back to none if Hacienda rejects that message.
The issuer (Emisor): the supplier.
object
Hacienda identification type: 01 cédula física, 02 cédula jurídica, 03 DIMEX, 04 NITE (others are possible for a foreign party). Null when the XML has none.
Identification number, as in the XML; null when it has none.
Name, as in the XML; null when it has none.
The activity the document declares for this party, in its own seat: the supplier's CodigoActividadEmisor, and for the company the one the supplier billed it under (CodigoActividadReceptor). Null when the XML declares none, or for a document imported before EmiteCR kept it (2026-10-28).
The receiver (Receptor): the company itself, as the supplier wrote it.
object
Hacienda identification type: 01 cédula física, 02 cédula jurídica, 03 DIMEX, 04 NITE (others are possible for a foreign party). Null when the XML has none.
Identification number, as in the XML; null when it has none.
Name, as in the XML; null when it has none.
The activity the document declares for this party, in its own seat: the supplier's CodigoActividadEmisor, and for the company the one the supplier billed it under (CodigoActividadReceptor). Null when the XML declares none, or for a document imported before EmiteCR kept it (2026-10-28).
Total tax (TotalImpuesto), in the document currency; null when missing.
Document total (TotalComprobante), in the document currency; null when missing.
The lines, as parsed from the XML.
object
Line number (NumeroLinea), from 1.
Description of the line (Detalle); empty when missing.
Quantity (Cantidad).
Unit of measure (UnidadMedida); empty when missing.
Unit price (PrecioUnitario), in the document currency.
Subtotal of the line (SubTotal), after discounts.
Total of the line (MontoTotalLinea), taxes included.
Every MensajeReceptor recorded for the document (sent from EmiteCR or imported), newest first.
object
Id of this message.
The <Mensaje> code sent: 1 — accepted (message type 05); 2 — partially accepted (06); 3 — rejected (07).
The 20-digit NumeroConsecutivoReceptor of the message: branch, terminal, message type (05/06/07) and sequence number. Empty for an imported message that had none.
The reason sent (DetalleMensaje); null when none was.
How the company declared it uses the IVA of the document (CondicionImpuesto, 01–05, see the request); null when none was sent.
The company's activity the message declared (CodigoActividad), the one the IVA credit goes to; null when it carried none.
The document's total tax declared in the message (MontoTotalImpuesto); null when it carries none, as for a document without tax.
The IVA declared as creditable (MontoTotalImpuestoAcreditar); null if none.
The amount declared as an applicable expense (MontoTotalDeGastoAplicable); null if none.
The document's total declared in the message (TotalFactura), in its currency; 0 for an imported message that had none.
Hacienda's status of THIS message (not of the supplier's document): sent — signed and in progress (waiting for a verdict, or for delivery when submittedAt is null — it is sent automatically when Hacienda answers again); procesando — Hacienda is processing it; aceptado (also every imported message); rechazado — Hacienda rejected the message, and the document can be answered again; error — it failed for good, and the document can be answered again.
Hacienda's detail of a rejection or an error of this message; null otherwise.
When the message was delivered to Hacienda (for an imported one, when it was imported); null while it waits to be delivered.
When the message was created (its emission date).
The company's activity an acceptance declares when the request names none: the one the supplier declared for the company, when the company has it; otherwise the company's default. Null when the company has no activity.
End of the window to accept or reject the document (MH-DGT-RES-0027-2024, art. 10: by default the 8th business day of the month after emission), derived from fechaEmision; null without one. The same value as in the list.
How close dueAt is while the document is not answered, as in the list: overdue means the window closed and the document is presumed fully accepted. Null once answered, or without a dueAt.
Whether an acceptance, partial acceptance or rejection may be sent now: false for a ticket (04), while a message is in progress (sent / procesando), once one was accepted by Hacienda, or once the deadline passed (urgency: overdue).
Example
{ "docType": "01", "currency": "CRC", "haciendaStatus": "accepted", "acceptanceStatus": "none", "emisor": { "identificationType": "02", "economicActivityCode": "6201.0" }, "receiver": { "identificationType": "02", "economicActivityCode": "6201.0" }, "lines": [ { "unitOfMeasure": "Unid" } ], "acceptances": [ { "mensaje": 1, "consecutivoReceptor": "00100001050000000042", "condicionImpuesto": "01", "codigoActividad": "6201.0", "status": "sent" } ], "defaultAcceptanceActivityCode": "6201.0", "urgency": "ok"}