Skip to main content
GET
Get a stored invoice

Authorizations

Authorization
string
header
required

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

Path Parameters

document_id
string
required

Prefix and number, e.g. SETP990000001.

Response

Successful Response

The stored invoice, without its XML.

cufe
string
required

CUFE: 96 hexadecimal characters (SHA-384).

customer
CustomerOut · object
required

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
required

The email of the invoice to its buyer.

document_id
string
required

Prefix and number, e.g. SETP990000001.

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

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
required
prefix
string
required
qr
QrOut · object
required
state
string
required

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[]
required

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
required

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[]
required

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
default: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.