Skip to content

POST /tms/staff-time/event

TMS > tms.transload

What it does

/tms/staff-time/event accepts POST and is declared in app/systems/TMS/staff-time/api_routes.php:608 as a path.

The route handler delegates to tmsStaffTimeCreateEvent(). That function is the owner of this behaviour; the route entry is only dispatch.

Call chain:

  1. → tmsStaffTimeCreateEvent() — app/systems/TMS/staff-time/api_routes.php:68
  2. ↳ staff_time_event_type() — app/systems/TMS/staff-time/staff_time_helper.php:41
  3. ↳ staff_time_normalize_code() — app/systems/TMS/staff-time/staff_time_helper.php:4

Who calls it

Called from:

  • frontend/pages/system/TMS/transload/inbound-loader.php

A caller is the strongest available evidence of the intended use.

Input

Where Key
body EVENT_TYPE

Request bodies must not use TYPE, ACTION or USERNAME as contract fields.

Output

Key
CREATED_BY
EVENT_TIME
EVENT_TYPE
SOURCE
STAFF_USER_ID
WORK_CONTEXT

Success is { "data": …, "requestId": "…" }. Failure is { "error": { "code", "message" }, "requestId": "…" }.

Data

No table reference is visible in the owner function body.

Access

  • module-gated on tms.transload, so tenant module access applies

Validation and failure messages

  • Only clock in/out events can be created from this endpoint.
  • Started Clock Out assignment must be completed through the Loader workflow.
  • Unsupported staff time event type.

These strings come from the owner function and are the messages a client can receive. They are also the cheapest way to tell a rejected request from a broken one.