Skip to main content

구성 입력 스키마 조회

행을 제출하기 전에 저장된 BatchConfiguration의 정확한 입력 계약(input contract)을 확인합니다. 이 엔드포인트는 preferredReportTemplate(구성에 연결된 최신 활성 SmartReportTemplate으로 폴백), webhookUrl, stepCount, estimatedCreditsPerRow, requiredFields, optionalFields, 표준 jsonSchema 및 바로 전송할 수 있는 exampleInput 페이로드를 반환합니다.

리졸버(resolver)는 비활성화된 단계, 비활성 dependencyGroup 옵션, 내부 플래그, 그리고 parameterDefaults나 visitaFlow 단계 체이닝({{results.N.field}})을 통해 이미 공급된 필드를 자동으로 건너뛰며, inputFieldMapping에 따라 열 이름을 다시 매핑합니다. 이 경로는 /input-schema가 직접 해석되도록 /{id}보다 먼저 등록되어 있으며 smart_report_get_input_schema MCP 도구로도 사용할 수 있습니다.

엔드포인트​

GET https://api.verifik.co/v2/batch-configurations/{id}/input-schema

클라이언트별 Authorization: Bearer <VERIFIK_JWT> 헤더를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/batch-configurations/{id}/input-schema)에서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.

헤더​

이름값
Content-Typeapplication/json
AuthorizationBearer <VERIFIK_JWT>

토큰은 클라이언트 JWT여야 합니다. 자격 증명이 누락되었거나 유효하지 않으면 401 Unauthorized가 반환됩니다.

매개변수​

이름타입필수설명
idstring예검사할 BatchConfiguration ObjectId.

요청​

const fetch = require("node-fetch");

async function run() {
const id = "67d1b4a0e4f5a60718293b12";
const res = await fetch(`https://api.verifik.co/v2/batch-configurations/${id}/input-schema`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(await res.json());
}

run();

응답​

{
"data": {
"configurationId": "67d1b4a0e4f5a60718293b12",
"name": "Colombia Citizen Essential",
"country": "CO",
"preferredReportTemplate": "67d1b4a1e4f5a60718293b15",
"webhookUrl": "https://example.com/webhooks/smart-reports",
"stepCount": 2,
"estimatedCreditsPerRow": 0.15,
"requiredFields": [
{
"field": "documentType",
"apiField": "documentType",
"type": "string",
"required": true,
"enum": ["CC", "CE"]
},
{
"field": "documentNumber",
"apiField": "documentNumber",
"type": "string",
"required": true
}
],
"optionalFields": [],
"jsonSchema": {
"type": "object",
"properties": {
"documentType": {
"type": "string",
"enum": ["CC", "CE"]
},
"documentNumber": {
"type": "string"
}
},
"required": ["documentType", "documentNumber"]
},
"exampleInput": {
"documentType": "CC",
"documentNumber": "123456789"
}
}
}

참고​

  • 입력 스키마를 검사해도 조회가 실행되지 않으며 크레딧이 소비되지 않습니다.
  • 구성에 preferredReportTemplate이 설정되지 않은 경우, 서버는 {id}에 연결된 최신 활성 SmartReportTemplate으로 폴백합니다(없으면 null).
  • inputFieldMapping이 입력 열을 API 매개변수에 매핑하는 경우, requiredFields, optionalFields, jsonSchema, exampleInput은 원시 API 매개변수 이름 대신 매핑된 입력 열 이름을 노출합니다.
  • 200과 함께 { "data": null }을 반환하는 배치 구성 조회와 달리, 누락되었거나 다른 클라이언트의 {id} 값은 404 (not_found)를 반환합니다.
  • AI 에이전트 및 헤드리스 파이프라인의 경우 이 엔드포인트는 smart_report_get_input_schema MCP 도구에 해당합니다.

관련​