// RADIAN
Reintentar evento
Vuelve a enviar a la DIAN un evento que quedó REJECTED o FAILED.
POST
/api/v1/radian-events/{id}/retryEn esta página
Si un evento falló por un error transitorio (la DIAN no respondió, un corte de red) o fue rechazado y ya corregiste la causa, reintenta el mismo evento en lugar de crear uno nuevo.
Headers
| Header | Obligatorio | Valor |
|---|---|---|
nestfac-api-key |
Sí | Tu API key. Ver Autenticación. |
Parámetros
Path
- idstring (uuid)obligatorio
- El
radian_event_iddel evento.
Query
- billing_account_idstring (uuid)obligatorio con una key global
- La cuenta del evento.
Ejemplo
curl -X POST "https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71" \
-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/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71", {
method: "POST",
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.post(
"https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71",
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/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
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.Post, "https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71");
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/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71"))
.header("nestfac-api-key", System.getenv("NESTFAC_API_KEY"))
.method("POST", 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("POST", "https://api-sandbox.nestfac.co/api/v1/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71", 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,
// que agrega la key y la llave de idempotencia (pestaña Node.js).
async function enviar(datos) {
const res = await fetch("/api/nestfac/radian-events/eaf5c00e-be58-4e2f-bef5-78e598ad7308/retry?billing_account_id=3f6c2a9e-5b1d-4c7e-9a2f-8d1e0b4c6a71", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(datos),
});
const json = await res.json();
if (!res.ok) throw new Error(json.message ?? json.code);
return json.data;
}
// const resultado = await enviar(datosDeLaVenta);Solo se reintentan eventos REJECTED o FAILED. Sobre uno aceptado, la API responde 409:
409 Conflict
{
"success": false,
"message": "El evento está en ACCEPTED: no requiere reintento"
}// Revisado contra la API el 24 de octubre de 2026.