Skip to main content

バッチ設定を更新する

クライアントアカウントが所有する既存の BatchConfiguration を更新します。変更したいフィールドのみを送信してください。省略されたフィールドは現在の値を保持します。

steps を指定すると、サーバーは不足している sequence 値を index + 1 に正規化し、retryDelayBaseSeconds(>= 1)および timeoutSeconds(>= 5)をクランプします。notification を更新すると関連付けられた Verifik Webhook が自動的に同期され、executor を変更すると終了状態でない子バッチにも新しい 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 配列全体が置き換えられます(個別のステップだけを部分更新するわけではありません)。
  • steps 内で不足している sequence 値は index + 1 に正規化され、retryDelayBaseSeconds は >= 1、timeoutSeconds は >= 5 にクランプされます。
  • executor を変更すると、この設定に属する終了状態でない子バッチが同期されます。
  • ID が存在しないか他クライアントに属している場合は 404(not_found)が返され、Mongoose のスキーマ検証エラーは 422(UnprocessableEntity)が返されます。

関連​