Staff
-
Create a new staff member
POST /api/1/staff.jsonFormats
json jsonpCreates a new staff member. Requires a valid user object to be posted.
Please Note: This may cause a charge for the user. If this is the case, they will receive an email asking them to confirm the creation of a new user
Errors
- 401 Unauthorized
- 402 Payment Required - if the authenticated user is on a plan with a maximum number of staff, and this user will take them over this limit, they will need to upgrade their plan.
- 403 Forbidden - returned if an authenticated user isn't allowed to create staff members
- 422 Invalid Record - if the staff member fails validation. An error message will be returned, declaring the error.
Example
POST /api/1/staff { "staff": { "active": "true", "email_address": "5jewel_kovacek@mertz.com", "first_name": "Sage", "hourly_rate_cents": null, "last_name": "Dicki", "login": "user5", "time_zone": "Australia/Perth", "type": "staff" } } 200 { "response": { "active": "true", "email_address": "5jewel_kovacek@mertz.com", "first_name": "Sage", "hourly_rate_cents": null, "last_name": "Dicki", "login": "user5", "time_zone": "Australia/Perth", "uuid": "694b9cd4-aa9a-47a1-b76c-1bca7c19a640", "type": "staff" } }Parameters
-
staff
A staff member JSON object.
Required-
uuid
A UUID to identify the user. If null, one will be generated
Optional Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
login
User’s login
Required Must be String -
first_name
User’s first name
Required Must be String -
last_name
User’s first name
Required Must be String -
email_address
User’s email address
Required Must be String -
time_zone
Time zone of the staff
Required Must be String -
active
Indicates whether the user is active or not. Note: This is a string.
Optional Must be one of: true, false. -
type
Indicates the user type. When updating or creating, you can only set the type to ‘manager’ or ‘staff’.
Optional Must be one of: owner, manager, freelancer, staff. -
hourly_rate_cents
The user’s hourly rate in cents
Optional Must be Integer
-