Roles
Different team members can have different roles in your company with different access levels and functions. On this page, we’ll dive into the different roles endpoints you can use to manage your employees roles. We'll look at how to upload and update roles.
The Role model
The role model contains all the information about this role parameters, including the role name, code and access restrictions.
Properties
- Name
code
- Type
- number
- Description
Unique identifier for the role.
- Name
name
- Type
- string
- Description
The name of the role.
- Name
usedInSchedule
- Type
- boolean
- Description
Can team member with this role be used in schedules.
- Name
canEditSchedule
- Type
- boolean
- Description
Can team member with this role edit and create schedules.
- Name
canApproveSchedule
- Type
- boolean
- Description
Can team member with this role approve schedules.
- Name
canAddNewEmployees
- Type
- boolean
- Description
Can team member with this role add new team members on the store level.
- Name
canEditRevenue
- Type
- boolean
- Description
Can team member with this role edit revenue forcasts.
- Name
isAdmin
- Type
- boolean
- Description
Does team member with this role have an access to admin section of the app.
Update all roles
This endpoint allows you to upload all your roles. It replaces all the existing roles with uploaded ones. See the code examples for how to upload your team member Roles through ProShedule API.
Required attributes
- Name
body
- Type
- Array<role>
- Description
An array of role objects.
Request
curl https://api.proschedule.ambraisoft.com/integrations/roles \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {token}" \
--data-raw '[
{
"code": 1,
"name": "General Manager",
"usedInSchedule": false,
"canEditSchedule": true,
"canApproveSchedule": true,
"canAddNewEmployees": true,
"canEditRevenue": true,
"isAdmin": false
},
{
"code": 2,
"name": "Crew member",
"usedInSchedule": true,
"canEditSchedule": false,
"canApproveSchedule": false,
"canAddNewEmployees": false,
"canEditRevenue": false,
"isAdmin": false
}
]'
Response
{
"message": "2 role(s) uploaded",
"status": 200
}