Skip to main content
DIAN (Dirección de Impuestos y Aduanas Nacionales) is Colombia’s tax authority, and every electronic invoice, credit and debit note, support document, payroll document and event passes through its electronic-invoicing system. An account there holds everything the company or person issued and received. These endpoints read that account as the taxpayer’s own connection.

Connect your account

DIAN’s electronic-invoicing system has no password: access is a link DIAN emails to the address registered in the RUT of the person who asks for it (for a company, its legal representative). Ask for it with the access requests endpoint below, or in DIAN’s electronic-invoicing system, then register the link here within the 60 minutes DIAN accepts it. DIAN keeps that access open for about an hour, so register the link when you are about to query and run what you need in that window. After it, queries answer 422 connection_rejected: ask for a new link and register it again, and the same connection is renewed, keeping its id. POST /co/dian-facturacion/connections/v1 Register a connection once. Croma checks it with the source before saving it, and answers with its id and a masked name.
Every query then runs as one of your organization’s connections. Croma picks one, keeps its session open between queries, and moves to the next when one reaches its daily allowance. Register more than one to get more capacity a day. To run as a specific one, send its id as connection_id. Registering an account that is already connected renews it: the connection takes the new values, keeps its id and answers 200, so nothing that stores the id has to change. How the flow works, step by step: Connections. List and delete them:
Over MCP, the same verbs are the dian_facturacion_connect, dian_facturacion_list_connections, dian_facturacion_delete_connection tools. Connecting from an agent never passes the credentials through the conversation: the agent gets a secure link, and the user enters the account’s details in the Croma console. When a query cannot run as any connection:
Credentials are encrypted as soon as they reach Croma, bound to your organization, and can only be opened by the isolated service that signs in to the source on your behalf. They are never returned by the API or shown to anyone. Deleting a connection destroys it permanently.

Access requests

POST /co/dian-facturacion/access-requests/v1 Live Have DIAN send the access link a connection is registered with, without leaving your product: the person (or the company’s legal representative) receives it at the email in their RUT.

Response

sent is true when DIAN accepted the request and emailed the link to the address in the person’s RUT; message is DIAN’s own answer. The link works for expires_in_minutes (60). Register it as a connection within that time.
This call runs without a connection: it is how one starts. It is billed like any other call.

Issued documents

POST /co/dian-facturacion/issued-documents/v1 Live

Response

Each document has its cufe (the key), document_type_code and document_type, series and number, issued_on and received_at, the issuer and recipient (nit, name), currency, payment_form and payment_method (DIAN’s codes), every tax DIAN totals in taxes and the withholdings (ReteIVA, ReteRenta, ReteICA), the total, DIAN’s validation status and its radian_status as a título valor. Besides invoices, the lists carry credit and debit notes, support documents, payroll and the events (application responses) the account issued or received.
Every call reads DIAN live as your connection, so the answer is current and is never shared between organizations.
This lookup can take longer than a typical request. It is an async job. By default the request waits inline and returns { data }, or you can poll / use a callback_url.

Received documents

POST /co/dian-facturacion/received-documents/v1 Live Same shape as the issued documents.
Every call reads DIAN live as your connection, so the answer is current and is never shared between organizations.
This lookup can take longer than a typical request. It is an async job. By default the request waits inline and returns { data }, or you can poll / use a callback_url.

One document

POST /co/dian-facturacion/document/v1 Live

Response

found says whether the account has the document on that date; when false the rest is empty. Otherwise you get the document’s header (document_type, series, number, issued_on, issued_at, due_on, issuer, recipient, currency, payment_form, payment_method, notes), its lines (description, quantity, unit, unit_price, line_total and each line’s taxes), its own monetary totals, the taxes and total as DIAN’s registry shows them, the legitimate_holder, DIAN’s validations, its events (acuse de recibo, recibo del bien, aceptación, endoso…), and the original files: xml (UBL 2.1) and pdf_base64. Payroll, support documents and events carry no lines or files here; their header, validations and events still come back.
Take cufe and issued_on from a row of the issued or received documents.
This lookup can take longer than a typical request. It is an async job. By default the request waits inline and returns { data }, or you can poll / use a callback_url.

Monthly report

POST /co/dian-facturacion/monthly-reports/v1 Live DIAN issues it to accounts that invoice electronically, usually in the first weeks of the next month.

Response

available says whether DIAN issued a report for the month; when false the rest is empty. A report has its reference, dated_on, cutoff_date and replaces_previous; documents[] with, per document type, what was issued and received (month_count, month_amount, year_count, year_amount); and indicators[] for the month and the two before it (count, daily_average_count, amount, daily_average_amount, issued and received).
This lookup can take longer than a typical request. It is an async job. By default the request waits inline and returns { data }, or you can poll / use a callback_url.

Profile

POST /co/dian-facturacion/profile/v1 Live

Response

The account’s nit, name, business_name, email, its status in DIAN’s electronic-invoicing system, the reception_email where it receives invoices, its legal_representatives, its operation_modes (own software, a technology provider’s, or DIAN’s), and the numbering_ranges associated with its software (prefix, resolution, from_number, to_number, associated_on, expires_on).
This lookup can take longer than a typical request. It is an async job. By default the request waits inline and returns { data }, or you can poll / use a callback_url.

Full reference

Schemas, all response fields, and an interactive playground.