レポートテンプレートを取得する
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> ヘッダーが必要です。
ヘッダー
| 名前 | 値 |
|---|---|
| Accept | application/json |
| Authorization | Bearer <VERIFIK_JWT> |
パラメータ
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | Smart Report テンプレートの ObjectId。 |
リクエスト
- Node.js
- PHP
- Python
- Go
- cURL
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();
<?php
$id = "67c1f94b2d8a1c0012a4b301";
$ch = curl_init("https://api.verifik.co/v2/smart-report-templates/" . $id);
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
template_id = "67c1f94b2d8a1c0012a4b301"
url = f"https://api.verifik.co/v2/smart-report-templates/{template_id}"
headers = {
"Accept": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
r = requests.get(url, headers=headers)
print(r.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
id := "67c1f94b2d8a1c0012a4b301"
req, _ := http.NewRequest("GET", "https://api.verifik.co/v2/smart-report-templates/"+id, 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/67c1f94b2d8a1c0012a4b301" \
-H "Accept: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
レスポンス
- 200
- 200(未検出)
- 401
- 409
{
"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"
}
}
{
"data": null
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "\"id\" must be a valid ObjectId",
"code": "MissingParameter"
}
注記
- テンプレートが存在しない場合や別のクライアントに属している場合、このエンドポイントは
404ではなく{ "data": null }とともに HTTP200を返します。 - 返却されるドキュメントからは
security.passwordとthumbnail.imageが除外されます。テンプレートのサムネイルをレンダリングまたは確認するには、レポートテンプレート一覧を取得する を使用してください。