Find Account Groups by Merchant ID

Returns every account group within the authenticated organization that carries the given merchant_id. Use this endpoint to locate WHITELABEL group records using the identifier that already exists on your side, without having to store or look up WHITELABEL-generated group IDs.

Multiple matches and empty results

A merchant_id is not guaranteed to be unique — more than one group can share the same value. All matching groups are returned. When no group carries the requested merchant_id, the response contains an empty data array rather than an error. Deleted groups are never included.

GET/organizations/account-groups

Returns all account groups that match the given merchant_id. Because a merchant ID is not guaranteed to be unique, every matching group is returned. When no group carries that merchant ID the response contains an empty data array — it is not an error. Only groups belonging to the authenticated organization are ever returned; deleted groups are excluded.

Query Parameters

merchant_idstringrequired

The merchant-side identifier to look up. Must be an exact match.

Response

OK — zero or more matching account groups.

dataobject[]

List of account groups that carry the requested merchant_id. Empty when no match is found.

Show data properties
idstring<uuid>

WHITELABEL-generated unique identifier of the account group.

namestring

Display name of the account group.

merchant_idstring

Merchant-side identifier stored on this group.

parent_codestring,null<uuid>

The id of the group this group is nested under. null for a root (top-level) group.

created_atstring<date-time>

ISO 8601 timestamp of when the group was created.

updated_atstring<date-time>

ISO 8601 timestamp of the last update.

paginationobject
Show pagination properties
pageinteger
page_sizeinteger
total_itemsinteger
total_pagesinteger
has_nextboolean
has_previousboolean

Bad Request — merchant_id query parameter is missing or blank.

Unauthorized — invalid or missing API credentials.

Request
curl -X GET "https://api-sandbox.whitelabel.com/v1/organizations/account-groups?merchant_id=<merchant_id>" \
  -H "PUBLIC-API-KEY: <PUBLIC-API-KEY>" \
  -H "PRIVATE-SECRET-KEY: <PRIVATE-SECRET-KEY>"
Response
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "string",
      "merchant_id": "string",
      "parent_code": null,
      "created_at": "1970-01-01T00:00:00.000Z",
      "updated_at": "1970-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 0,
    "page_size": 0,
    "total_items": 0,
    "total_pages": 0,
    "has_next": true,
    "has_previous": true
  }
}