v1

latestOpenAPI 3.0.02026-07-2466275257.1 KB
user

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.

patch/v2/modify-user-permission

Request body

Example request

{
  "modifyUserPermission": {
    "userId": "user-456",
    "teamId": "team-356",
    "roles": [
      "ROLE_TYPES_SUPPLIER_FULL",
      "ROLE_TYPES_SUPPLIER_REPORT_VIEW"
    ],
    "retailerTeamId": "retailer-team-id-356"
  }
}

Response

Permission modified successfully.

Example response

{
  "modifyUserPermission": {
    "userId": "user-456",
    "teamId": "team-356",
    "roles": [
      "ROLE_TYPES_SUPPLIER_FULL",
      "ROLE_TYPES_SUPPLIER_REPORT_VIEW"
    ],
    "retailerTeamId": "retailer-team-id-356"
  }
}