LiteLogDocs
English

REST API: Time tracking

This page belongs to the REST API reference, which covers the address, authentication, scopes, pagination and errors. Every path is appended to https://api.litelog.de/api. In the examples $KEY stands for your API key; the example values are made up.

Overview

Call Purpose Scope
GET /v1/time-entries List work-time entries time_entries:read
POST /v1/time-entries Create a closed work-time entry (manual booking) time_entries:write
GET /v1/time-entries/link-events Why a work-time entry was not linked to a shift time_entries:read
GET /v1/time-entries/link-rules The linking rules as data time_entries:read
GET /v1/time-entries/edit-events Who changed which work-time entry, when and why time_entries:read
POST /v1/time-entries/clock-in Clock in (start a running entry) time_entries:write
POST /v1/time-entries/clock-out Clock out (close the running entry) time_entries:write
GET /v1/time-entries/{id} Get a work-time entry incl. timeline time_entries:read
PATCH /v1/time-entries/{id} Correct start/end/pause of an entry time_entries:write
DELETE /v1/time-entries/{id} Delete an entry (soft delete) time_entries:write

Notes

For shift planning and time tracking: employees are referenced via account_id — map personnel numbers to account_ids with GET /v1/accounts?custom_id=…. Duration fields (pause_ms/work_ms/total_ms) are always server-computed and enforce the property's minimum-pause rules; clients cannot set them. Series rules (recurrence, notifications, proof-of-life) remain portal-only — the API works on shift instances.

GET /v1/time-entries

List time entries (filters: from/to, property_id, account_id, status open/closed, shift_uuid, linked). linked=false returns only entries on no shift, linked=true only entries on a shift. Each entry names its origin (source), the clocking method (start_method, end_method), the result of the location check (ONSITE / OFFSITE, never coordinates) and the marker for an entry under one minute (invalid_reason). The list follows the key account's person scope: a key of a subcontractor account only sees itself and its own employees.

Scope: time_entries:read

Parameters

Name In Type Required Description
page query integer no Default: 1; at least 1.
pageSize query integer no Default: 50; 1 – 100.
from query string (date-time) no —
to query string (date-time) no —
property_id query integer no —
account_id query integer no —
status query string no Values: open, closed.
shift_uuid query string (uuid) no —
linked query string no true = only entries linked to a shift, false = only entries without one. Values: true, false.

Example call

curl "https://api.litelog.de/api/v1/time-entries?from=2026-12-01T00:00:00Z&to=2026-12-08T00:00:00Z&property_id=123" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": [
    {
      "uuid": "d4c87f20-1b6e-4a93-b5d7-08e2f6a13c9b",
      "account_id": 41,
      "account_name": "Erika Musterfrau",
      "account_custom_id": "P-0041",
      "property_id": 123,
      "start_ts": "2026-12-03T06:58:42.317Z",
      "end_ts": null,
      "pause_ms": 0,
      "work_ms": null,
      "total_ms": null,
      "shift_uuid": null,
      "invalid_reason": null,
      "start_method": "manual",
      "end_method": null,
      "source": "manual",
      "start_location_status": "ONSITE",
      "end_location_status": null,
      "clock_corrected": null,
      "created_at": "2026-12-03T06:58:42.391Z",
      "updated_at": "2026-12-03T06:58:42.391Z"
    },
    {
      "uuid": "6a0e9d34-c7b1-4d52-8f3a-e15b4c9072d6",
      "account_id": 42,
      "account_name": "Max Mustermann",
      "account_custom_id": "P-0042",
      "property_id": 123,
      "start_ts": "2026-12-02T07:00:00.000Z",
      "end_ts": "2026-12-02T15:30:00.000Z",
      "pause_ms": 1800000,
      "work_ms": 28800000,
      "total_ms": 30600000,
      "shift_uuid": null,
      "invalid_reason": null,
      "start_method": "manual",
      "end_method": "manual",
      "source": "manual",
      "start_location_status": null,
      "end_location_status": null,
      "clock_corrected": null,
      "created_at": "2026-12-03T09:12:44.512Z",
      "updated_at": "2026-12-03T09:12:44.512Z"
    }
  ],
  "total": 3,
  "page": 1,
  "pageSize": 50
}

POST /v1/time-entries

Book a closed time entry — durations are always server-computed, overlaps answer 409.

Scope: time_entries:write

Body fields (JSON)

Field Type Required Description
account_id integer yes —
property_id integer yes —
start_ts string (date-time) yes —
end_ts string (date-time) yes —
pause_ms integer no At least 0.
shift_uuid string (uuid) no —
allow_overlap boolean no —

Example call

curl -X POST "https://api.litelog.de/api/v1/time-entries" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "account_id": 42,
  "property_id": 123,
  "start_ts": "2026-12-02T07:00:00.000Z",
  "end_ts": "2026-12-02T15:30:00.000Z",
  "pause_ms": 1800000
}'

Example response (201)

{
  "data": {
    "uuid": "6a0e9d34-c7b1-4d52-8f3a-e15b4c9072d6",
    "account_id": 42,
    "account_name": "Max Mustermann",
    "account_custom_id": "P-0042",
    "property_id": 123,
    "start_ts": "2026-12-02T07:00:00.000Z",
    "end_ts": "2026-12-02T15:30:00.000Z",
    "pause_ms": 1800000,
    "work_ms": 28800000,
    "total_ms": 30600000,
    "shift_uuid": null,
    "invalid_reason": null,
    "start_method": "manual",
    "end_method": "manual",
    "source": "manual",
    "start_location_status": null,
    "end_location_status": null,
    "clock_corrected": null,
    "created_at": "2026-12-03T09:12:44.512Z",
    "updated_at": "2026-12-03T09:12:44.512Z"
  }
}

Link log: why a time entry was not put on a shift (from/to, max. 31 days; filters: property_id, account_id, event). Events: threshold_rejected (clocked in more than 6 hours before the shift start), no_candidate_nearby (a shift of the property was near but did not fit), live_link_failed (failed at clock-in, at clock-out or when a shift was named by hand, reason in reason_code), linked_to_cancelled (put on a cancelled shift). The log holds anomalies only: no row does not mean "linked". Each row names the shift the entry is on today (time_entry_shift_uuid); linked=false returns only rows whose entry is still on no shift.

Scope: time_entries:read

Parameters

Name In Type Required Description
page query integer no Default: 1; at least 1.
pageSize query integer no Default: 50; 1 – 100.
from query string (date) yes —
to query string (date) yes —
property_id query integer no —
account_id query integer no —
event query string no Values: threshold_rejected, no_candidate_nearby, live_link_failed, linked_to_cancelled.
linked query string no State of the entry TODAY. false = only rows whose entry is still without a shift (or was not found) — the rows worth a look. true = only rows whose entry hangs on a shift by now. Values: true, false.

Example call

curl "https://api.litelog.de/api/v1/time-entries/link-events?from=2026-12-01&to=2026-12-07&property_id=123" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": [
    {
      "id": 9012,
      "created_at": "2026-12-03T00:32:00.412Z",
      "event": "threshold_rejected",
      "reason_code": null,
      "property_id": 123,
      "account_id": 42,
      "account_name": "Max Mustermann",
      "shift_uuid": "27f8b3d5-a916-4c0e-9d74-c3b60e5a1f82",
      "time_entry_uuid": "5c1f8e2a-93d7-4b60-a4e9-b7d02c6f3a15",
      "time_entry_derived": false,
      "time_entry_shift_uuid": null,
      "details": {
        "deviation_ms": -23400000,
        "threshold": 21600000
      }
    },
    {
      "id": 9007,
      "created_at": "2026-12-02T09:47:30.268Z",
      "event": "live_link_failed",
      "reason_code": "outside_window",
      "property_id": 123,
      "account_id": 41,
      "account_name": "Erika Musterfrau",
      "shift_uuid": "c58e0a14-7d39-4f6b-b1a2-93e4f7d06c28",
      "time_entry_uuid": "0b7d2f69-e41a-4c35-9a82-6f5c8d1e3b07",
      "time_entry_derived": true,
      "time_entry_shift_uuid": "c58e0a14-7d39-4f6b-b1a2-93e4f7d06c28",
      "details": {
        "mode": "live",
        "state": "LOGIN",
        "timestamp": "2026-12-02T09:47:30.000Z",
        "candidate_count": 1,
        "window_candidate_count": 0,
        "linkable_count": 0
      }
    }
  ],
  "total": 2,
  "page": 1,
  "pageSize": 50
}

The linking rules as data: largest distance between clock-in and shift start (4 hours), the exception for late arrivals (still linked later than that while at least 2 hours of the shift lie ahead), largest lead (6 hours) and the windows of the re-check (every 2 minutes; only entries that started at most 24 hours ago and are still running or ended at most 1 hour ago). A shift created later does not pick up older entries.

Scope: time_entries:read

Example call

curl "https://api.litelog.de/api/v1/time-entries/link-rules" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": {
    "same_property": true,
    "person_needs_property_access": true,
    "cancelled_shifts_excluded": true,
    "max_link_distance_ms": 14400000,
    "late_link_min_remaining_ms": 7200000,
    "max_pre_shift_deviation_ms": 21600000,
    "recheck_interval_minutes": 2,
    "recheck_max_entry_age_ms": 86400000,
    "recheck_ended_within_ms": 3600000
  }
}

GET /v1/time-entries/edit-events

Edit history of time entries: who changed, deleted, booked after the fact or confirmed an entry and when, with old and new values and the reason. For a date range (from/to, max. 31 days) or for one entry over its whole life (time_entry_uuid); filters: property_id, account_id, event. Coordinates and device identifiers are not included. Needs the right to see other people's times.

Scope: time_entries:read

Parameters

Name In Type Required Description
page query integer no Default: 1; at least 1.
pageSize query integer no Default: 50; 1 – 100.
from query string (date) no Required unless time_entry_uuid is set. Only together with to.
to query string (date) no —
time_entry_uuid query string (uuid) no —
property_id query integer no —
account_id query integer no Person of the entry (not who made the change).
event query string no Values: edited, deleted, bulk_deleted, sublogs_cleared, overlap_override, confirmed, unconfirmed, confirm_dropped, created.

Example call

curl "https://api.litelog.de/api/v1/time-entries/edit-events?from=2026-12-01&to=2026-12-07&property_id=123" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": [
    {
      "id": 2291,
      "created_at": "2026-12-03T09:40:18.207Z",
      "event": "edited",
      "time_entry_uuid": "6a0e9d34-c7b1-4d52-8f3a-e15b4c9072d6",
      "time_entry_deleted": false,
      "property_id": 123,
      "account_id": 42,
      "account_name": "Max Mustermann",
      "actor_account_id": 5,
      "actor_name": "Petra Beispiel",
      "reason": "Ende laut Stundenzettel korrigiert",
      "changes": {
        "end_ts": {
          "old": "2026-12-02T15:30:00.000Z",
          "new": "2026-12-02T16:00:00.000Z"
        },
        "pause_ms": {
          "old": 1800000,
          "new": 2700000
        },
        "logout_ts": {
          "old": "2026-12-02T15:30:00.000Z",
          "new": "2026-12-02T16:00:00.000Z"
        }
      },
      "details": {
        "end_mode": "manual"
      }
    },
    {
      "id": 2290,
      "created_at": "2026-12-03T09:12:44.530Z",
      "event": "created",
      "time_entry_uuid": "6a0e9d34-c7b1-4d52-8f3a-e15b4c9072d6",
      "time_entry_deleted": false,
      "property_id": 123,
      "account_id": 42,
      "account_name": "Max Mustermann",
      "actor_account_id": 5,
      "actor_name": "Petra Beispiel",
      "reason": null,
      "changes": null,
      "details": {
        "source": "api"
      }
    }
  ],
  "total": 2,
  "page": 1,
  "pageSize": 50
}

POST /v1/time-entries/clock-in

Clock in (start a running entry).

Time clock: deterministic clock-in/out, never a toggle (409 ALREADY_CLOCKED_IN / NOT_CLOCKED_IN).

Scope: time_entries:write

Body fields (JSON)

Field Type Required Description
account_id integer yes —
property_id integer yes —
timestamp string (date-time) no —
lat number no —
lng number no —

Example call

curl -X POST "https://api.litelog.de/api/v1/time-entries/clock-in" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "account_id": 41,
  "property_id": 123,
  "lat": 48.137154,
  "lng": 11.576124
}'

Example response (201)

{
  "data": {
    "uuid": "d4c87f20-1b6e-4a93-b5d7-08e2f6a13c9b",
    "account_id": 41,
    "account_name": "Erika Musterfrau",
    "account_custom_id": "P-0041",
    "property_id": 123,
    "start_ts": "2026-12-03T06:58:42.317Z",
    "end_ts": null,
    "pause_ms": 0,
    "work_ms": null,
    "total_ms": null,
    "shift_uuid": null,
    "invalid_reason": null,
    "start_method": "manual",
    "end_method": null,
    "source": "manual",
    "start_location_status": "ONSITE",
    "end_location_status": null,
    "clock_corrected": null,
    "created_at": "2026-12-03T06:58:42.391Z",
    "updated_at": "2026-12-03T06:58:42.391Z"
  }
}

POST /v1/time-entries/clock-out

Clock out (close the running entry).

Time clock: deterministic clock-in/out, never a toggle (409 ALREADY_CLOCKED_IN / NOT_CLOCKED_IN).

Scope: time_entries:write

Body fields (JSON)

The example shows the structure of the body.

Example call

curl -X POST "https://api.litelog.de/api/v1/time-entries/clock-out" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "account_id": 41,
  "property_id": 123,
  "lat": 48.137154,
  "lng": 11.576124
}'

Example response (200)

{
  "data": {
    "uuid": "d4c87f20-1b6e-4a93-b5d7-08e2f6a13c9b",
    "account_id": 41,
    "account_name": "Erika Musterfrau",
    "account_custom_id": "P-0041",
    "property_id": 123,
    "start_ts": "2026-12-03T06:58:42.317Z",
    "end_ts": "2026-12-03T15:04:10.846Z",
    "pause_ms": 1800000,
    "work_ms": 27328529,
    "total_ms": 29128529,
    "shift_uuid": null,
    "invalid_reason": null,
    "start_method": "manual",
    "end_method": "manual",
    "source": "manual",
    "start_location_status": "ONSITE",
    "end_location_status": "ONSITE",
    "clock_corrected": null,
    "created_at": "2026-12-03T06:58:42.391Z",
    "updated_at": "2026-12-03T15:04:10.902Z"
  }
}

GET /v1/time-entries/{id}

Get a work-time entry incl. timeline.

Read an entry (incl. timeline with pauses), correct start/end/pause, or delete — every change lands in the work-time audit log.

Scope: time_entries:read

Parameters

Name In Type Required Description
id path string (uuid) yes —

Example call

curl "https://api.litelog.de/api/v1/time-entries/3f2b6c1e-8a4d-4e7b-9c15-2d6f0a8b7e41" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": {
    "uuid": "3f2b6c1e-8a4d-4e7b-9c15-2d6f0a8b7e41",
    "account_id": 41,
    "account_name": "Erika Musterfrau",
    "account_custom_id": "P-0041",
    "property_id": 123,
    "start_ts": "2026-12-01T07:02:11.000Z",
    "end_ts": "2026-12-01T15:31:40.000Z",
    "pause_ms": 1800000,
    "work_ms": 28769000,
    "total_ms": 30569000,
    "shift_uuid": "9e5a1c73-4f0b-4b8d-a2e6-51c7d3f8b064",
    "invalid_reason": null,
    "start_method": "nfc_tag",
    "end_method": "nfc_tag",
    "source": "device",
    "start_location_status": "ONSITE",
    "end_location_status": "ONSITE",
    "clock_corrected": null,
    "created_at": "2026-12-01T07:02:12.184Z",
    "updated_at": "2026-12-01T15:31:41.027Z",
    "timeline": [
      {
        "state": "LOGIN",
        "timestamp": "2026-12-01T07:02:11.000Z",
        "reason": null,
        "timing_status": "on_time",
        "deviation_ms": 131000
      },
      {
        "state": "PAUSED",
        "timestamp": "2026-12-01T11:00:00.000Z",
        "reason": null,
        "timing_status": null,
        "deviation_ms": null
      },
      {
        "state": "RESUMED",
        "timestamp": "2026-12-01T11:30:00.000Z",
        "reason": null,
        "timing_status": null,
        "deviation_ms": null
      },
      {
        "state": "LOGOUT",
        "timestamp": "2026-12-01T15:31:40.000Z",
        "reason": null,
        "timing_status": "on_time",
        "deviation_ms": 100000
      }
    ]
  }
}

PATCH /v1/time-entries/{id}

Correct start/end/pause of an entry.

Read an entry (incl. timeline with pauses), correct start/end/pause, or delete — every change lands in the work-time audit log.

Scope: time_entries:write

Parameters

Name In Type Required Description
id path string (uuid) yes —

Body fields (JSON)

The example shows the structure of the body.

Example call

curl -X PATCH "https://api.litelog.de/api/v1/time-entries/6a0e9d34-c7b1-4d52-8f3a-e15b4c9072d6" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "end_ts": "2026-12-02T16:00:00.000Z",
  "pause_ms": 2700000,
  "reason": "Ende laut Stundenzettel korrigiert"
}'

Example response (200)

{
  "data": {
    "uuid": "6a0e9d34-c7b1-4d52-8f3a-e15b4c9072d6",
    "account_id": 42,
    "account_name": "Max Mustermann",
    "account_custom_id": "P-0042",
    "property_id": 123,
    "start_ts": "2026-12-02T07:00:00.000Z",
    "end_ts": "2026-12-02T16:00:00.000Z",
    "pause_ms": 2700000,
    "work_ms": 29700000,
    "total_ms": 32400000,
    "shift_uuid": null,
    "invalid_reason": null,
    "start_method": "manual",
    "end_method": "manual",
    "source": "manual",
    "start_location_status": null,
    "end_location_status": null,
    "clock_corrected": null,
    "created_at": "2026-12-03T09:12:44.512Z",
    "updated_at": "2026-12-03T09:40:18.193Z"
  }
}

DELETE /v1/time-entries/{id}

Delete an entry (soft delete).

Read an entry (incl. timeline with pauses), correct start/end/pause, or delete — every change lands in the work-time audit log.

Scope: time_entries:write

Parameters

Name In Type Required Description
id path string (uuid) yes —

Example call

curl -X DELETE "https://api.litelog.de/api/v1/time-entries/e7a35b90-6d2c-4f18-83be-4a9c1d07f562" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": {
    "deleted": true
  }
}