Change credit limit
Description
This web service changes the Credit Limit for a Loan Account in the Marketplace. After changing the credit limit it returns the updated Loan Account.
Definition
POST https://<domain>/services/apexrest/peer/v1/loanAccounts/changeCreditLimit/*
Parameters
The table given below provides details of the request parameters used by this web service:
Field | Type | Description |
---|---|---|
loanId* | String |
|
transactionDate | String |
|
newCreditLimit | Decimal |
|
Error messages
When you use this web service you can receive the possible error messages as shown in the table below:
Error Code | Error Message | System.Label | Reason | HTTP Status Code |
---|---|---|---|---|
INVALID_INPUT | Unable to parse the Request parameters. | UNABLE_PARSE_REQ_PARAMS | If error occurs while parsing request parameters. | 400 |
INVALID_INPUT | Unknown Exception : <exception_message> | UNKNOWN_EXCEPTION | Unknown exception while parsing request parameters. | 400 |
INVALID_INPUT | Loan Account Id is null. | LOAN_ACCOUNT_ID_NULL | Loan Account Id for Loan is not specified in the request parameters. | 400 |
INVALID_INPUT | No parameters specified in the JSON body request. | INVALID_JSON_BODY_IN_POST_REQUEST | Empty JSON body passed in the HTTP Post Request. | 400 |
INVALID_INPUT | Unable to find the Loan Account. | LOAN_ACCOUNT_NOT_FOUND | No record exists in the system for Loan Id (loanId) specified in the request parameters for a lending account. | 400 |
INVALID_INPUT | Required parameter/s is/are null. | REQUIRED_PARAMETERS_NULL | If new Credit Limit is not passed in the request, then system will raise this exception. | 400 |
INVALID_INPUT | Draw Term is not valid. | NEGATIVE_CREDIT_LIMIT | If new Credit Limit is passed but it is not a positive decimal number then system will raise this exception. | 400 |
API_EXCEPTION | <exception_message> | Not Applicable | If any validation fails or any unexpected error occurs during the processing of the request, system will raise the exception. | 500 |
Sample request
The sample request to be sent is as shown below:
POST https://<domain>/services/apexrest/peer/v1/loanAccounts/changeCreditLimit/loanId
loanId -> must be for LoC-type loanAccount, else throw error
newCreditLimit-> String parameter representing a decimal number.
Return Response -> Success if the limit is increased, failure with reason if limit is not increased
{
"newCreditLimit":10000
}
Sample response
{
"status": "SUCCESS",
"response": [],
"errorMessage": null,
"errorCode": "NO_ERROR",
}