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
| Nom | Valeur | Description |
|---|---|---|
Content-Type | application/json | Format du payload de la requête. |
Authorization | Bearer <VERIFIK_JWT> | JWT limité au client (authUser.clientId). |
Paramètres
| Nom | Type | Requis | Description |
|---|---|---|---|
id | string | Oui | ObjectId du SmartReport renvoyé par POST /v2/smart-reports/run, POST /v2/smart-reports ou GET /v2/smart-reports. |
Requête
- 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"
Réponse
- 200 OK
- 200 OK (Introuvable / 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"
}
Intégration Webhooks et MCP
- Polling vs Webhooks : Pour les exécutions asynchrones, vous pouvez soit interroger
GET /v2/smart-reports/{id}jusqu'à ce quedata.statusse 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 OKavec{ "data": null }plutôt que404. downloadUrlethtmlUrlsont des chemins API relatifs pouvant être ajoutés àhttps://api.verifik.co(ouhttps://ai.verifik.co).