Skip to main content

배치 구성 수정

클라이언트 계정이 소유한 기존 BatchConfiguration을 수정합니다. 변경하려는 필드만 전송하세요. 생략된 필드는 현재 값을 유지합니다.

steps가 제공되면 서버는 누락된 sequence 값을 index + 1로 정규화하고 retryDelayBaseSeconds(>= 1)와 timeoutSeconds(>= 5)의 범위를 제한합니다. notification을 수정하면 연결된 Verifik Webhook이 자동으로 동기화되며, executor를 변경하면 종료 상태가 아닌 하위 배치에 새 실행기가 전파됩니다. 구성을 수정해도 조회가 실행되지 않으며 크레딧이 소비되지 않습니다.

엔드포인트​

PUT https://api.verifik.co/v2/batch-configurations/{id}

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

헤더​

이름값
Content-Typeapplication/json
AuthorizationBearer <VERIFIK_JWT>

토큰은 클라이언트 JWT여야 합니다. 자격 증명이 누락되었거나 유효하지 않으면 401 Unauthorized가 반환됩니다.

매개변수​

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

본문​

모든 본문 필드는 선택 사항입니다. 수정하려는 속성만 포함하세요.

이름타입필수설명
namestring아니요구성의 표시 이름. 앞뒤 공백이 제거되며 최대 150자입니다.
descriptionstring아니요워크플로우에 대한 선택적 요약. 최대 800자.
countrystring아니요국가 범위. 서버에서 공백을 제거하고 대문자로 변환합니다.
stepsobject[]아니요순서가 지정된 단계 배열을 대체합니다. 누락된 sequence는 기본값 index + 1이 되며 retryDelayBaseSeconds는 >= 1로, timeoutSeconds는 >= 5로 제한됩니다.
inputFormatstring아니요기본 입력 형식: csv, jsonl 또는 xlsx.
outputFormatstring아니요기본 출력 형식: csv, jsonl 또는 xlsx.
mergeStrategystring아니요단계 실행 전략: sequential, parallel-independent 또는 parallel-with-fallback.
notificationobject아니요완료 알림 설정(webhookUrl 및 emailOnCompletion). webhookUrl이 설정되면 활성 Verifik Webhook이 자동으로 동기화됩니다.
scheduleExpressionstring아니요자동 실행을 위한 스케줄 표현식.
preferredReportTemplatestring아니요이 구성에 연결된 SmartReportTemplate ObjectId.
visitaFlowobject아니요단계 체이닝을 정의하는 시각적 노드 그래프({{results.N.field}} 표현식은 파생된 입력 스키마의 수동 입력에서 제외됨).
isActiveboolean아니요구성의 활성 여부.
executorstring아니요실행 대상: queue, featureRunner 또는 browser(featureRunner는 browser로 저장됨). 변경 시 종료 상태가 아닌 하위 배치를 동기화합니다.

요청​

const fetch = require("node-fetch");

async function run() {
const id = "67d1b4a0e4f5a60718293b12";
const res = await fetch(`https://api.verifik.co/v2/batch-configurations/${id}`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
body: JSON.stringify({
name: "Colombia KYC Workflow (Updated)",
mergeStrategy: "parallel-independent",
notification: {
webhookUrl: "https://example.com/webhooks/smart-reports",
emailOnCompletion: ["compliance@example.com"]
},
isActive: true
}),
});
console.log(await res.json());
}

run();

응답​

{
"data": {
"_id": "67d1b4a0e4f5a60718293b12",
"name": "Colombia KYC Workflow (Updated)",
"description": "Core Colombian identity and registry verification for citizens.",
"country": "CO",
"executor": "browser",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "parallel-independent",
"preferredReportTemplate": "67d1b4a1e4f5a60718293b15",
"notification": {
"webhookUrl": "https://example.com/webhooks/smart-reports",
"emailOnCompletion": ["compliance@example.com"]
},
"isActive": true,
"steps": [
{
"_id": "67d1b4a0e4f5a60718293b13",
"appFeature": {
"_id": "65f0a1b2c3d4e5f607182901",
"name": "Colombian Cédula Validation",
"code": "co-cedula",
"url": "/v2/co/cedula",
"method": "GET",
"price": 0.05,
"smartCheckPrice": 0.05,
"country": "Colombia"
},
"sequence": 1,
"enabled": true,
"parameterDefaults": {},
"queryMode": "byDocument",
"inputFieldMapping": {},
"outputFieldsToKeep": [],
"maxRetries": 3,
"retryDelayBaseSeconds": 4,
"timeoutSeconds": 30
}
],
"createdAt": "2026-10-15T14:20:00.000Z",
"updatedAt": "2026-10-15T15:45:00.000Z"
}
}

참고​

  • steps를 전송하면 구성의 전체 steps 배열이 교체됩니다. 개별 단계를 부분 수정(patch)하지는 않습니다.
  • steps 내부에서 누락된 sequence 값은 index + 1로 정규화되며 retryDelayBaseSeconds는 >= 1로, timeoutSeconds는 >= 5로 제한됩니다.
  • executor를 변경하면 이 구성에 속한 종료 상태가 아닌 하위 배치가 동기화됩니다.
  • 누락되었거나 다른 클라이언트의 ID는 404 (not_found)를 반환하며, Mongoose 스키마 검증 오류는 422 (UnprocessableEntity)를 반환합니다.

관련​