サンプルデータをイントロスペクトする
sampleData の検証ペイロードを検査し、フィールドパス、値の形状、推奨される sectionType の選択肢、代替セクション種別、推奨テーブル列、およびバインディング提案を含む構造化マップを取得します。
ヘッドレスでのレポート作成や AI エージェントのパイプラインでは、シミュレートレスポンスを取得する からペイロードを取得した直後、または SmartBatch の行データを取得した直後にこのエンドポイントを呼び出します。dataPath 文字列を推測したり脆い JSON 走査ロジックを書いたりする代わりに、UI やエージェントはイントロスペクトされた nodes と batch メタデータを使用して有効な sections を直接構築したり、テンプレートレイアウトを生成する の prompt コンテキストを補強したりできます。ウォーカーは深さ 5 まで、最大 600 ノードを検査します。
エンドポイント
POST https://api.verifik.co/v2/smart-report-templates/introspect
Smart-Agent プロキシ(https://ai.verifik.co)も同じ /v2/... パスを公開しており、お客様自身の Authorization: Bearer <VERIFIK_JWT> ヘッダーが必要です。
ヘッダー
| 名前 | 値 |
|---|---|
| Content-Type | application/json |
| Accept | application/json |
| Authorization | Bearer <VERIFIK_JWT> |
ボディ
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
sampleData | object | はい | 任意の batchName(string)、rowIndex(number)、inputData(object)、および results(object)を含むサンプル検証ペイロード。 |
リクエスト
- 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/introspect",
{
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
body: JSON.stringify({
sampleData: {
batchName: "Driver Onboarding",
rowIndex: 0,
inputData: {
documentType: "CC",
documentNumber: "1020304050",
},
results: {
identity: {
fullName: "Mateo Rojas",
status: "active",
},
fines: [
{ code: "C02", amount: 580000, status: "pending" },
],
},
},
}),
}
);
console.log(await res.json());
}
run();
<?php
$payload = [
"sampleData" => [
"batchName" => "Driver Onboarding",
"rowIndex" => 0,
"inputData" => [
"documentType" => "CC",
"documentNumber" => "1020304050",
],
"results" => [
"identity" => [
"fullName" => "Mateo Rojas",
"status" => "active",
],
"fines" => [
["code" => "C02", "amount" => 580000, "status" => "pending"],
],
],
],
];
$ch = curl_init("https://api.verifik.co/v2/smart-report-templates/introspect");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Accept: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);
curl_close($ch);
import os
import requests
url = "https://api.verifik.co/v2/smart-report-templates/introspect"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
payload = {
"sampleData": {
"batchName": "Driver Onboarding",
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1020304050",
},
"results": {
"identity": {
"fullName": "Mateo Rojas",
"status": "active",
},
"fines": [
{"code": "C02", "amount": 580000, "status": "pending"},
],
},
}
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body, _ := json.Marshal(map[string]interface{}{
"sampleData": map[string]interface{}{
"batchName": "Driver Onboarding",
"rowIndex": 0,
"inputData": map[string]interface{}{
"documentType": "CC",
"documentNumber": "1020304050",
},
"results": map[string]interface{}{
"identity": map[string]interface{}{
"fullName": "Mateo Rojas",
"status": "active",
},
"fines": []map[string]interface{}{
{"code": "C02", "amount": 580000, "status": "pending"},
},
},
},
})
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/smart-report-templates/introspect", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
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 POST "https://api.verifik.co/v2/smart-report-templates/introspect" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT" \
-d '{
"sampleData": {
"batchName": "Driver Onboarding",
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1020304050"
},
"results": {
"identity": {
"fullName": "Mateo Rojas",
"status": "active"
},
"fines": [
{ "code": "C02", "amount": 580000, "status": "pending" }
]
}
}
}'
レスポンス
- 200
- 401
- 409
{
"data": {
"nodes": [
{
"path": "results.identity",
"shape": "object",
"sectionType": "keyValueGrid",
"alternatives": ["card", "table"],
"columns": [
{ "key": "fullName", "label": "Full Name" },
{ "key": "status", "label": "Status" }
],
"suggestion": {
"type": "keyValueGrid",
"dataPath": "results.identity"
}
},
{
"path": "results.fines",
"shape": "array",
"sectionType": "dataTable",
"alternatives": ["repeater", "table"],
"columns": [
{ "key": "code", "label": "Code" },
{ "key": "amount", "label": "Amount" },
{ "key": "status", "label": "Status" }
],
"suggestion": {
"type": "dataTable",
"dataPath": "results.fines"
}
}
],
"batch": [
{
"path": "inputData",
"shape": "object",
"sectionType": "keyValueGrid"
}
],
"count": 2,
"truncated": false
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "\"sampleData\" is required",
"code": "MissingParameter"
}
注記
- 走査は深さ
5で停止し、上限は600ノードです。非常に大きなペイロードで上限に達した場合、truncatedがtrueになります。 - このエンドポイントは読み取り専用かつステートレスであり、テンプレートの保存や検証クレジットの消費は行いません。