curl --request GET \
--url https://api.cufea.com/v1/invoices/{invoice_id}/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cufea.com/v1/invoices/{invoice_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/invoices/{invoice_id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"accepted": [
"030"
],
"events": [
{
"code": "030",
"event_id": "<string>",
"registered": true,
"state": "scheduled",
"dian_errors": [
{
"rule": "<string>",
"severity": "<string>",
"text": "<string>"
}
],
"dian_status_code": "<string>",
"not_before": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z"
}
],
"invoice_id": "<string>",
"next_allowed": [
"030"
],
"notes_blocked": "030"
}{
"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": "<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 the RADIAN event chain of an invoice
The invoice’s events, oldest first, with their state; the codes the DIAN accepted; whether an accepted 033/034 blocks notes; and the codes the local chain and timing rules allow today. registered mirrors a recorded GetStatusEvent answer.
curl --request GET \
--url https://api.cufea.com/v1/invoices/{invoice_id}/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cufea.com/v1/invoices/{invoice_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/invoices/{invoice_id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"accepted": [
"030"
],
"events": [
{
"code": "030",
"event_id": "<string>",
"registered": true,
"state": "scheduled",
"dian_errors": [
{
"rule": "<string>",
"severity": "<string>",
"text": "<string>"
}
],
"dian_status_code": "<string>",
"not_before": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z"
}
],
"invoice_id": "<string>",
"next_allowed": [
"030"
],
"notes_blocked": "030"
}{
"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": "<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 RADIAN event chain of an invoice, derived from its history.
Codes the DIAN accepted, oldest first.
RADIAN events of a sales invoice (TB/13.3.1 Eventos de un Documento Electrónico).
The description of each code is the literal AAH04 requires in
DocumentResponse/Response/cbc:Description (anexo19.txt:15426, 15566, 15748, 15827;
032 at 31565-31567).
030, 031, 032, 033, 034 Codes that may be sent today under the chain and timing rules, in code order.
RADIAN events of a sales invoice (TB/13.3.1 Eventos de un Documento Electrónico).
The description of each code is the literal AAH04 requires in
DocumentResponse/Response/cbc:Description (anexo19.txt:15426, 15566, 15748, 15827;
032 at 31565-31567).
030, 031, 032, 033, 034