// RADIAN
Consultar evento
Trae un evento RADIAN por su ID con el estado ante la DIAN, su CUDE, la factura a la que se refiere y los datos que enviaste.
GET
/api/v1/radian-events/{id}En esta página
Con el radian_event_id del 202, consulta hasta que final sea true. Los estados son los de la factura: PENDING, ACCEPTED o REJECTED.
Headers
| Header | Obligatorio | Valor |
|---|---|---|
nestfac-api-key |
Sí | Tu API key. Ver Autenticación. |
Parámetros de ruta
Path
- idstring (uuid)obligatorio
- El
radian_event_iddel evento.
Ejemplo
curl "https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308" \
-H "nestfac-api-key: $NESTFAC_API_KEY"// Node.js 18+ (fetch nativo). Corre en TU servidor: la API key nunca va al navegador.
const res = await fetch("https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308", {
headers: {
"nestfac-api-key": process.env.NESTFAC_API_KEY,
},
});
const json = await res.json();
if (!res.ok) throw new Error(`${json.code ?? res.status}: ${json.message ?? JSON.stringify(json.errors)}`);
console.log(json.data);import os
import requests
res = requests.get(
"https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308",
headers={
"nestfac-api-key": os.environ["NESTFAC_API_KEY"],
},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data.get('code', res.status_code)}: {data.get('message') or data.get('errors')}")
print(data["data"])<?php
$ch = curl_init('https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'nestfac-api-key: ' . getenv('NESTFAC_API_KEY'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) {
throw new RuntimeException(($response['code'] ?? $status) . ': ' . ($response['message'] ?? json_encode($response['errors'] ?? null)));
}
print_r($response['data']);// .NET 7+
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308");
request.Headers.Add("nestfac-api-key", Environment.GetEnvironmentVariable("NESTFAC_API_KEY"));
var response = await http.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode) throw new Exception($"{(int)response.StatusCode}: {result}");
Console.WriteLine(result);// Java 15+ (java.net.http)
import java.net.URI;
import java.net.http.*;
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308"))
.header("nestfac-api-key", System.getenv("NESTFAC_API_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 400) throw new RuntimeException(response.body());
System.out.println(response.body());package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308", nil)
req.Header.Set("nestfac-api-key", os.Getenv("NESTFAC_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}// La API key NUNCA va en el navegador. React llama a TU backend,
// y tu backend llama a NestFac con la key (pestaña Node.js).
import { useEffect, useState } from "react";
export function useNestfac(path = "/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308") {
const [data, setData] = useState(null);
const [error, setError] = useState(null);
useEffect(() => {
const ctrl = new AbortController();
fetch(`/api/nestfac${path}`, { signal: ctrl.signal })
.then(async (res) => {
const json = await res.json();
if (!res.ok) throw new Error(json.message ?? json.code);
setData(json.data);
})
.catch((e) => e.name !== "AbortError" && setError(e));
return () => ctrl.abort();
}, [path]);
return { data, error, loading: !data && !error };
}200 OK
{
"success": true,
"data": {
"id": "eaf5c00e-be58-4e2f-bef5-78e598ad7308",
"billing_account_id": "3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71",
"number": "EVRP20",
"event_code": "030",
"event_name": "Acuse de recibo de Factura Electrónica de Venta",
"issuer_role": "RECEPTOR",
"status": "ACCEPTED",
"final": true,
"dian": {
"status": "ACCEPTED",
"cude": "a3d8e8a6094495ff3c69895f6dac273eb8bf9c0b5214e5f9f1ad484aeb69330198dee68d002a54cfbc47aac7de5c8298",
"qr": null,
"track_id": "a3d8e8a6094495ff3c69895f6dac273eb8bf9c0b5214e5f9f1ad484aeb69330198dee68d002a54cfbc47aac7de5c8298",
"accepted_at": "2026-10-23T13:57:53.390Z",
"errors": []
},
"document": {
"received_invoice_id": "e3841f4c-1be8-4e14-9e47-ccd82f7a0226",
"invoice_id": null,
"number": "FEV8812",
"cufe": "271b025d54c4b974c294fb5c62a65fd6be888e4865e0d61969b145867351d9f926e46c42fb85e1ae103771a28d8a8477",
"type_code": "01",
"issue_date": "2026-10-22"
},
"sender": { "document_number": "900123456", "name": "Mi Empresa S.A.S." },
"receiver": { "document_number": "901555111", "name": "Distribuidora del Huila S.A.S." },
"received_by": {
"document_type_code": "13",
"document_identification_number": "1075234567",
"first_name": "Laura",
"family_name": "Perdomo",
"job_title": "Auxiliar contable",
"organization_department": "Contabilidad"
},
"claim_concept": null,
"note": null,
"issue_date": "2026-10-23T13:57:52.277Z",
"files": {
"xml": { "available": true, "url": "/api/v1/radian-events/eaf5c00e-…/files/xml" },
"application-response": { "available": false, "url": "/api/v1/radian-events/eaf5c00e-…/files/application-response" },
"zip": { "available": true, "url": "/api/v1/radian-events/eaf5c00e-…/files/zip" }
},
"created_at": "2026-10-23T13:57:52.288Z",
"updated_at": "2026-10-23T13:57:53.391Z"
}
}Campos de la respuesta
data
- numberstring
- Número del evento (
EVRP20). Cada evento consume un folio. - event_codestring
030,031,032,033o034.- event_namestring
- Nombre oficial del evento.
- issuer_rolestring
Si lo emitiste como comprador (
RECEPTOR) o como vendedor (EMISOR, en la034).RECEPTOREMISOR- dianobject
status,cude(código único del evento),track_id,accepted_atyerrors.- documentobject
La factura del evento:
received_invoice_id(si es una factura recibida) oinvoice_id(si es una tuya),number,cufe,type_codeeissue_date.- senderobject
- Quién emite el evento (
document_number,name). - receiverobject
- A quién va dirigido.
- received_byobject | null
- La persona que recibió, en
030y032. - claim_conceptstring | null
- Motivo, en
031. - filesobject
xml,application-responseyzip. Los eventos no tienen PDF.
// Revisado contra la API el 24 de octubre de 2026.