CancelSelfServiceLoanQuoteCommand
Overview​
Cancels a draft loan quote belonging to the authenticated customer. This command is intended for a customer who no longer wants to continue an application before its approval workflow has started.
Cancellation is terminal. A cancelled quote cannot subsequently be submitted for approval, and it no longer counts as an in-progress application when the product prevents concurrent loan applications.
Authorization​
This command requires an authenticated customer token. The customer identity is read from the token; a customer ID must not be supplied by the client.
The command cannot be used to cancel another customer's quote.
Command Structure​
{
"cmd": "CancelSelfServiceLoanQuoteCommand",
"data": "{\"loanQuoteId\":110,\"reason\":\"I no longer require this loan\"}"
}
Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
loanQuoteId | long | Yes | Database ID of the loan quote to cancel |
reason | string | No | Customer's reason for cancelling the quote |
Cancellation Rules​
The command succeeds only when all the following conditions are true:
- The quote belongs to the authenticated customer.
ApprovalStateisNotInitiated(0).DisbursementStateisNotInitiated(0).
Once approval or disbursement has started, customer cancellation is rejected. Calling the command again for a quote that is already cancelled is treated as an idempotent success.
Successful Response​
{
"ok": true,
"message": "Loan quote cancelled successfully.",
"outData": {
"isSuccessful": true,
"statusCode": "00",
"message": "Loan quote cancelled successfully.",
"data": {
"loanQuoteId": 110,
"requestId": "00129PAYROLL-011816",
"approvalState": 6,
"approvalStateDescription": "Cancelled by Customer",
"cancelledAt": "2026-09-02T17:15:00Z",
"cancellationReason": "I no longer require this loan",
"canCustomerCancel": false
}
}
}
Already Cancelled Response​
Repeating the request does not create another cancellation record:
{
"ok": true,
"outData": {
"isSuccessful": true,
"statusCode": "00",
"message": "Loan quote has already been cancelled.",
"data": {
"loanQuoteId": 110,
"approvalState": 6,
"approvalStateDescription": "Cancelled by Customer",
"canCustomerCancel": false
}
}
}
Validation Responses​
Quote not found or not owned by customer​
{
"outData": {
"isSuccessful": false,
"statusCode": "04",
"message": "Loan quote not found."
}
}
The same response is used for a missing quote and a quote owned by another customer so the command does not disclose another customer's application.
Approval or disbursement already started​
{
"outData": {
"isSuccessful": false,
"statusCode": "08",
"message": "This loan quote can no longer be cancelled because its approval or disbursement process has already started.",
"data": {
"loanQuoteId": 110,
"approvalState": 1,
"approvalStateDescription": "Pending Approval",
"disbursementState": 0,
"disbursementStateDescription": "Awaiting Configuration",
"canCustomerCancel": false
}
}
}
Audit and Query Behaviour​
Successful cancellation:
- Sets the quote's
ApprovalStatetoCancelled(6). - Sets
ApprovalStatustoCancelled by customer. - Creates a loan approval-history entry with stage
Customerand actionCancelled. - Stores
reasonas the history comment when it is supplied.
GetAllMyLoanApplicationsQuery, GetLoanQuoteWithDetailsQuery, and GetCustomerLoanDetailsQuery expose canCustomerCancel. The value is true only while the authenticated customer is permitted to call this command.