Retrieve Loan Guarantor List
Overview
Retrieves the list of guarantors associated with a specific loan account.
Endpoint
POST /api/bpm/cmd
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
| Content-Type | string | Yes | Must be application/json |
| X-Tenant-Id | string | Yes | Tenant identifier |
Request Body
{
"cmd": "RetrieveLoanGuarantorListQuery",
"data": {
"loanAccountId": 12345
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| cmd | string | Yes | Must be "RetrieveLoanGuarantorListQuery" |
| data | object | Yes | Query data |
| ↳ loanAccountId | integer | Yes | Loan account ID to retrieve guarantors for |
Response
Success Response (200 OK)
{
"success": true,
"message": "Loan guarantors retrieved successfully",
"data": {
"loanId": "LA-2024-00001",
"guarantors": [
{
"guarantorId": "CUST-67890",
"guarantorName": "Alice Johnson",
"guaranteeAmount": 25000.00,
"guaranteeType": "Partial",
"relationshipToBorrower": "Business Partner",
"status": "Active",
"acceptanceDate": "2024-01-12T00:00:00Z",
"addedAt": "2024-01-10T15:00:00Z"
},
{
"guarantorId": "CUST-98765",
"guarantorName": "Bob Wilson",
"guaranteeAmount": 25000.00,
"guaranteeType": "Partial",
"relationshipToBorrower": "Family Member",
"status": "Active",
"acceptanceDate": "2024-01-13T00:00:00Z",
"addedAt": "2024-01-10T15:05:00Z"
}
],
"summary": {
"totalGuarantors": 2,
"totalGuaranteeAmount": 50000.00,
"activeGuarantors": 2,
"pendingAcceptance": 0
}
}
}
Status Codes
| Code | Description |
|---|---|
| 200 | Guarantors retrieved successfully |
| 401 | Unauthorized |
| 404 | Loan not found |
| 500 | Internal server error |
Code Examples
C# Example
public async Task<GuarantorList> GetLoanGuarantorsAsync(string loanId)
{
var response = await _httpClient.GetAsync($"/api/administration/loan/{loanId}/guarantors");
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize<ApiResponse<GuarantorList>>(json).Data;
}
TypeScript Example
async function getLoanGuarantors(loanId: string): Promise<GuarantorList> {
const response = await fetch(`/api/administration/loan/${loanId}/guarantors`, {
headers: {
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-Id': tenantId
}
});
const result = await response.json();
return result.data;
}
Notes
- Returns all guarantors regardless of status
- Summary provides total guarantee coverage
- Status indicates whether guarantor has accepted
- Use for compliance and risk assessment reporting