Timesheets

Last Updated: November 04, 2017

Following is a list of the properties that are common to both types of timesheet objects, and a description of each.

Important: Each employee/user may only ever have a single active timesheet (no end_time defined) at any given point in time. This is enforced by the API and attempts to create additional timesheets without end_time defined will fail.

id:
Integer. Read-only. Id of timesheet.
user_id:
Integer. User id for the user that this timesheet belongs to.
jobcode_id:
Integer. Jobcode id for the jobcode that this timesheet is recorded against.
locked:
Integer. Read-only. If greater than 0, the timesheet is locked for editing. A timesheet could be locked for various reasons, such as being exported, invoiced, etc. NOTE: This setting does not reflect the approved or submitted status of time. To determine whether a timesheet falls within an approved or submitted time frame, check the submitted_to or approved_to properties of the User object that owns the timesheet (you can easily obtain this via the supplemental_data portion of any response dealing with timesheets).
notes:
String. Notes associated with the timesheet.
customfields:
JSON object. Only present if the Advanced Tracking Add-on is installed. This is a key / value map of customfield ids to the customfield items that are associated with the timesheet.
created:
String (ISO8601 format). Read-only. Date/time when this object was created (i.e. 2004-02-12T15:19:21+00:00).
last_modified:
String (ISO8601 format). Read-only. Date/time when this object was last modified (i.e. 2004-02-12T15:19:21+00:00).
type:
String. Either 'regular' or 'manual'. Regular timesheets have a start/end time (duration is calculated by TSheets). Manual timesheets have a date and a duration (in seconds). Unique properties for each timesheet type are below.
on_the_clock:
Boolean. Read-only. Either true or false. If true, the user is currently on the clock (i.e. not clocked out, so end time is empty). If false, the user is not currently working on this timesheet. Manual timesheets will always have this property set as false.

Regular Timesheets

start:
String (ISO8601 format). Date/time that represents the start time of this timesheet (i.e. 2004-02-12T15:19:21+00:00).
end:
String (ISO8601 format). Date/time that represents the end time of this timesheet (i.e. 2004-02-12T15:19:21+00:00). Enter an empty string to make the timesheet active.
date:
String. Read-only. YYYY-MM-DD formatted date. The timesheet's date.
duration:
Integer. Read-only. The total number of seconds recorded for this timesheet.

Manual Timesheets

start:
String. Not applicable. Will always be an empty string.
end:
String. Not applicable. Will always be an empty string.
date:
String. YYYY-MM-DD formatted date. The timesheet's date.
duration:
Integer. The total number of seconds recorded for this timesheet.