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}

此接口也可通过 Smart-Agent 代理 https://ai.verifik.co/v2/smart-batches/{id} 访问,需使用你自己的客户专属 Authorization: Bearer <VERIFIK_JWT>。共享 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 行,并将任何缺少步骤输出或错误信息(errors)的行重新打开为 pending。
  • 若需频繁轮询状态,建议优先使用获取 Smart Batch 进度,以避免重复拉取完整的行载荷。

相关文档​