Skip to main content

レポートテンプレートを更新する

クライアントアカウントが所有するカスタム Smart Report テンプレートを更新します。更新可能なメタデータ、レイアウト sections、reportTheme、sampleData、または PDF レンダリングオプションの任意のサブセットを送信してください。ペイロードから省略されたフィールドは既存の値が維持されます。

ヘッドレスおよび AI パイプラインでは、テンプレートレイアウトを生成する で生成したレイアウトの反復調整、ブランドアセット(logo、primaryColor、customFonts)の更新、SmartBatch バインディングの更新、または isActive の切り替えにこのエンドポイントを使用します。組み込みの "System" テンプレートは読み取り専用であり、対象として指定すると 403(system_template_readonly)が返されます。

エンドポイント​

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

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

ヘッダー​

名前値
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBearer <VERIFIK_JWT>

パラメータ​

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

ボディ​

更新時、すべてのボディフィールドは任意です。

名前型必須説明
namestringいいえ更新後のテンプレート表示名。最大 150 文字。
descriptionstringいいえ更新後のテンプレート説明。最大 500 文字。
batchConfigurationstringいいえ関連付ける SmartBatch 設定の ObjectId。
countrystringいいえ国の識別子またはラベル。最大 60 文字。
categorystringいいえ検証ドメイン: "citizen"、"company"、または "vehicle"。
isActivebooleanいいえテンプレートを有効または無効にします。
logostringいいえブランドロゴの URL または base64 データ URI。
primaryColorstringいいえメインブランドアクセントの 16 進カラーコード。
identityColorstringいいえセカンダリ/アイデンティティアクセントの 16 進カラーコード。
pageBackgroundColorstringいいえページ背景の 16 進カラーコード。
headerobjectいいえカスタムヘッダーのレイアウトおよびコンテンツ設定。
footerobjectいいえカスタムフッターのレイアウトおよびコンテンツ設定。
legendstringいいえフッターの凡例またはコンプライアンス注記テキスト。最大 2000 文字。
legendPositionstringいいえ凡例の配置: "left"、"center"、または "right"。
termsAndConditionsstringいいえ法的利用規約テキスト。最大 4000 文字。
termsPositionstringいいえ利用規約の配置: "left"、"center"、または "right"。
sectionsobject[]いいえReportSection オブジェクトの配列(id、type、order、dataPath、label、staticContent、columns、columnsPerRow、keyOverrides、valueRules、chartKind、style、condition、frame など)。
pageSizestringいいえPDF 用紙サイズ: "A4"、"Letter"、または "Legal"。
layoutVersionintegerいいえレイアウトレンダラーバージョン: 1 または 2。
orientationstringいいえページの向き: "portrait" または "landscape"。
marginsobjectいいえ余白オブジェクト `{ "top": 40, "right": 40, "bottom": 40, "left": 40 }`。
pdfEnginestringいいえPDF レンダリングエンジン: "puppeteer" または "pdfkit"。
showPageNumbersbooleanいいえレンダリングされた PDF にページ番号を表示します。
pageNumberPositionstringいいえページ番号の位置: "top-left"、"top-center"、"top-right"、"bottom-left"、"bottom-center"、または "bottom-right"。
pageNumberDividerboolean / stringいいえページ番号の区切り線設定。
watermarkobjectいいえ透かしオーバーレイの設定。
securityobjectいいえPDF 保護設定 `{ "enabled": true, "password": "..." }`。"******" を渡すか password を省略すると、既存の暗号化済みパスワードが保持されます。
signatureobjectいいえ署名ブロックの設定。
logoSettingsobjectいいえロゴのサイズおよび配置設定。
sheetImagesobject[]いいえ埋め込みテンプレート画像アセット。最大 12 件。
customFontsobject[]いいえカスタムフォント定義(Google Fonts、外部 URL、またはアップロード済みファイル)。最大 6 件。
headerLogosobject[]いいえヘッダーに表示する追加ロゴ。最大 16 件。
bodyTopPaddingnumberいいえドキュメント本文の上部パディング(0〜600)。
sampleDataobjectいいえプレビューやサンプルダウンロード用にテンプレートと一緒に保存されるサンプル検証ペイロード。
endpointDesignobjectいいえエンドポイント固有のプレゼンテーションメタデータ。
reportThemestring / objectいいえテーマプリセット ID("premium_dark"、"light_cards"、"editorial"、"dashboard")または設定オブジェクト(id、scoreScale、scoreEnabled、scoreProfile、locale、density、eyebrow、coverTitle、headlines、legalNote、showVerifiedBadge、showWeights、showDeductions、showFields、showHowItWorks、blocks、tokens)。

リクエスト​

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: "PUT",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
body: JSON.stringify({
name: "Colombia Driver Onboarding Report v2",
primaryColor: "#0F766E",
isActive: true,
security: {
enabled: true,
password: "******",
},
reportTheme: {
id: "light_cards",
scoreEnabled: true,
scoreProfile: "cabify_driver",
scoreScale: "percent",
density: "compact",
},
}),
}
);

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

run();

レスポンス​

{
"data": {
"_id": "67c1f94b2d8a1c0012a4b301",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Driver Onboarding Report v2",
"primaryColor": "#0F766E",
"isActive": true,
"security": {
"enabled": true
},
"reportTheme": {
"id": "light_cards",
"scoreEnabled": true,
"scoreProfile": "cabify_driver",
"scoreScale": "percent",
"density": "compact"
},
"updatedAt": "2026-09-10T04:10:00.000Z"
}
}

注記​

  • security.password: "******" を渡すか password を省略すると、上書きする代わりにテンプレートの既存の暗号化済みパスワードが保持されます。
  • 組み込みの "System" テンプレートは更新できません(403 system_template_readonly)。システムスターターをカスタマイズする場合は、レポートテンプレートを作成する を使用してカスタムコピーを作成してください。
  • 変更を保存する際は、プレビュー用ヘルパー(scoreScale、themeTokens、scoreSettings)を reportTheme 配下(scoreScale、tokens、scoreEnabled/scoreProfile)に格納してください。

関連項目​