Skip to main content

Smart Batch 생성

기존 BatchConfiguration에 연결된 SmartBatch를 생성합니다. 표시용 name과 rows에 최소 하나의 입력 행을 제공하세요. 배치를 생성하면 입력 행이 status: "draft" 상태로 저장되며, 실행이 시작될 때까지 카탈로그 단계를 실행하거나 크레딧을 소비하지 않습니다.

rows의 각 항목은 래핑된 객체({ rowIndex?, inputData }) 또는 평면 객체({ rowIndex?, ...inputFields }) 중 하나를 허용하며, 검증 계층이 이를 { rowIndex, inputData }로 정규화합니다. 생성 시 status, results 또는 errors를 포함하지 마세요.

엔드포인트​

POST https://api.verifik.co/v2/smart-batches

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

헤더​

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

본문​

이름타입필수설명
batchConfigurationstring예워크플로우 단계를 정의하는 BatchConfiguration ObjectId.
namestring예배치 표시 이름. 최대 150자.
executorstring아니요실행 모드: "queue", "featureRunner" 또는 "browser". batchConfiguration에서 파생될 때는 "queue" 또는 "browser"로 정규화됩니다.
sourcestring아니요원본 제품 식별자: "smart_batch"(기본값) 또는 "smart_fleet".
rowsobject[]예최소 1개의 행 배열(min 1). 래핑된 { rowIndex?, inputData } 또는 평면 { rowIndex?, ...inputFields } 형식을 허용합니다. 생성 시 status, results 또는 errors를 전송하지 마세요.

알 수 없는 키와 허용되지 않는 행 속성(status, results, errors)은 Joi 검증에 의해 409 MissingParameter로 거부됩니다.

요청​

import axios from "axios";

const run = async () => {
const { data } = await axios.post(
"https://api.verifik.co/v2/smart-batches",
{
batchConfiguration: "6801a2b3c4d5e6f7a8b9c0d4",
name: "Colombia Onboarding — November",
source: "smart_batch",
rows: [
{
rowIndex: 0,
inputData: {
documentType: "CC",
documentNumber: "1032386359",
},
},
{
documentType: "CC",
documentNumber: "1007463534",
},
],
},
{
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": "draft",
"executor": "browser",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0,
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
},
"status": "pending",
"results": {},
"errors": [],
"creditsSpent": 0,
"attemptCount": 0,
"attempts": []
},
{
"rowIndex": 1,
"inputData": {
"documentType": "CC",
"documentNumber": "1007463534"
},
"status": "pending",
"results": {},
"errors": [],
"creditsSpent": 0,
"attemptCount": 0,
"attempts": []
}
],
"totalRows": 2,
"completedRows": 0,
"failedRows": 0,
"partialRows": 0,
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:00:00.000Z"
}
}

참고​

  • 배치를 생성할 때 rows 내부에 status, results 또는 errors를 절대 전달하지 마세요. 새로 생성된 행은 항상 pending 상태로 시작합니다.
  • executor가 생략되면 batchConfiguration.executor에서 확인되어 "queue" 또는 "browser"로 정규화됩니다.
  • 생성 후에는 Smart Batch 비용 추정을 호출하여 예상 크레딧 요금을 미리 확인하고 Smart Batch 시작으로 처리를 시작하세요.
  • 종속성 검증 및 선택적 즉시 실행을 지원하는 대량 CSV, XLSX 또는 JSONL 가져오기의 경우 파일에서 Smart Batch 생성을 사용하세요.

관련​