FactusCreateInvoice
Description
Section titled “Description”Creates and validates an electronic invoice with Colombia’s DIAN through the Factus API. The node returns the CUFE (Código Único de Factura Electrónica) and QR code required by Colombian regulations.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Factus OAuth2 credentials |
| numbering_range_id | number | Yes | DIAN numbering range ID configured in Factus |
| payment_method_code | select | No | Payment method: 10=Cash, 42=Bank transfer (default: 10) |
| reference_code | text | No | Internal reference code (order, purchase order) |
| observation | text | No | Invoice notes or description |
| customer | object | Yes | JSON object with customer data |
| items | array | Yes | JSON array with invoice items |
Credentials
Section titled “Credentials”Requires a factus credential type with:
- Client ID: OAuth2 Client ID from the Factus dashboard API section
- Client Secret: OAuth2 Client Secret
- Environment:
sandbox(testing) orproduction(real DIAN)
Customer object
Section titled “Customer object”{ "identification": "900123456", "dv": "7", "company": "Client Company S.A.S.", "trade_name": "Client Company", "names": "John Doe", "address": "Calle 1 # 2-3, Bogotá", "email": "client@company.com", "phone": "3001234567", "legal_organization_id": "1", "tribute_id": "21", "identification_document_id": "31", "municipality_id": "149"}Common values:
legal_organization_id: 1=Legal entity, 2=Individualtribute_id: 21=VAT responsible, 22=Not VAT responsibleidentification_document_id: 31=NIT, 13=National IDmunicipality_id: Factus internal code (149=Bogotá)
Items array
Section titled “Items array”[ { "code_reference": "SERV-001", "name": "Software development service", "quantity": 1, "discount_rate": 0, "price": 1000000, "tax_rate": "19.00", "unit_measure_id": 70, "standard_code_id": 1, "is_excluded": 0 }]Output
Section titled “Output”{ "success": true, "bill_id": "123", "bill_number": "FE-001", "cufe": "abc123...hash256", "qr_code": "https://...", "status": "Accepted", "raw": { ... }}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-factus-prod", "numbering_range_id": "1", "payment_method_code": "42", "reference_code": "PO-2025-001", "customer": { "identification": "900123456", "dv": "7", "company": "Client S.A.S.", "email": "admin@client.com", "legal_organization_id": "1", "tribute_id": "21", "identification_document_id": "31", "municipality_id": "149" }, "items": [ { "name": "Technical consulting", "quantity": 8, "price": 200000, "tax_rate": "19.00", "unit_measure_id": 70, "standard_code_id": 1, "is_excluded": 0 } ]}numbering_range_idcorresponds to the DIAN resolution enabled in the Factus dashboard- Authentication uses OAuth2
client_credentials; the token is refreshed automatically - The CUFE is the unique identifier of the invoice with the DIAN — store it for future queries
- If DIAN rejects the invoice, Factus returns HTTP 422 with the rejection reasons
Related Nodes
Section titled “Related Nodes”- FactusGetInvoice - Query an issued invoice
- FactusCreateCreditNote - Create a credit note