Skip to main content

レポートテンプレートを取得する

ObjectId({id})を指定して単一の Smart Report テンプレートを取得します。sections、reportTheme、sampleData、ページレイアウト設定、および展開(populate)された batchConfiguration・client 参照を含むテンプレートの全仕様が返されます。

ヘッドレスおよび AI ワークフローでは、append または edit モードで テンプレートレイアウトを生成する を呼び出す前に現在の sections 配列を読み込んだり、テンプレート HTML をプレビューする 用に保存済みの sampleData を取得したり、PUT 更新を実行する前にテンプレートを確認したりするためにこのエンドポイントを使用します。セキュリティおよびペイロードサイズの効率化のため、このエンドポイントでは security.password と thumbnail.image は除外されます。

エンドポイント​

GET https://api.verifik.co/v2/smart-report-templates/{id}

Smart-Agent プロキシ(https://ai.verifik.co)も同じ /v2/... パスを公開しており、お客様自身の Authorization: Bearer <VERIFIK_JWT> ヘッダーが必要です。

ヘッダー​

名前値
Acceptapplication/json
AuthorizationBearer <VERIFIK_JWT>

パラメータ​

名前型必須説明
idstringはいSmart Report テンプレートの ObjectId。

リクエスト​

const fetch = require("node-fetch");

async function run() {
const id = "67c1f94b2d8a1c0012a4b301";
const res = await fetch(
`https://api.verifik.co/v2/smart-report-templates/${id}`,
{
method: "GET",
headers: {
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);

console.log(await res.json());
}

run();

レスポンス​

{
"data": {
"_id": "67c1f94b2d8a1c0012a4b301",
"name": "Colombia Driver Onboarding Report",
"description": "Themed driver verification report for fleet onboarding",
"client": {
"_id": "507f1f77bcf86cd799439013",
"name": "Acme Mobility"
},
"batchConfiguration": {
"_id": "67c1f8102d8a1c0012a4b210",
"name": "Colombia Driver Onboarding"
},
"country": "CO",
"category": "citizen",
"isActive": true,
"pageSize": "A4",
"layoutVersion": 2,
"orientation": "portrait",
"margins": {
"top": 40,
"right": 40,
"bottom": 40,
"left": 40
},
"pdfEngine": "puppeteer",
"primaryColor": "#4F46E5",
"identityColor": "#111827",
"pageBackgroundColor": "#ffffff",
"reportTheme": {
"id": "light_cards",
"scoreEnabled": true,
"scoreProfile": "cabify_driver",
"scoreScale": "percent"
},
"sections": [
{
"id": "sec-header",
"type": "header",
"order": 0,
"label": "Driver Verification Report"
}
],
"createdAt": "2026-09-10T03:32:00.000Z",
"updatedAt": "2026-09-10T03:35:12.000Z"
}
}

注記​

  • テンプレートが存在しない場合や別のクライアントに属している場合、このエンドポイントは 404 ではなく { "data": null } とともに HTTP 200 を返します。
  • 返却されるドキュメントからは security.password と thumbnail.image が除外されます。テンプレートのサムネイルをレンダリングまたは確認するには、レポートテンプレート一覧を取得する を使用してください。

関連項目​