배치 구성 생성
인증된 클라이언트 계정에 사용자 지정 BatchConfiguration을 생성합니다. 대상 country, 카탈로그 AppFeature ID를 참조하는 순서가 지정된 검증 steps, 선택적 입출력 형식, 재시도 매개변수, visitaFlow 시각적 그래프 및 완료 알림을 정의합니다.
구성을 생성해도 검사가 실행되지 않으며 크레딧이 소비되지 않습니다. 이 엔드포인트는 201이 아닌 HTTP 200과 함께 data에 저장된 구성을 반환합니다. 스키마 검증은 Mongoose에서 직접 처리하므로 유효하지 않거나 누락된 필드는 422 UnprocessableEntity를 반환합니다.
엔드포인트
POST https://api.verifik.co/v2/batch-configurations
클라이언트별 Authorization: Bearer <VERIFIK_JWT> 헤더를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/batch-configurations)에서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.
헤더
| 이름 | 값 |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <VERIFIK_JWT> |
토큰은 클라이언트 JWT여야 합니다. 자격 증명이 누락되었거나 유효하지 않으면 401 Unauthorized가 반환됩니다.
본문
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
name | string | 예 | 구성의 표시 이름. 앞뒤 공백이 제거되며 최대 150자입니다. |
country | string | 예 | 구성의 국가 범위. 서버에서 공백을 제거하고 대문자로 변환합니다(예: CO). |
steps | object[] | 예 | 순서가 지정된 검증 단계 객체 배열(아래 steps[] 필드 참조). |
description | string | 아니요 | 워크플로우에 대한 선택적 요약. 최대 800자. |
executor | string | 아니요 | 실행 대상: queue, featureRunner 또는 browser. 기본값은 featureRunner입니다(browser로 저장되지만 헤드리스 실행기는 FeatureRunner를 통해 실행). |
inputFormat | string | 아니요 | 기본 입력 형식: csv, jsonl 또는 xlsx. 기본값은 csv입니다. |
outputFormat | string | 아니요 | 기본 출력 형식: csv, jsonl 또는 xlsx. 기본값은 csv입니다. |
mergeStrategy | string | 아니요 | 단계 실행 전략: sequential, parallel-independent 또는 parallel-with-fallback. 기본값은 sequential입니다. |
notification | object | 아니요 | 완료 알림 설정(webhookUrl 및 emailOnCompletion). 아래 notification 필드를 참조하세요. |
scheduleExpression | string | 아니요 | 자동 실행을 위한 선택적 스케줄 표현식. |
preferredReportTemplate | string | 아니요 | 이 구성에 따른 배치의 기본 보고서 템플릿으로 연결된 SmartReportTemplate ObjectId. |
visitaFlow | object | 아니요 | 단계 체이닝을 정의하는 시각적 노드 그래프. 모든 {{results.N.field}} 자리 표시자는 파생된 입력 스키마의 수동 입력에서 제외됩니다. |
isActive | boolean | 아니요 | 구성의 활성 여부. 기본값은 true입니다. |
steps[] 객체 필드
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
appFeature | string | 예 | 이 단계에서 실행할 AppFeature ObjectId. |
sequence | number | 예 | 1부터 시작하는 단계 실행 순서(>= 1). |
enabled | boolean | 아니요 | 배치 실행 중 이 단계의 실행 여부. 기본값은 true입니다. |
parameterDefaults | object | 아니요 | 이 단계에 고정된 정적 매개변수 값 또는 {{results.N.field}} 표현식. 기본값은 {}입니다. |
queryMode | string | 아니요 | 기능이 여러 조회 모드를 지원하는 경우 선택적 종속성 그룹 선택기. |
inputFieldMapping | object | 아니요 | 입력 열 이름을 API 매개변수 이름에 매핑합니다(inputColumn -> apiParam). 기본값은 {}입니다. |
outputFieldsToKeep | string[] | 아니요 | 테이블 형식 결과에 유지할 출력 필드의 하위 집합. 기본값은 []입니다. |
maxRetries | number | 아니요 | 일시적인 단계 실패 시 최대 재시도 횟수(>= 0). 기본값은 3입니다. |
retryDelayBaseSeconds | number | 아니요 | 기본 백오프 지연 시간(초, >= 1). 기본값은 4입니다. |
timeoutSeconds | number | 아니요 | 단계 실행 시간 제한(초, >= 5). 기본값은 30입니다. |
notification 객체 필드
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
webhookUrl | string | 아니요 | 배치 완료 시 알림을 보낼 HTTPS 엔드포인트. webhookUrl을 제공하면 클라이언트의 활성 Verifik Webhook이 자동으로 동기화됩니다. |
emailOnCompletion | string[] | 아니요 | 배치가 완료될 때 알림을 받을 수신자 이메일 주소 목록. |
요청
- Node.js
- PHP
- Python
- Go
- cURL
const fetch = require("node-fetch");
async function run() {
const res = await fetch("https://api.verifik.co/v2/batch-configurations", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
body: JSON.stringify({
name: "Colombia KYC Workflow",
description: "Validate citizen ID and run background checks",
country: "CO",
inputFormat: "csv",
outputFormat: "csv",
mergeStrategy: "sequential",
steps: [
{
appFeature: "65f0a1b2c3d4e5f607182901",
sequence: 1,
enabled: true,
parameterDefaults: {
documentType: "CC"
},
maxRetries: 3,
retryDelayBaseSeconds: 4,
timeoutSeconds: 30
}
],
notification: {
webhookUrl: "https://example.com/webhooks/smart-reports",
emailOnCompletion: ["ops@example.com"]
}
}),
});
console.log(await res.json());
}
run();
<?php
$ch = curl_init("https://api.verifik.co/v2/batch-configurations");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT")
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"name" => "Colombia KYC Workflow",
"description" => "Validate citizen ID and run background checks",
"country" => "CO",
"inputFormat" => "csv",
"outputFormat" => "csv",
"mergeStrategy" => "sequential",
"steps" => [
[
"appFeature" => "65f0a1b2c3d4e5f607182901",
"sequence" => 1,
"enabled" => true,
"parameterDefaults" => [
"documentType" => "CC"
],
"maxRetries" => 3,
"retryDelayBaseSeconds" => 4,
"timeoutSeconds" => 30
]
],
"notification" => [
"webhookUrl" => "https://example.com/webhooks/smart-reports",
"emailOnCompletion" => ["ops@example.com"]
]
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
url = "https://api.verifik.co/v2/batch-configurations"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
payload = {
"name": "Colombia KYC Workflow",
"description": "Validate citizen ID and run background checks",
"country": "CO",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "sequential",
"steps": [
{
"appFeature": "65f0a1b2c3d4e5f607182901",
"sequence": 1,
"enabled": True,
"parameterDefaults": {"documentType": "CC"},
"maxRetries": 3,
"retryDelayBaseSeconds": 4,
"timeoutSeconds": 30,
}
],
"notification": {
"webhookUrl": "https://example.com/webhooks/smart-reports",
"emailOnCompletion": ["ops@example.com"],
},
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
payload := map[string]interface{}{
"name": "Colombia KYC Workflow",
"description": "Validate citizen ID and run background checks",
"country": "CO",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "sequential",
"steps": []map[string]interface{}{
{
"appFeature": "65f0a1b2c3d4e5f607182901",
"sequence": 1,
"enabled": true,
"parameterDefaults": map[string]string{"documentType": "CC"},
"maxRetries": 3,
"retryDelayBaseSeconds": 4,
"timeoutSeconds": 30,
},
},
"notification": map[string]interface{}{
"webhookUrl": "https://example.com/webhooks/smart-reports",
"emailOnCompletion": []string{"ops@example.com"},
},
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/batch-configurations", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -sS -X POST "https://api.verifik.co/v2/batch-configurations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT" \
-d '{
"name": "Colombia KYC Workflow",
"description": "Validate citizen ID and run background checks",
"country": "CO",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "sequential",
"steps": [
{
"appFeature": "65f0a1b2c3d4e5f607182901",
"sequence": 1,
"enabled": true,
"parameterDefaults": {
"documentType": "CC"
},
"maxRetries": 3,
"retryDelayBaseSeconds": 4,
"timeoutSeconds": 30
}
],
"notification": {
"webhookUrl": "https://example.com/webhooks/smart-reports",
"emailOnCompletion": ["ops@example.com"]
}
}'
응답
- 200
- 401
- 403
- 422
{
"data": {
"_id": "67d1c100e4f5a60718293c01",
"name": "Colombia KYC Workflow",
"description": "Validate citizen ID and run background checks",
"country": "CO",
"executor": "browser",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "sequential",
"steps": [
{
"_id": "67d1c100e4f5a60718293c02",
"appFeature": "65f0a1b2c3d4e5f607182901",
"sequence": 1,
"enabled": true,
"parameterDefaults": {
"documentType": "CC"
},
"inputFieldMapping": {},
"outputFieldsToKeep": [],
"maxRetries": 3,
"retryDelayBaseSeconds": 4,
"timeoutSeconds": 30
}
],
"notification": {
"webhookUrl": "https://example.com/webhooks/smart-reports",
"emailOnCompletion": ["ops@example.com"]
},
"isActive": true,
"createdAt": "2026-10-15T15:00:00.000Z",
"updatedAt": "2026-10-15T15:00:00.000Z"
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Access forbidden",
"code": "Forbidden"
}
{
"message": "BatchConfiguration validation failed: name: Path `name` is required.",
"code": "UnprocessableEntity"
}
참고
- 성공 시
data에 생성된 문서와 함께 HTTP200(201아님)을 반환합니다. - 이 엔드포인트에는 Joi 미들웨어가 없습니다. Mongoose 스키마 검증이 필수 필드와 숫자 제약 조건을 강제하며 실패 시
422 UnprocessableEntity를 반환합니다. executor가"featureRunner"(기본값)일 때 서버는 구성 문서에는"browser"를 저장하지만 헤드리스 실행기는 계속FeatureRunner를 통해 실행합니다.notification.webhookUrl을 설정하면 클라이언트의 활성 Verifik Webhook이 자동으로 생성되거나 동기화됩니다.- 다음으로, 보고서를 실행하기 전에 구성 입력 스키마 조회를 호출하여 파생된 필드와
exampleInput을 검사하세요.