Récupérer le rapport d'une ligne de Smart Batch
Composez le modèle de rapport structuré pour une seule ligne (rowIndex) d'un SmartBatch. Ce point de terminaison exécute le compositeur de rapport intégré de Verifik (colombia_vehicle) sur les sorties d'étapes enregistrées de la ligne et joint facultativement un verificationScore lorsque score ou scoreProfile est transmis.
Si la BatchConfiguration du lot ne correspond pas à un compositeur intégré, ce point de terminaison renvoie 409 Conflict (no_report_composer_for_configuration). Pour des modèles de rapport personnalisés quelconques, utilisez plutôt POST /v2/smart-reports/run, GET /v2/smart-reports/{id}/html ou /generate. La lecture de ce point de terminaison ne consomme pas de crédits.
Point de terminaison
GET https://api.verifik.co/v2/smart-batches/{id}/rows/{rowIndex}/report
Ce point de terminaison est également accessible via le proxy Smart-Agent à l'adresse https://ai.verifik.co/v2/smart-batches/{id}/rows/{rowIndex}/report avec votre propre en-tête 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 de la charge utile de la requête. |
Authorization | Bearer <VERIFIK_JWT> | JWT lié au client (authUser.clientId). |
Paramètres de chemin
| Nom | Type | Requis | Description |
|---|---|---|---|
id | string | Oui | ObjectId SmartBatch. |
rowIndex | number | Oui | Index basé sur 0 de la ligne dans le lot. |
Paramètres de requête
| Nom | Type | Requis | Description |
|---|---|---|---|
score | boolean ou string | Non | Passez true ou "1" pour calculer et inclure verificationScore dans la réponse. |
scoreProfile | string | Non | Identifiant du profil de notation. Fournir scoreProfile active également score. |
Requête
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";
const rowIndex = 0;
const { data } = await axios.get(
`https://api.verifik.co/v2/smart-batches/${batchId}/rows/${rowIndex}/report`,
{
params: {
score: true,
scoreProfile: "fleet_standard",
},
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);
console.log(data);
};
run();
<?php
$batchId = "6801a2b3c4d5e6f7a8b9c0d3";
$rowIndex = 0;
$query = http_build_query([
"score" => "true",
"scoreProfile" => "fleet_standard",
]);
$ch = curl_init("https://api.verifik.co/v2/smart-batches/" . $batchId . "/rows/" . $rowIndex . "/report?" . $query);
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
batch_id = "6801a2b3c4d5e6f7a8b9c0d3"
row_index = 0
url = f"https://api.verifik.co/v2/smart-batches/{batch_id}/rows/{row_index}/report"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
params = {
"score": "true",
"scoreProfile": "fleet_standard",
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
)
func main() {
batchID := "6801a2b3c4d5e6f7a8b9c0d3"
rowIndex := "0"
params := url.Values{}
params.Set("score", "true")
params.Set("scoreProfile", "fleet_standard")
endpoint := fmt.Sprintf("https://api.verifik.co/v2/smart-batches/%s/rows/%s/report?%s", batchID, rowIndex, params.Encode())
req, _ := http.NewRequest("GET", endpoint, 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-batches/6801a2b3c4d5e6f7a8b9c0d3/rows/0/report?score=true&scoreProfile=fleet_standard" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
Réponse
- 200 OK
- 401
- 403
- 404 (Lot)
- 404 (Ligne)
- 409 (Aucun compositeur)
- 409 (MissingParameter)
- 422
{
"data": {
"reportType": "colombia_vehicle",
"meta": {
"plate": "ABC123",
"documentType": "CC",
"documentNumber": "1032386359",
"vin": "9FB4SRAC2NM123456",
"batchName": "Colombia Fleet Inspection",
"rowIndex": 0,
"generatedAt": "2026-11-24T20:30:00.000Z"
},
"summary": {
"soatVigente": "VIGENTE",
"soatVencimiento": "2027-03-15",
"rtmVigente": "SI",
"rtmVencimiento": "2027-04-01",
"tieneGravamenes": "NO",
"blindado": "NO",
"pazSalvo": "SI",
"comparendoCount": 0,
"sinisterCount": 0
},
"blocks": {
"runt_vehicle_by_plate": {
"featureCode": "colombia_api_vehicle_complete_by_plate",
"title": "RUNT — Vehículo",
"status": "ok",
"sequence": 1,
"sections": [
{
"id": "identity",
"title": "Identificación",
"priority": "high"
}
],
"displayRows": [],
"tables": []
}
},
"blockOrder": [
"runt_vehicle_by_plate"
],
"verificationScore": {
"version": 1,
"profile": "fleet_standard",
"profileLabel": "Fleet Standard",
"score": 0.96,
"score100": 96,
"decision": "approve",
"band": "low_risk",
"coverage": 1,
"coveragePercent": 100
}
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "batch_not_found",
"code": "NotFound"
}
{
"message": "batch_row_not_found",
"code": "NotFound"
}
{
"message": "no_report_composer_for_configuration",
"code": "Conflict"
}
{
"message": "\"rowIndex\" must be a number",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
Notes
- Ce point de terminaison sert uniquement les rapports de ligne composés intégrés (
colombia_vehicle). Toute autre configuration renvoie409 Conflict(no_report_composer_for_configuration). - Pour les modèles personnalisés, le rendu HTML thématisé ou les dossiers PDF sur n'importe quelle configuration, utilisez
POST /v2/smart-reports/run,GET /v2/smart-reports/{id}/htmlou/generate(voir Exécuter un Smart Report). verificationScoreest omis sauf siscore=true,score=1ouscoreProfileest fourni.