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

Download XML

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

Returns the original signed XML (XAdES), bit-for-bit identical to what was sent to Hacienda. It is the official evidence of the document for tax audits and for accounting systems that parse XML.

Authentication

AttributeValue
Required scopefacturas:read

Response

HTTP/1.1 200 OK Content-Type: application/xml Content-Disposition: attachment; filename="50615012600310112345600100001010000000123456789012_Firmado.xml"

(XAdES XML)

When to use it

  • Tax audits — the signed XML is the official evidence before Hacienda (Costa Rica’s tax authority).
  • Syncing with accounting systems that consume XML.
  • Signature verification by third parties (experts, oversight bodies, etc.).

Notes

  • Right after issuance, this endpoint can return 404 for a few seconds. Signing and uploading the XML happen in the background: there is a short window between the 201 of the issuance and the moment the file becomes available. If you download it immediately, retry; it’s best to wait for the webhook, which arrives once the document has been resolved.
  • If the document ended up in error status and was never signed, the 404 is permanent.
  • The XML is never modified: it is bit-for-bit identical to what was sent to Hacienda.
  • The acknowledgment signed by Hacienda is a different document, downloaded separately: see Download the Hacienda message.
  • The same endpoint exists for purchase invoices, with the same behavior: see Download purchase invoice XML.

Errors

CodeMeaning
404 Not FoundThe key doesn’t exist or the XML hasn’t been generated yet.