# List scheduled shifts

**Requires scope:** `business`.
Returns a list of available shifts

Endpoint: GET /api/business/v3/scheduled
Security: apiKey

## Query parameters:

  - `startDate` (string)
    List shifts that start from this date

  - `endDate` (string)
    List shifts starting before this date (end date exclusive)

  - `departmentId` (integer)
    The department the shifts should be scheduled in

  - `departmentGroupId` (integer)
    the department group the shifts should be scheduled in

  - `officeId` (integer)
    The office the shifts should be scheduled in

  - `includeOpenShifts` (boolean)
    When true, it also returns open shifts

  - `page` (integer)
    Page number of the paginated result set. The first page is `1`.

## Response 200 fields (application/json):

  - `_links` (object)

  - `_links.self` (object)

  - `_links.self.href` (string)
    link to current page
    Example: https://app.dyflexis.com/{systemName}/api/business/v3/scheduled?page=2

  - `_links.next` (object)

  - `_links.next.href` (string | null)
    link to next page
    Example: https://app.dyflexis.com/{systemName}/api/business/v3/scheduled?page=3

  - `_links.prev` (object)

  - `_links.prev.href` (string | null)
    link to previous page
    Example: https://app.dyflexis.com/{systemName}/api/business/v3/scheduled?page=1

  - `_links.first` (object)

  - `_links.first.href` (string)
    link to first page
    Example: https://app.dyflexis.com/{systemName}/api/business/v3/scheduled?page=1

  - `_links.last` (object)

  - `_links.last.href` (string)
    link to last page
    Example: https://app.dyflexis.com/{systemName}/api/business/v3/scheduled?page=100

  - `shifts` (array)
    Collection of all shifts

  - `shifts.id` (integer)
    Internal shift id used by Dyflexis
    Example: 1

  - `shifts.employeeId` (integer)
    Internal employee id used by Dyflexis
    Example: 1

  - `shifts.personnelNumber` (string)
    External employee id used by the client
    Example: HV-FD-014

  - `shifts.firstName` (string)
    First name
    Example: Maria

  - `shifts.infix` (string | null)
    Infix (name particle), or null when the employee has none. May also be an empty string.
    Example: de

  - `shifts.lastName` (string)
    Surname
    Example: Santos

  - `shifts.contractTypeId` (integer | null)
    Internal contract type id used by Dyflexis
    Example: 123

  - `shifts.contractType` (string | null)
    The name of the contract type the employee has
    Example: Hospitality permanent

  - `shifts.officeId` (integer)
    The id of the office the shift has been scheduled in
    Example: 1

  - `shifts.officeName` (string)
    The name of the office the shift has been scheduled in
    Example: Harborview Grand Hotel

  - `shifts.departmentId` (integer)
    The id of the department the shift has been scheduled in
    Example: 1

  - `shifts.departmentName` (string)
    The name of the department the shift has been scheduled in
    Example: Front Desk

  - `shifts.costCenterId` (integer | null)
    The id of the cost center associated with the shift
    Example: 1

  - `shifts.costCenterName` (string | null)
    The name of the cost center associated with the shift
    Example: Name

  - `shifts.costCenterCode` (string | null)
    The code of the cost center associated with the shift
    Example: code

  - `shifts.startDateTime` (string)
    DateTime in ISO 8601 format
    Example: 2026-12-31T12:34:56+01:00

  - `shifts.breakMinutes` (integer)
    The break time of the shift in minutes, 0 if no break.
    Example: 30

  - `shifts.duration` (integer)
    The shift time in minutes.
    Example: 480

  - `shifts.remark` (string)
    The shift remark, empty string if not used
    Example: Remark

  - `shifts.marking` (string)
    The shift marking, or an empty string when the shift has no marking.
    Enum: "", "leave", "sick", "standBy", "cancelled"

  - `shifts.published` (boolean)
    Will show if the shift is published to the schedule

  - `shifts.isOpenShift` (boolean)
    True if the shift is open (not assigned to an employee)

  - `pageCount` (integer)
    amount of pages
    Example: 100

## Response 400 fields (application/json):

  - `title` (string, required)
    Short, human-readable summary of the error.
    Example: Unauthorized

  - `status` (integer, required)
    The HTTP status code.
    Example: 401

  - `message` (string, required)
    Human-readable explanation of this occurrence of the error.
    Example: Invalid Token

  - `detail` (string)
    Human-readable explanation of this occurrence. Not returned by all backend versions.
    Example: Invalid Token

  - `code` (integer)
    The HTTP status code (duplicate of `status`). Not returned by all backend versions.
    Example: 401

## Response 401 fields (application/json):

  - `title` (string, required)
    Short, human-readable summary of the error.
    Example: Unauthorized

  - `status` (integer, required)
    The HTTP status code.
    Example: 401

  - `message` (string, required)
    Human-readable explanation of this occurrence of the error.
    Example: Invalid Token

  - `detail` (string)
    Human-readable explanation of this occurrence. Not returned by all backend versions.
    Example: Invalid Token

  - `code` (integer)
    The HTTP status code (duplicate of `status`). Not returned by all backend versions.
    Example: 401

## Response 403 fields (application/json):

  - `title` (string, required)
    Short, human-readable summary of the error.
    Example: Unauthorized

  - `status` (integer, required)
    The HTTP status code.
    Example: 401

  - `message` (string, required)
    Human-readable explanation of this occurrence of the error.
    Example: Invalid Token

  - `detail` (string)
    Human-readable explanation of this occurrence. Not returned by all backend versions.
    Example: Invalid Token

  - `code` (integer)
    The HTTP status code (duplicate of `status`). Not returned by all backend versions.
    Example: 401

