> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/colombia-dian.md).

# COLOMBIA DIAN

Colombia DIAN electronic document support in DocBits (Factura Electrónica, Documento Soporte)

{% hint style="info" %}
Check the country guide for version limits, effective configuration and the country explainer. [Colombia](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/colombia.md). The credit-note classification entry has no dedicated extraction bundle in the inspected status. Confirm the effective mapping instead of inferring support from the invoice entry.
{% endhint %}

| Property             | Value                                                                           |
| -------------------- | ------------------------------------------------------------------------------- |
| **Country / Region** | Colombia                                                                        |
| **Document Types**   | Invoice (Factura Electrónica), Credit Note (Nota de Crédito), Documento Soporte |
| **Format**           | XML (UBL 2.1)                                                                   |
| **Standard**         | DIAN 2.1 (Dirección de Impuestos y Aduanas Nacionales)                          |
| **Locale**           | `es_CO`                                                                         |

The Colombian electronic invoicing standard is regulated by the **DIAN** (Dirección de Impuestos y Aduanas Nacionales). It is based on UBL 2.1 with DIAN-specific extensions (`sts:DianExtensions`). DocBits detects Colombia DIAN documents via the DIAN namespace and routes by `CustomizationID`:

| CustomizationID | Document Type                                      |
| --------------- | -------------------------------------------------- |
| 10              | Factura Electrónica de Venta (FACTURA ELECTRONICA) |
| 20              | Nota de Crédito (Credit Note)                      |
| 91              | Nota de Crédito por devolución                     |
| 92              | Nota de Débito                                     |
| DS              | Documento Soporte (DOCUMENTO SOPORTE)              |

The DIAN identifier (**NIT** — Número de Identificación Tributaria) uses `schemeID="31"` in the UBL `CompanyID` element.

## Support Status

| Component        | Status      |
| ---------------- | ----------- |
| Preview          | ✅ Supported |
| Field Extraction | ✅ Supported |
| Transformation   | ✅ Supported |

## Default Preview

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-d16a709ef9a2edca138b707afd955191b2e024a2%2Fcolombia-dian-preview.png?alt=media" alt="Colombia DIAN Factura Electrónica preview in DocBits"><figcaption><p>Default DocBits preview for a COLOMBIA FACTURA ELECTRONICA (CustomizationID 10)</p></figcaption></figure>

## Field Mapping

### Header Fields

| DocBits Field   | Source XML Element                                  | Notes                                             |
| --------------- | --------------------------------------------------- | ------------------------------------------------- |
| `invoice_id`    | `cbc:ID`                                            | Invoice number with prefix (e.g. `SETP990000001`) |
| `invoice_date`  | `cbc:IssueDate`                                     | Issue date (ISO 8601)                             |
| `due_date`      | `cbc:DueDate`                                       | Payment due date                                  |
| `currency`      | `cbc:DocumentCurrencyCode`                          | Always `COP` (Colombian Peso)                     |
| `total_amount`  | `cac:LegalMonetaryTotal/cbc:PayableAmount`          | Total payable incl. IVA                           |
| `net_amount`    | `cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount`     | Net amount excl. IVA                              |
| `tax_amount`    | `cac:TaxTotal/cbc:TaxAmount`                        | Total IVA amount (standard rate 19%)              |
| `supplier_name` | `cac:AccountingSupplierParty//cbc:RegistrationName` | Supplier legal name                               |
| `supplier_id`   | `cac:AccountingSupplierParty//cbc:CompanyID`        | Supplier NIT (schemeID=31)                        |
| `buyer_name`    | `cac:AccountingCustomerParty//cbc:RegistrationName` | Buyer legal name                                  |
| `buyer_id`      | `cac:AccountingCustomerParty//cbc:CompanyID`        | Buyer NIT (schemeID=31)                           |

### Line Item Table (`INVOICE_TABLE`)

Row path: `cac:InvoiceLine` (or `cac:CreditNoteLine`)

| Column        | Source XML Element          | Notes                             |
| ------------- | --------------------------- | --------------------------------- |
| `POSITION`    | `cbc:ID`                    | Line number                       |
| `DESCRIPTION` | `cac:Item/cbc:Description`  | Product or service description    |
| `QUANTITY`    | `cbc:InvoicedQuantity`      | Quantity with unit code attribute |
| `UNIT_PRICE`  | `cac:Price/cbc:PriceAmount` | Unit price excl. IVA              |
| `NET_AMOUNT`  | `cbc:LineExtensionAmount`   | Line total excl. IVA              |

## Classification Rules

DocBits detects Colombia DIAN documents by the DIAN namespace string:

| Electronic Document Type     | Pattern                                                                                    |
| ---------------------------- | ------------------------------------------------------------------------------------------ |
| COLOMBIA FACTURA ELECTRONICA | `http://www.dian.gov.co/contratos/facturaelectronica/v1/Structures` + `DianExtensions`     |
| COLOMBIA DOCUMENTO SOPORTE   | `http://www.dian.gov.co/contratos/facturaelectronica/v1/Structures` + `CustomizationID=DS` |

The root element is `<Invoice>` (UBL 2.1) for invoices, `<CreditNote>` for credit notes. All documents include a `<sts:DianExtensions>` block with DIAN authorization data (`InvoiceAuthorization`, `CUFE`/`CUDE` UUID, QR code).

## Related

* [Currently Supported E-Invoice Standards](https://github.com/Fellow-Consulting-AG/docbits/tree/main/readme/administration-and-setup/settings/global-settings/document-types/currently-supported-e-invoice-standards/README.md)
* [Supported Electronic Documents](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/colombia-dian.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
