Description (Revoke Permission from User)
Revoke permisions from the selected user. (POST)
End Point
https://api-h2h-staging.yedpay.com/v1/users/{{user_id}}/permissions/revoke
Variable
| # | Name | Type | Description |
|---|---|---|---|
| 1 | user_id | String | User's ID |
Request Header
| # | Key | Value | Description |
|---|---|---|---|
| 1 | Authorization | Bearer {{access_token}} | Login Token |
| 2 | Content-Type | application/x-www-form-urlencoded | x-www-form-urlencoded Format |
Body
| # | Name | Type | Description |
|---|---|---|---|
| 1 | permissions[0][key] | String | Revoke Permission from the User (Company, User, etc..) |
| 2 | permissions[0][ability] | String | The Ability of the Permission (index, view, update, etc..) |
Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | Request Success or Fail |
| 2 | data | Array | Include all Revoke Permission's Information (key, ability, success, message) |
Success Response - data
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key | String | Revoke Permission of the User |
| 2 | ability | String | The Ability of the Permission |
| 3 | success | Boolean | Revoke Permission Success or Fail |
| 4 | message | String | Success or Fail Message |
Example Success Response
{
"success": true,
"data": [
{
"key": "Transaction",
"ability": "delete",
"success": false,
"message": "Invalid role permission"
},
{
"key": "Transaction",
"ability": "index",
"success": true,
"message": "Success"
}
]
}
Error Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | False |
| 2 | message | String | Message of the Error |
| 3 | status | Integer | HTTP Status Code |
Example Error Response
{
"success": false,
"message": "Forbidden",
"status": 403
}
v1.89.5-20251216 © The Payment Cards Group Limited. All rights reserved.