API referenceDocumentsFiles and delivery
Download document file
Downloads an available document file. For an unstamped CFDI draft, use preview_pdf to inspect the rendered PDF before stamping; the preview has no fiscal validity. When available, cancellation_xml and cancellation_pdf return the cancellation acknowledgement. Its availability alone does not establish completed cancellation; inspect the document status separately.
- Endpoint
GET /v1/documents/{documentRef}/files/{file}- Authorization
- The document category encoded in the reference determines the required permission: `invoice` → `invoices:read`, `withholding` → `invoices:read`, `sales_receipt` → `receipts:read`, `declaration` → `sat:read`, `tax_compliance_opinion` → `sat:read`.
- Environments
- Production and sandbox
- Sandbox document categories
invoice,withholding,sales_receipt- Idempotency
- Not required.
- Common next step