Update fields of a single time-entry identified by its unique id.
The “id” field must be sent and correspond to an existing time-entry.
Read more about the time-entry object and any validation error that you might encounter when using this API.
There are different ways to update time-entries. Please see this guide on how to update time-entries the right way depending on your use case.
API key. Value must be formatted like so: lucca application={api_key}.
Identifier of the time-entry.
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.
Lucca Timesheet supports up to 3 different units when it comes to entering time-entries. These are:
0: Days In 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: Hours In 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: Time In 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".enum TimeEntryUnit:
{
Days = 0,
Hours = 1,
Time = 2
}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. In Days and Hours units, the time part can only be 00:00:00 for "morning" (AM) or 12:00:00 for 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:ss where d is the number of days (can be omitted if equal to zero which is in most cases), hh the number of hours, mm the number of minutes, and ss the number of seconds.Some examples :
// TIME UNIT
// Case: "John (id: 416) worked between 09:45 and 12:15 on January, 1st 2021."
var timeEntry = {
"ownerId": 416,
"startsAt": "2021-01-01 09:45:00",
"duration: "02:30:00",
"unit": 2
};
// HOURS UNIT
// Case: "John (id: 416) spent 4h45min working on January, 1st 2021 in the morning"
var timeEntry = {
"ownerId": 416,
"startsAt": "2021-01-01 00:00:00",
"duration: "04:45:00",
"unit": 1
}
// DAYS UNIT
// Case: "John (id: 416) worked on the afternoon of January, 1st 2021"
var timeEntry = {
"ownerId": 416,
"startsAt": "2021-01-01 12:00:00",
"duration: "12:00:00",
"unit": 0
}There are 2 submission modes in Lucca Timesheet:
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.
The time-entry is NOT determined by the axisSection[] it is associated with as a user can change the axisSection[].
{
"ownerId": 416,
"startsAt": "2021-01-01 00:00:00",
"duration: "04:45:00",
"unit": 1,
"axisSections": [
{
"name": "R&D",
"axis": {
"name": "Cost centers"
}
},
{
"name": "My awesome project",
"axis": {
"name": "Projects"
}
},
{
"name": "Testing",
"axis": {
"name": "Tasks"
}
}
]
}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:
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.
A time-entry cannot be modified if its startsAt date belongs to an already submitted or approved timesheet.
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.
A time-entry cannot have a duration longer than 24h00 (ie one full day).
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.
A time-entry must have axisSection if the corresponding timesheet is in activity mode, and vice-versa.
A time-entry cannot be modified if one of its axisSection is no longer active (active=false).
A time-entry cannot have nested axisSections that does not meet a correct parent-child tree structure.
Reference to the time-entry owner.
x >= 1199
Unit in which the time-entry has been entered.
0, 1, 2 2
The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).
"2022-01-01T08:00:00"
Duration of the time-entry in the "c" format of a C# timespan In other words : d.hh:mm:ss. Max: "1.00:00:00" (ie 24 hours).
"03:45:00"
The owner of this time-entry.
Attribute used to identify last modification source :
0, 1, 2, 3 Represent the activities that time-entry should be associated with. When not in activity mode, send an empty array, or do not serialize this property.
A comment to add additional information about the given time-entry. It will be visible on Lucca Timesheet user interface.
Optional reference of a configured Time Type. To use only if the timesheet is set up to use Time Types. Null otherwise.
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.
Lucca Timesheet supports up to 3 different units when it comes to entering time-entries. These are:
0: Days In 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: Hours In 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: Time In 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".enum TimeEntryUnit:
{
Days = 0,
Hours = 1,
Time = 2
}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. In Days and Hours units, the time part can only be 00:00:00 for "morning" (AM) or 12:00:00 for 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:ss where d is the number of days (can be omitted if equal to zero which is in most cases), hh the number of hours, mm the number of minutes, and ss the number of seconds.Some examples :
// TIME UNIT
// Case: "John (id: 416) worked between 09:45 and 12:15 on January, 1st 2021."
var timeEntry = {
"ownerId": 416,
"startsAt": "2021-01-01 09:45:00",
"duration: "02:30:00",
"unit": 2
};
// HOURS UNIT
// Case: "John (id: 416) spent 4h45min working on January, 1st 2021 in the morning"
var timeEntry = {
"ownerId": 416,
"startsAt": "2021-01-01 00:00:00",
"duration: "04:45:00",
"unit": 1
}
// DAYS UNIT
// Case: "John (id: 416) worked on the afternoon of January, 1st 2021"
var timeEntry = {
"ownerId": 416,
"startsAt": "2021-01-01 12:00:00",
"duration: "12:00:00",
"unit": 0
}There are 2 submission modes in Lucca Timesheet:
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.
The time-entry is NOT determined by the axisSection[] it is associated with as a user can change the axisSection[].
{
"ownerId": 416,
"startsAt": "2021-01-01 00:00:00",
"duration: "04:45:00",
"unit": 1,
"axisSections": [
{
"name": "R&D",
"axis": {
"name": "Cost centers"
}
},
{
"name": "My awesome project",
"axis": {
"name": "Projects"
}
},
{
"name": "Testing",
"axis": {
"name": "Tasks"
}
}
]
}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:
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.
A time-entry cannot be modified if its startsAt date belongs to an already submitted or approved timesheet.
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.
A time-entry cannot have a duration longer than 24h00 (ie one full day).
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.
A time-entry must have axisSection if the corresponding timesheet is in activity mode, and vice-versa.
A time-entry cannot be modified if one of its axisSection is no longer active (active=false).
A time-entry cannot have nested axisSections that does not meet a correct parent-child tree structure.