v1

latestOpenAPI 3.1.0Apache 2.02026-07-22160175414.0 KB
TimeEntries

TimeEntries update service

Before using this service

This service is aimed at updating a given user TimeEntries easily, as it automatically detects and applies changes needed to transform whatever TimeEntries might currently exist to what you send it. It create, edit, or delete TimeEntries. An algorithm tries to match and update any existing TimeEntries, but it might wipe clean TimeEntries before adding new ones.

There are different ways to update TimeEntries. Please see this guide for a guide on how to update TimeEntries the right way depending on your use case.

How to use

It will create, edit, or delete existing TimeEntries for a given period and owner to match the TimeEntries of the request body.

The request body is an array of 'simplified' TimeEntries, please see the API reference for a TimeEntry model for additional information and main validation rules.

Here the TimeEntry id field is optional as the matching algorithm does not take it into account.

put/timmi-timesheet/services/time-entries

Query parameters

startsOnstring date required

First day (included) of the period you want to update with provided TimeEntries.

endsOnstring date required

Last day (included) of the period you want to update with provided TimeEntries.

ownerIdinteger required

Unique identifier of the TimeEntries owner.

Request body

startsAtstring date-time required

The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).

unit'day' | 'duration' | 'time' required

Unit in which the TimeEntry has been entered.

  • day: share a of a 24-hour day (e.g. "1/2 day")
  • duration: number of hours (e.g. "8h15min")
  • time: accurate time of a day (e.g. "23:45:00")
timeSource'manual' | 'import' | 'timer'

Attribute used to identify last modification source :

  • manual : Manually created or edited (default).
  • import : Imported from external sources. Is read-only on Lucca Timesheet user interfaces only if Timesheet regulation is in following modes : attendance schedule with clock-in clock-out, and activity-schedule
  • timer : Entered with Lucca Timesheet clock-in clock-out tool.
commentstring nullable

A comment on the TimeEntry, visible on Lucca Timesheet user interface.

Example request

[
  {
    "owner": {
      "id": 123
    },
    "startsAt": "2023-10-12T12:00:00",
    "duration": {
      "iso": "PT15M"
    },
    "axisSections": [
      {
        "id": 123
      }
    ]
  }
]

Response

OK