Skip to main content

Récupérer un Smart Report

Récupérez un SmartReport unique à partir de son ID. La réponse peuple template, smartBatch et client, et attache les chemins prêts à l'emploi downloadUrl (/v2/smart-reports/{id}/download) et htmlUrl (/v2/smart-reports/{id}/html).

Ce point de terminaison sert également de cible de polling (pollUrl) renvoyée lorsque POST /v2/smart-reports/run s'exécute en mode "async" ou bascule sur 202 Accepted après le délai synchrone de 90 secondes. Si l'ID du rapport n'existe pas ou appartient à un autre client, le point de terminaison renvoie HTTP 200 OK avec { "data": null }.

Point de terminaison​

GET https://api.verifik.co/v2/smart-reports/{id}

Ce point de terminaison est également accessible via le proxy Smart-Agent à l'adresse https://ai.verifik.co/v2/smart-reports/{id} en utilisant votre propre en-tête par client Authorization: Bearer <VERIFIK_JWT>. L'exécution partagée x402 est bloquée avec 403 Forbidden.

En-têtes​

NomValeurDescription
Content-Typeapplication/jsonFormat du payload de la requête.
AuthorizationBearer <VERIFIK_JWT>JWT limité au client (authUser.clientId).

Paramètres​

NomTypeRequisDescription
idstringOuiObjectId du SmartReport renvoyé par POST /v2/smart-reports/run, POST /v2/smart-reports ou GET /v2/smart-reports.

Requête​

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();

Réponse​

{
"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"
}
}

Intégration Webhooks et MCP​

  • Polling vs Webhooks : Pour les exécutions asynchrones, vous pouvez soit interroger GET /v2/smart-reports/{id} jusqu'à ce que data.status se stabilise ("generated", "sent" ou "failed"), soit vous abonner aux événements webhook (smart_batch_report_generated, smart_batch_report_generation_failed, smart_batch_report_sent, smart_batch_report_delivery_failed). Consultez Webhooks SmartReports.
  • Équivalent MCP : Les agents IA peuvent récupérer un enregistrement de rapport à l'aide de l'outil MCP smart_report_get. Consultez MCP et Agents IA.

Notes​

  • Les rapports manquants ou appartenant à un autre client renvoient 200 OK avec { "data": null } plutôt que 404.
  • downloadUrl et htmlUrl sont des chemins API relatifs pouvant être ajoutés à https://api.verifik.co (ou https://ai.verifik.co).

Voir aussi​