Track Time

POST {{baseUrl}}/odata/TrackTime

Helper method for writing time.

timeEntries - a list of time entries, each entry corresponds to a timesheet cell.

  • *date - write-off date
  • *comment - comment to the timesheet cell
  • *hours - hours
  • *userId - user ID
  • *projectId - project task ID
  • *projectTaskId - project task ID
  • activityId - activity type ID
  • roleId - Role ID

*required.

strategyIfEntryExists - if there is a time entry for the specified date and with the specified analytics (project, task, role and type of work), determines the behavior strategy:
CreateNew (by default) - a new timesheet line will be created.
Replace - time record will be replaced.
Merge - time entry will be merged (hours summed, comments merged)

The method creates timesheets as needed or uses existing ones. Recording is possible only in timesheets in the Draft state. Further adds lines and fills cells. If a cell for the specified date and properties already exists, its value is replaced with a new one.

Request Body

{"strategyIfEntryExists"=>"replace", "timeEntries"=>[{"date"=>"2022-09-01", "comment"=>"Text comment", "hours"=>4, "userId"=>"2010b229-62fb-427b-ad6a-b426d15dd39f", "projectId"=>"7979d62d-5236-491d-8d09-9cece6dfee29", "projectTaskId"=>"838de55f-e965-43ed-bcdf-8eeba10ede7f", "activityId"=>nil, "roleId"=>nil}]}