Update permissions

API to update permissions of a member in a group.

This API enables you to update the user group permissions of a member in a group. There are four types of permissions that you can set for a member:

  • allow_points_redemption
  • allow_points_transfer
  • block_points_redemption
  • block_points_transfer

👍

Note

For an overview on our APIs and for hands-on testing, refer to API overview and Make your first API call documentation.

Prerequisites

Resource information

URI/v2/userGroup2/members/permissions
HTTP methodPUT
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

https://eu.api.capillarytech.com/v2/userGroup2/members/permissions?id=3839

Request query parameters

Parameter (Parameters marked * are mandatory)Description
id*User group identification number.

Request body parameters

[{
    "userId": 109983515,
    "permissions":
    ["allow_points_transfer"]
}]
Parameter (Parameters marked * are mandatory)TypeDescription
userId*stringUser ID (customer ID) of the group member you want to update the permission for.
permissions*stringThe permission list that you want to assign the user. Supported values: allow_points_redemption, allow_points_transfer, block_points_redemption, block_points_transfer

Response parameters

{
    "response": [
        {
            "entityId": {
                "userId": 109983515,
                "groupId": 3839,
                "permissions": [
                    "allow_points_transfer"
                ],
                "defaultGroup": false,
                "primaryMember": false,
                "active": false
            },
            "result": {
                "userId": 109983515,
                "groupId": 3839,
                "permissions": [
                    "allow_points_transfer"
                ],
                "defaultGroup": false,
                "primaryMember": false,
                "active": false
            },
            "warnings": []
        }
    ],
    "totalCount": 1,
    "failureCount": 0
}
ParameterDescription
responseAn array containing the details of the response for each entity.
entityIdAn object holding identifier and status details of the member in a user group.
- userIdCustomer ID of the user group member.
- groupIdIdentifier for the group to which the user belongs
- permissionsArray of permissions assigned to the user
- defaultGroupBoolean indicating if this group is the user's default.
- primaryMemberBoolean indicating if the user is a primary member of the group.
- activeBoolean indicating if the user is active in this group.
resultObject echoing the relevant details of the entity, confirming the information processed.
warningsArray for potential warning messages.
totalCountTotal number of entities processed
failureCountTotal number of entities that failed to process

Error codes

Error codeDescription
1632Invalid user group member ID passed. Make sure that the user group ID is valid.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!