Skip to main content

Introspect sample data

Inspect a sampleData verification payload and receive a structured map of field paths, value shapes, recommended sectionType choices, alternative section types, suggested table columns, and binding suggestions.

In headless report authoring and AI agent pipelines, call this endpoint right after fetching a payload from Retrieve a simulated response or capturing a SmartBatch row. Instead of guessing dataPath strings or writing brittle JSON traversal logic, your UI or agent can use the introspected nodes and batch metadata to build valid sections directly or enrich prompt context for Generate template layout. The walker inspects up to depth 5 and up to 600 nodes.

Endpoint​

POST https://api.verifik.co/v2/smart-report-templates/introspect

The Smart-Agent proxy (https://ai.verifik.co) exposes the same /v2/... paths and requires your own Authorization: Bearer <VERIFIK_JWT> header.

Headers​

NameValue
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBearer <VERIFIK_JWT>

Body​

NameTypeRequiredDescription
sampleDataobjectYesSample verification payload with optional batchName (string), rowIndex (number), inputData (object), and results (object).

Request​

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();

Response​

{
"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
}
}

Notes​

  • Traversal stops at depth 5 and caps at 600 nodes. When a very large payload hits the limit, truncated is true.
  • This endpoint is read-only and stateless; it does not save a template or spend verification credits.