Method: accounts.list

Lists accounts accessible to the calling user and matching the constraints of the request such as page size or filters. This is not just listing the sub-accounts of an MCA, but all accounts the calling user has access to including other MCAs, linked accounts, standalone accounts and so on. If no filter is provided, then it returns accounts the user is directly added to.

HTTP request

GET https://merchantapi.googleapis.com/accounts/v1beta/accounts

The URL uses gRPC Transcoding syntax.

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 to accounts.list must match the call that provided the page token.

filter

string

Optional. Returns only accounts that match the filter. For more details, see the filter syntax reference.

Request body

The request body must be empty.

Response body

Response message for the accounts.list method.

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

JSON representation
{
  "accounts": [
    {
      object (Account)
    }
  ],
  "nextPageToken": string
}
Fields
accounts[]

object (Account)

The accounts matching the ListAccountsRequest.

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.