Hours worked
Calculates the hours the user is expected to work over a date range. Optionally restrict to specific templates. Hours are clamped to the range edges, split-shift gaps are excluded, and all-day templates are ignored.
GET
/v1/reports/hours-worked
const url = 'https://api.shiftsync.app/v1/reports/hours-worked?startDate=2026-04-15T12%3A00%3A00Z&endDate=2026-04-15T12%3A00%3A00Z';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.shiftsync.app/v1/reports/hours-worked?startDate=2026-04-15T12%3A00%3A00Z&endDate=2026-04-15T12%3A00%3A00Z' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”startDate
required
string format: date-time
endDate
required
string format: date-time
templateId
string
Responses
Section titled “Responses”Hours worked in the range
Media typeapplication/json
object
item
required
object
totalHours
required
number
shiftCount
required
integer
Example
{ "item": { "totalHours": 0, "shiftCount": 0 }}