Attendance

Time and attendance — work sessions, punches and timesheets. Split from `hr` so a time-clock or scheduling integration can be granted punches without every employee's PII.

8 endpoints·Scopes: attendance:read, attendance:write
POST/api/hr/attendance/approve#

Approve work sessions in a day range. Never your own (law 20).

scope · attendance:writerole · MANAGER+

Performs the approve operation for the work sessions feature.

Scope: attendance:write
Min role: MANAGER or higher
Endpoint: POST /api/hr/attendance/approve

Example request

curl -X POST "https://app.guliel.com/api/hr/attendance/approve" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "from": "string",
  "to": "string"
}'

Request body

  • organizationIdreq
    string
  • counterpartyId
    string
  • fromreq
    string
  • toreq
    string

Response (200/201)

  • approvedreq
    integer
  • skippedreq
    integerSessions left unapproved: the approver's own, and rows in a locked or already-paid month.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/hr/attendance/check-in#

Clock in. The server stamps the time; no timestamp is accepted.

scope · attendance:writerole · VIEWER+

Performs the check-in operation for the work sessions feature.

Scope: attendance:write
Min role: VIEWER or higher
Endpoint: POST /api/hr/attendance/check-in

Example request

curl -X POST "https://app.guliel.com/api/hr/attendance/check-in" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123"
}'

Request body

  • organizationIdreq
    string

Response (200/201)

  • idreq
    string
  • counterpartyIdreq
    string
  • employeeNamereq
    string | null
  • startAtreq
    stringISO instant, server-stamped for a CLOCK punch.
  • endAtreq
    string | nullnull ⟺ the session is open (law 18).
  • sourcereq
    enum<2>
    CLOCK · MANUAL
  • notereq
    string | null
  • approvedAtreq
    string | null
  • approvedByUserIdreq
    string | null
  • editedAtreq
    string | null
  • originalStartAtreq
    string | null
  • originalEndAtreq
    string | null
  • hoursreq
    number | null

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/hr/attendance/check-out#

Clock out of the open session. The server stamps the time.

scope · attendance:writerole · VIEWER+

Performs the check-out operation for the work sessions feature.

Scope: attendance:write
Min role: VIEWER or higher
Endpoint: POST /api/hr/attendance/check-out

Example request

curl -X POST "https://app.guliel.com/api/hr/attendance/check-out" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123"
}'

Request body

  • organizationIdreq
    string

Response (200/201)

  • idreq
    string
  • counterpartyIdreq
    string
  • employeeNamereq
    string | null
  • startAtreq
    stringISO instant, server-stamped for a CLOCK punch.
  • endAtreq
    string | nullnull ⟺ the session is open (law 18).
  • sourcereq
    enum<2>
    CLOCK · MANUAL
  • notereq
    string | null
  • approvedAtreq
    string | null
  • approvedByUserIdreq
    string | null
  • editedAtreq
    string | null
  • originalStartAtreq
    string | null
  • originalEndAtreq
    string | null
  • hoursreq
    number | null

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/attendance/sessions#

List work sessions over a day range.

scope · attendance:readrole · VIEWER+

Returns the sessions data for the work sessions feature.

Scope: attendance:read
Min role: VIEWER or higher
Endpoint: GET /api/hr/attendance/sessions

Example request

curl "https://app.guliel.com/api/hr/attendance/sessions?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • fromreq
    string
  • toreq
    string
  • counterpartyId
    string
  • pagereq
    integer
  • limitreq
    integer

Response (200/201)

  • sessionsreq
    array<object>
    • idreq
      string
    • counterpartyIdreq
      string
    • employeeNamereq
      string | null
    • startAtreq
      stringISO instant, server-stamped for a CLOCK punch.
    • endAtreq
      string | nullnull ⟺ the session is open (law 18).
    • sourcereq
      enum<2>
      CLOCK · MANUAL
    • notereq
      string | null
    • approvedAtreq
      string | null
    • approvedByUserIdreq
      string | null
    • editedAtreq
      string | null
    • originalStartAtreq
      string | null
    • originalEndAtreq
      string | null
    • hoursreq
      number | null
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/hr/attendance/sessions#

Record a missed punch as a MANUAL session. Always unapproved.

scope · attendance:writerole · CONTRIBUTOR+

Performs the sessions operation for the work sessions feature.

Scope: attendance:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/hr/attendance/sessions

Example request

curl -X POST "https://app.guliel.com/api/hr/attendance/sessions" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "startAt": "string",
  "note": "string"
}'

Request body

  • organizationIdreq
    string
  • counterpartyId
    string
  • startAtreq
    string
  • endAt
    string | null
  • notereq
    string

Response (200/201)

  • idreq
    string
  • counterpartyIdreq
    string
  • employeeNamereq
    string | null
  • startAtreq
    stringISO instant, server-stamped for a CLOCK punch.
  • endAtreq
    string | nullnull ⟺ the session is open (law 18).
  • sourcereq
    enum<2>
    CLOCK · MANUAL
  • notereq
    string | null
  • approvedAtreq
    string | null
  • approvedByUserIdreq
    string | null
  • editedAtreq
    string | null
  • originalStartAtreq
    string | null
  • originalEndAtreq
    string | null
  • hoursreq
    number | null

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/hr/attendance/sessions/{id}#

Delete an unapproved session.

scope · attendance:writerole · CONTRIBUTOR+

Removes the association without deleting the underlying record.

Scope: attendance:write
Min role: CONTRIBUTOR or higher
Endpoint: DELETE /api/hr/attendance/sessions/{id}

Example request

curl -X DELETE "https://app.guliel.com/api/hr/attendance/sessions/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • organizationIdreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
PATCH/api/hr/attendance/sessions/{id}#

Correct a session. Flips it to MANUAL and clears its approval.

scope · attendance:writerole · CONTRIBUTOR+

Mutates the sessions attached to the given work session.

Scope: attendance:write
Min role: CONTRIBUTOR or higher
Endpoint: PATCH /api/hr/attendance/sessions/{id}

Example request

curl -X PATCH "https://app.guliel.com/api/hr/attendance/sessions/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123",
  "organizationId": "abc123",
  "note": "string"
}'

Request body

  • idreq
    string
  • organizationIdreq
    string
  • startAt
    string
  • endAt
    string | null
  • notereq
    string

Response (200/201)

  • idreq
    string
  • counterpartyIdreq
    string
  • employeeNamereq
    string | null
  • startAtreq
    stringISO instant, server-stamped for a CLOCK punch.
  • endAtreq
    string | nullnull ⟺ the session is open (law 18).
  • sourcereq
    enum<2>
    CLOCK · MANUAL
  • notereq
    string | null
  • approvedAtreq
    string | null
  • approvedByUserIdreq
    string | null
  • editedAtreq
    string | null
  • originalStartAtreq
    string | null
  • originalEndAtreq
    string | null
  • hoursreq
    number | null

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/timesheets#

Timesheet grid: employee × day hours over a period, folded from sessions.

scope · attendance:readrole · VIEWER+

Lists timesheets the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: attendance:read
Min role: VIEWER or higher
Endpoint: GET /api/hr/timesheets

Example request

curl "https://app.guliel.com/api/hr/timesheets?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • fromreq
    string
  • toreq
    string
  • counterpartyId
    string

Response (200/201)

  • rowsreq
    array<object>
    • counterpartyIdreq
      string
    • employeeNamereq
      string | null
    • daysreq
      object
    • totalHoursreq
      number
    • pendingHoursreq
      number
    • openSessionsreq
      integer
  • timezonereq
    string
  • openSessionsreq
    integer
  • pendingHoursreq
    number
  • ordinaryOnlyreq
    boolean
  • countryreq
    string
  • anomaliesreq
    array<object>
    • counterpartyIdreq
      string
    • employeeNamereq
      string | null
    • dayreq
      string
    • workedHoursreq
      number
    • leaveKindreq
      string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal