Get a time-entry by id
Retrieve a single time-entry identified by its unique identifier.
Read more about the time-entry object.
Please see this guide on how to retrieve time-entries the right way.
Headers
API key. Value must be formatted like so: lucca application={api_key}.
Path Parameters
Identifier of the time-entry.
Response
OK
time-entries are the working time sequences spent by a user on any given day.
time-entries come in different units and submission modes that should match the timesheet configuration of a given owner on a given day.
About units & duration
Lucca Timesheet supports up to 3 different units when it comes to entering time-entries. These are:
0: DaysIn this case, the user does not enter the exact hours he/she started working, but rather the total duration spent as a fraction of a day. For example: "John worked half a day on Monday".1: HoursIn this case, the user still does not enter the exact hours, but only the duration spent in hours. For example: "John worked 7h30min yesterday".2: TimeIn this unit, the user has to enter the actual time he/she started working, as well as the end time. For example: "John started working at 08:00 for 3 hours, thus ending at 11:00".
Whichever the unit, the time-entry is mainly determined by three properties:
(int) ownerId: The user it belongs to.(date-time) startsAt: The date and time when the user started working. InDaysandHoursunits, the time part can only be00:00:00for "morning" (AM) or12:00:00for the "afternoon" (PM).(duration) duration: The total time spent by the user from the time he/she started. In all units, this property is serialized as a string compliant with the Timespan formating:d.hh:mm:sswheredis the number of days (can be omitted if equal to zero which is in most cases),hhthe number of hours,mmthe number of minutes, andssthe number of seconds.
Some examples :
About submission modes
There are 2 submission modes in Lucca Timesheet:
- Attendance: the user is expected to enter the sequences of work without much detail.
- Activities: the user is expected to enter the time spent on each task / project / whatever.
Therefore, time-entries in activities mode have a supplementary property: the set of task / project / cost center / ... the user worked on. These analytical items are called AxisSections. More info here [blocked].
The time-entry is NOT determined by the axisSection[] it is associated with as a user can change the axisSection[].
About time types
Each time-entry can reference a time type via its timeTypeId property.
Time types are a configured working time classification. It is generally used as a way of discriminating different types of working hours regarding compensation:
- Attendance
- Travels
- etc...
Time types can only be used on users that belong to a specific regulation (ie time and attendance policy) mode: timeTrackingMode: typed. Whenever it is not the case, the timeTypeId property should be left null.
Validation rules
Locked timeentries after timesheet submission
A time-entry cannot be modified if its startsAt date belongs to an already submitted or approved timesheet.
StartsAt and timezones
The startsAt date-time property must be considered a floating date-time. As such, no UTC offset should be sent when creating or editing a time-entry.
Max duration
A time-entry cannot have a duration longer than 24h00 (ie one full day).
Cut at midnight
A time-entry cannot overlap 2 different days (example startsAt = 18:00:00 and duration = 10:00:00). It should be two distinct time-entries cut at 00:00:00.
Mandatory axisSection on activity timesheets
A time-entry must have axisSection if the corresponding timesheet is in activity mode, and vice-versa.
Inactive axisSection
A time-entry cannot be modified if one of its axisSection is no longer active (active=false).
Incompatible axisSections
A time-entry cannot have nested axisSections that does not meet a correct parent-child tree structure.
Fields
Related topics
Update a time-entry by idDelete a time-entry by idGet a Working Time Arrangement by id.Get a Collective Schedule from a Working Time Arrangement by id.Update multiple time-entries