Skip to main content

Smart Batch を取得する

認証済みクライアント向けに ID で単一の SmartBatch ドキュメントを取得します。ペイロードを返す前に、サーバーは外部に保存されたすべての smartbatchrows 出力を rows[].results にマージし、healIncompleteRows() を実行して、有効化された設定ステップが欠落している completed マーク済みの行を再オープンします。

バッチが存在しないか別のクライアントアカウントに属している場合、エンドポイントは 200 と { "data": null } を返します。バッチの読み取りはチェックを実行せず、クレジットも消費しません。

エンドポイント​

GET 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。

クエリパラメータ​

名前型必須説明
selectstringいいえフィールド射影式(例: 行ペイロードを除外する "-rows")。
columnsstringいいえ返されるドキュメントに含めるフィールドのサブセット。
populates[]string[]いいえ展開する関連ドキュメント: "batchConfiguration" および/または "client"。

リクエスト​

import axios from "axios";

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

const { data } = await axios.get(`https://api.verifik.co/v2/smart-batches/${batchId}`, {
params: {
"populates[]": ["batchConfiguration", "client"],
},
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});

console.log(data);
};

run();

レスポンス​

{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": {
"_id": "6801a2b3c4d5e6f7a8b9c0d4",
"name": "Colombia Identity Check"
},
"client": {
"_id": "507f1f77bcf86cd799439013"
},
"name": "Colombia Onboarding — November",
"status": "completed",
"executor": "browser",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0.04,
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
},
"status": "completed",
"results": {
"1": {
"fullName": "JANE DOE",
"documentNumber": "1032386359"
}
},
"errors": [],
"creditsSpent": 0.04,
"attemptCount": 1,
"processedAt": "2026-11-24T20:01:00.000Z"
}
],
"totalRows": 1,
"completedRows": 1,
"failedRows": 0,
"partialRows": 0,
"startedAt": "2026-11-24T20:00:00.000Z",
"completedAt": "2026-11-24T20:01:00.000Z",
"createdAt": "2026-11-24T19:58:00.000Z",
"updatedAt": "2026-11-24T20:01:00.000Z"
}
}

補足​

  • 外部の smartbatchrows ステップ結果は、バッチの読み取り時に rows[].results へ自動的にマージされます。
  • healIncompleteRows() は、有効化された batchConfiguration ステップに対して各 completed 行を検査し、ステップ出力またはエラーが欠落している行を pending へ再オープンします。
  • 頻繁なステータスポーリングを行う場合は、完全な行ペイロードを繰り返し取得するのを避けるため、Smart Batch の進捗を取得するを優先して使用してください。

関連​