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

# List Collective Schedules from a Working Time Arrangement

> <Warning>
**This is a beta feature.** 
You may not benefit from this feature. Working-time-arrangements are the
replacement for the workcycles. If this feature has not been deployed on
your environment, please contact our support.
</Warning>

Get the list of Collective Schedules from a Working Time Arrangement by id



## OpenAPI

````yaml /openapi-specs/schedule.yaml get /schedule/api/working-time-arrangements/{workingTimeArrangementId}/collective-schedules
openapi: 3.1.0
info:
  title: Time Settings API
  version: '1.0'
  description: |
    Welcome on the documentation for the Time Settings API.
  contact:
    name: API Support
    url: https://support.lucca.fr
    email: contact@luccasoftware.com
  license:
    name: Unlicensed
    url: https://www.luccasoftware.com
servers:
  - url: https://{host}
    description: Your Lucca account URL.
    variables:
      host:
        default: example.ilucca.net
        description: >-
          The URL of your dedicated Lucca account: `{account}.{env}.{region}`.


          Account reflects your company name. Env indicates the environment.
          Region depends on your server location.


          **Please, use your test or sandbox environments (and not your
          production env.) for testing purposes.**


          Environments:

          - `ilucca`: production environment for customers.

          - `ilucca-test`: test environment for customers.

          - `ilucca-demo`: demo environment for prospects.


          Regions:

          - `.ch` for Swiss located accounts.

          - `.net` for the others.


          Regarding sandboxes, the pattern differs:
          `https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com`,
          where:

          - `{sandboxName}` is automatically generated upon creation.

          - `{server}` may be "eu1", "eu2" or "ch1".
security: []
tags:
  - name: UserDates
    description: Aggregates work schedule events.
  - name: WorkCycleExceptions
    description: Override an employee's theoretical working hours.
  - name: Working Time Arrangements
    description: Employees recurring working hours.
  - name: Collective Schedules
    description: Describes the working hours pattern of a working-time-arrangement.
  - name: employee-assignments
    description: Assignations of employees to working time arrangements.
paths:
  /schedule/api/working-time-arrangements/{workingTimeArrangementId}/collective-schedules:
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/workingTimeArrangementId_path'
    get:
      tags:
        - Collective Schedules
      summary: List Collective Schedules from a Working Time Arrangement
      description: >-
        <Warning>

        **This is a beta feature.** 

        You may not benefit from this feature. Working-time-arrangements are the

        replacement for the workcycles. If this feature has not been deployed on

        your environment, please contact our support.

        </Warning>


        Get the list of Collective Schedules from a Working Time Arrangement by
        id
      operationId: >-
        get-schedule-api-working-time-arrangements-workingTimeArrangementId-collective-schedules
      parameters:
        - $ref: '#/components/parameters/workingTimeArrangementId_path'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/fields.root'
        - name: sort
          description: Sort items by a property.
          in: query
          schema:
            type: string
            enum:
              - '-startsOn'
            default: '-startsOn'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/CollectiveSchedule'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
components:
  parameters:
    Authorization:
      name: Authorization
      required: true
      description: 'API key. Value must be formatted like so: `lucca application={api_key}`.'
      in: header
      schema:
        type: string
    workingTimeArrangementId_path:
      name: workingTimeArrangementId
      description: The unique identifier of the Working Time Arrangement.
      in: path
      required: true
      schema:
        type: integer
        format: int32
        minimum: 0
    limit:
      name: limit
      in: query
      description: Number of items per page
      required: false
      schema:
        type: integer
        minimum: 0
        maximum: 100
        default: 10
    page:
      name: page
      in: query
      description: Next page token
      required: false
      schema:
        type: string
        examples:
          - next_token&fields.root=next
          - '2'
    fields.root:
      name: fields.root
      in: query
      description: Include collection properties.
      required: false
      schema:
        type: string
        enum:
          - count
  schemas:
    CollectiveSchedule:
      title: The Collective Schedule resource (named workCycle on the interface)
      description: >
        A Collective Schedule describes the employees' expected working hours
        over a week.


        It comes in two shapes:
          - "Single Week": Working hours are identical every week.
          - "Odd / Even Weeks": Working hours depend on the oddness of the week.
      type: object
      properties:
        id:
          type: integer
          format: int32
          minimum: 0
          readOnly: true
          description: The unique identifier of this Collective Schedule.
        workingTimeArrangementId:
          type: integer
          format: int32
          minimum: 0
          readOnly: true
          description: >-
            The unique identifier of the Working Time Arrangement this
            Collective Schedule belongs to.
        startsOn:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date (included) from which this Collective Schedule is
            applicable. Must be left null for the very first Collective Schedule
            of a Working Time Arrangement.
        endsOn:
          type:
            - string
            - 'null'
          format: date
          readOnly: true
          description: >
            The date (included) from which this Collective Schedule is no longer
            applicable. Is null for the last Collective Schedule of a Working
            Time Arrangement.

            Can not be modified as its equal to the day before the next
            applicable Collective Schedule for this Working Time Arrangement.
        pattern:
          oneOf:
            - $ref: '#/components/schemas/SingleWeekPattern'
            - $ref: '#/components/schemas/OddEvenWeeksPattern'
          description: >-
            The Pattern this Collective Schedule implements. Depends on the
            Shape.
        splitsHalfDays:
          type: boolean
          description: >-
            Should half-days be discriminated? In other words, should shifts
            belong to half days rather than just the day itself?
      required:
        - id
        - workingTimeArrangementId
        - pattern
        - splitsHalfDays
      x-tags:
        - Collective Schedules
    ProblemDetail:
      title: ProblemDetail
      type: object
      properties:
        type:
          type: string
          format: uri
          description: Type of problem encountered.
        title:
          type: string
          description: Human-readable description of the type of problem encountered.
        detail:
          type: string
          description: Human-readable description of the problem encountered.
    SingleWeekPattern:
      title: Single week SchedulePattern
      x-internal: true
      x-tags:
        - Schedule Patterns
      allOf:
        - $ref: '#/components/schemas/SchedulePattern'
        - type: object
          properties:
            monday:
              $ref: '#/components/schemas/SchedulePatternDay'
            tuesday:
              $ref: '#/components/schemas/SchedulePatternDay'
            wednesday:
              $ref: '#/components/schemas/SchedulePatternDay'
            thursday:
              $ref: '#/components/schemas/SchedulePatternDay'
            friday:
              $ref: '#/components/schemas/SchedulePatternDay'
            saturday:
              $ref: '#/components/schemas/SchedulePatternDay'
            sunday:
              $ref: '#/components/schemas/SchedulePatternDay'
    OddEvenWeeksPattern:
      title: Odd-even weeks Schedule Pattern
      x-internal: true
      x-tags:
        - Schedule Patterns
      allOf:
        - $ref: '#/components/schemas/SchedulePattern'
        - type: object
          properties:
            oddWeek:
              $ref: '#/components/schemas/SingleWeekPattern'
            evenWeek:
              $ref: '#/components/schemas/SingleWeekPattern'
    SchedulePattern:
      title: Schedule Pattern
      type: object
      properties:
        shape:
          $ref: '#/components/schemas/SchedulePatternShape'
      discriminator:
        propertyName: shape
        mapping:
          singleWeek:
            $ref: '#/components/schemas/SingleWeekPattern'
          oddEvenWeeks:
            $ref: '#/components/schemas/OddEvenWeeksPattern'
      required:
        - shape
    SchedulePatternDay:
      title: Schedule Pattern Day
      type: object
      properties:
        id:
          type: integer
          format: int32
          minimum: 0
        dayOffType:
          $ref: '#/components/schemas/DayOffType'
          description: >
            Gives the reason why this day should not be worked, as it largely
            impacts the leave management system:
              - 'partTime': this is the day off of a part-time employee.
              - 'weeklyRest': often used to mark Sundays.
              - 'off': often used to mark Saturdays.
        shifts:
          type: array
          items:
            $ref: '#/components/schemas/SchedulePatternShift'
        workDuration:
          $ref: '#/components/schemas/Duration'
          description: The total duration of work expected on this day.
      required:
        - id
        - shifts
    SchedulePatternShape:
      title: Shape of a Schedule Pattern
      type: string
      enum:
        - singleWeek
        - oddEvenWeeks
    DayOffType:
      title: DayOffType (enum)
      x-internal: true
      type: string
      enum:
        - 'off'
        - partTime
        - weeklyRest
      description: >-
        When a user requests a leave during a period, the type of day off
        defines whether the off days of the period must be counted according to
        the settings of the absence (unit and part time policy).
    SchedulePatternShift:
      title: Shift of a Schedule Pattern
      type: object
      properties:
        position:
          $ref: '#/components/schemas/DayPosition'
          description: Depends on the Splits Half Days property of the Collective Schedule.
        startsAt:
          type:
            - string
            - 'null'
          format: time
          description: >-
            Not null when the Working Time Arrangement Unit is "time". Must be
            left null otherwise.
        duration:
          $ref: '#/components/schemas/Duration'
          description: >-
            The duration in hours or days (depending on the Unit) of this work
            Shift.
      required:
        - duration
        - position
    Duration:
      title: Duration
      x-internal: true
      x-tags:
        - Core
      type: object
      properties:
        value:
          type: number
          format: decimal
          multipleOf: 0.0001
          minimum: 0
          readOnly: true
        iso:
          type: string
          format: duration
        unit:
          $ref: '#/components/schemas/DurationUnit'
    DayPosition:
      title: DayPosition
      type: string
      enum:
        - firstHalf
        - secondHalf
        - fullDay
    DurationUnit:
      title: Duration Unit
      type: string
      enum:
        - days
        - hours
      readOnly: true

````