# Method: accounts.listSubaccounts

- [HTTP request](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.request_body)
- [Response body](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.response_body)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.ListSubAccountsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#body.aspect)
- [Try it!](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts/listSubaccounts#try-it)

List all sub-accounts for a given advanced account. This is a convenience wrapper for the more powerful `accounts.list` method. This method will produce the same results as calling `ListsAccounts` with the following filter: `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))`

### HTTP request

`GET https://merchantapi.googleapis.com/accounts/v1/{provider=accounts/*}:listSubaccounts`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `provider` | `string` Required. The aggregation service provider. Format: `accounts/{accountId}` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The maximum number of accounts to return. The service may return fewer than this value. If unspecified, at most 250 accounts are returned. The maximum value is 500; values above 500 are coerced to 500. |
| `pageToken` | `string` Optional. A page token, received from a previous `accounts.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided in the `accounts.list` request must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

Response message for the `accounts.listSubaccounts` method.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "accounts": [ { object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts#Account`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `accounts[]` | ``object (`https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts#Account`)`` The accounts for which the given parent account is an aggregator. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/content`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).