Yedpay

Description (Company's User Permission List)

Show the list of all the User with Permissions related with the company. (GET)

Queries

In order to search users you can add in the url the follow parameters

  • * username - username of the user
  • * first_name - first_name of the user
  • * last_name - last_name of the user
  • * email - email of the user

Example:

https://api.yedpay.com/v1/companies/{{company_id}}/permissions?username=JhonDoe&first_name=Jhon&last_name=Doe&email=jhon@doe.com

End Point

https://api.yedpay.com/v1/companies/{{company_id}}/permissions

Variable

# Name Type Description
1 company_id String Company'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 User Permission List Success or Fail
2 data Array Include All User's Permissions (Company, User, etc..)
3 meta Array Include all Pagination's Information (total, count, total_pages, 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": "xXxXxXxXxXXxXx",
                        "role": "owner",
                        "permissions": {
                            "User": [
                                {
                                    "ability": "index",
                                    "allowed": true
                                },
                                {
                                    "ability": "create",
                                    "allowed": true
                                },
                                {
                                    "ability": "delete",
                                    "allowed": false
                                }
                            ],
                            "Company": [
                                {
                                    "ability": "autoSettlement",
                                    "allowed": true
                                },
                                {
                                    "ability": "index",
                                    "allowed": false
                                },
                                {
                                    "ability": "create",
                                    "allowed": false
                                },
                                {
                                    "ability": "assign",
                                    "allowed": false
                                },
                                {
                                    "ability": "delete",
                                    "allowed": false
                                }
                            ]
                        }
                    },
                    {
                        "user_id": "xXxXxXxXxXXxXx",
                        "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
                                }
                            ]
                        }
                    }
                ],
                "meta": {
                    "pagination": {
                        "total": 2,
                        "count": 2,
                        "per_page": 40,
                        "current_page": 1,
                        "total_pages": 1,
                        "links": []
                    }
                }
            }
        

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.30.0-20191113 © The Payment Cards Group Limited. All rights reserved.