Docs

Preview Crew State Records

POST /crew/{crewId}/state-records/preview

POST/crew/{crewId}/state-records/preview

Shows the states one crew member would be in between from and to if a booking were added, without creating it. Send exactly one of: the plan blocks of new work, the procurementResourceId of an organization need, or the eventProcurementResourceId of an event need the person would fill (its plan is read from the event). Nothing is written; the booking's blocks come back with source.isCandidate. Compare with OrgCrew_GetCrewStateRecords for the current answer. crewId comes from OrgCrew_GetCrew, procurementResourceId from Procurements_GetProcurement, block typeIds from ResourceTypes_GetScheduleBlockTypes. Needs Crew.View at the organization.

Path Parameters

FieldTypeRequiredDescription
crewIduuidRequired

Request Body

FieldTypeRequiredDescription
fromdate-timeOptional
todate-timeOptional
procurementResourceIduuidOptional
eventProcurementResourceIduuidOptional
blocksPreviewCrewStateRecordsRequestBlockInfo[]Optional

PreviewCrewStateRecordsRequestBlockInfo

FieldTypeDescription
typeIduuid
startDateTimedate-time
endDateTimedate-time

Response

FieldTypeDescription
crewIduuid
fromdate-time
todate-time
recordsGetCrewStateRecordsResponseRecordInfo[]| null
blocksGetCrewStateRecordsResponseBlockInfo[]| null

GetCrewStateRecordsResponseRecordInfo

FieldTypeDescription
stateIduuid
stateGetCrewStateRecordsResponseStateInfo
ruleIduuid
ruleNamestring| null
startDateTimedate-time
endDateTimedate-time| null
isActualboolean
explanationGetCrewStateRecordsResponseExplanationInfo

GetCrewStateRecordsResponseBlockInfo

FieldTypeDescription
iduuid
typeIduuid| null
startDateTimedate-time
endDateTimedate-time
isActualboolean
sourceGetCrewScheduleBlocksResponseSourceInfo
statesGetCrewStateRecordsResponseSegmentInfo[]| null

GetCrewStateRecordsResponseStateInfo

FieldTypeDescription
namestring| null
colorstring| null
iconstring| null
sortOrderinteger

GetCrewStateRecordsResponseExplanationInfo

FieldTypeDescription
thresholdGetCrewStateRecordsResponseThresholdInfo
countedFromdate-time| null
sourcesGetCrewStateRecordsResponseSourceHoursInfo[]| null

GetCrewScheduleBlocksResponseSourceInfo

FieldTypeDescription
resourceReservationIduuid| null
eventReservationIduuid| null
eventIduuid| null
eventNamestring| null
isCandidateboolean

GetCrewStateRecordsResponseSegmentInfo

FieldTypeDescription
stateIduuid
ruleIduuid
startDateTimedate-time
endDateTimedate-time

GetCrewStateRecordsResponseThresholdInfo

FieldTypeDescription
valuenumber
unitstring| null

GetCrewStateRecordsResponseSourceHoursInfo

FieldTypeDescription
eventIduuid| null
eventNamestring| null
isOrgDirectboolean
isCandidateboolean
actualHoursnumber
planHoursnumber