post
https://{host}/v2/v2/userGroup2/join?id=
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Pass at least one among the query parameters. - id, externalId, primaryUserId.
Make sure you have the appropriate access control configured. For more information, see access group documentation.
Example request
curl --location 'https://eu.api.capillarytech.com/v2/userGroup2/join?id=3962910&primaryUserId=565039506' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkaHVfcI3MjU2YQ==' \
--header 'Cookie: _cfuvid=vzCvOnzGrFLOd.qyWq3C1wR4U_d0NN8lePwtil_RTVU-1774957797145-0.0.1.1-604800000' \
--data '[
{
"userId": 568557831,
"primaryMember": true,
"permissions": [
"allow_points_redemption",
"allow_points_transfer",
"block_points_redemption",
"block_points_transfer"
],
"defaultGroup" : true,
"active" : true
}
]'Query parameter
| Parameter | Data type | Description |
|---|---|---|
| id | long | Unique ID of the user group. |
| externalId | String | External ID of the user group. |
| primaryUserId | long | User ID of the primary member of the group. |
Note: Either of the query parameters is mandatory.
Body parameters
| Parameter | Data type | Mandatory | Description |
|---|---|---|---|
userId | Long | Yes | The unique identifier for the user. |
primaryMember | boolean | No | A boolean value indicating whether the user is a primary member or not. Notes:
|
permissions | String | Yes | An array of strings that represent the permissions assigned to the user. |
Example response
{
"response": [
{
"entityId": {
"userId": 568557831,
"groupId": 3962910,
"permissions": [
"allow_points_redemption",
"allow_points_transfer",
"block_points_redemption",
"block_points_transfer"
],
"primaryMember": true,
"active": true,
"defaultGroup": true
},
"result": {
"userId": 568557831,
"groupId": 3962910,
"permissions": [
"allow_points_redemption",
"allow_points_transfer",
"block_points_redemption",
"block_points_transfer"
],
"primaryMember": true,
"active": true,
"defaultGroup": true
},
"warnings": []
}
],
"totalCount": 1,
"failureCount": 0
}Response parameters
| Parameter | Description |
|---|---|
| response | Array containing details of the response entity and the result. |
| response[].entityId | Contains information about the entity's identification and associated properties. |
| response[].entityId.userId | Unique identifier of the user associated with the entity. |
| response[].entityId.groupId | Unique identifier of the group associated with the entity. |
| response[].entityId.permissions | Array of permissions granted to the entity. |
| response[].entityId.defaultGroup | Boolean indicating whether the entity belongs to a default group or not. |
| response[].entityId.active | Boolean indicating if the entity is active. |
| response[].entityId.primaryMember | Boolean indicating if the entity is a primary member or not. |
| response[].result | Contains the resultant details after processing the request. |
| response[].result.userId | Unique identifier of the user associated with the result. |
| response[].result.groupId | Unique identifier of the group associated with the result. |
| response[].result.permissions | Array of permissions granted to the result. |
| response[].result.defaultGroup | Boolean indicating whether the result belongs to a default group or not. |
| response[].result.active | Boolean indicating if the result is active. |
| response[].result.primaryMember | Boolean indicating if the result is a primary member or not. |
| response[].warnings | Array containing any warnings related to the response. |
| totalCount | The total number of entities in the response. |
| failureCount | The total number of failures during the processing. |
Error code
| Error code | Description |
|---|---|
| 1636 | Customer is already a member of the group |
| 1635 | group query param is not passed |
