Request
curl -X POST https://sandbox.api.lendeasy.ai /v1/servicing/admin/workflow-definitions/validate \
-H "Authorization: Bearer $TOKEN" \
-H "LendEasy-Tenant: $TENANT" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"caseTypeCode": "COLLECTIONS",
"workflowKey": "COLLECTIONS_DEFAULT",
"versionNumber": 3 ,
"definition": {
"schemaVersion": 2 ,
"stages": [
{
"stageKey": "INTAKE",
"displayName": "Understand the case",
"next": [
{
"when": "DEFAULT",
"stage": "CLOSE"
}
]
},
{
"stageKey": "CLOSE",
"displayName": "Close the case",
"terminal": true
}
],
"terminalOutcomes": []
}
}' await fetch(`https://sandbox.api.lendeasy.ai /v1/servicing/admin/workflow-definitions/validate` , {
method: "POST" ,
headers: { Authorization: `Bearer ${token}` , "LendEasy-Tenant" : tenant, "Idempotency-Key" : idempotencyKey, "Content-Type" : "application/json" },
body: JSON.stringify({
"caseTypeCode": "COLLECTIONS",
"workflowKey": "COLLECTIONS_DEFAULT",
"versionNumber": 3 ,
"definition": {
"schemaVersion": 2 ,
"stages": [
{
"stageKey": "INTAKE",
"displayName": "Understand the case",
"next": [
{
"when": "DEFAULT",
"stage": "CLOSE"
}
]
},
{
"stageKey": "CLOSE",
"displayName": "Close the case",
"terminal": true
}
],
"terminalOutcomes": []
}
}),
});requests.post(
f"https://sandbox.api.lendeasy.ai /v1/servicing/admin/workflow-definitions/validate" ,
headers={"Authorization" : f"Bearer {token}" , "LendEasy-Tenant" : tenant, "Idempotency-Key" : idempotency_key},
json={
"caseTypeCode": "COLLECTIONS",
"workflowKey": "COLLECTIONS_DEFAULT",
"versionNumber": 3 ,
"definition": {
"schemaVersion": 2 ,
"stages": [
{
"stageKey": "INTAKE",
"displayName": "Understand the case",
"next": [
{
"when": "DEFAULT",
"stage": "CLOSE"
}
]
},
{
"stageKey": "CLOSE",
"displayName": "Close the case",
"terminal": true
}
],
"terminalOutcomes": []
}
},
)200 400 401 403 404 409
{
"valid": false ,
"findings": [
{
"severity": "ERROR",
"code": "TASK_TYPE_UNKNOWN",
"message": "taskTemplate FIELD_VISIT names a task type that does not exist",
"stageKey": "MONITORING"
}
]
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "400",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "401",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "403",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "error.msg.not.authorized",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "404",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "error.msg.resource.not.found",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "409",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "idempotency.request.in.flight",
"errors": []
}