List Validation Scripts
List the custom validation scripts registered on a model
/api/v1/deployments/{deploymentId}/validation-scriptsReturns every custom validation script registered on the model, enabled or not, ordered by key. Addressed through a deployment, it returns the scripts of the model that deployment points at.
Custom validation scripts are one of the two kinds of check a document goes through; the model's validation rules are the other, and Validations explains how each appears in responses and webhooks.
Custom validation scripts are standalone Node.js ES modules that run in a sandbox after extraction. Each one reads the extracted data from a JSON file passed as argv[2] and writes a { findings, breakdown } object to stdout. A script with behavior: "RESEND" can request a re-extraction of the cells it flagged; behavior: "SURFACE" only reports.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The model's ID, or the ID of a deployment that points at it |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/validation-scripts",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { scripts } = await res.json();Response
{
"scripts": [
{
"id": "cvs_abc123",
"extractionSchemaId": "esch_abc123",
"key": "vin-checksum",
"name": "VIN format (ISO 3779)",
"description": "Validates the VIN against the ISO 3779 format",
"behavior": "RESEND",
"s3Key": "custom-validations/esch_abc123/vin-checksum/v3-9f2b7c1d4e05.mjs",
"version": 3,
"contentHash": "9f2b...",
"enabled": true,
"timeoutMs": 60000,
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}
],
"modelId": "dep_abc123",
"viaDeploymentId": "dpl_prod01"
}modelId names the model the request resolved to, and viaDeploymentId the deployment it arrived through — null when the request named the model directly.