Request
curl -X POST https://sandbox.api.lendeasy.ai /v1/servicing/admin/hardship-policies/guardrails \
-H "Authorization: Bearer $TOKEN" \
-H "LendEasy-Tenant: $TENANT" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"guardrails": {
"guardrailVersion": 2 ,
"minimumLoanAgeInstallments": 1 ,
"maximumActiveHardshipCasesPerLoan": 1 ,
"requireVerifiedContactForOffer": true ,
"requireWorkflowConfirmedEvidence": true ,
"prohibitPrincipalForgiveness": true ,
"prohibitRateChange": true ,
"specialistConditions": [
"BANKRUPTCY",
"LITIGATION",
"FRAUD_INVESTIGATION",
"DECEASED",
"LEGAL_HOLD",
"RECOVERY_PLACEMENT"
],
"offerValidityHoursMaximum": 168 ,
"documentDeadlineHoursMaximum": 504 ,
"maximumDeferredPayments": 6 ,
"reevaluateOnMaterialLoanDrift": true
},
"reason": "Widens the document deadline from two weeks to three so declared-disaster relief can be drafted."
}' await fetch(`https://sandbox.api.lendeasy.ai /v1/servicing/admin/hardship-policies/guardrails` , {
method: "POST" ,
headers: { Authorization: `Bearer ${token}` , "LendEasy-Tenant" : tenant, "Idempotency-Key" : idempotencyKey, "Content-Type" : "application/json" },
body: JSON.stringify({
"guardrails": {
"guardrailVersion": 2 ,
"minimumLoanAgeInstallments": 1 ,
"maximumActiveHardshipCasesPerLoan": 1 ,
"requireVerifiedContactForOffer": true ,
"requireWorkflowConfirmedEvidence": true ,
"prohibitPrincipalForgiveness": true ,
"prohibitRateChange": true ,
"specialistConditions": [
"BANKRUPTCY",
"LITIGATION",
"FRAUD_INVESTIGATION",
"DECEASED",
"LEGAL_HOLD",
"RECOVERY_PLACEMENT"
],
"offerValidityHoursMaximum": 168 ,
"documentDeadlineHoursMaximum": 504 ,
"maximumDeferredPayments": 6 ,
"reevaluateOnMaterialLoanDrift": true
},
"reason": "Widens the document deadline from two weeks to three so declared-disaster relief can be drafted."
}),
});requests.post(
f"https://sandbox.api.lendeasy.ai /v1/servicing/admin/hardship-policies/guardrails" ,
headers={"Authorization" : f"Bearer {token}" , "LendEasy-Tenant" : tenant, "Idempotency-Key" : idempotency_key},
json={
"guardrails": {
"guardrailVersion": 2 ,
"minimumLoanAgeInstallments": 1 ,
"maximumActiveHardshipCasesPerLoan": 1 ,
"requireVerifiedContactForOffer": true ,
"requireWorkflowConfirmedEvidence": true ,
"prohibitPrincipalForgiveness": true ,
"prohibitRateChange": true ,
"specialistConditions": [
"BANKRUPTCY",
"LITIGATION",
"FRAUD_INVESTIGATION",
"DECEASED",
"LEGAL_HOLD",
"RECOVERY_PLACEMENT"
],
"offerValidityHoursMaximum": 168 ,
"documentDeadlineHoursMaximum": 504 ,
"maximumDeferredPayments": 6 ,
"reevaluateOnMaterialLoanDrift": true
},
"reason": "Widens the document deadline from two weeks to three so declared-disaster relief can be drafted."
},
)200 400 401 403 404 409
{
"resourceId": 7502 ,
"changes": {
"guardrailVersionId": 7502 ,
"operation": "DRAFT"
}
}{
"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": []
}