Modify user permission
Use this endpoint to update a user's permissions by providing both user ID and team ID. To modify permissions for supplier teams, full supplier access is required, while full retailer access is necess
description: "Use this endpoint to update a user's permissions by providing both user ID and team ID. To modify permissions for supplier teams, full supplier access is required, while full retailer access is necessary for retailer teams. Retailers can modify supplier permissions by specifying retailerTeamId. Ensure that API requests are authenticated with the retailer's bearer token. Users can be assigned either 'Retailer Full' and 'Retailer Report View' permissions or 'Supplier Full' and 'Supplier Report View' permissions. Combining retailer and supplier roles is not allowed."
Modify user permission
Use this endpoint to update a user's permissions by providing both user ID and team ID. To modify permissions for supplier teams, full supplier access is required, while full retailer access is necessary for retailer teams.
Retailers can modify supplier permissions by specifying retailerTeamId. Ensure that API requests are authenticated with the retailer's bearer token.
Users can be assigned either 'Retailer Full' and 'Retailer Report View' permissions or 'Supplier Full' and 'Supplier Report View' permissions. Combining retailer and supplier roles is not allowed.
For accessing the API a valid JWT jwt must be passed in all queries in the 'Authorization' header. The following syntax must be used in the 'Authorization' header. (Bearer xxx.yyy.zzz)
Permission modified successfully.
There was a problem with input.
Login failed or token not valid.
Login failed or token not valid.
User for specified id does not exist.
An unexpected error response.
PATCH /v2/modify-user-permission HTTP/1.1
Host: auth.<env>.citrusad.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 177
{
"modifyUserPermission": {
"retailerTeamId": "retailer-team-id-356",
"roles": [
"ROLE_TYPES_SUPPLIER_FULL",
"ROLE_TYPES_SUPPLIER_REPORT_VIEW"
],
"teamId": "team-356",
"userId": "user-456"
}
}{
"modifyUserPermission": {
"retailerTeamId": "retailer-team-id-356",
"roles": [
"ROLE_TYPES_SUPPLIER_FULL",
"ROLE_TYPES_SUPPLIER_REPORT_VIEW"
],
"teamId": "team-356",
"userId": "user-456"
}
}
