列出 Smart Reports
列出属于已认证客户的 SmartReport 记录。返回结果会填充 template、smartBatch 与 client 引用,并支持按 smartBatch、template、externalRefId 和 createdByChannel 筛选,同时支持可选的分页和排序。
当你传入 page 参数时,响应会包含分页元数据(total、limit、page 与 pages)。省略 page 则直接在 { data: [...] } 中返回匹配列表,不含分页元数据。
端点
GET https://api.verifik.co/v2/smart-reports
使用你自己的每客户 Authorization: Bearer <VERIFIK_JWT>,也可通过 Smart-Agent 代理地址 https://ai.verifik.co/v2/smart-reports 访问此端点。共享 x402 执行会被拦截并返回 403 Forbidden。
请求头
| 名称 | 值 | 说明 |
|---|---|---|
Content-Type | application/json | 请求体负载格式。 |
Authorization | Bearer <VERIFIK_JWT> | 客户作用域 JWT(authUser.clientId)。 |
参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
smartBatch | string | 否 | 按关联的特定 SmartBatch ObjectId 筛选报告。 |
template | string | 否 | 按关联的特定模板 ObjectId 筛选报告。 |
status | string | 否 | 允许值:"draft"、"pending"、"generating"、"generated"、"failed"、"sent"。Joi 校验已接受该参数以保证前向兼容性;当前列表查询实际按 smartBatch、template、externalRefId 与 createdByChannel 筛选。 |
externalRefId | string | 否 | 按你的外部关联标识符筛选。最多 200 个字符。 |
createdByChannel | string | 否 | 按来源渠道筛选:"portal"、"api"、"mcp"、"x402" 或 "webhook"。 |
page | number | 否 | 要获取的页码。传入 page 将启用包含 total、limit、page 与 pages 的分页输出。 |
limit | number | 否 | 每页最大条目数。传入 page 时默认为 20。 |
sort | string | 否 | 排序字段与方向。传入 page 时默认为 "-updatedAt"。 |
筛选与分页说明
- 前向兼容的
status参数:Joi 会按"draft"、"pending"、"generating"、"generated"、"failed"和"sent"校验status,而底层列表查询目前按smartBatch、template、externalRefId与createdByChannel过滤。 - 两种
200响应形态:当仪表盘或同步任务需要total和pages时传入page;省略page可获取更精简的{ data: [...] }结构。
请求示例
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const { data } = await axios.get("https://api.verifik.co/v2/smart-reports", {
params: {
createdByChannel: "api",
externalRefId: "applicant-42",
page: 1,
limit: 20,
sort: "-updatedAt",
},
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(data);
};
run();
<?php
$query = http_build_query([
"createdByChannel" => "api",
"externalRefId" => "applicant-42",
"page" => 1,
"limit" => 20,
"sort" => "-updatedAt",
]);
$ch = curl_init("https://api.verifik.co/v2/smart-reports?" . $query);
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
url = "https://api.verifik.co/v2/smart-reports"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
params = {
"createdByChannel": "api",
"externalRefId": "applicant-42",
"page": 1,
"limit": 20,
"sort": "-updatedAt",
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
)
func main() {
params := url.Values{}
params.Set("createdByChannel", "api")
params.Set("externalRefId", "applicant-42")
params.Set("page", "1")
params.Set("limit", "20")
params.Set("sort", "-updatedAt")
req, _ := http.NewRequest("GET", "https://api.verifik.co/v2/smart-reports?"+params.Encode(), 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 -X GET "https://api.verifik.co/v2/smart-reports?createdByChannel=api&externalRefId=applicant-42&page=1&limit=20&sort=-updatedAt" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
响应示例
- 200 OK(带 page 分页)
- 200 OK(不带 page 分页)
- 401
- 403
- 409
- 422
{
"data": [
{
"_id": "6801a2b3c4d5e6f7a8b9c0d1",
"name": "Background Check - Applicant 42",
"status": "generated",
"template": {
"_id": "6801a2b3c4d5e6f7a8b9c0d2"
},
"smartBatch": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3"
},
"client": {
"_id": "507f1f77bcf86cd799439013"
},
"externalRefId": "applicant-42",
"createdByChannel": "api",
"rowIndex": 0,
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:00:04.000Z"
}
],
"total": 1,
"limit": 20,
"page": 1,
"pages": 1
}
{
"data": [
{
"_id": "6801a2b3c4d5e6f7a8b9c0d1",
"name": "Background Check - Applicant 42",
"status": "generated",
"template": {
"_id": "6801a2b3c4d5e6f7a8b9c0d2"
},
"smartBatch": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3"
},
"client": {
"_id": "507f1f77bcf86cd799439013"
},
"externalRefId": "applicant-42",
"createdByChannel": "api",
"rowIndex": 0,
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:00:04.000Z"
}
]
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "\"smartBatch\" must be a valid ObjectId",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
注意事项
GET /v2/smart-reports会在每条返回的SmartReport上填充template、smartBatch与client。- 无效的查询参数值会在 Joi 校验阶段失败并返回
409 MissingParameter。 - 若需查看包含可直接使用的
downloadUrl与htmlUrl字段的单份报告,请使用 获取 Smart Report。 - 若需在不单独管理
SmartBatch与SmartReport记录的情况下端到端运行新报告,请使用 运行 Smart Report。