Skip to main content

Smart Batch 시작

기존 SmartBatch의 실행을 시작합니다. 배치는 현재 "draft", "pending" 또는 "cancelled" 상태여야 하며, 그 외의 상태에서는 400 BadRequest (batch_not_in_startable_state)로 실패합니다.

시작하기 전에 서버는 연결된 BatchConfiguration의 모든 활성화된 단계가 클라이언트 계정에 부여되어 있는지 검증하고(누락된 기능이 있으면 409 endpoints_not_in_account), status: "processing" 및 startedAt을 설정한 뒤 업데이트된 SmartBatch를 반환합니다.

엔드포인트​

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

클라이언트별 Authorization: Bearer <VERIFIK_JWT>를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/smart-batches/{id}/start)를 통해서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.

헤더​

이름값설명
Content-Typeapplication/json요청 페이로드 형식.
AuthorizationBearer <VERIFIK_JWT>클라이언트 범위 JWT (authUser.clientId).

매개변수​

이름타입필수설명
idstring예시작할 SmartBatch ObjectId.

요청​

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

응답​

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

참고​

  • "draft", "pending" 또는 "cancelled" 상태의 배치만 시작할 수 있습니다. 일시 중지된 배치는 Smart Batch 재개를 사용해야 합니다.
  • "cancelled" 배치를 다시 시작하면 completedAt이 지워지고 "processing" 상태였던 행이 "pending"으로 재설정됩니다.
  • Smart Batch 비용 추정을 사용하여 예상 크레딧 요금을 미리 확인하고 Smart Batch 진행률 조회로 실행을 모니터링하세요.

관련​