Change user access
This interface is used to change user's access. Staff Only and Intern can't set access. Only the managers who have admin access can use this endpoint.
Change user access and managed staff list
POST /edit-access
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Body
Name
Type
Required
Description
customer_id
string
The unique Marco identifier for your company.
email
string
The user's email
profile_type
string
Valid values: Manager Only / Worker Only / Intern / Manager & Worker
access_admin
boolean
Default value: false
access_payroll
boolean
Default value: false
access_time
boolean
Default value: false
staff_list
list of string
Managed staff email list
Parameter Example
{
"customer_id": 1,
"email": "[email protected]",
"profile_type": "Manager Only",
"access_admin": false,
"access_payroll": false,
"access_time": true,
"staff_list": [
"[email protected]",
"[email protected]"
]
}Response
{
"id": 2232,
"access_admin": false,
"access_payroll": false,
"access_time": false,
"name": "Zhounan",
"platform_email": "[email protected]",
"staff_list": [
30,
3592
]
}//if staff's email is wrong
{
"code": "ERROR_FATAL",
"message": "Please check the staff email",
"payload": "[email protected]"
}
//if staff's profile type is wrong
{
"code": "ERROR_FATAL",
"message": "Staff only can't set access",
"payload": ""
}
//if auth user don't have access to set staff's access
{
"code": "ERROR_FATAL",
"message": "Access Denied",
"payload": ""
}Last updated