Yedpay

Description (Attach Permission to User)

Attach permisions to the selected user. (POST)

End Point

https://api.yedpay.com/v1/users/{{user_id}}/permissions/attach

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 Attach Permission of 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 Attach Permission's Information (key, ability, success, message)

Success Response - data

# Name Type Description
1 key String Attach Permission of the User
2 ability String The Ability of the Permission
3 success Boolean Attach 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.22.0-20190710 © The Payment Cards Group Limited. All rights reserved.