列出主题起步模板
获取 Verifik 内置的主题化起步模板,并支持按 theme 进行可选筛选。每个起步模板均预配置了 sections、reportTheme、sampleData、页面布局属性与配色方案,使你无需从零组装区块树即可快速上线生产级报告设计。
在无头准入流程与 AI 智能体中,可调用此端点挑选精心编排的视觉起点,立即通过 预览模板 HTML 进行预览,按需自定义品牌配色或 Logo,然后通过 创建报告模板 保存为可编辑的自定义模板。
端点
GET https://api.verifik.co/v2/smart-report-templates/theme-starters
Smart-Agent 代理(https://ai.verifik.co)暴露了完全相同的 /v2/... 路径,并同样要求携带你自己的 Authorization: Bearer <VERIFIK_JWT> 请求头。
请求头
| 名称 | 值 |
|---|---|
| Accept | application/json |
| Authorization | Bearer <VERIFIK_JWT> |
参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
theme | string | 否 | 可选主题筛选:"premium_dark"、"light_cards"、"editorial"、"dashboard" 或 "smart_enroll_v2"("light_cards" 的别名;建议使用规范名称 "light_cards")。 |
请求示例
- Node.js
- PHP
- Python
- Go
- cURL
const fetch = require("node-fetch");
async function run() {
const res = await fetch(
"https://api.verifik.co/v2/smart-report-templates/theme-starters?theme=light_cards",
{
method: "GET",
headers: {
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);
console.log(await res.json());
}
run();
<?php
$ch = curl_init("https://api.verifik.co/v2/smart-report-templates/theme-starters?theme=light_cards");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Accept: 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-report-templates/theme-starters"
headers = {
"Accept": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
r = requests.get(url, headers=headers, params={"theme": "light_cards"})
print(r.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
url := "https://api.verifik.co/v2/smart-report-templates/theme-starters?theme=light_cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
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-report-templates/theme-starters?theme=light_cards" \
-H "Accept: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
响应示例
- 200
- 401
- 409
{
"data": [
{
"name": "Light Cards KYC Starter",
"description": "Clean card-based background verification report with score gauge",
"type": "System",
"systemKey": "starter_light_cards_kyc",
"country": "CO",
"category": "citizen",
"tier": "comprehensive",
"pageSize": "A4",
"orientation": "portrait",
"pdfEngine": "puppeteer",
"primaryColor": "#4F46E5",
"pageBackgroundColor": "#ffffff",
"sections": [
{
"id": "sec-cover",
"type": "coverPage",
"order": 0,
"label": "Verification Summary"
},
{
"id": "sec-score",
"type": "scoreGauge",
"order": 1,
"label": "Verification Score"
}
],
"reportTheme": {
"id": "light_cards",
"scoreEnabled": true,
"scoreProfile": "kyc",
"scoreScale": "percent"
},
"sampleData": {
"batchName": "KYC Sample",
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1020304050"
},
"results": {}
}
}
]
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "\"theme\" must be one of [premium_dark, light_cards, editorial, dashboard, smart_enroll_v2]",
"code": "MissingParameter"
}
注意事项
"smart_enroll_v2"可作为"light_cards"的别名使用,但建议按规范主题 ID"light_cards"进行筛选。- 此处返回的起步模板携带
type: "System"以供参考。当通过 创建报告模板 保存自定义副本时,只需传入你的name及设计字段(sections、reportTheme、sampleData、配色和 PDF 设置)。