Add employee shift.
Expect error codes:
- INVALID_EMPLOYEE - when invalid employee id provided
- INVALID_SHIFT_START - when invalid start of work time provided
- INVALID_SHIFT_END - when invalid finish of work time provided
- SHIFT_END_BEFORE_START - when end of work time is before start
- SHIFT_TO_SHORT - when shift period is shorter than one minute
- INVALID_BREAK_TYPE - when invalid break type id provided. You should use get-break-types method to find proper break type ID
- INVALID_BREAK_FOR_USER - when break type is not available for employee
- INVALID_BREAK_START - when invalid start of break time provided
- INVALID_BREAK_END - when invalid finish of break time provided
- BREAK_END_BEFORE_START - when end of break time is before start
- BREAK_IS_NOT_IN_SHIFT_RANGE - when break time range goes beyond work time range
- BREAK_TO_SHORT - when break period is shorter than one minute
- BREAKS_OVERLAP - when one break time range overlaps another
- INVALID_PROJECT_TYPE - when invalid project type id provided. You should use get-projects method to find proper project type ID
- INVALID_PROJECT_FOR_USER - when project type is not available for employee. You should use get-projects-for-person method to find proper project type ID
- INVALID_PROJECT_TIME_ENTRY_START - when invalid start of project time entry provided
- INVALID_PROJECT_TIME_ENTRY_END - when invalid finish of project time entry provided
- PROJECT_TIME_ENTRY_END_BEFORE_START - when end of project time entry is before start
- PROJECT_TIME_ENTRY_IS_NOT_IN_SHIFT_RANGE - when project time entry goes beyond work time range
- PROJECT_TIME_ENTRY_TO_SHORT - when project time entry is shorter than one minute
- PROJECT_TIME_ENTRIES_OVERLAP - when one project time entry overlaps another
- SHIFT_DESCRIPTION_TOO_LONG - when description contains more than 4096 characters
- SHIFT_DESCRIPTION_NOT_ALLOWED_FORMATTING - when description contains more not allowed HTML or Markdown formatting
Security
basicAuth
Employee identifier. You can use e-mail or external identifier in format (externalNumber:ABC123)
Example:"john.white@mycompany.com"
- https://awesome-company.calamari.io/apihttps://awesome-company.calamari.io/api/clockin/timesheetentries/v1/create
curl -i -X POST \
-u '<username>:<password>' \
https://awesome-company.calamari.io/api/clockin/timesheetentries/v1/create \
-H 'Content-Type: application/json' \
-d '{
"person": "john.white@mycompany.com",
"shiftStart": "2019-08-24T14:15:22Z",
"shiftEnd": "2019-08-24T14:15:22Z",
"breaks": [
{
"breakType": 1,
"breakStart": "2019-08-24T14:15:22Z",
"breakEnd": "2019-08-24T14:15:22Z"
}
],
"projects": [
{
"projectType": 1,
"projectStart": "2019-08-24T14:15:22Z",
"projectEnd": "2019-08-24T14:15:22Z"
}
],
"description": "string"
}'successful operation
Date and time of timesheet entry finished. Has null value if employee does not clock out
Finished work timezone. Has null value if employee does not clock out
Example:"Europe/Warsaw"
Duration of timesheet entry in seconds. Has 0 value if employee does not clock out
Example:28800
Response
{ "id": 0, "started": "2019-08-24T14:15:22Z", "finished": "2019-08-24T14:15:22Z", "startedTimeZone": "Europe/Warsaw", "finishedTimeZone": "Europe/Warsaw", "duration": 28800, "person": { "firstName": "John", "lastName": "Williams", "email": "john.williams@domain.com", "externalId": "A12Y" }, "breaks": [ { … } ], "projects": [ { … } ], "closed": true, "description": "string" }