Skip to main content

Reports

API Connect generates accounting reports by period and returns them as a ZIP of Excel files. They are meant for monthly closing, reconciliation, and filing annexes with the MH.

There are three reports, all with the same mechanics:

EndpointContent
GET /reports/active-documentsActive (valid) documents in the range.
GET /reports/voided-documentsVoided documents in the range.
GET /reports/annexesAccounting annexes (VAT ledger format).

Technical details

MethodGET
AuthenticationHeader Authorization: Bearer odt_... (does not accept ?key=)
Responseapplication/zip (direct download)

Parameters

ParameterTypeRequiredDescription
start_datestringYesStart date, format YYYY-MM-DD.
end_datestringYesEnd date, format YYYY-MM-DD (inclusive).
31-day limit

The range (end date minus start date) cannot exceed 31 days. A larger range returns 400 immediately, without generating anything. For longer periods, request one month at a time.

What the ZIP contains

Each ZIP contains one Excel file per document type that the company actually issued in the range. Inside each Excel there is one sheet per point of sale and one row per document.

Only what was issued is included

If a document type had no activity in the range, that file is omitted from the ZIP. For example, if no CCF was issued during the month, there will be no CCF file — that is expected, not an error.

File names inside the active-documents ZIP:

FileDocument type
COMPROBANTES_CONSUMIDOR_FINAL.xlsxInvoice (01)
CONTRIBUYENTES.xlsxCCF (03)
NOTAS_DE_CREDITO.xlsxCredit Note (05)
SUJETOS_EXCLUIDOS.xlsxExcluded Subject (14)
It is a summary, not the individual files

The report is a listing (documents as Excel rows), not the PDF/JSON of each DTE. To download the file of a specific document, use Download files.

Example

curl
curl -fL -o active_documents.zip \
-H "Authorization: Bearer odt_xxx" \
"https://ocote.io/api/connect/reports/active-documents?start_date=2026-06-01&end_date=2026-06-30"

The other two reports are identical; only the path changes to voided-documents or annexes.

File name on Windows

On Windows prefer -o name.zip (explicit name). The -OJ flag (use the server-provided name) may fail in some Windows environments when renaming the file across drives.

Errors

HTTPMessage
400Formato de fecha invalido. Use YYYY-MM-DD
400La fecha de inicio no puede ser posterior a la fecha de fin
400El rango de fechas no puede ser mayor a 31 dias (un mes)
401API key missing or invalid.

See also

  • List documents — to query documents by filters in JSON (instead of Excel).
  • Rate limits — report downloads count against the limit.
  • Download files — for the PDF/JSON of an individual document.