Skip to main content

Create an employee

POSThttps://carchost.fieldcontrol.com.br/employees

Creates 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-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

namestringrequired

Employee name.

From 4 to 150 characters.

emailstring (email)required

Email used to sign in to the app. Must be unique across all Field Control accounts. The employee receives an invitation at this email.

passwordstring

Password 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.

notesstring

Employee notes.

Up to 2000 characters.

avatarUrlstring

URL of the employee's photo.

Accepts: null.

contractobject

Employee 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.

workScheduleobject

Work 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
startstring

Start of the work schedule.

Example: 08:00:00.

endstring

End of the work schedule.

Example: 17:00:00.

breakobject

Break.

Fields of break
startstring

Start of the break.

Example: 12:00:00.

endstring

End 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.