List invoices for the current tenant
const url = 'https://api.emite.cr/v1/invoices?q=0010001&from=2026-01-01&to=2026-12-31&fechaEmisionFrom=2026-10-01&fechaEmisionTo=2026-10-31&sort=createdAt&order=asc&page=1&pageSize=25';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/invoices?q=0010001&from=2026-01-01&to=2026-12-31&fechaEmisionFrom=2026-10-01&fechaEmisionTo=2026-10-31&sort=createdAt&order=asc&page=1&pageSize=25' \ --header 'Authorization: Bearer <token>'Paginated, filterable, sortable list of invoices. Returns a lightweight InvoiceListItemDto per row (no lines/payment methods) — use GET /v1/invoices/:id to load the full document. Multi-value filters (status, haciendaStatus, docType) accept repeated query params (e.g. ?status=signed&status=submitted). Free-text q matches consecutivo, clave, and the receiver name (case-insensitive). Default sort is createdAt desc, default page size is 25 (max 100).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
0010001Free-text search. Matches against consecutivo, clave, and the receiver name (case-insensitive substring). Trimmed; empty strings are ignored.
Invoice lifecycle status. Repeat the param to filter by multiple values.
ATV-reported status. Repeat the param to filter by multiple values.
Hacienda document type code (01-10). Repeatable.
Filter to invoices issued to a specific persisted party (tenant_parties.id).
Exact-match filter on the caller-owned externalReference (business-level idempotency id, e.g. a POS ticket uuid). For reconciliation after any disaster recovery: ask instead of guessing. Attempt suffixes (:2, :3) are distinct values — query each explicitly.
Example
2026-01-01Lower bound for createdAt — when the RECORD was created (a draft can be issued days later, an imported XML is created the day it is imported). For a fiscal period use fechaEmisionFrom/fechaEmisionTo. A bare YYYY-MM-DD is a Costa Rica calendar day (midnight CR = 06:00Z); a full ISO 8601 instant is used verbatim. Inclusive. Combine with to for a range; omit either side for an open bound.
Example
2026-12-31Upper bound for createdAt. A bare YYYY-MM-DD covers that whole Costa Rica calendar day (up to, but excluding, midnight CR of the next day) — so to=2026-08-31 includes a document created 8pm CR on the 31st. A full ISO 8601 instant is an inclusive cut at that exact instant.
Example
2026-10-01Lower bound for fechaEmision — the date the document was ISSUED: the one its clave and its XML declare and its PDF prints, and the one /v1/reports/* and the dashboard count by. A bare YYYY-MM-DD is a Costa Rica calendar day; a full ISO 8601 instant is used verbatim. Inclusive. A document without a number (a draft) has no emission date and never matches.
Example
2026-10-31Upper bound for fechaEmision. A bare YYYY-MM-DD covers that whole Costa Rica calendar day; a full ISO 8601 instant is an inclusive cut at that exact instant.
Sort key. Default createdAt. fechaEmision orders by the date the document was issued, documents without one (drafts) last in either direction.
Sort direction. Default desc.
Example
11-indexed page number. Default 1.
Example
25Rows per page. Default 25, max 100.
Responses
Section titled “Responses”object
The documents on this page, in the requested order.
object
Id of the document; read the whole document with GET /v1/invoices/{id}.
The document's 20-digit number, <NumeroConsecutivo>: branch (3) + terminal (5) + document type (2) + sequence (10). Null until the document gets its number, when it is signed.
The document's 50-digit Hacienda key, <Clave>. Null until the document gets its number, when it is signed.
Hacienda document type: 01 invoice (FE), 02 debit note (ND), 03 credit note (NC), 04 ticket (TE), 08 purchase invoice (FEC), 09 export invoice (FEE), 10 payment receipt (REP). 05–07 name the receiver's messages, which are not invoices. Details under docType in the document read by GET /v1/invoices/{id}.
Environment the document belongs to, fixed when it is created: sandbox (Hacienda's test environment, free and with no fiscal value) or production (real fiscal documents). GET /v1/invoices lists only the active environment; GET /v1/drafts lists the drafts of both.
Where the document is in EmiteCR: draft (not signed yet), signed (numbered and signed, delivered to Hacienda automatically), submitted (received by Hacienda, verdict pending), accepted, rejected, or error (could not be signed or delivered, or no verdict within 24 hours).
Hacienda's own state for the document, as its reception API (ATV) reports it: recibido (received, not judged yet), procesando (being processed), aceptado (accepted), rechazado (rejected), or error (ATV's error state, or one it does not name). Null until an answer from Hacienda is recorded.
Hacienda's explanation of its verdict (<DetalleMensaje>), so a rejection's reasons can be shown without reading the whole document; when ATV refused a submission, ATV's own message about it. Null until there is one.
ISO 4217 currency of the document; totalComprobante is in this currency.
Document total (<TotalComprobante>), in currency. Null until the document is signed, when its totals are computed. Positive on a credit note too.
Name of the receiver (the supplier on a purchase invoice, FEC): the current name of the linked contact when receiverPartyId is set, otherwise the name captured on the document. Null for a ticket (TE) without a receiver.
Id of the contact in the company's contacts the document was issued to, when it was created with receiverId. Null for a receiver given inline and for a ticket (TE) without a receiver.
When the record was created (ISO 8601 instant): the draft was first saved, or the XML was imported. Not the emission date, which is fechaEmision.
When the document was issued (ISO 8601 instant): the <FechaEmision> its clave and XML declare and its PDF prints, the date reports count by. Null while it has no number.
When Hacienda received the document from EmiteCR (ISO 8601 instant); for a document imported from XML, the emission date its XML declares. Null until then.
When a draft is scheduled to be signed and sent automatically (ISO 8601 instant). Null for a draft without a schedule and for any document that is no longer a draft.
Your own id for the sale behind the document (for example a POS ticket UUID), as sent at creation; unique per company and environment. Null when none was sent.
How many documents match the filters, across all pages.
The page returned (1-based).
Rows per page used for this answer: 25 by default, at most 100.
Example
{ "items": [ { "consecutivo": "00100001010000000042", "docType": "01", "environment": "sandbox", "status": "draft", "haciendaStatus": "recibido", "currency": "CRC", "totalComprobante": 1130 } ], "total": 137, "page": 1, "pageSize": 25}