Récupérer le schéma d'entrée d'une configuration
Résolvez le contrat d'entrée exact d'une BatchConfiguration enregistrée avant de soumettre des lignes. Ce point de terminaison renvoie preferredReportTemplate (en se repliant sur le dernier SmartReportTemplate actif lié à la configuration), webhookUrl, stepCount, estimatedCreditsPerRow, requiredFields, optionalFields, un jsonSchema standard et une charge utile exampleInput prête à être envoyée.
Le résolveur ignore automatiquement les étapes désactivées, les options dependencyGroup inactives, les indicateurs internes ainsi que les champs déjà fournis via parameterDefaults ou le chaînage d'étapes visitaFlow ({{results.N.field}}), tout en remappant les noms de colonnes selon inputFieldMapping. Cette route est enregistrée avant /{id} afin que /input-schema soit résolu directement, et elle est également disponible en tant qu'outil MCP smart_report_get_input_schema.
Point de terminaison
GET https://api.verifik.co/v2/batch-configurations/{id}/input-schema
Également accessible via le proxy Smart-Agent à l'adresse https://ai.verifik.co/v2/batch-configurations/{id}/input-schema avec votre propre en-tête par client Authorization: Bearer <VERIFIK_JWT>. L'exécution partagée x402 est bloquée avec 403 Forbidden.
En-têtes
| Nom | Valeur |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <VERIFIK_JWT> |
Le jeton doit être un JWT client. Des identifiants manquants ou invalides renvoient 401 Unauthorized.
Paramètres
| Nom | Type | Requis | Description |
|---|---|---|---|
id | string | Oui | ObjectId BatchConfiguration à inspecter. |
Requête
- Node.js
- PHP
- Python
- Go
- cURL
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();
<?php
$id = "67d1b4a0e4f5a60718293b12";
$ch = curl_init("https://api.verifik.co/v2/batch-configurations/" . $id . "/input-schema");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT")
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
config_id = "67d1b4a0e4f5a60718293b12"
url = f"https://api.verifik.co/v2/batch-configurations/{config_id}/input-schema"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
r = requests.get(url, headers=headers)
print(r.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
id := "67d1b4a0e4f5a60718293b12"
req, _ := http.NewRequest("GET", "https://api.verifik.co/v2/batch-configurations/"+id+"/input-schema", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -sS "https://api.verifik.co/v2/batch-configurations/67d1b4a0e4f5a60718293b12/input-schema" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
Réponse
- 200
- 401
- 403
- 404
{
"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"
}
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Access forbidden",
"code": "Forbidden"
}
{
"message": "not_found",
"code": "NotFound"
}
Notes
- L'inspection du schéma d'entrée n'exécute aucune consultation et ne consomme pas de crédits.
- Si
preferredReportTemplaten'est pas défini sur la configuration, le serveur se replie sur le dernierSmartReportTemplateactif lié à{id}(ounulls'il n'en existe aucun). - Lorsque
inputFieldMappingmappe une colonne d'entrée vers un paramètre API,requiredFields,optionalFields,jsonSchemaetexampleInputexposent le nom de colonne d'entrée mappé plutôt que le nom brut du paramètre API. - Les valeurs
{id}manquantes ou appartenant à un autre client renvoient404(not_found), contrairement à Récupérer une configuration de lot qui renvoie200avecdata: null. - Pour les agents IA et les pipelines headless, ce point de terminaison correspond à l'outil MCP
smart_report_get_input_schema.