Report the DIAN test set status
curl --request GET \
--url https://api.cufea.com/v1/tenant/test-set \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cufea.com/v1/tenant/test-set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/tenant/test-set"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"accepted_at": "2023-11-07T05:31:56Z",
"documents": {
"credit_note": {
"accepted": 123,
"failed": 123,
"pending": 123,
"rejected": 123
},
"debit_note": {
"accepted": 123,
"failed": 123,
"pending": 123,
"rejected": 123
},
"invoice": {
"accepted": 123,
"failed": 123,
"pending": 123,
"rejected": 123
}
},
"last_dian_answer": {
"at": "2023-11-07T05:31:56Z",
"document_id": "<string>",
"errors": [
{
"rule": "<string>",
"severity": "<string>",
"text": "<string>"
}
],
"kind": "invoice",
"status_code": "<string>",
"status_description": "<string>"
},
"status": "not_configured",
"test_set_id": "<string>"
}{
"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": "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>"
}
}Report the DIAN test set status
Where the habilitación test set stands: the current TestSetId, a derived status, the test-stage documents per kind by their latest DIAN outcome, and the latest DIAN answer. The DIAN decides how many documents a set needs; Cufea does not know it and reports no required counts. There is no rejected status: a failed set stays in_progress with rejected documents. Read by a test or production key.
GET
/
v1
/
tenant
/
test-set
Report the DIAN test set status
curl --request GET \
--url https://api.cufea.com/v1/tenant/test-set \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cufea.com/v1/tenant/test-set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/tenant/test-set"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"accepted_at": "2023-11-07T05:31:56Z",
"documents": {
"credit_note": {
"accepted": 123,
"failed": 123,
"pending": 123,
"rejected": 123
},
"debit_note": {
"accepted": 123,
"failed": 123,
"pending": 123,
"rejected": 123
},
"invoice": {
"accepted": 123,
"failed": 123,
"pending": 123,
"rejected": 123
}
},
"last_dian_answer": {
"at": "2023-11-07T05:31:56Z",
"document_id": "<string>",
"errors": [
{
"rule": "<string>",
"severity": "<string>",
"text": "<string>"
}
],
"kind": "invoice",
"status_code": "<string>",
"status_description": "<string>"
},
"status": "not_configured",
"test_set_id": "<string>"
}{
"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": "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>"
}
}Authorizations
Response
Successful Response
Where the DIAN habilitación test set stands. Derived from stored data.
not_configured: no issuer or TestSetId; not_started: no test-stage document; in_progress: documents sent, the set not accepted yet (a failed set stays here: see the counts and last_dian_answer); accepted: the DIAN accepted the current TestSetId.
Available options:
not_configured, not_started, in_progress, accepted