Skip to main content

Shift events

The time clock on an order: check-in, break start, break end, check-out, no-show. Events are immutable facts with a timestamp; the order's shiftStatus follows the latest one. Scopes: Read needs, orders and shift events for GET, Manage needs, orders and shift events for everything else.

MethodPathPurpose
GET/shift-events?orderId={id}Events on an order, oldest first
POST/shift-eventsRecord an event
PUT/shift-events/{id}Correct an event's time or notes
DELETE/shift-events/{id}Delete an event

The shift event object​

{
"id": "e4f0…",
"organizationId": "680e…",
"orderId": "b3e7…",
"eventType": "check_in",
"timestamp": "2026-11-03T14:02:00.000Z",
"localTimestamp": "2026-11-03T07:02:00",
"actorId": "8e2a…",
"notes": null,
"latitude": 33.4484,
"longitude": -112.074,
"createdAt": "2026-11-03T14:02:03.000Z",
"actor": { "id": "8e2a…", "email": "jane.smith@example.com", "firstName": "Jane", "lastName": "Smith", "displayName": "Jane Smith" }
}

timestamp is the instant in UTC. localTimestamp is the same instant rendered in the facility's time zone, which is what to show people and what to send back when editing. latitude and longitude are present when the provider checked in from the mobile app.

Latest eventTypeOrder shiftStatus
(none)scheduled
check_inchecked_in
break_starton_break
break_endchecked_in
check_outchecked_out
no_showno_show

List events​

curl -H "Authorization: Bearer $KEY" \
"https://app.atlahq.com/api/v1/shift-events?orderId=b3e7…"

orderId is required. For a payroll or attendance export, list the orders for the period first, then fetch events per order; the hours worked are the gaps between check_in, breaks and check_out.

Record an event​

curl -X POST https://app.atlahq.com/api/v1/shift-events \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{
"orderId": "b3e7…",
"eventType": "check_out",
"localTimestamp": "2026-11-03T19:05:00",
"notes": "Stayed for handover"
}'
{ "success": true, "id": "f1a2…" }

Required: orderId, eventType. Give the time as localTimestamp (facility wall-clock) or timestamp (UTC); with neither, the server uses now. latitude and longitude are optional.

Correct or delete​

curl -X PUT https://app.atlahq.com/api/v1/shift-events/f1a2… \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{ "localTimestamp": "2026-11-03T19:00:00" }'

curl -X DELETE https://app.atlahq.com/api/v1/shift-events/f1a2… -H "Authorization: Bearer $KEY"

After either, the order's shiftStatus is recomputed from the remaining events.