Skip to main content

Démarrer un Smart Batch

Démarrez l'exécution d'un SmartBatch existant. Le lot doit actuellement être au statut "draft", "pending" ou "cancelled" ; tout autre statut échoue avec 400 BadRequest (batch_not_in_startable_state).

Avant de démarrer, le serveur vérifie que chaque étape activée de la BatchConfiguration liée est bien autorisée sur votre compte client (409 endpoints_not_in_account si une fonctionnalité est manquante), définit status: "processing" et startedAt, puis renvoie le SmartBatch mis à jour.

Point de terminaison​

POST https://api.verifik.co/v2/smart-batches/{id}/start

Ce point de terminaison est également accessible via le proxy Smart-Agent à l'adresse https://ai.verifik.co/v2/smart-batches/{id}/start 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​

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

Paramètres​

NomTypeRequisDescription
idstringOuiObjectId SmartBatch à démarrer.

Requête​

import axios from "axios";

const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";

const { data } = await axios.post(
`https://api.verifik.co/v2/smart-batches/${batchId}/start`,
{},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);

console.log(data);
};

run();

Réponse​

{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Onboarding — November",
"status": "processing",
"executor": "queue",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0,
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
},
"status": "pending",
"results": {},
"errors": []
}
],
"totalRows": 1,
"completedRows": 0,
"failedRows": 0,
"partialRows": 0,
"startedAt": "2026-11-24T20:10:00.000Z",
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:10:00.000Z"
}
}

Notes​

Voir aussi​