Skip to main content
GET
/
v1
/
loans
List loans
curl --request GET \
  --url https://api-dev.bsa.ai/v1/loans \
  --header 'Authorization: Bearer <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.api.bsa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Returns a page of loans. See Pagination for the common query parameter contract.

Query parameters

page
integer
default:"1"
rows
integer
default:"10"
orderBy
string
Common values: id, principal, expectedDisbursementDate.
sortOrder
string
ASC or DESC.
customerId
integer
Restrict the result to loans belonging to a specific customer.

Example

# All loans for customer 42
curl -sf "$BASE/v1/loans?customerId=42&page=1&rows=25" \
  -H "Authorization: Bearer $TOKEN"

Response

{
  "items": [
    {
      "id": "501",
      "accountNo": "000000501",
      "customerId": "42",
      "customerName": "Ada Lovelace",
      "loanProductId": "1",
      "loanProductName": "Standard 12-Month",
      "status": "Active",
      "principal": 5000,
      "approvedPrincipal": 5000,
      "currencyCode": "TZS"
    }
  ],
  "total": 7,
  "page": 1,
  "rowsPerPage": 25
}