Skip to content

Received documents & acceptance

The flip side of emission: documents your tenant receives from suppliers (where you are the Receptor). Over each one you can emit a MensajeReceptor to accept, partially accept, or reject it before Hacienda — the fiscal counterpart to approving a purchase.

Ventana de terminal
GET /v1/documents/received # list received documents
GET /v1/documents/received/:id # one document + its acceptance attempts
GET /v1/documents/received/summary # pending-count buckets for the inbox header

A received-document detail includes the parsed emisor / receiver, totals, lines, its acceptanceStatus (none | accepted | partial | rejected), and canEmitAcceptance (whether a message may still be sent).

Acceptance deadline (MH-DGT-RES-0027-2024, art. 10)

Section titled “Acceptance deadline (MH-DGT-RES-0027-2024, art. 10)”

Every pending document carries a derived acceptance deadline — never stored, computed from the emission date: the 8th business day (Costa Rica legal holidays observed) of the month following the transaction, end of day America/Costa_Rica. A document still unanswered when the deadline passes is presumed fully accepted (same article) and admits no answer any more: POST /v1/documents/received/{id}/acceptance returns 409 ACCEPTANCE_DEADLINE_PASSED, bulk acceptance reports it in skipped with that code, and the detail carries canEmitAcceptance: false. An answer signed in time that Hacienda did not receive is still delivered afterwards. The window is configurable via ACCEPTANCE_DEADLINE_BUSINESS_DAYS (1–15, default 8).

List items, and the detail, expose dueAt (ISO) and urgency (ok | due_soon | due_today | overdue, computed against “now” — null once the document is responded). overdue is what is presumed accepted.

The list is paginated like GET /v1/invoices — { items, total, page, pageSize }, pageSize up to 100 — and every filter is additive:

Ventana de terminal
GET /v1/documents/received?acceptanceStatus=none # pending (repeatable: &acceptanceStatus=partial)
GET /v1/documents/received?pendingOnly=true # alias of acceptanceStatus=none
GET /v1/documents/received?urgency=overdue # unanswered and past the deadline: presumed accepted
GET /v1/documents/received?answerable=true # what can still be answered (or has no date)
GET /v1/documents/received?docType=01&docType=03 # by Hacienda document type
GET /v1/documents/received?from=2026-09-01&to=2026-09-30 # fechaEmision, Costa Rica calendar days
GET /v1/documents/received?q=ferreteria # supplier name, clave or consecutivo
GET /v1/documents/received?sort=total&order=desc&page=2&pageSize=50

Sort keys: fechaEmision (default), total, supplier. Without order, the pending view (pendingOnly, answerable, urgency, or acceptanceStatus=none alone) lists the nearest deadline first — the deadline depends only on the emission month, so ascending emission is ascending deadline — and every other view lists the newest first. urgency is resolved in SQL as a window of emission months, so it paginates like any other filter.

GET /v1/documents/received/summary returns { pending, overdue, dueToday, dueSoon, nextDueAt, ivaAtRisk } — ivaAtRisk is the IVA (converted to colones with each document’s exchange rate) of documents due_soon or worse; the name predates the rule: an unanswered document does not lose the credit, it is presumed accepted.

Ventana de terminal
POST /v1/documents/received/acceptance/bulk
{ "ids": ["…", "…"], "mensaje": 1 }

Accepts up to 200 documents in one call (202 Accepted). Only full acceptance (mensaje: 1) is supported in bulk — partials and rejections need per-document amounts/reasons, so they stay on the single-document endpoint. The response is { accepted, skipped: [{ id, reason }], batchId }: documents that changed state between your listing and the call (already responded, already in flight, TE 04, past the deadline) are reported in skipped, never retried. Each accepted document gets its own MensajeReceptor emitted by the mensaje-receptor.emit queue — one Hacienda failure does not roll back the batch.

Pending acceptances approaching their deadline trigger reminder notifications (email, and WhatsApp for users who opted in) at T-3 / T-1 / T-0 days, grouped per due month. Toggle them org-wide under Settings → Notifications (acceptanceReminders).

Ventana de terminal
POST /v1/documents/received/:id/acceptance
{
"mensaje": 1,
"condicionImpuesto": "01",
"montoTotalImpuestoAcreditar": 13000,
"montoTotalDeGastoAplicable": 100000
}
mensaje Meaning docType emitted
1 Aceptar 05 Confirmación de Aceptación
2 Aceptar parcial 06 Confirmación de Aceptación Parcial
3 Rechazar 07 Rechazo de Comprobante

Body fields:

Field Required Notes
mensaje ✔ 1 / 2 / 3
detalleMensaje required when rejecting Reason, max 160 chars
condicionImpuesto — IVA credit condition (01–05)
montoTotalImpuestoAcreditar — Tax amount to credit
montoTotalDeGastoAplicable — Applicable expense amount

The monetary anchors (MontoTotalImpuesto, TotalFactura) are not taken from your body — they’re read from the received document’s parsed totals server-side.

  • No new clave is generated — the message reuses the original document’s clave plus a 20-digit NumeroConsecutivoReceptor allocated from your default branch/terminal.
  • It’s submitted to ATV POST /recepcion and polled at GET /recepcion/{clave}-{consecutivoReceptor} (hyphen-joined, so Hacienda disambiguates it from the original).
  • received_documents.acceptanceStatus is stamped optimistically on submit and reverted to none by the poll if Hacienda rejects your message.
  • Each attempt is a separate record, so a Hacienda-rejected confirmation can be re-emitted with a fresh consecutivo.
  • If Hacienda does not answer, the message is not lost: it is already numbered, signed and stored, the request answers 502 ACCEPTANCE_PENDING_DELIVERY, and it is delivered automatically later with the same consecutivo. Until then the attempt reads as pending delivery and a new confirmation for that document answers ACCEPTANCE_IN_PROGRESS.

A receptor confirmation is not a billable emission — it doesn’t consume quota.

Situation Code
The doc is a TE (04) — no identified receiver to confirm ACCEPTANCE_NOT_ALLOWED_FOR_DOCTYPE
A confirmation is already in flight ACCEPTANCE_IN_PROGRESS
Already responded RECEIVED_DOCUMENT_ALREADY_RESPONDED
Demo tenant ACCEPTANCE_NOT_AVAILABLE_IN_DEMO
Bulk call with more than 200 ids ACCEPTANCE_BULK_TOO_LARGE

Gated by the documents:accept scope (owner / admin / issuer / accountant, and grantable to API keys).

The reverse also happens: when a customer emits a MensajeReceptor over an invoice you issued, EmiteCR records their verdict on your invoice (receptorAcceptanceStatus / detail / at) — visible on the invoice detail, separate from Hacienda’s own accept/reject.