Colombia
In Colombia, Floogos connects to the DIAN (Dirección de Impuestos y Aduanas Nacionales) through the Factus platform, an authorized technology provider that builds the electronic document, signs it, and transmits it to the DIAN on the issuer’s behalf. There is no direct SOAP connection to the DIAN: the entire exchange goes through Factus’s REST API.
Integration model
Section titled “Integration model”- Via provider (Factus): unlike countries with a direct connection (such as Peru or Paraguay), in Colombia Floogos talks to the Factus API, and it is Factus that validates the document with the DIAN.
- OAuth2 authentication: the
factuscredential usesclient_credentials(Client ID + Client Secret); the token is refreshed automatically on each call. - DIAN numbering range: each invoice is issued within a
numbering_range_id, which corresponds to a numbering resolution previously enabled in the Factus dashboard. - CUFE: the Código Único de Factura Electrónica is the identifier issued by the DIAN (through Factus) for each valid document; it is returned together with the QR code.
- 19% VAT: Colombia’s general Value Added Tax rate is 19%, configurable per item via
tax_rate. - Environments: the credential supports
sandbox(testing) orproduction(real DIAN).
When a document becomes valid
Section titled “When a document becomes valid”An invoice is not valid just by being sent to Factus: the DIAN must accept it and return the CUFE and status (status_name, e.g. “Aceptado”). If the DIAN rejects the document, Factus responds with an HTTP 422 error detailing the rejection reasons, and no CUFE is generated.
Available nodes
Section titled “Available nodes”| Node | Description |
|---|---|
| FactusCreateInvoice | Issues a DIAN-validated electronic invoice through Factus; returns the CUFE and QR code |
| FactusCreateCreditNote | Creates a credit note against an already-issued invoice: full cancellation, partial return, discount, or price adjustment |
| FactusGetInvoice | Queries an invoice by Factus internal ID, invoice number, or reference code |
Typical flow
Section titled “Typical flow”- FactusCreateInvoice — issues the invoice with the customer data and items; returns the
bill_idand the CUFE. - FactusCreateCreditNote — if the invoice needs to be cancelled or adjusted, a credit note is created referencing the original
bill_id. - FactusGetInvoice — at any point the status and full data of the invoice or credit note can be queried.
- The
factuscredential type stores the Client ID, Client Secret, and environment (sandboxorproduction). - The
numbering_range_idmust correspond to a DIAN numbering resolution already configured and enabled in the Factus dashboard; Floogos does not generate it. - The
customeranditemsfields are sent as full JSON objects (customer identification, items withtax_rate,unit_measure_id, etc.), not as individual form fields. - For full cancellations (
reason_code=2),itemsdoes not need to be sent in the credit note; Factus cancels the invoice’s full amount.