Skip to main content

Retrieve Smart Report HTML

Retrieve the rendered HTML for a SmartReport, together with its linked batchId, templateId, rowIndex, optional verificationScore, and the corresponding row payload (rowIndex, status, inputData, results, errors).

Important: This endpoint responds with Content-Type: application/json and returns the HTML string inside data.html, not as a raw text/html document.

Endpoint​

GET https://api.verifik.co/v2/smart-reports/{id}/html

This endpoint is also reachable through the Smart-Agent proxy at https://ai.verifik.co/v2/smart-reports/{id}/html using your own per-client Authorization: Bearer <VERIFIK_JWT>. Shared x402 execution is blocked with 403 Forbidden.

Headers​

NameValueDescription
Acceptapplication/jsonJSON envelope response format.
AuthorizationBearer <VERIFIK_JWT>Client-scoped JWT (authUser.clientId).

Parameters​

NameLocationTypeRequiredDescription
idpathstringYesSmartReport ObjectId.
rowIndexqueryintegerNoZero-based row index (>= 0).
previewquerybooleanNoRender in preview mode when true.
scorequerybooleanNoWhether to compute and include verificationScore in data.
scoreProfilequerystringNoScoring profile identifier used when score is enabled (max 64 characters).

Request​

import axios from "axios";

const run = async () => {
const id = "6801a2b3c4d5e6f7a8b9c0d1";
const { data } = await axios.get(`https://api.verifik.co/v2/smart-reports/${id}/html`, {
params: {
rowIndex: 0,
preview: false,
score: true,
},
headers: {
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});

console.log({
reportId: data.data.reportId,
htmlLength: data.data.html.length,
rowStatus: data.data.row?.status,
});
};

run();

Response​

{
"data": {
"reportId": "6801a2b3c4d5e6f7a8b9c0d1",
"batchId": "6801a2b3c4d5e6f7a8b9c0d3",
"templateId": "6801a2b3c4d5e6f7a8b9c0d2",
"rowIndex": 0,
"html": "<!DOCTYPE html><html><head><meta charset=\"utf-8\" /></head><body><h1>Verification Report</h1></body></html>",
"verificationScore": {},
"row": {
"rowIndex": 0,
"status": "completed",
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
},
"results": {},
"errors": []
}
}
}

Error codes​

StatusError Code / TypeCause
401UnauthorizedMissing or invalid JWT.
403ForbiddenShared x402 execution was attempted; use your own per-client JWT.
404not_foundReport ID does not exist or belongs to another client.
404template_not_foundLinked template could not be found.
409MissingParameterJoi validation failed on query or path parameters.
409row_not_foundThe requested rowIndex does not exist in the batch.
409unknown_score_profileThe supplied scoreProfile is not recognized.
422UnprocessableEntityMongoose validation error.

Webhooks & MCP Integration​

Notes​

  • Because the HTTP response uses application/json, extract data.html from the JSON payload before embedding it in a webview, iframe, or PDF renderer.
  • data.verificationScore is present when score=true is passed.
  • data.row is null if no batch row object is attached for the context.