Recuperar un Smart Report
Recupera un único SmartReport por su ID. La respuesta puebla template, smartBatch y client, y adjunta las rutas listas para usar downloadUrl (/v2/smart-reports/{id}/download) y htmlUrl (/v2/smart-reports/{id}/html).
Este endpoint también es el destino de sondeo (pollUrl) devuelto cuando POST /v2/smart-reports/run se ejecuta en modo "async" o cambia automáticamente a 202 Accepted tras el límite síncrono de 90 segundos. Si el ID del reporte no existe o pertenece a otro cliente, el endpoint devuelve HTTP 200 OK con { "data": null }.
Endpoint
GET https://api.verifik.co/v2/smart-reports/{id}
Este endpoint también es accesible a través del proxy de Smart-Agent en https://ai.verifik.co/v2/smart-reports/{id} usando tu propio encabezado por cliente Authorization: Bearer <VERIFIK_JWT>. La ejecución compartida mediante x402 está bloqueada con 403 Forbidden.
Encabezados
| Nombre | Valor | Descripción |
|---|---|---|
Content-Type | application/json | Formato del payload de la solicitud. |
Authorization | Bearer <VERIFIK_JWT> | JWT con alcance de cliente (authUser.clientId). |
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string | Sí | ObjectId de SmartReport devuelto por POST /v2/smart-reports/run, POST /v2/smart-reports o GET /v2/smart-reports. |
Solicitud
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const id = "6801a2b3c4d5e6f7a8b9c0d1";
const { data } = await axios.get(`https://api.verifik.co/v2/smart-reports/${id}`, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(data);
};
run();
<?php
$id = "6801a2b3c4d5e6f7a8b9c0d1";
$ch = curl_init("https://api.verifik.co/v2/smart-reports/" . $id);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
report_id = "6801a2b3c4d5e6f7a8b9c0d1"
url = f"https://api.verifik.co/v2/smart-reports/{report_id}"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
id := "6801a2b3c4d5e6f7a8b9c0d1"
req, _ := http.NewRequest("GET", "https://api.verifik.co/v2/smart-reports/"+id, nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -X GET "https://api.verifik.co/v2/smart-reports/6801a2b3c4d5e6f7a8b9c0d1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
Respuesta
- 200 OK
- 200 OK (No encontrado / Null)
- 401
- 403
- 409
- 422
{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d1",
"name": "Background Check - Applicant 42",
"status": "generated",
"template": {
"_id": "6801a2b3c4d5e6f7a8b9c0d2"
},
"smartBatch": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3"
},
"client": {
"_id": "507f1f77bcf86cd799439013"
},
"pdfEngine": "puppeteer",
"pdfSize": 148320,
"generationDurationMs": 1840,
"generatedAt": "2026-11-24T20:00:04.000Z",
"externalRefId": "applicant-42",
"rowIndex": 0,
"createdByChannel": "api",
"downloadUrl": "/v2/smart-reports/6801a2b3c4d5e6f7a8b9c0d1/download",
"htmlUrl": "/v2/smart-reports/6801a2b3c4d5e6f7a8b9c0d1/html",
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:00:04.000Z"
}
}
{
"data": null
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "\"id\" must be a valid ObjectId",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
Integración con Webhooks y MCP
- Polling vs Webhooks: Para ejecuciones asíncronas, puedes consultar
GET /v2/smart-reports/{id}hasta quedata.statusllegue a un estado final ("generated","sent"o"failed"), o suscribirte a eventos webhook (smart_batch_report_generated,smart_batch_report_generation_failed,smart_batch_report_sent,smart_batch_report_delivery_failed). Consulta Webhooks de SmartReports. - Equivalente MCP: Los agentes de IA pueden recuperar un registro de reporte mediante la herramienta MCP
smart_report_get. Consulta MCP y Agentes de IA.
Notas
- Los reportes inexistentes o pertenecientes a otro cliente devuelven
200 OKcon{ "data": null }en lugar de404. downloadUrlyhtmlUrlson rutas API relativas que pueden agregarse ahttps://api.verifik.co(ohttps://ai.verifik.co).