CurrentSession

[POST] .../v1/workattendance/currentsession

Returns current active work session. Use this method to load the currently open WorkSession for the current employee or, with manager permissions, another employee. The response returns the active session with planned shift timestamps, check-in data, optional checkout data, comments, worked seconds and last_update; user_id is optional and defaults to the authenticated user. Reading another user requires status select permission 695 and manage-all permission 699, while reading the current user does not require the cross-user check. Missing body, denied permission, unavailable user context and database errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
user_id Int64 Optional User ID. Defaults to the current user.

Request Example

{
  "user_id": 10
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result WorkSession Result object.

Response Example

{
  "ok": true,
  "result": {
    "id": 88,
    "user_id": 10,
    "schedule_id": 14,
    "planned_shift_start": 1772530800,
    "planned_shift_end": 1772563200,
    "check_in_date": 1772531100,
    "check_in_ip": "203.0.113.10",
    "check_out_date": null,
    "check_in_source": "User",
    "check_out_source": null,
    "check_in_comment": "Started shift from the front desk",
    "check_out_comment": null,
    "worked_sec": 0,
    "deleted": false,
    "last_update": 1772531100
  }
}