Skip to content

Get a received document with its lines + acceptance history

GET
/v1/documents/received/{id}
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.

id
required
string
Media typeapplication/json
object
id
required

Id of the received document.

string format: uuid
clave
required

The 50-digit Hacienda clave of the document.

string
consecutivo
required

The supplier's 20-digit consecutive number; null when the XML has none.

string
nullable
docType
required

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).

string
currency
required

ISO 4217 currency of the document.

string
fechaEmision
required

The document's FechaEmision; null when the XML has none.

string format: date-time
nullable
haciendaStatus
required

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.

string
nullable
Allowed values: accepted partial rejected unknown
haciendaDetailMessage
required

The detail of Hacienda's verdict on the document, when imported; null otherwise.

string
nullable
acceptanceStatus
required

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.

string
Allowed values: none accepted partial rejected
emisor
required

The issuer (Emisor): the supplier.

object
identificationType
required

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.

string
nullable
identificationNumber
required

Identification number, as in the XML; null when it has none.

string
nullable
name
required

Name, as in the XML; null when it has none.

string
nullable
economicActivityCode
required

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).

string
nullable
receiver
required

The receiver (Receptor): the company itself, as the supplier wrote it.

object
identificationType
required

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.

string
nullable
identificationNumber
required

Identification number, as in the XML; null when it has none.

string
nullable
name
required

Name, as in the XML; null when it has none.

string
nullable
economicActivityCode
required

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).

string
nullable
totalImpuesto
required

Total tax (TotalImpuesto), in the document currency; null when missing.

number
nullable
totalComprobante
required

Document total (TotalComprobante), in the document currency; null when missing.

number
nullable
lines
required

The lines, as parsed from the XML.

Array<object>
object
lineNumber
required

Line number (NumeroLinea), from 1.

number
description
required

Description of the line (Detalle); empty when missing.

string
quantity
required

Quantity (Cantidad).

number
unitOfMeasure
required

Unit of measure (UnidadMedida); empty when missing.

string
unitPrice
required

Unit price (PrecioUnitario), in the document currency.

number
subtotal
required

Subtotal of the line (SubTotal), after discounts.

number
total
required

Total of the line (MontoTotalLinea), taxes included.

number
acceptances
required

Every MensajeReceptor recorded for the document (sent from EmiteCR or imported), newest first.

Array<object>
object
id
required

Id of this message.

string format: uuid
mensaje
required

The <Mensaje> code sent: 1 — accepted (message type 05); 2 — partially accepted (06); 3 — rejected (07).

number
Allowed values: 1 2 3
consecutivoReceptor
required

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.

string
detalleMensaje
required

The reason sent (DetalleMensaje); null when none was.

string
nullable
condicionImpuesto
required

How the company declared it uses the IVA of the document (CondicionImpuesto, 01–05, see the request); null when none was sent.

string
nullable
Allowed values: 01 02 03 04 05
codigoActividad
required

The company's activity the message declared (CodigoActividad), the one the IVA credit goes to; null when it carried none.

string
nullable
montoTotalImpuesto
required

The document's total tax declared in the message (MontoTotalImpuesto); null when it carries none, as for a document without tax.

number
nullable
montoTotalImpuestoAcreditar
required

The IVA declared as creditable (MontoTotalImpuestoAcreditar); null if none.

number
nullable
montoTotalDeGastoAplicable
required

The amount declared as an applicable expense (MontoTotalDeGastoAplicable); null if none.

number
nullable
totalFactura
required

The document's total declared in the message (TotalFactura), in its currency; 0 for an imported message that had none.

number
status
required

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.

string
Allowed values: sent procesando aceptado rechazado error
haciendaDetailMessage
required

Hacienda's detail of a rejection or an error of this message; null otherwise.

string
nullable
submittedAt
required

When the message was delivered to Hacienda (for an imported one, when it was imported); null while it waits to be delivered.

string format: date-time
nullable
createdAt
required

When the message was created (its emission date).

string format: date-time
defaultAcceptanceActivityCode
required

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.

string
nullable
dueAt
required

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.

string format: date-time
nullable
urgency
required

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.

string
nullable
Allowed values: ok due_soon due_today overdue
canEmitAcceptance
required

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).

boolean
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"
}