Docs

Get Timesheet

GET /timesheets

GET/timesheets

Returns the organization's timesheet for the week containing periodStart (YYYY-MM-DD; today when omitted). The week begins on the organization's timesheetWeekStart, so the returned periodStart may be earlier than the date sent. One entry per crew member with work that week, each with a row per reservation across every active event plus the organization's own work: plan and actual blocks, hours per day, and the approval. Approval is per shift (each actual block carries its own); a row's and a person's approval read the shifts starting in the week, with approvedBlockCount of actualBlockCount. Each day carries the states the organization's own rules put its hours in, and each person their week's hours per block type and per state (hours under no rule state count to the block type's base state), listed as columns in blockTypes and states. A state is labelled actual only when every hour behind it is approved. A person's hours count each overlapping span once across their reservations; each row's overlaps names the other events or shop work it overlaps (an event the caller cannot reach comes back with no id or name). Computed live (OrgCrew_GetCrewStateRecords has the detail). Unnamed quantity holds are not included. Approve or reopen shifts by their block ids with Reservations_SetScheduleBlockActualsApproval. Requires ResourceInventory.Read and Crew.View at the organization.

Query Parameters

FieldTypeRequiredDescription
periodStartdateOptional

Response

FieldTypeDescription
periodStartdate-time
periodEnddate-time
weekStartstring| null
blockTypesGetTimesheetResponseBlockTypeColumn[]| null
statesGetTimesheetResponseStateColumn[]| null
peopleGetTimesheetResponsePersonInfo[]| null
amountsVisibleboolean

GetTimesheetResponseBlockTypeColumn

FieldTypeDescription
typeIduuid| null
namestring| null
colorstring| null

GetTimesheetResponseStateColumn

FieldTypeDescription
stateIduuid
namestring| null
colorstring| null
sortOrderinteger

GetTimesheetResponsePersonInfo

FieldTypeDescription
crewIduuid
namestring| null
planHoursnumber
actualHoursnumber
approvalStatestring| null
approvedBlockCountinteger
actualBlockCountinteger
blockTypeHoursGetTimesheetResponseBlockTypeHoursInfo[]| null
stateHoursGetTimesheetResponseStateHoursInfo[]| null
unstatedHoursnumber
eventHoursGetTimesheetResponseEventHoursInfo[]| null
daysGetTimesheetResponseDayInfo[]| null
rowsGetTimesheetResponseRowInfo[]| null
groupsGetTimesheetResponseGroupInfo[]| null

GetTimesheetResponseBlockTypeHoursInfo

FieldTypeDescription
typeIduuid| null
hoursnumber

GetTimesheetResponseStateHoursInfo

FieldTypeDescription
stateIduuid
hoursnumber
isActualboolean

GetTimesheetResponseEventHoursInfo

FieldTypeDescription
eventIduuid| null
isOrgWorkboolean
blockTypeHoursGetTimesheetResponseBlockTypeHoursInfo[]| null
stateHoursGetTimesheetResponseStateHoursInfo[]| null
unstatedHoursnumber

GetTimesheetResponseDayInfo

FieldTypeDescription
datedate
planHoursnumber
actualHoursnumber
statesGetTimesheetResponseStateTag[]| null

GetTimesheetResponseRowInfo

FieldTypeDescription
resourceReservationIduuid| null
eventReservationIduuid| null
eventIduuid| null
eventNamestring| null
procurementNamestring| null
resourceTypeNamestring| null
originstring| null
statusstring| null
actualsApprovalStatestring| null
actualsApprovalActualsApprovalInfo
awaitsFirstActualboolean
shiftsGetTimesheetResponseShiftInfo[]| null
daysGetTimesheetResponseDayInfo[]| null
planBlocksGetTimesheetResponseBlockInfo[]| null
actualBlocksGetTimesheetResponseBlockInfo[]| null
overlapsGetTimesheetResponseOverlapInfo[]| null

GetTimesheetResponseGroupInfo

FieldTypeDescription
eventIduuid
memberReservationIdsuuid[]| null
clustersGetTimesheetResponseClusterInfo[]| null
planPiecesGetTimesheetResponsePlanPieceInfo[]| null

GetTimesheetResponseStateTag

FieldTypeDescription
stateIduuid
namestring| null
colorstring| null
iconstring| null
sortOrderinteger
isActualboolean

ActualsApprovalInfo

FieldTypeDescription
statestring| null
approvedAtdate-time| null
approvedByUserIduuid| null
approvedByNamestring| null

GetTimesheetResponseShiftInfo

FieldTypeDescription
planBlockIduuid
startdate-time
enddate-time
statestring| null
arrivedAtdate-time| null
heldByReservationIduuid| null
awaitsFirstActualboolean
closedWithNoHoursGetTimesheetResponseNoHoursClosureInfo
hasActualsboolean| null

GetTimesheetResponseBlockInfo

FieldTypeDescription
iduuid
typeIduuid| null
eventBlockTypeIduuid| null
typeNamestring| null
namestring| null
startDateTimedate-time
endDateTimedate-time
notesstring| null
activityIduuid| null
areaIduuid| null
collaboratorIduuid| null
approvalActualsApprovalInfo
workedHeadsnumber| null
headsnumber| null

GetTimesheetResponseOverlapInfo

FieldTypeDescription
resourceReservationIduuid
eventIduuid| null
namestring| null

GetTimesheetResponseClusterInfo

FieldTypeDescription
startdate-time
enddate-time
paidReservationIduuid
memberReservationIdsuuid[]| null

GetTimesheetResponsePlanPieceInfo

FieldTypeDescription
startdate-time
enddate-time
planBlockIduuid
reservationIduuid
typeIduuid