> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cufea.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customers

> Identified buyers, consumidor final and DANE codes.

`customer` takes one of two shapes, chosen by `kind`.

## An identified buyer

The default (`"kind": "identified"`, which may be left out). Only the identification and the
name are required:

| Field | Required | Default |
| - | - | - |
| `organization_type` | yes | `1` legal entity, `2` natural person |
| `id_type` | yes | the DIAN identification type, e.g. `13` cédula, `31` NIT |
| `id_number` | yes | a NIT goes without its check digit |
| `check_digit` | NIT only | |
| `registration_name` | yes | |
| `tax_scheme` | no | `ZZ` (not applicable); also `01` IVA or `04` INC |
| `fiscal_responsibilities` | no | `["R-99-PN"]`; also `O-13`, `O-15`, `O-23`, `O-47`, `ZZ` |
| `address` | no | without it the XML leaves out the buyer's `PhysicalLocation` and `RegistrationAddress` |
| `trade_name`, `email` | no | |

A natural person with no RUT data:

```json theme={null}
{"organization_type": "2", "id_type": "13", "id_number": "1020304050",
 "registration_name": "Ana Perez", "email": "ana@example.com"}
```

A company with its RUT data and address:

```json theme={null}
{"organization_type": "1", "id_type": "31", "id_number": "800197268", "check_digit": "4",
 "registration_name": "Acme S.A.S.", "tax_scheme": "01", "fiscal_responsibilities": ["O-13"],
 "address": {"line": "Cra 7 # 1-10", "city_code": "11001", "city_name": "Bogotá, D.C.",
             "department_code": "11", "department_name": "Bogotá"}}
```

The defaults describe a buyer without RUT data. When the buyer has a RUT, send its real
`tax_scheme` and `fiscal_responsibilities`: Cufea does not query the RUT, and the values go into
the signed XML as given.

Send the `address` when the sale happens outside your premises: FAK07 requires it then.

## Consumidor final

For an anonymous buyer send `"kind": "final_consumer"`. Cufea fills the party the Anexo
prescribes (FAK61-FAK64): natural person, id type `13`, id `222222222222`, name
`consumidor final`, responsibility `R-99-PN` and tax scheme `ZZ`. Only an `email` and the
`address` of the place of sale may be added; any other field is refused with `422`.

```json theme={null}
{"kind": "final_consumer"}
```

Do not build the consumidor final by hand as an identified buyer, and never send
`222222222222` as a NIT (`31`) or with a check digit.

## DANE codes

`city_code` (5 digits, DANE municipality) and `department_code` (2 digits, DANE department)
are checked for their **format only**. Cufea does not check that the code exists, nor that
`city_name` and `department_name` match it: the codes and the names go into the XML as sent.
Take both from the DIAN lists (`Municipio-2.1.gc` and `Departamentos-2.1.gc` in the DIAN
toolbox) or another official source; a made-up code is accepted by Cufea and can then be
refused by the DIAN.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.