OpenFacturaDTE
Description
Section titled “Description”Issues an Electronic Tax Document (DTE) to Chile’s SII through the OpenFactura (Haulmer) platform. Supports the most common DTE types: invoices, exempt invoices, receipts, exempt receipts, dispatch guides, and credit/debit notes.
The node builds the document from the receiver’s data and the item detail, and sends it to OpenFactura, which handles communication with the SII. The response includes OpenFactura’s internal document ID and, when applicable, the trackId assigned by the SII to track it.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | OpenFactura credential |
| dte_type_id | select | No | DTE type: 33=Invoice, 34=Exempt, 39=Receipt, 41=Exempt Receipt, 52=Dispatch Guide, 56=Debit Note, 61=Credit Note (default: 33) |
| receiver | json | Yes | Receiver data (object) |
| details | json | Yes | Items / details (array) |
| payment_type | select | No | Payment type: 1=Cash, 2=Credit (default: 1) |
| issue_date | text | No | Issue date (YYYY-MM-DD, default: today) |
| global_discount | number | No | Global discount (%) |
| reference | json | No | Reference to another DTE (object), for credit/debit notes |
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", "folio": 1042, "track_id": "998877", "dte_type_id": 33, "dte_type": "Factura Electrónica", "pdf_url": "https://api.haulmer.com/v2/dte/document/12345/pdf", "status": "sent", "raw": { ... }}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-openfactura-prod", "dte_type_id": 33, "receiver": { "code": "76354771-K", "name": "Cliente SpA", "address": "Av. Providencia 1234", "comune": "Providencia", "city": "Santiago" }, "details": [ { "name": "Consulting service", "quantity": 1, "price": 100000 } ], "payment_type": 1}dte_type_iddefaults to 33 (Electronic Invoice); see the node’s help for the rest of the valid codes.receiveranddetailsare required: without receiver data or at least one item, the node returns an error.- The
rawfield keeps OpenFactura’s full response for debugging. - Submission does not guarantee immediate SII acceptance; query the status with OpenFacturaConsulta while the DTE is being processed.
Related Nodes
Section titled “Related Nodes”- OpenFacturaConsulta - Query the status of a DTE
- OpenFacturaPDF - Download a DTE’s PDF or XML