Saltar al contenido principal
POST
Ask the DIAN for the current status of an invoice

Autorizaciones

Authorization
string
header
requerido

Send your Cufea API key as Authorization: Bearer <key>.

Parámetros de ruta

document_id
string
requerido

Prefix and number, e.g. SETP990000001.

Respuesta

Successful Response

The stored invoice, without its XML.

cufe
string
requerido

CUFE: 96 hexadecimal characters (SHA-384).

customer
CustomerOut · object
requerido

The buyer. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.

delivery
Delivery · object
requerido

The email of the invoice to its buyer.

document_id
string
requerido

Prefix and number, e.g. SETP990000001.

issue_datetime
string<date-time>
requerido
lines
LineSummaryOut · object[]
requerido

The lines in order. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.

number
integer
requerido
prefix
string
requerido
qr
QrOut · object
requerido
state
string
requerido

prepared until the document is sent; then the latest DIAN outcome (accepted, rejected, not_found...) or, before any answer, the last event (sent, send_failed...).

taxes
TaxAmountOut · object[]
requerido

Taxes per code and percent, ordered by code and percent, then the IVA-excluded entry when a line has no IVA. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.

totals
DocumentTotals · object
requerido

Monetary totals. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.

withholdings
TaxAmountOut · object[]
requerido

Withholdings per code and percent; empty on notes. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.

dian_errors
DianMessage · object[]

Rule messages of the latest DIAN answer.

dian_status_code
string | null

StatusCode of the latest DIAN answer, e.g. 00; none yet.

dian_status_description
string | null

StatusDescription of the latest DIAN answer.

kind
string
predeterminado:invoice

Always invoice.

Allowed value: "invoice"
notes
string[]

The document's cbc:Note legends as signed, in order (notes, or the observation, given on create); empty when none.

payments
PaymentOut · object[]

The means of payment as signed (cac:PaymentMeans), in order, with the amounts given on create. A single payment on create is one entry.

reference
string | null

The reference given on create; null when none was given.

sent_at
string<date-time> | null

When the DIAN last received the document; none if never.