Skip to content

Start employee break.

Request

Start employee break.

Client application should send request immediately when event occurs. If there is any problem with connection or access to API event should be queued in clients side and then sent in order of occurence.

Before you can use this method, please:

  1. Configure 'API Terminal' in Calamari Clockin configuration panel
  2. Make sure API access is enabled


Expect error codes:
  1. INVALID_EMPLOYEE - when invalid employee id provided
  2. INVALID_TIME - when invalid event time provided
  3. INVALID_BREAK_TYPE - when invalid break type id provided
  4. API_TERMINAL_NOT_AVAILABLE - no API terminal configured or the employee doesn't have access to this terminal

Security
basicAuth
Bodyapplication/json
personstringrequired

Employee e-mail or login

Example:"john.white@mycompany.com"
timestring, (date-time)required

Date and time of event occurence in ISO format.

breakTypeinteger, (int64)required

ID break type

Example:1
curl -i -X POST \
  -u '<username>:<password>' \
  https://awesome-company.calamari.io/api/clockin/terminal/v1/break-start \
  -H 'Content-Type: application/json' \
  -d '{
    "person": "john.white@mycompany.com",
    "time": "2019-08-24T14:15:22Z",
    "breakType": 1
  }'

Responses

successful operation

Bodyapplication/json
personobject(Person)required

Employee description

breakStatusstringrequired

Employee break status after request

Enum:"STARTED""FINISHED"
Response
{ "person": { "firstName": "John", "lastName": "White" }, "breakStatus": "STARTED" }