Description (User's Permission)
Show the permisions of the selected user. (GET)
End Point
https://api-h2h-staging.yedpay.com/v1/users/{{user_id}}/permissions
Variable
| # | Name | Type | Description |
|---|---|---|---|
| 1 | user_id | String | User's ID |
Request Header
| # | Key | Value | Description |
|---|---|---|---|
| 1 | Authorization | Bearer {{access_token}} | Login Token |
Body
| # | Name | Type | Description |
|---|
Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | Request Success or Fail |
| 2 | data | Array | Include User's Permissions (Company, User, etc..) |
Success Response - data
| # | Name | Type | Description |
|---|---|---|---|
| 1 | user_id | String | Id of the User |
| 2 | role | String | Role of the User |
| 3 | permissions | Array | Include User's Permissions for:
- Name of the Permissions - ability - allowed |
Example Success Response
{
"success": true,
"data": {
"user_id": "JwoMPpKy",
"role": "operator",
"permissions": {
"User": [
{
"ability": "create",
"allowed": false
},
{
"ability": "delete",
"allowed": false
},
{
"ability": "statusUpdate",
"allowed": false
},
{
"ability": "attach",
"allowed": false
},
{
"ability": "revoke",
"allowed": false
}
],
"Company": [
{
"ability": "index",
"allowed": false
},
{
"ability": "create",
"allowed": false
},
{
"ability": "update",
"allowed": false
},
{
"ability": "assign",
"allowed": false
},
{
"ability": "delete",
"allowed": false
},
{
"ability": "documentStore",
"allowed": false
}
]
}
}
}
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": "Unauthenticated.",
"status": 500
}
v1.89.5-20251216 © The Payment Cards Group Limited. All rights reserved.