Skip to main content

SmartReports

SmartReports는 다단계 Verifik 카탈로그 검증(SmartCheck + SmartBatch)을 자동화된 검증 점수(Verification Scores), 이메일 전송, 실시간 웹훅이 포함된 구조화된 HTML 및 PDF 리포트로 변환합니다. Smart-Agent 포털에서 리포트를 설계 및 검토하거나, 헤드리스 REST API를 통해 백엔드에서 종단 간 실행을 트리거하거나, **Model Context Protocol (MCP)**을 통해 자율 에이전트를 연결할 수 있습니다.

테넌트 격리 및 클라이언트별 인증

모든 SmartReports, 템플릿, 구성, 프리셋 및 배치 엔드포인트는 클라이언트별 Verifik Bearer JWT(Authorization: Bearer <VERIFIK_JWT>)가 필요합니다. 공유 x402 서비스 계정을 통한 실행은 엄격히 차단되며(403 Forbidden), 실행된 카탈로그 단계마다 Verifik 계정 잔액에서 크레딧이 직접 차감됩니다.


아키텍처 및 구성 요소​

SmartReports는 실행할 검증 항목, 결과 표시 방식, 각 실행의 전달 방식을 분리하여 관리합니다.

flowchart LR
P["1. 리포트 프리셋\n/v2/smart-batch-presets"] -->|"POST .../{systemKey}/clone으로 복제"| C["2. 배치 구성\n/v2/batch-configurations"]
C -->|"preferredReportTemplate +\ninput-schema"| T["3. 리포트 템플릿\n/v2/smart-report-templates"]
C -->|"단계 및 알림"| R["4. 배치 및 SmartReports\nPOST /v2/smart-reports/run\n/v2/smart-batches & /v2/smart-reports"]
T -->|"테마, 섹션 및 scoreProfile"| R
R -->|"출력"| O["PDF + HTML + Verification Score\n이메일 전송 + 웹훅"]
구성 요소주요 엔드포인트역할
리포트 프리셋(Report Presets)GET /v2/smart-batch-presets
POST /v2/smart-batch-presets/{systemKey}/clone
사전 연결된 검증 단계, 입력 스키마 및 테마 적용 템플릿이 포함된 국가별·도메인별(citizen, company, vehicle; essential 또는 comprehensive 등급) Verifik 기본 번들입니다.
배치 구성(Batch Configurations)GET / POST / PUT / DELETE /v2/batch-configurations
GET /v2/batch-configurations/{id}/input-schema
정렬된 카탈로그 단계, 단계 체이닝({{results.N.*}}), mergeStrategy(sequential, parallel-independent, parallel-with-fallback), preferredReportTemplate 및 notification 설정(webhookUrl, emailOnCompletion)을 저장하는 재사용 가능한 레시피입니다.
리포트 템플릿(Report Templates)GET / POST / PUT / DELETE /v2/smart-report-templates
POST /v2/smart-report-templates/generate-layout
POST /v2/smart-report-templates/preview-html
POST /v2/smart-report-templates/introspect
시각적 레이아웃 정의(sections[], reportTheme, 사용자 지정 글꼴, 워터마크, 디지털 서명, PDF 비밀번호 보호 및 점수 설정)입니다. 시스템 템플릿(type: "System")은 읽기 전용이며, 클라이언트 템플릿(type: "client")은 전체 수정이 가능합니다.
배치 및 SmartReports(Batches & SmartReports)POST /v2/smart-reports/run
/v2/smart-batches
/v2/smart-reports
FeatureRunner를 통해 서버 측에서 검증 단계를 실행하고, 행의 verificationScore를 계산하며, HTML 및 PDF를 렌더링하고, 수신자에게 이메일을 전송하며 웹훅 이벤트를 발송합니다.

각 요소의 연결 방식​

  1. 프리셋 탐색 또는 복제: GET /v2/smart-batch-presets 및 POST /v2/smart-batch-presets/{systemKey}/clone을 호출하거나, 계정에 활성화된 카탈로그 엔드포인트로 사용자 지정 BatchConfiguration을 생성합니다.
  2. 필수 입력 확인: GET /v2/batch-configurations/{id}/input-schema(또는 프리셋의 inputSchema 객체)를 통해 requiredFields, optionalFields, jsonSchema, exampleInput 및 estimatedCreditsPerRow를 조회합니다.
  3. 템플릿 사용자 지정: /v2/smart-report-templates에서 내장 테마, AI 레이아웃 생성(POST /v2/smart-report-templates/generate-layout), 데이터 팔레트 분석(POST /v2/smart-report-templates/introspect), 크레딧 차감 없는 실시간 HTML 미리보기(POST /v2/smart-report-templates/preview-html)를 활용하여 템플릿을 구성합니다.
  4. 실행 및 전달: POST /v2/smart-reports/run(systemKey 또는 batchConfigurationId 지정)으로 단일 헤드리스 호출을 실행하거나, 대용량 처리 시 /v2/smart-batches 및 /v2/smart-batches/from-file을 사용한 후 /v2/smart-reports/{id}/generate, /download, /html, /send-email을 호출합니다.

세 가지 통합 방식​

통합 방식진입점적합한 용도
Smart-Agent 포털https://ai.verifik.co대화형 템플릿 빌더, 프리셋 갤러리, 배치 모니터링, 리포트 뷰어 및 내장된 Developer & AI Agent Kit(API & AI Agent / API / MCP).
헤드리스 REST APIhttps://api.verifik.co/v2/...
https://ai.verifik.co/v2/...
브라우저 UI 없이 백엔드 서비스, 자동화된 KYC/KYB/차량 관리 파이프라인, 웹훅 기반 PDF 생성 및 대용량 파일 배치 처리.
Streamable HTTP MCP 서버https://ai.verifik.co/mcp
https://ai.verifik.co/api/mcp
10개의 smart_report_* 도구를 직접 호출하는 자율 AI 에이전트(Claude Desktop, Cursor, Windsurf, ChatGPT Agents 및 사용자 지정 JSON-RPC 2.0 MCP 클라이언트).
api.verifik.co와 ai.verifik.co의 동일한 /v2/... 경로

/v2/smart-reports/*, /v2/smart-report-templates/*, /v2/batch-configurations/*, /v2/smart-batches/* 및 /v2/smart-batch-presets/*는 https://api.verifik.co에서 직접 호출하거나 https://ai.verifik.co의 Smart-Agent 프록시를 통해 호출할 수 있습니다. 두 경로 모두 동일한 클라이언트별 JWT 인증을 적용합니다.


인증 및 과금 모델​

클라이언트별 Bearer JWT 강제 적용​

모든 SmartReports, 템플릿, 배치 구성, 프리셋 및 SmartBatch 엔드포인트는 테넌트 단위로 격리되며 호출자가 제공하는 Verifik Bearer JWT가 필요합니다.

Authorization: Bearer <VERIFIK_JWT>
  • Smart-Agent 프록시 가드(smartReportAuthGuard): 유효한 클라이언트별 Bearer JWT 없이 /v2/smart-reports*, /v2/smart-report-templates*, /v2/batch-configurations*, /v2/smart-batches*, /v2/smart-batch-presets*(또는 /api/... / /api/proxy 대응 경로)로 요청을 보내면 x402 결제 처리 전에 **HTTP 403 Forbidden**으로 거부됩니다.
{
"code": "Forbidden",
"message": "SmartReports, SmartReportTemplates, BatchConfigurations, and SmartBatches require your own per-client Verifik Bearer JWT. They are not available through the shared x402 account."
}
  • MCP 테넌트 격리: 검색 메서드(initialize, ping, notifications/initialized, tools/list)는 자격 증명 없이 동작하지만, tools/call은 클라이언트별 Authorization: Bearer <VERIFIK_JWT> 헤더를 반드시 요구하며 헤더가 누락되었거나 공유 서비스 토큰이 전달되면 HTTP 401(JSON-RPC -32001)을 반환합니다.
  • SmartReports 라우트에서 x-payment-info 미사용: https://ai.verifik.co/openapi.json에서 SmartReports 라우트는 호출당 결제 x402 헤더 대신 bearerAuth 보안을 사용합니다.

크레딧 기반 종량제 과금​

  • 카탈로그 단계별 과금: 검증 단계가 카탈로그 소스를 대상으로 실제 실행될 때 Verifik 클라이언트 계정 잔액에서 크레딧이 차감됩니다(배치의 creditsSpent 필드로 추적됨).
  • 사전 비용 예측: GET /v2/smart-batch-presets 및 GET /v2/batch-configurations/{id}/input-schema는 조회를 실행하기 전에 estimatedCreditsPerRow를 반환합니다.
  • 크레딧 차감 없는 설계 및 조회 작업: 프리셋·템플릿 목록 조회, 스키마 검사, /introspect, /preview-html, /theme-starters, /score-profiles, /simulated-responses 호출, /v2/smart-reports/{id}/html 조회, PDF 다운로드 및 리포트 이메일 전송에는 검증 크레딧이 차감되지 않습니다.
  • 계정 권한 확인: 배치 또는 POST /v2/smart-reports/run을 실행하기 전, Verifik은 활성화된 모든 단계 엔드포인트가 클라이언트 계정에 활성화되어 있는지 확인합니다(사용 불가능한 단계가 있으면 409 Conflict 및 endpoints_not_in_account 반환).

검증 점수(Verification Score), 테마 및 PDF 엔진​

기본 제공 리포트 테마(reportTheme.id)​

SmartReports는 reportTheme.id를 통해 구성되는 4가지 테마 적용 HTML/PDF 디자인 시스템을 제공합니다(reportTheme.tokens에서 브랜드 색상, 타이포그래피, 여백, logoText 및 logoUrl 선택적 재정의 가능).

테마 ID별칭시각적 스타일기본 팔레트
premium_dark— (기본값)짙은 네이비 표지(#0b1730), 따뜻한 스톤 톤 본문 페이지(#f7f5f2), 깔끔한 흰색 카드Ink #122033, Accent #c4b5fd, Mark #1e3a5f
light_cardssmart_enroll_v2고대비 흰색 페이지(#ffffff), 부드러운 밝은 카드(#f3f5f1) 및 알약 형태 칩Ink #0e0f0c, Accent #7145d6, Mark #163300
editorial—따뜻한 종이 질감 배경(#fffdf8), 세리프 디스플레이 제목(Noto Serif), 대문자 자간 라벨Ink #1b1a17, Accent #7145d6, 가는 테두리(Hairline borders)
dashboard—구조화된 메트릭 카드(#f6f7fb)와 컴팩트한 모서리 반경(12px)의 깔끔한 흰색 캔버스Ink #111827, Accent #7145d6, 부드러운 바이올렛 강조
레거시 테마 별칭

reportTheme: "smart_enroll_v2" 또는 reportTheme.id: "smart_enroll_v2"로 저장된 템플릿은 렌더링 시 자동으로 light_cards로 해석됩니다.

검증 점수 프로필(scoreProfile)​

점수 산출이 활성화되면(score: true이거나 테마 적용 템플릿에 의해 자동 활성화됨), SmartReports는 실행된 각 검증 단계를 0–1 점수로 정규화하고(소수점 넷째 자리 score 및 0–100 범위의 score100), 부적격 규칙(knockout rules) 및 커버리지(approve 판정 시 최소 90%)를 평가하여 최종 판정을 생성합니다.

  • approve — 가중 점수 0.90–1.00, 커버리지 >= 90%, 모든 필수 검사 응답 완료
  • review — 가중 점수 0.70–0.89(또는 부적격 항목이 아닌 검토 필요 결과 포함)
  • reject — 가중 점수 < 0.70이거나 설정된 부적격 규칙(knockout rule) 발동
  • pending — 필수 검사에서 응답하지 못함(예: 업스트림 타임아웃/5xx) 또는 커버리지 < 90%

10가지 기본 제공 점수 프로필이 지원됩니다(실시간 ID 및 라벨은 GET /v2/smart-report-templates/score-profiles로 조회 가능).

프로필 ID라벨별칭카테고리 가중치(합계 100%)
cabify_driver (기본값)드라이버 온보딩driver, cabifyrecords (25), driving (25), identity (15), biometrics (15), watchlists (10), vehicle (10)
kyc일반 KYCgeneric_kycidentity (25), biometrics (25), watchlists (25), records (20), contact (5)
kybKYB—company (45), watchlists (25), identity (15), records (15)
fleet차량 / 플릿vehiclevehicle (60), driving (15), identity (15), watchlists (10)
vehicle_purchase차량 구매 / 딜러dealervehicle (70), identity (15), watchlists (10), driving (5)
identity_lookup신원 조회 전용identity_onlyidentity (100)
background_check신원 조회(백그라운드)screeningrecords (45), watchlists (25), identity (20), company (10)
lending대출 심사creditidentity (40), records (25), supporting (25), driving (10)
healthcare_professional의료 전문가health_professionalsupporting (55), identity (25), watchlists (20)
biometrics생체 인증facebiometrics (70), identity (30)

PDF 렌더링 엔진: puppeteer vs pdfkit​

엔진동작 방식지원 기능
puppeteer (기본값)풀링된 헤드리스 Chromium 인스턴스를 통해 전체 HTML/CSS를 렌더링합니다.4가지 리포트 테마 전체, SVG 점수 게이지 및 차트(pie/bar), 동적 dataTable 및 keyValueGrid 레이아웃, 사용자 지정 글꼴, 이미지/텍스트 워터마크, 서명 오버레이, PDF 비밀번호 암호화.
pdfkit하위 호환성을 위해 템플릿 및 API 요청에서 허용되며, HTML/Puppeteer 호환성 심(pdf-pdfkit.service.js)을 통해 라우팅됩니다.pdfEngine: "pdfkit"으로 구성된 기존 템플릿도 기능 저하된 자리 표시자 없이 전체 테이블 렌더링, 워터마크 및 서명 기능을 자동으로 활용할 수 있습니다.

문서 섹션​

SmartReports 가이드 및 API 레퍼런스 섹션을 살펴보세요.