The Spanish version is the authoritative reference. View in Spanish
π¨π΄ Colombia
This sheet assumes you know the xPOS-Core communication protocol. Here we only document what is specific to Colombia.
Summaryβ
| Aspect | Value |
|---|---|
country code | co |
| Tax authority | DIAN |
| Pattern | C β dual XML (DTE / equivalent DTE) |
Supported inputType | json, xml, xdoc, txt |
| Extra endpoint | β |
| Output | Signed tax XML |
XSLT mappingβ
| XSLT | Use |
|---|---|
input_to_dte_co.xslt | json and xml inputs β XML <root> β Gosocket XML. |
other_to_dte_co.xslt | txt input β Gosocket XML. Does not go through input_to_dte. |
xdoc_to_dte_co.xslt | xdoc input β Gosocket XML. Does not go through input_to_dte. |
dte_to_fiscal_co.xslt | Gosocket XML β DIAN tax DTE. |
dteEQ_to_fiscal_co.xslt | Gosocket XML β DIAN equivalent DTE (depending on document type). |
custom_response_co.xslt | Generates custom_response when applicable. |
Document types (typeDoc)β
WebSocket example uses
typeDoc=01(electronic invoice). The parameter is numeric:typeDoc=1andtypeDoc=01are equivalent.
typeDoc | Document |
|---|---|
| 01 | Electronic sales invoice |
| 02 | Electronic sales invoice β export |
| 03 | Electronic transmission document |
| 04 | Electronic sales invoice β type 04 |
| 07 | Electronic equivalent document β contingency |
| 08 | Electronic equivalent document β contingency |
| 20 | Electronic POS equivalent document |
| 25 | Cinema admission ticket |
| 27 | Public shows admission ticket |
| 30 | Document in localized and non-localized games |
| 35 | Land passenger transport ticket |
| 40 | Document issued for toll collection |
| 45 | Statement issued by financial companies and funds |
| 50 | Air passenger transport ticket |
| 55 | Stock, agricultural and commodities exchange operation document |
| 60 | Document issued for public and residential services |
| 91 | Credit note |
| 92 | Debit note |
In local contingency, the invoice (01) is converted to type 03 or 04, and the equivalent document to its corresponding contingency code (08). Notes (91 and 92) validate against their own schema.
Colombia-specific response fieldsβ
Colombia returns the entire core + full tax echo + two exclusive fields:
| Field | Description |
|---|---|
docNumber | Series and number of the document (e.g. SETP990044419). |
contingencyCode | DIAN contingency code. |
countryIdentificationCode in Colombia is CUFE (electronic invoice) or CUDE (equivalent document) depending on the type.
WebSocket exampleβ
{
"env": "sbx",
"operation": "consolidate",
"typeDoc": 1,
"country": "co",
"inputType": "json",
"origin": "<issuer taxId>",
"document": { /* factura electronica o documento equivalente */ }
}Status re-retrievalβ
The /api/v1/status response in Colombia includes, in addition to the core, these fields:
| Field | Description |
|---|---|
signedXml | Signed tax XML with folio. |
param | test or consolidate. |
typedoc | DTE type. |
date | Transaction date (yyyy-mm-ddTHH:mm:ss). |
Local contingency (type 03)β
When the DIAN suffers an outage, xPOS converts and issues the document in its contingency modality (type 03) locally on the device, without depending on external services, and regularizes it later once the authority recovers.
To have this functionality it is required to have the Folio Manager enabled and to request its activation from the Gosocket consulting team.
On devices with several issuers, contingency is independent per company: it is activated only for the affected company and the others keep issuing online.
Particular notesβ
- Pattern C: the flow branches the XSLT depending on the document type (electronic invoice vs equivalent document).
- Publishes in Inbox-Gosocket.
Changes in version 2.7.0β
- Local contingency (type 03) resolved on the device β see its own section.
- More precise Rule 90: the message retrieves the previously accepted document by querying the correct environment of each company.
- DIAN response readable on screen, with the View TA response option of the dashboard.
- Fix of the date format in the self-reference that the DIAN observed in certain contingency documents.
- The configuration download leaves the installation exactly as the portal defines it.