レポートプリセットを複製する
精選されたシステム Smart Report プリセットをご自身のクライアントアカウントへ複製します。この操作により BatchConfiguration とリンクされた SmartReportTemplate の両方が返され、すぐに実行することも、さらにカスタマイズすることもできます。
このエンドポイントはクライアントアカウントに対して**べき等(idempotent)**です。{systemKey} から複製された有効なクライアントテンプレートがすでに存在する場合、サーバーはその設定とテンプレートを再利用し(必要に応じてステップの順序を再マッピングし)、reused: true を返します。存在しない場合は、新しい BatchConfiguration(inputFormat: "csv"、outputFormat: "csv"、mergeStrategy: "sequential")と、preferredReportTemplate でリンクされた新しいクライアント用 SmartReportTemplate(clonedFromSystemKey に {systemKey} を設定)を作成し、reused: false を返します。このエンドポイントは smart_report_clone_preset MCP ツールとしても公開されています。
エンドポイント
POST https://api.verifik.co/v2/smart-batch-presets/{systemKey}/clone
クライアント単位の Authorization: Bearer <VERIFIK_JWT> ヘッダーを使用することで、Smart-Agent プロキシ(https://ai.verifik.co/v2/smart-batch-presets/{systemKey}/clone)経由でもアクセスできます。共有 x402 実行は 403 Forbidden でブロックされます。
ヘッダー
| 名前 | 値 |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <VERIFIK_JWT> |
トークンは クライアント JWT である必要があります。認証情報がないか無効な場合は 401 Unauthorized を返します。
パラメータ
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
systemKey | string | はい | レポートプリセット一覧から取得したプリセットキー。トリム済みで最大 120 文字、/^[a-z0-9][a-z0-9._-]{1,118}$/i に一致する必要があります。 |
リクエストボディ
このエンドポイントではリクエストボディは不要です。
リクエスト
- Node.js
- PHP
- Python
- Go
- cURL
const fetch = require("node-fetch");
async function run() {
const systemKey = "co.citizen.essential";
const res = await fetch(`https://api.verifik.co/v2/smart-batch-presets/${encodeURIComponent(systemKey)}/clone`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(await res.json());
}
run();
<?php
$systemKey = "co.citizen.essential";
$ch = curl_init("https://api.verifik.co/v2/smart-batch-presets/" . rawurlencode($systemKey) . "/clone");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT")
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
system_key = "co.citizen.essential"
url = f"https://api.verifik.co/v2/smart-batch-presets/{system_key}/clone"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
r = requests.post(url, headers=headers)
print(r.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
)
func main() {
systemKey := "co.citizen.essential"
endpoint := fmt.Sprintf("https://api.verifik.co/v2/smart-batch-presets/%s/clone", url.PathEscape(systemKey))
req, _ := http.NewRequest("POST", endpoint, nil)
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/smart-batch-presets/co.citizen.essential/clone" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
レスポンス
- 200 (作成済み)
- 200 (再利用)
- 401
- 403
- 404
- 409
- 409 (ステップなし)
- 500
{
"data": {
"batchConfiguration": {
"_id": "67d1b4a0e4f5a60718293b12",
"name": "Colombia Citizen Essential",
"description": "Core Colombian identity and registry verification for citizens.",
"country": "CO",
"executor": "browser",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "sequential",
"preferredReportTemplate": "67d1b4a1e4f5a60718293b15",
"isActive": true,
"steps": [
{
"_id": "67d1b4a0e4f5a60718293b13",
"appFeature": {
"_id": "65f0a1b2c3d4e5f607182901",
"name": "Colombian Cédula Validation",
"code": "co-cedula",
"price": 0.05
},
"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-15T14:20:00.000Z"
},
"template": {
"_id": "67d1b4a1e4f5a60718293b15",
"name": "Colombia Citizen Essential",
"clonedFromSystemKey": "co.citizen.essential",
"batchConfiguration": "67d1b4a0e4f5a60718293b12",
"isActive": true,
"createdAt": "2026-10-15T14:20:00.000Z",
"updatedAt": "2026-10-15T14:20:00.000Z"
},
"reused": false
}
}
{
"data": {
"batchConfiguration": {
"_id": "67d1b4a0e4f5a60718293b12",
"name": "Colombia Citizen Essential",
"country": "CO",
"executor": "browser",
"inputFormat": "csv",
"outputFormat": "csv",
"mergeStrategy": "sequential",
"preferredReportTemplate": "67d1b4a1e4f5a60718293b15",
"isActive": true,
"steps": []
},
"template": {
"_id": "67d1b4a1e4f5a60718293b15",
"name": "Colombia Citizen Essential",
"clonedFromSystemKey": "co.citizen.essential",
"batchConfiguration": "67d1b4a0e4f5a60718293b12",
"isActive": true
},
"reused": true
}
}
{
"message": "unauthorized",
"code": "Unauthorized"
}
{
"message": "Access forbidden",
"code": "Forbidden"
}
{
"message": "preset_not_found",
"code": "NotFound"
}
{
"message": "\"systemKey\" with value \"bad!key\" fails to match the required pattern: /^[a-z0-9][a-z0-9._-]{1,118}$/i",
"code": "MissingParameter"
}
{
"message": "preset_has_no_steps",
"code": "Conflict"
}
{
"message": "Internal Server Error",
"code": "InternalServerError"
}
補足
- プリセットを複製しても照会は実行されず、クレジットも消費されません。
- クライアントアカウントに対して同じ
{systemKey}でこのエンドポイントを繰り返し呼び出しても安全かつべき等であり、既存の複製済み設定とテンプレートがreused: trueとともに返されます。 {systemKey}が Joi のパスバリデーションに失敗した場合(例:120文字を超える、または許可されていない文字を含む)は409 MissingParameterが返されます。一致したプリセットにステップが設定されていない場合は409とともにpreset_has_no_stepsが返されます。- プリセットに必要な機能がアカウントで利用できない場合、
500 InternalServerErrorが発生することがあります。 - 複製後、行を送信する前に
batchConfiguration._idを指定してバッチ設定の入力スキーマを取得するを呼び出すか、smart_report_clone_presetMCP ツールをご利用ください。