In Colombia, the sales e-invoice works with prior validation: the DIAN validates the document before it becomes valid for your customer. Doing it manually slows your operation; doing it via API, embedded in your workflows, makes every sale invoice and validate itself. This guide reviews what you need, how the CUFE flow works, and how to automate it with Floogos, where issuing with the DIAN is a node inside your process.
Note: this article is a general technical guide, not tax advice. Always validate the current requirements with the DIAN or your accountant.
- Authority
- DIAN
- CUFE
- f1e2d3c4b5a6
- Tax
- IVA 19%
- Delivery
- XML + PDF
Key concepts in 30 seconds
Gather what you need
Before issuing via API, have your enablement and data in order:
- Be enabled as an electronic invoicer with the DIAN
- A valid numbering resolution (the authorized folio range)
- Issuer NIT and tax data
- Credentials of the technology provider / API you use to issue
💡 Tip: first complete the enablement in the DIAN's test environment. It's a requirement before invoicing in production.
Build the invoice (UBL 2.1 + CUFE)
With the sale's data, the standard XML and its unique identifier are built:
- Issuer, buyer and item detail
- Taxes (19% VAT or others as applicable) and totals
- Numbering within your current resolution
- Calculation of the CUFE that uniquely identifies the invoice
💡 Tip: numbering must be within your resolution's range. Issuing out of range is a common cause of rejection.
Validate with the DIAN
The step that grants validity: the DIAN validates the document before it reaches the customer.
- You send the signed invoice to the DIAN for prior validation
- The DIAN responds with acceptance (or the rejection reason)
- With validation, the invoice already takes fiscal effect
- The validated XML is kept as the official document
💡 Tip: always keep the XML with the validation response. It's your backup for any review.
Deliver to the buyer
You close the cycle by delivering the invoice in the right format:
- Send the validated XML and the graphic representation (PDF with QR code)
- Do it by email or the customer's usual channel
- Record the CUFE in your ERP, store or database
- Update the order/invoice status in your system
💡 Tip: the graphic representation must include the CUFE and the QR. Automating its delivery prevents complaints about invoices that don't arrive.
Credit and debit notes
To adjust or void, you use notes associated with the invoice, nothing is "deleted":
- Credit note for returns, discounts or voids
- Debit note for additional charges
- Each note references the original invoice and its CUFE
- They are also validated with the DIAN
💡 Tip: define how you handle returns from the start. Poorly issued notes are a classic source of mismatches.
How you automate it with Floogos
In Floogos, the whole flow fits into a workflow. The Colombia invoicing node handles the XML, the CUFE and the DIAN validation; you connect the trigger and the data:
- 1A trigger starts the process (a sale, a form, an order in your ERP)
- 2The workflow takes the data and builds the UBL 2.1 invoice with its CUFE
- 3The Colombia node validates with the DIAN and receives acceptance
- 4Another node sends the XML and the PDF with QR to the customer and archives the receipt
- 5The CUFE is recorded and the status updated, with traces and insights per run
💡 The credential is configured once and reused. As a workflow, you can issue in batches, retry rejections and notify errors automatically, plus issue credit/debit notes with the same approach.
Frequently asked questions
What is the DIAN's prior validation?
It's the Colombian model where the DIAN validates the e-invoice before it takes effect for the buyer. Floogos sends the invoice for validation and receives the response automatically within the workflow.
What do I need to start invoicing via API?
Being enabled with the DIAN, having a valid numbering resolution, your tax data (NIT) and the provider/API credentials. With that, the Colombia node can already issue and validate.
What is the CUFE?
The Código Único de Factura Electrónica, a unique identifier for each receipt, calculated when building the invoice and shown on the graphic representation next to the QR code.
How do I void or correct an invoice?
It isn't deleted: you issue a credit note (for returns, discounts or voids) or a debit note (for additional charges), referencing the original invoice, and they are also validated with the DIAN.
The sales e-invoice in Colombia doesn't have to slow your operation. With API issuance and prior validation embedded in your processes, every sale invoices, validates with the DIAN, reaches the customer and gets archived, with CUFE and full traceability. Floogos turns all of that into a node in your workflow; you focus on selling, not paperwork.
Official sources
General technical guide, not tax advice. Requirements verified against official sources; always check the current regulations with the DIAN or your accountant.
