OpenFacturaPDF
Description
Section titled “Description”Downloads the PDF representation or the XML of an Electronic Tax Document (DTE) already issued in OpenFactura, given its internal ID. This is the final step of the typical flow: issue the DTE, confirm its status with the SII, and then fetch the document to hand it to the customer or archive it.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | OpenFactura credential |
| dte_id | text | Yes | DTE ID in OpenFactura |
| format | select | No | Format to download: PDF or XML (default: pdf) |
Credentials
Section titled “Credentials”This module requires an openfactura credential type with the following fields:
- API Key: OpenFactura/Haulmer API key (sent in the
apikeyheader) - Environment:
production(live environment) or any other value to use the test environment (sandbox)
Output
Section titled “Output”{ "success": true, "dte_id": "12345", "format": "pdf", "content": "...", "content_type": "application/pdf", "filename": "dte_12345.pdf", "raw": { ... }}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-openfactura-prod", "dte_id": "12345", "format": "pdf"}dte_idis required: it is the identifier returned by OpenFacturaDTE when the document was issued (not the SII trackId).formatonly acceptspdforxml; any other value results in an error.- The suggested filename in the response follows the pattern
dte_{id}.{format}. - It is best to download the document only after confirming with OpenFacturaConsulta that the DTE was accepted by the SII.
Related Nodes
Section titled “Related Nodes”- OpenFacturaDTE - Issue a DTE
- OpenFacturaConsulta - Query the status of a DTE