Skip to main content

Smart Batch 수정

인증된 클라이언트가 소유한 기존 SmartBatch의 필드를 수정합니다. name, status, executor를 수정하거나 rows를 교체할 수 있습니다. rows를 제공하면 서버는 totalRows, completedRows, failedRows, partialRows를 다시 계산하고 외부 행 스냅샷을 동기화합니다.

배치를 "paused" 상태로 전환하려면 전용 Smart Batch 일시 중지 엔드포인트를 사용하세요. executor 변경은 배치가 현재 "draft", "pending" 또는 "cancelled" 상태일 때만 적용됩니다.

엔드포인트​

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

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

헤더​

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

매개변수​

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

본문​

이름타입필수설명
namestring아니요수정된 배치 표시 이름. 최대 150자.
statusstring아니요허용 값: "draft", "pending", "processing", "completed", "failed" 또는 "cancelled". "paused" 상태로 변경하려면 POST /v2/smart-batches/{id}/pause를 사용하세요.
executorstring아니요허용 값: "queue", "featureRunner" 또는 "browser". 현재 배치 상태가 "draft", "pending" 또는 "cancelled"일 때만 적용됩니다.
rowsobject[]아니요교체할 행 목록. 래핑된 형식에는 rowIndex와 inputData가 필요하며 선택적으로 status, results, errors, processedAt을 허용합니다. 평면 행은 자동으로 정규화됩니다.

알 수 없는 본문 키는 Joi 검증에 의해 409 MissingParameter로 거부됩니다.

요청​

import axios from "axios";

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

const { data } = await axios.put(
`https://api.verifik.co/v2/smart-batches/${batchId}`,
{
name: "Colombia Onboarding — Updated",
executor: "queue",
rows: [
{
rowIndex: 0,
inputData: {
documentType: "CC",
documentNumber: "1032386359",
},
status: "pending",
},
],
},
{
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 — Updated",
"status": "draft",
"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,
"createdAt": "2026-11-24T19:58:00.000Z",
"updatedAt": "2026-11-24T20:06:00.000Z"
}
}

참고​

  • PUT /v2/smart-batches/{id}에서는 "paused"가 허용되지 않습니다. 대신 Smart Batch 일시 중지를 호출하세요.
  • 배치가 현재 "draft", "pending" 또는 "cancelled" 상태가 아니면 executor 수정은 무시됩니다.
  • 기존 행을 교체하지 않고 기존 배치에 새 행을 추가하려면 Smart Batch에 행 추가를 사용하세요.

관련​