> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roostedhr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Worker Shifts

> Returns a paginated list of shifts assigned to a worker.

<Info>
  This endpoint supports pagination via `items_per_page` and `page` query parameters.
</Info>

<Tip>
  Use the `type` parameter to filter by `past` or `future` shifts. This can be combined with `start_date` and `end_date` for more specific date range filtering.
</Tip>


## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json GET /workers/{id}/shifts
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /workers/{id}/shifts:
    parameters:
      - schema:
          type: integer
        name: id
        in: path
        required: true
        description: Worker ID
    get:
      tags:
        - Workers
      summary: Get Worker Shifts
      description: Returns a paginated list of shifts assigned to a worker.
      operationId: get-worker-shifts
      parameters:
        - schema:
            type: string
            enum:
              - past
              - future
          name: type
          in: query
          required: false
          description: >-
            Filter by past or future shifts relative to current time. Defaults
            to `future`. Ignored when `start_date` or `end_date` is provided.
        - schema:
            type: string
            format: date
            example: '2026-01-01'
          name: start_date
          in: query
          required: false
          description: >-
            Filter shifts starting on or after this date. When provided, `type`
            is ignored.
        - schema:
            type: string
            format: date
            example: '2026-12-31'
          name: end_date
          in: query
          required: false
          description: >-
            Filter shifts ending on or before this date. When provided, `type`
            is ignored.
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          name: items_per_page
          in: query
          required: false
          description: Number of items per page.
        - schema:
            type: integer
            minimum: 1
          name: page
          in: query
          required: false
          description: Page number.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  shifts:
                    type: array
                    description: List of worker shifts.
                    items:
                      $ref: '#/components/schemas/WorkerShift'
                  total:
                    type: integer
                    description: Total number of shifts matching the filter criteria.
                    example: 32
              examples:
                Worker shifts:
                  value:
                    shifts:
                      - id: '1443208'
                        erf_id: '2205987'
                        start: '2026-03-17 10:00:00'
                        end: '2026-03-17 20:00:00'
                        event_id: '98765'
                        event_uuid: gH1f2w5xE3
                        event_name: Test TP
                        location: Arrowhead Stadium
                        erfComments: null
                        star_ranking: null
                        late_for_work: null
                        nocall_noshow: null
                        role_title: Bartender
                        formattedStart: Mar 17th 2026
                        formattedTime: 10:00 am
                        formattedEnd: Mar 17th 2026
                        formattedEndTime: 8:00 pm
                    total: 1
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid items per page parameter:
                  value:
                    code: WRK-1900
                    error: Invalid items per page parameter
                Invalid date range filter:
                  value:
                    code: WRK-1900
                    error: Invalid date range filter
                Invalid type parameter:
                  value:
                    code: WRK-1900
                    error: Invalid type parameter
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid or missing API key:
                  value:
                    code: ATH-100
                    error: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Insufficient permissions to view worker shifts:
                  value:
                    code: WRK-800
                    error: Insufficient permissions to view worker shifts
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Worker not found:
                  value:
                    code: WRK-300
                    error: Worker not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                An unexpected error occurred:
                  value:
                    code: WRK-900
                    error: An unexpected error occurred
components:
  schemas:
    WorkerShift:
      title: WorkerShift
      type: object
      description: A shift assignment for a worker, including event and scheduling details.
      properties:
        id:
          type: string
          description: Shift definition ID.
          example: '1443208'
        erf_id:
          type: string
          description: Shift assignment ID.
          example: '2205987'
        event_id:
          type: string
          description: Event ID.
          example: '98765'
        event_uuid:
          type: string
          description: Event UUID.
          example: gH1f2w5xE3
        event_name:
          type: string
          description: Name of the event.
          example: Test TP
        role_title:
          type: string
          description: Skillset or role name for the shift.
          example: Bartender
        location:
          type: string
          nullable: true
          description: Location name where the shift takes place.
          example: Arrowhead Stadium
        start:
          type: string
          description: Shift start datetime.
          example: '2026-03-17 10:00:00'
        end:
          type: string
          description: Shift end datetime.
          example: '2026-03-17 20:00:00'
        formattedStart:
          type: string
          description: Human-readable start date.
          example: Mar 17th 2026
        formattedTime:
          type: string
          description: Human-readable start time.
          example: 10:00 am
        formattedEnd:
          type: string
          description: Human-readable end date.
          example: Mar 17th 2026
        formattedEndTime:
          type: string
          description: Human-readable end time.
          example: 8:00 pm
        erfComments:
          type: string
          nullable: true
          description: Comments on the shift assignment.
          example: null
        star_ranking:
          type: integer
          nullable: true
          description: Performance rating for the shift.
          minimum: 0
          maximum: 5
          example: null
        late_for_work:
          type: integer
          nullable: true
          description: Whether the worker was late.
          enum:
            - 0
            - 1
          example: null
        nocall_noshow:
          type: integer
          nullable: true
          description: Whether the worker was a no-call/no-show.
          enum:
            - 0
            - 1
          example: null
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````