Skip to content
ShiftlyDevelopers
Documentation menu

Timesheet totals

Hours, counts and cost of timesheets started in a date range, split into approved and pending. Rejected timesheets and timesheets still open are left out, and a range with none returns no rows. Totals are rounded once, so they can differ by a few cents from adding up each timesheet.

Needs the timesheets:read permission, depending on the operation. The business sees it as "Timesheets".

Fields

TimesheetTotals fields
FieldTypeAccessMeaning
employee_idstring, may be nullRead-onlyThe person, when grouped by employee.
location_idstring, may be nullRead-onlyThe location, when grouped by location.
datedate, may be nullRead-onlyThe day in the location's timezone, when grouped by day.
approved_hoursnumberRead-onlyPaid hours on approved timesheets.
approved_countintegerRead-onlyHow many approved timesheets.
approved_costobject, may be nullRead-onlyWhat the approved timesheets cost, including super and allowances. Returned only with pay:read.
pending_hoursnumberRead-onlyPaid hours on pending timesheets.
pending_countintegerRead-onlyHow many pending timesheets.
pending_costobject, may be nullRead-onlyWhat the pending timesheets cost, including super and allowances. Returned only with pay:read.

Operations

Total timesheets over a date range

GET/v1/timesheet-totals

Permission: timesheets:read

Query parameters
ParameterTypeMeaning
fromdateRequiredThe first day of the range, in the location's timezone. With to, at most 92 days.
todateRequiredThe last day of the range, inclusive.
location_idstringOptionalOnly this location.
employee_idstringOptionalOnly this person.
group_by"employee", "location", "day"Optional
200 response
{
  "data": [
    {
      "employee_id": "66f1c2a4b3d9e8f7a6b5c4d3",
      "location_id": "66f1c2a4b3d9e8f7a6b5c4d3",
      "date": "2026-10-06",
      "approved_hours": 1.5,
      "approved_count": 1,
      "approved_cost": {
        "total": null,
        "subtotal": null,
        "super": null,
        "allowances": null,
        "position_loading": null
      },
      "pending_hours": 1.5,
      "pending_count": 1,
      "pending_cost": {
        "total": null,
        "subtotal": null,
        "super": null,
        "allowances": null,
        "position_loading": null
      }
    }
  ],
  "has_more": true,
  "next_cursor": "text"
}
Refusals
StatusWhen
400The error's code is invalid_request or range_too_long. The Errors page describes each code.
401The error's code is invalid_token or token_expired. The Errors page describes each code.
403The error's code is origin_not_allowed, permission_denied, not_available, connection_disconnected, connection_suspended or app_suspended. The Errors page describes each code.
404There is nothing at this address, or no such record in this business.
429Too many requests. Retry-After says when to try again.
500Something went wrong at Shiftly. Quote the request id.
503This environment is not set up for partner apps yet.