> ## Documentation Index
> Fetch the complete documentation index at: https://gobl-improv.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Colombia DIAN UBL 2.X

Key: <code>co-dian-v2</code>

Extensions to support the Colombian DIAN (Dirección de Impuestos y Aduanas Nacionales)
specifications for electronic invoicing based on UBL 2.1.

## Correction Definitions

Auto-generation of corrective invoices or credit and debit notes is
supported.

A reason is required in the <code>reason</code> field
when submitting the correction options.

### Invoice Types

The types of invoices that can be created with a preceding definition:

* <code>credit-note</code>
* <code>debit-note</code>

### Stamp Keys

Stamp keys from the previous invoice that need to be referenced:

* <code>dian-cude</code>

### Extension Keys

One or all of the following extensions may be required as part of the correction
options. See the [Extensions](#extensions) section for possible values.

* <code>co-dian-credit-code</code>
* <code>co-dian-debit-code</code>

## Extensions

### DIAN Municipality Code

The municipality code as defined by the DIAN.

For further details on the list of possible codes, see:

* [https://www.dian.gov.co/atencionciudadano/formulariosinstructivos/Formularios/2007/Codigos\_municipios\_2007.pdf](https://www.dian.gov.co/atencionciudadano/formulariosinstructivos/Formularios/2007/Codigos_municipios_2007.pdf)
* [https://github.com/ALAxHxC/MunicipiosDane](https://github.com/ALAxHxC/MunicipiosDane)

<Accordion title="co-dian-municipality">
  Pattern: <code>^\d{5}\$</code>
</Accordion>

### Credit Code

DIAN correction code for credit notes

<Accordion title="co-dian-credit-code">
  | Code           | Name           |
  | -------------- | -------------- |
  | <code>1</code> | Partial refund |
  | <code>2</code> | Revoked        |
  | <code>3</code> | Discount       |
  | <code>4</code> | Adjustment     |
  | <code>5</code> | Other          |
</Accordion>

### Debit Code

DIAN correction code for debit notes

<Accordion title="co-dian-debit-code">
  | Code           | Name            |
  | -------------- | --------------- |
  | <code>1</code> | Interest        |
  | <code>2</code> | Pending charges |
  | <code>3</code> | Change in value |
  | <code>4</code> | Other           |
</Accordion>
