Create an employee
https://carchost.fieldcontrol.com.br/employeesCreates an employee and sends them an invitation to access the app at the given email. The employee's address is filled in with the account's address.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredEmployee name.
From 4 to 150 characters.
emailstring (email)requiredEmail used to sign in to the app. Must be unique across all Field Control accounts. The employee receives an invitation at this email.
passwordstringPassword the employee uses to sign in to the app. Optional: without a password, the employee sets their own through the invitation sent by email.
Accepts: null.
notesstringEmployee notes.
Up to 2000 characters.
avatarUrlstringURL of the employee's photo.
Accepts: null.
contractobjectEmployee contract. If omitted, the API stores hiredAt with the current date and firedAt as null, including on update.
Fields of contract
hiredAtstring (date)Hire date (AAAA-MM-DD).
firedAtstring (date)Termination date (AAAA-MM-DD). From this date on, the employee is inactive.
Accepts: null.
workScheduleobjectWork schedule, in HH:MM:SS. If omitted, the API stores 08:00:00 to 17:00:00 with a break from 12:00:00 to 13:00:00, including on update.
Fields of workSchedule
startstringStart of the work schedule.
Example: 08:00:00.
endstringEnd of the work schedule.
Example: 17:00:00.
breakobjectBreak.
Fields of break
startstringStart of the break.
Example: 12:00:00.
endstringEnd of the break.
Example: 13:00:00.
Responses
- 201
Employee created.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 422
Invalid body (resourceValidationErr) or email already used by another employee (
reason: duplicated). - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.