Skip to Content
v1.5Official documentation for the LX CloudPos API · stable in production

Download PDF

GET /api/v1/facturas/{clave}/pdf

Regenerates the document’s PDF on the fly and returns it with Content-Type: application/pdf. Useful for sending to the customer, accounting archives, or backup.

Authentication

AttributeValue
Required scopefacturas:read

Response

HTTP/1.1 200 OK Content-Type: application/pdf Content-Disposition: attachment; filename="50615012600310112345600100001010000000123456789012.pdf" Content-Length: 124567

(PDF bytes)

Notes

The PDF is regenerated every time (it isn’t cached), so it always reflects the most recent state:

  • Changes to the tenant’s logo.
  • Changes to the customer’s data (if updated after issuance).
  • The document’s current status with Hacienda (if it has already been accepted, the corresponding stamp is shown).

Errors

CodeMeaning
404 Not FoundThe key doesn’t exist for the API key’s tenant.
500 Internal Server ErrorFailed to generate the PDF (corrupted logo, missing data in the document, etc.).