Timecards
GET /v1/timecards lists one location’s timecards for a range of business days. A timecard is one clock-in, with its clock-out, breaks, and the cash tips the person declared. Use it to send hours to a payroll system.
Needs the timecards:read scope (Time cards in Back Office). The hourly rate also needs staff.pay:read (Staff pay). See Scopes.
The clock-in photo, the edit log, and who edited a card are never returned.
Request
curl "https://developer.selflane.com/v1/timecards?location=64b0c1e2f3a4b5c6d7e8f901&from=2026-11-01&to=2026-11-15" \
-H "Authorization: Bearer $SELFLANE_API_KEY"| Parameter | Required | Notes |
|---|---|---|
from | Yes | First business day, YYYY-MM-DD |
to | Yes | Last business day, inclusive. At most 31 days counting both ends. |
limit | No | Timecards per page, 1 to 200. Default 50. |
cursor | No | The next_cursor from the previous page. Works only with the same location, from, and to. |
location | When the key covers several locations | One of the key’s locations |
A business day starts at the location’s POS start hour, in its timezone. A timecard belongs to the business day of its clock-in.
Timecards come in clock-in order. Keep requesting with cursor until next_cursor is null.
Response
{
"data": [
{
"id": "6740a1b2c3d4e5f6a7b8c9d0",
"location": "64b0c1e2f3a4b5c6d7e8f901",
"staff_id": "65a1c2d3e4f5a6b7c8d9e0f1",
"staff_name": "Sam L",
"role": { "id": "6552a1b2c3d4e5f6a7b8c9d0", "name": "Cashier" },
"business_date": "2026-11-20",
"status": "closed",
"clock_in": "2026-11-20T15:00:00.000Z",
"clock_out": "2026-11-20T23:00:00.000Z",
"breaks": [{ "start": "2026-11-20T18:00:00.000Z", "end": "2026-11-20T18:30:00.000Z", "paid": false }],
"worked_minutes": 450,
"declared_cash_tip": 2000,
"currency": "usd",
"hourly_rate": 1550
}
],
"next_cursor": null
}Fields
All money is integer cents in currency. Times are UTC.
| Field | Meaning |
|---|---|
staff_id | The person’s id in Staff |
staff_name | The person’s display name when they clocked in, or null |
role | The role they clocked in as. id matches a role id in Staff. Either may be null on old cards. |
business_date | The business day of the clock-in, YYYY-MM-DD |
status | open (still clocked in), closed, or canceled. A manager canceled the card, and it counts toward nothing. It stays listed so you can remove your copy. |
clock_out | null while open |
breaks | Each break’s start, its end (null while on break), and whether it’s paid |
worked_minutes | Minutes worked, less unpaid breaks, as payroll counts them. Can have up to 2 decimal places. A card counts at most 24 hours. null while open. |
declared_cash_tip | Cash tips the person declared for this card. 0 on a canceled card. |
hourly_rate | Only with staff.pay:read. The rate recorded on the card, in cents per hour, or 0 if none was recorded. Without the scope, the field is missing. |
Keep your copy current
A manager can edit a timecard after the shift. On every sync, re-pull at least the current and previous pay periods and replace each stored timecard with the same id. A card edited during a sync can be missed or seen twice. The next sync picks it up.
Errors
| Status | code | When |
|---|---|---|
400 | invalid_parameter | from or to is missing or isn’t a date, or limit isn’t a whole number from 1 to 200. param names it. |
400 | invalid_date_range | to is before from, or the range covers more than 31 days |
400 | invalid_cursor | The cursor isn’t valid, or wasn’t issued for this location and range |
400 | location_required | The key covers several locations and none was named |
403 | insufficient_scope | The key lacks timecards:read |
403 | location_not_permitted | The key doesn’t cover the named location |
403 | plan_required | The location isn’t live or is below the POS plan |
404 | location_missing | The location no longer exists |
503 | replica_unavailable | Timecards are briefly unavailable. Retry after Retry-After. |
503 | timecard_timeout | The request took too long. Retry after Retry-After, or ask for fewer days. |
See Errors for the codes every endpoint shares.