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
| Field | Type | Required | Description |
|---|
| periodStart | date | Optional | |
Response
| Field | Type | Description |
|---|
| periodStart | date-time | |
| periodEnd | date-time | |
| weekStart | string| null | |
| blockTypes | GetTimesheetResponseBlockTypeColumn[]| null | |
| states | GetTimesheetResponseStateColumn[]| null | |
| people | GetTimesheetResponsePersonInfo[]| null | |
| amountsVisible | boolean | |
GetTimesheetResponseBlockTypeColumn
| Field | Type | Description |
|---|
| typeId | uuid| null | |
| name | string| null | |
| color | string| null | |
GetTimesheetResponseStateColumn
| Field | Type | Description |
|---|
| stateId | uuid | |
| name | string| null | |
| color | string| null | |
| sortOrder | integer | |
GetTimesheetResponsePersonInfo
| Field | Type | Description |
|---|
| crewId | uuid | |
| name | string| null | |
| planHours | number | |
| actualHours | number | |
| approvalState | string| null | |
| approvedBlockCount | integer | |
| actualBlockCount | integer | |
| blockTypeHours | GetTimesheetResponseBlockTypeHoursInfo[]| null | |
| stateHours | GetTimesheetResponseStateHoursInfo[]| null | |
| unstatedHours | number | |
| eventHours | GetTimesheetResponseEventHoursInfo[]| null | |
| days | GetTimesheetResponseDayInfo[]| null | |
| rows | GetTimesheetResponseRowInfo[]| null | |
| groups | GetTimesheetResponseGroupInfo[]| null | |
GetTimesheetResponseBlockTypeHoursInfo
| Field | Type | Description |
|---|
| typeId | uuid| null | |
| hours | number | |
GetTimesheetResponseStateHoursInfo
| Field | Type | Description |
|---|
| stateId | uuid | |
| hours | number | |
| isActual | boolean | |
GetTimesheetResponseEventHoursInfo
| Field | Type | Description |
|---|
| eventId | uuid| null | |
| isOrgWork | boolean | |
| blockTypeHours | GetTimesheetResponseBlockTypeHoursInfo[]| null | |
| stateHours | GetTimesheetResponseStateHoursInfo[]| null | |
| unstatedHours | number | |
GetTimesheetResponseDayInfo
| Field | Type | Description |
|---|
| date | date | |
| planHours | number | |
| actualHours | number | |
| states | GetTimesheetResponseStateTag[]| null | |
GetTimesheetResponseRowInfo
| Field | Type | Description |
|---|
| resourceReservationId | uuid| null | |
| eventReservationId | uuid| null | |
| eventId | uuid| null | |
| eventName | string| null | |
| procurementName | string| null | |
| resourceTypeName | string| null | |
| origin | string| null | |
| status | string| null | |
| actualsApprovalState | string| null | |
| actualsApproval | ActualsApprovalInfo | |
| awaitsFirstActual | boolean | |
| shifts | GetTimesheetResponseShiftInfo[]| null | |
| days | GetTimesheetResponseDayInfo[]| null | |
| planBlocks | GetTimesheetResponseBlockInfo[]| null | |
| actualBlocks | GetTimesheetResponseBlockInfo[]| null | |
| overlaps | GetTimesheetResponseOverlapInfo[]| null | |
GetTimesheetResponseGroupInfo
| Field | Type | Description |
|---|
| eventId | uuid | |
| memberReservationIds | uuid[]| null | |
| clusters | GetTimesheetResponseClusterInfo[]| null | |
| planPieces | GetTimesheetResponsePlanPieceInfo[]| null | |
GetTimesheetResponseStateTag
| Field | Type | Description |
|---|
| stateId | uuid | |
| name | string| null | |
| color | string| null | |
| icon | string| null | |
| sortOrder | integer | |
| isActual | boolean | |
ActualsApprovalInfo
| Field | Type | Description |
|---|
| state | string| null | |
| approvedAt | date-time| null | |
| approvedByUserId | uuid| null | |
| approvedByName | string| null | |
GetTimesheetResponseShiftInfo
| Field | Type | Description |
|---|
| planBlockId | uuid | |
| start | date-time | |
| end | date-time | |
| state | string| null | |
| arrivedAt | date-time| null | |
| heldByReservationId | uuid| null | |
| awaitsFirstActual | boolean | |
| closedWithNoHours | GetTimesheetResponseNoHoursClosureInfo | |
| hasActuals | boolean| null | |
GetTimesheetResponseBlockInfo
| Field | Type | Description |
|---|
| id | uuid | |
| typeId | uuid| null | |
| eventBlockTypeId | uuid| null | |
| typeName | string| null | |
| name | string| null | |
| startDateTime | date-time | |
| endDateTime | date-time | |
| notes | string| null | |
| activityId | uuid| null | |
| areaId | uuid| null | |
| collaboratorId | uuid| null | |
| approval | ActualsApprovalInfo | |
| workedHeads | number| null | |
| heads | number| null | |
GetTimesheetResponseOverlapInfo
| Field | Type | Description |
|---|
| resourceReservationId | uuid | |
| eventId | uuid| null | |
| name | string| null | |
GetTimesheetResponseClusterInfo
| Field | Type | Description |
|---|
| start | date-time | |
| end | date-time | |
| paidReservationId | uuid | |
| memberReservationIds | uuid[]| null | |
GetTimesheetResponsePlanPieceInfo
| Field | Type | Description |
|---|
| start | date-time | |
| end | date-time | |
| planBlockId | uuid | |
| reservationId | uuid | |
| typeId | uuid | |