---
title: "Fetch all sub-accounts belonging to the customer."
method: GET
path: "/ledger/subaccounts"
tags: ["ledger-sub-accounts"]
---

# Fetch all sub-accounts belonging to the customer.

`GET /ledger/subaccounts`

This endpoint returns all sub-accounts

## Query parameters

- `accountId` string, uuid
- `size` integer
- `page` integer

## Response `200`

Sub-accounts fetched Successfully

- SubAccountList — Paginated list of sub-accounts belonging to a client.
  - `name` string — Descriptive name for the list
  - `size` integer — Positive integer
  - `totalItems` integer — Positive integer
  - `nextPage` integer — Positive integer
  - `previousPage` integer — Positive integer
  - `content` SubAccount[], required — List of sub-accounts
    - `id` string, uuid, required — Unique sub-account ID
    - `accountId` string, uuid, required — The main account ID to which this sub-account belongs.
    - `displayName` string — An optional name for the sub-account.
    - `reference` string, required — A unique reference for the sub-account.
    - `currency` string, required — Currency of the sub-account
    - `accountBalance` AccountBalanceDetails, required — Account balance details
      - `balance` number — The actual ledger balance of the account
      - `availableBalance` number — The available balance for spending
    - `frozen` boolean, required — Indicates if the sub-account is frozen (locked) or not.
    - `createdDate` string, date-time, required — The date the sub-account was created.

## Other responses

- `400` — Request could not be validated
- `401` — Client is not authorized to make request
- `403` — Expected permission is not available.
- `default` — Internal Server Error

---

[API](https://skmtc.net/nestechops/apis/onboard-external-api-gateway.md) · [All operations](https://skmtc.net/nestechops/apis/onboard-external-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nestechops/onboard-external-api-gateway/revisions/35fe01ca087b/schema)
