Get a stored invoice
curl --request GET \
--url https://api.cufea.com/v1/invoices/{document_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cufea.com/v1/invoices/{document_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/invoices/{document_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"cufe": "0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1",
"customer": {
"id_number": "800197268",
"id_type": "31",
"name": "Acme S.A.S."
},
"delivery": {
"attempts": 1,
"manual": false,
"reason": null,
"recipient": "comprador@example.com",
"status": "sent",
"updated_at": "2026-11-15T01:38:02.104511Z"
},
"dian_errors": [],
"dian_status_code": "00",
"dian_status_description": "Procesado Correctamente.",
"document_id": "SBX1",
"issue_datetime": "2026-11-14T20:37:52.369143-05:00",
"kind": "invoice",
"lines": [
{
"description": "Service",
"discount_amount": "0.00",
"discount_rate": "0.00",
"gross_amount": "100000.00",
"is_excluded": false,
"item_code": null,
"line_id": 1,
"net_amount": "100000.00",
"quantity": "1",
"taxes": [
{
"is_excluded": false,
"name": "IVA",
"percent": "19.00",
"scheme": "01",
"tax_amount": "19000.00",
"taxable_amount": "100000.00"
}
],
"unit_code": "94",
"unit_price": "100000.00"
}
],
"notes": [],
"number": 1,
"payments": [
{
"amount": "60000.00",
"due_date": null,
"form": "1",
"method_code": "10"
},
{
"amount": "59000.00",
"due_date": "2026-12-14",
"form": "2",
"method_code": "1"
}
],
"prefix": "SBX",
"qr": {
"content": "https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1",
"url": "https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1"
},
"reference": "ORDER-1001",
"sent_at": "2026-11-15T01:37:55.748083Z",
"state": "accepted",
"taxes": [
{
"is_excluded": false,
"name": "IVA",
"percent": "19.00",
"scheme": "01",
"tax_amount": "19000.00",
"taxable_amount": "100000.00"
}
],
"totals": {
"allowance_total": "0.00",
"charge_total": "0.00",
"line_extension": "100000.00",
"payable": "119000.00",
"rounding": "0.00",
"tax_exclusive": "100000.00",
"tax_inclusive": "119000.00"
},
"withholdings": []
}{
"code": "unauthorized",
"detail": "Missing or invalid API key.",
"request_id": "3668a7374b1e4314b2f932a5620da1f1",
"status": 401,
"title": "Unauthorized",
"type": "urn:cufea:problem:unauthorized"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}{
"code": "validation_error",
"detail": "The request is not valid; see `errors` for the offending fields.",
"errors": [
{
"loc": [
"body",
"customer"
],
"msg": "Field required"
},
{
"loc": [
"body",
"lines"
],
"msg": "List should have at least 1 item after validation, not 0"
}
],
"request_id": "88272d6eb903438690d3193e3113270a",
"status": 422,
"title": "Request validation failed",
"type": "urn:cufea:problem:validation_error"
}{
"code": "rate_limited",
"detail": "This API key made more than 120 requests in the current window. Retry after 17 seconds.",
"request_id": "5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b",
"status": 429,
"title": "Too Many Requests",
"type": "urn:cufea:problem:rate_limited"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}Get a stored invoice
The stored record of an invoice of this tenant, without its XML.
GET
/
v1
/
invoices
/
{document_id}
Get a stored invoice
curl --request GET \
--url https://api.cufea.com/v1/invoices/{document_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cufea.com/v1/invoices/{document_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/invoices/{document_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"cufe": "0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1",
"customer": {
"id_number": "800197268",
"id_type": "31",
"name": "Acme S.A.S."
},
"delivery": {
"attempts": 1,
"manual": false,
"reason": null,
"recipient": "comprador@example.com",
"status": "sent",
"updated_at": "2026-11-15T01:38:02.104511Z"
},
"dian_errors": [],
"dian_status_code": "00",
"dian_status_description": "Procesado Correctamente.",
"document_id": "SBX1",
"issue_datetime": "2026-11-14T20:37:52.369143-05:00",
"kind": "invoice",
"lines": [
{
"description": "Service",
"discount_amount": "0.00",
"discount_rate": "0.00",
"gross_amount": "100000.00",
"is_excluded": false,
"item_code": null,
"line_id": 1,
"net_amount": "100000.00",
"quantity": "1",
"taxes": [
{
"is_excluded": false,
"name": "IVA",
"percent": "19.00",
"scheme": "01",
"tax_amount": "19000.00",
"taxable_amount": "100000.00"
}
],
"unit_code": "94",
"unit_price": "100000.00"
}
],
"notes": [],
"number": 1,
"payments": [
{
"amount": "60000.00",
"due_date": null,
"form": "1",
"method_code": "10"
},
{
"amount": "59000.00",
"due_date": "2026-12-14",
"form": "2",
"method_code": "1"
}
],
"prefix": "SBX",
"qr": {
"content": "https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1",
"url": "https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1"
},
"reference": "ORDER-1001",
"sent_at": "2026-11-15T01:37:55.748083Z",
"state": "accepted",
"taxes": [
{
"is_excluded": false,
"name": "IVA",
"percent": "19.00",
"scheme": "01",
"tax_amount": "19000.00",
"taxable_amount": "100000.00"
}
],
"totals": {
"allowance_total": "0.00",
"charge_total": "0.00",
"line_extension": "100000.00",
"payable": "119000.00",
"rounding": "0.00",
"tax_exclusive": "100000.00",
"tax_inclusive": "119000.00"
},
"withholdings": []
}{
"code": "unauthorized",
"detail": "Missing or invalid API key.",
"request_id": "3668a7374b1e4314b2f932a5620da1f1",
"status": 401,
"title": "Unauthorized",
"type": "urn:cufea:problem:unauthorized"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}{
"code": "validation_error",
"detail": "The request is not valid; see `errors` for the offending fields.",
"errors": [
{
"loc": [
"body",
"customer"
],
"msg": "Field required"
},
{
"loc": [
"body",
"lines"
],
"msg": "List should have at least 1 item after validation, not 0"
}
],
"request_id": "88272d6eb903438690d3193e3113270a",
"status": 422,
"title": "Request validation failed",
"type": "urn:cufea:problem:validation_error"
}{
"code": "rate_limited",
"detail": "This API key made more than 120 requests in the current window. Retry after 17 seconds.",
"request_id": "5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b",
"status": 429,
"title": "Too Many Requests",
"type": "urn:cufea:problem:rate_limited"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}Autorizaciones
Respuesta
Successful Response
The stored invoice, without its XML.