# Retrieve client accounts overview

`GET /lokta-lms/api/v1/clients/{clientId}/accounts`

An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.
It is quite reasonable to add resources like this to simplify User Interface development.

Example Requests:
 
clients/1/accounts

clients/1/accounts?fields=loanAccounts,savingsAccounts

## Parameters
- `clientId` (path, integer, required): clientId

## Responses
- `200`: OK
- `400`: Bad Request

## Response fields
- `loanAccounts` (array of GetClientsLoanAccounts)
- `savingsAccounts` (array of GetClientsSavingsAccounts)
- `workingCapitalLoanAccounts` (array of GetClientsWorkingCapitalLoanAccounts)

## Example request (cURL)
```bash
curl -X GET \
  'http://localhost:8080/lokta-lms/api/v1/clients/{clientId}/accounts' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

## Example response
```json
{
  "loanAccounts": [
    {}
  ],
  "savingsAccounts": [
    {}
  ],
  "workingCapitalLoanAccounts": [
    {}
  ]
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/retrieveAllClientAccounts
