Skip to main content
GET
Returns a ZIP containing one PDF per issued invoice in the requested range (same rules as Download Invoice PDF for which PDF each invoice kind gets) plus a CSV manifest listing every invoice in the range — including the ones a PDF could not be produced for. Payer accounts (cuentas a convenio) are included. Drafts are never included. Nothing is persisted; the ZIP is built fresh per request.

Query Parameters

string
required
Start date, YYYY-MM-DD, inclusive. Filters by the invoice’s emission date (issuedAt; legacy invoices without it fall back to issueDate) as a Colombian calendar day (America/Bogota).
string
required
End date, YYYY-MM-DD, inclusive. Must be on or after from.
string
default:"all"
One of all, electronic, manual. electronic includes both Alegra FEVs and external-provider FEVs.

Rules

  • Includes invoices in status issued, partially_paid, paid, voided or filed. Drafts are excluded.
  • Maximum 100 invoices per request. A larger range is rejected outright (never silently truncated) — see INVOICE_EXPORT_TOO_LARGE below. The cap and the default range are also available from the form-schema endpoint.
  • One export at a time per clinic (the Alegra credential is shared across the whole deployment): a second concurrent request gets 429 INVOICE_EXPORT_IN_PROGRESS. The endpoint also caps at 10 exports per minute per clinic.
  • A provider failure is per-invoice, never fatal to the export: if Alegra can’t produce a given invoice’s PDF, that row is skipped and recorded in the manifest with a reason; the rest of the ZIP still ships. If Alegra is down or rejects the credential, the remaining Alegra invoices in that request are all skipped as provider_unavailable while Nevatal-generated PDFs (manual, external) still ship. A provider failure never produces a 500 or aborts the ZIP.
  • ZIP and manifest are ordered by emission date, ascending.

File names

  • The displayed invoice number is the DIAN number when available, otherwise Nevatal’s internal number; sanitized to [A-Za-z0-9._-].
  • PDF: <number>.pdf, or <number>-VOIDED.pdf for a voided invoice.
  • ZIP: invoices_<from>_<to>.zip. Manifest: manifest.csv.
  • A name collision inside the ZIP gets a -2, -3, … suffix.

Response

200 returns the ZIP as application/zip, with Content-Disposition: attachment and Content-Length. A 200 can still contain skipped rows — check the manifest’s Reason column rather than assuming every invoice in range got a PDF. Every non-2xx response is the standard JSON error envelope, never binary.

ZIP contents

manifest.csv

UTF-8 with BOM. One header row plus one row per invoice in range, including skipped ones. Formula-injection guard on cells starting with =, +, -, @ (prefixed with ').

Skip reasons

Errors