Docs
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.

Endpoint
GET /v1/documents/{documentRef}/files/{file}
Authorization
The document category encoded in the reference determines the required permission: `cfdi` → `invoices:read`, `withholding` → `invoices:read`, `sales_receipt` → `receipts:read`, `quote` → `quotes:read`, `declaration` → `sat:read`, `tax_compliance_opinion` → `sat:read`.
Environments
Production and sandbox
Sandbox document categories
cfdi, withholding, sales_receipt, quote
Idempotency
Not required.