In this article we will review how to default a loan contract.
The loan contract header ID is ID-1664282427 and the contract version is ID-1664282427.
...v2/contracts/ID-1664282427/versions/ID-1664282427/...
To default the loan contract, make the following API call.
https://loan-api.sandbox.tuumplatform.com/api/v2/contracts/{headerId}/versions/{versionId}/default
Below is an example request body of the API call for defaulting the loan contract.
{
"reasonCode": "PERMANENT_INSOLVENCY",
"comment": "Free form description"
}
curl --location 'https://loan-api.sandbox.tuumplatform.com/api/v2/contracts/ID-1664282427/versions/ID-1664282427/default' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMDhUMDg6Mzg6MjgiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTE0ODM5MDh9.5DysSjt0zhdQCaXUOiEZxRfO8sW6loVJRQYSbTLihkQ' \
--header 'Content-Type: application/json' \
--data '{
"reasonCode": "PERMANENT_INSOLVENCY",
"comment": "Free form description"
}'
Below you find an example response body to the API call above.
The contract with the number SM-1000
is set to the DEFAULT status.