Skip to main content

Add Loan Guarantor

Overview

Adds a guarantor to an existing loan account.

Endpoint

POST /api/bpm/cmd

Request Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
Content-TypestringYesMust be application/json
X-Tenant-IdstringYesTenant identifier

Request Body

{
"cmd": "AddLoanGuarantorCommand",
"data": {
"loanAccountId": 12345,
"clientId": 67890,
"relationship": "Business Partner"
}
}

Parameters

ParameterTypeRequiredDescription
cmdstringYesMust be "AddLoanGuarantorCommand"
dataobjectYesGuarantor data
↳ loanAccountIdintegerYesLoan account ID
↳ clientIdintegerYesClient/Customer ID of guarantor
↳ relationshipstringYesRelationship to borrower

Response

Success Response (200 OK)

{
"success": true,
"message": "Guarantor added successfully",
"data": {
"loanId": "LA-2024-00001",
"guarantorId": "CUST-67890",
"guarantorName": "Alice Johnson",
"guaranteeAmount": 25000.00,
"guaranteeType": "Partial",
"relationshipToBorrower": "Business Partner",
"status": "PendingAcceptance",
"addedAt": "2024-01-20T10:00:00Z",
"addedBy": "officer@bank.com"
}
}

Status Codes

CodeDescription
200Guarantor added successfully
400Invalid request or guarantor ineligible
401Unauthorized
404Loan or guarantor customer not found
409Guarantor already exists for this loan
500Internal server error

Business Rules

  • Guarantor must be an existing customer
  • Guarantor must have good credit standing
  • Guarantor cannot be the borrower
  • Total guarantees may have minimum requirements
  • Guarantor acceptance may be required

Code Examples

C# Example

public async Task<GuarantorResponse> AddLoanGuarantorAsync(AddGuarantorRequest request)
{
var json = JsonSerializer.Serialize(request);
var content = new StringContent(json, Encoding.UTF8, "application/json");

var response = await _httpClient.PostAsync("/api/administration/loan/guarantor/add", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize<ApiResponse<GuarantorResponse>>(result).Data;
}

TypeScript Example

async function addLoanGuarantor(request: AddGuarantorRequest): Promise<GuarantorResponse> {
const response = await fetch('/api/administration/loan/guarantor/add', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-Id': tenantId
},
body: JSON.stringify(request)
});

const result = await response.json();
return result.data;
}

Notes

  • Guarantor notification sent automatically
  • Guarantor must accept guarantee before loan disbursement
  • Multiple guarantors can be added to a loan
  • Guarantee amount contributes to security coverage