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
| Name | Type | Description |
|---|---|---|
groupId Required | groupId | The identifier of a group in your app, which the Get Customer Groups endpoint returns. |
Query Parameters
| Name | Type | Description |
|---|---|---|
paginationToken Optional | paginationToken | An optional token you use to get the next set of members. Responses that have more members available include a Note: Omit this parameter the first time you call this endpoint. |
limit Optional | limit | An optional maximum number of members to return in a single response. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | GetGroupMembersResponse | Request succeeded. |
| 400 | Bad Request Content-Type: application/json | (InvalidGroupIdError | InvalidLimitError | InvalidPaginationTokenError) | Invalid request. |
| 401 | Unauthorized | The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests. | |
| 404 | Not Found Content-Type: application/json | GroupNotFoundError | The group doesn’t exist. |
| 429 | Content-Type: application/json | RateLimitExceededError | The request exceeded the rate limit. |
| 500 | Internal 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=50Group 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
}