Department Shift

Find department shifts based on search parameters. Deleted shifts are not returned. Sort by `id`, `departmentId`, `name`, `startTime`, `endTime`, `unlimitedCapacity`, `maxDailyNewJobs` or `createdUtc`, ignoring case. Shifts that tie on the sort field are ordered by `id` ascending. Without a sort field, results are ordered by creation date, newest first, whatever the sort direction.

Changed on
post/api/department-shifts/list

Request

  • Base URL
    https://api.fulcrumpro.com
  • URL
    https://api.fulcrumpro.com/api/department-shifts/list
  • Auth
    none declared

Query parameters

Sort.Fieldstring

Sort field

Sort.Dir'ascending' | 'descending'

Specify sorting direction.

Sort direction

Skipinteger

Number of records to skip. Defaults to 0. Combine with FulcrumProduct.PublicApi.Dto.Common.PagingDto.Take to page through a result set larger than one page.

Takeinteger

Number of records to return. Validation accepts 0 through 5000, but 0 is not a page size and what an endpoint does with it varies, so send a value from 1 to 5000.

Two cases differ. A request that supplies paging but leaves this field out takes this field's default of <b>50</b>. A request that supplies no paging at all is endpoint-specific — some define their own fallback — so it does not reliably mean any particular number of records. Either way the response says nothing about records it did not return, so send this explicitly whenever the size of the answer matters. Endpoints returning a paged envelope report totalCount and hasNextPage alongside the records; endpoints returning a bare array report neither, so page those with FulcrumProduct.PublicApi.Dto.Common.PagingDto.Skip until a page comes back shorter than the value requested.

Request body

idsstring[] nullable

Filter shifts to those with one of these ids.

departmentIdsstring[] nullable

Filter shifts to those belonging to one of these departments.

namestring nullable

Filter shifts whose name contains this text, ignoring case.

Response

List of department shifts matching the filters

idstring

Unique id of the shift.

departmentIdstring nullable

Id of the department that works this shift.

namestring nullable

Name of the shift.

startTimestring nullable

Time the shift starts, as a four-digit 24-hour clock value in HHmm format: "0000" is midnight, "0800" is 8:00 AM and "1730" is 5:30 PM. Returned exactly as stored.

endTimestring nullable

Time the shift ends, in the same HHmm format as startTime. An end time earlier than the start time means the shift runs overnight and ends on the next day. Returned exactly as stored.

lengthOfShiftInMinutesinteger nullable

Length of the shift in minutes, from startTime to endTime. An overnight shift wraps past midnight, so "2200" to "0600" is 480. Equal start and end times give 0. Null when either time is not a valid HHmm value (four digits, hours 00 to 23, minutes 00 to 59).

unlimitedCapacityboolean

When true, the shift has no limit on how many pieces of equipment can run at the same time, and simultaneousEquipment is not applied on any day.

maxDailyNewJobsinteger nullable

Maximum number of new jobs to schedule per shift. Null when no maximum is set.

deletedboolean

Indicates whether this shift has been deleted.

Changes

    • breaking

      the request property's minItems was increased to 1 (media type: application/json-patch+json)

    • breaking

      the request property's minItems was increased to 1 (media type: application/json)

    • breaking

      the request property's minItems was increased to 1 (media type: text/json)

    • breaking

      the request property's minItems was increased to 1 (media type: application/*+json)

    • breaking

      the request property's minItems was increased to 1 (media type: application/json-patch+json)

    • breaking

      the request property's minItems was increased to 1 (media type: application/json)

    • breaking

      the request property's minItems was increased to 1 (media type: text/json)

    • breaking

      the request property's minItems was increased to 1 (media type: application/*+json)

    • info

      endpoint added