Contents

Get Group Members

Get a paginated list of the customers that belong to a group.

URL

GET https://api.storekit.apple.com/groups/v1/group/{groupId}

Sandbox URL

GET https://api.storekit-sandbox.apple.com/groups/v1/group/{groupId}

Path Parameters

NameTypeDescription
groupId RequiredgroupId

The identifier of a group in your app, which the Get Customer Groups endpoint returns.

Query Parameters

NameTypeDescription
paginationToken OptionalpaginationToken

An optional token you use to get the next set of members. Responses that have more members available include a paginationToken.

Note: Omit this parameter the first time you call this endpoint.

limit Optionallimit

An optional maximum number of members to return in a single response.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
GetGroupMembersResponse

Request succeeded.

400Bad Request
Content-Type: application/json
(InvalidGroupIdError | InvalidLimitError | InvalidPaginationTokenError)

Invalid request.

401Unauthorized

The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests.

404Not Found
Content-Type: application/json
GroupNotFoundError

The group doesn’t exist.

429
Content-Type: application/json
RateLimitExceededError

The request exceeded the rate limit.

500Internal Server Error
Content-Type: application/json
GeneralInternalError

Server error. Try again later.

Mentioned in

Discussion

Call this endpoint to enumerate the customers that belong to a group. Get the groupId for a group by calling the Get Customer Groups endpoint.

The response, GetGroupMembersResponse, contains a GroupMemberEntry for each member. Each entry identifies the member by their appTransactionId.

Each response returns at most the number of members you request in the limit query parameter. If the hasMore field in the response is true, more members are available: call the endpoint again with the paginationToken from the previous response to get the next set.

The following request gets the first 50 members of a group:

GET https://api.storekit.apple.com/groups/v1/group/{groupId}?limit=50

Group membership is separate from any transaction information. To unlock content for a customer, read their transactions; don’t depend on this endpoint. For more information, see Get Customer Groups.

Test in the sandbox environment

In the sandbox environment, this endpoint returns a placeholder response when you send the placeholder groupId of 900000000000000000 that the Get Customer Groups endpoint returns:

{
  "members": [
    {
      "appTransactionId": "700000000000000000"
    }
  ],
  "hasMore": false
}

See Also

Multiseat purchases