Skip to content

OpenFacturaDTE

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesOpenFactura credential
dte_type_idselectNoDTE type: 33=Invoice, 34=Exempt, 39=Receipt, 41=Exempt Receipt, 52=Dispatch Guide, 56=Debit Note, 61=Credit Note (default: 33)
receiverjsonYesReceiver data (object)
detailsjsonYesItems / details (array)
payment_typeselectNoPayment type: 1=Cash, 2=Credit (default: 1)
issue_datetextNoIssue date (YYYY-MM-DD, default: today)
global_discountnumberNoGlobal discount (%)
referencejsonNoReference to another DTE (object), for credit/debit notes

This module requires an openfactura credential type with the following fields:

  • API Key: OpenFactura/Haulmer API key (sent in the apikey header)
  • Environment: production (live environment) or any other value to use the test environment (sandbox)
{
"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": { ... }
}
{
"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_id defaults to 33 (Electronic Invoice); see the node’s help for the rest of the valid codes.
  • receiver and details are required: without receiver data or at least one item, the node returns an error.
  • The raw field 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.