> ## 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 Employee Assignments

> <Warning>
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>

Returns a paginated list of employee-assignments. An employee-assignment represents the assignment of a working-time-arrangement to an employee over a given period `startsOn` - `endsOn`.



## OpenAPI

````yaml /openapi-specs/schedule.yaml get /schedule/api/employee-assignments
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/employee-assignments:
    parameters:
      - $ref: '#/components/parameters/Authorization'
    get:
      tags:
        - employee-assignments
      summary: List Employee Assignments
      description: >-
        <Warning>

        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>


        Returns a paginated list of employee-assignments. An employee-assignment
        represents the assignment of a working-time-arrangement to an employee
        over a given period `startsOn` - `endsOn`.
      operationId: get-schedule-api-employee-assignments
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields.root'
        - name: workingTimeArrangement.id
          in: query
          description: >
            Only return results that match one of the given working time
            arrangement ID.
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: '-workingTimeArrangement.id'
          in: query
          description: >
            Only return results that DO NOT match one of the given working time
            arrangement ID (exclude).
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: employee.id
          in: query
          description: |
            Only return results that match one of the given employee ID.
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: '-employee.id'
          in: query
          description: |
            Only return results that DO NOT match one of the given employee ID.
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: employee.applicableEstablishment.id
          in: query
          description: >
            Only return results for employees who belong to one of the given
            business-establishment ID.
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: '-employee.applicableEstablishment.id'
          in: query
          description: >
            Only return results for employees who DO NOT belong to one of the
            given business-establishment ID (exclude).
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: employee.applicableDepartment.id
          in: query
          description: >
            Only return results for employees who belong to one of the given
            department ID.
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: '-employee.applicableDepartment.id'
          in: query
          description: >
            Only return results for employees who DO NOT belong to one of the
            given department ID (exclude).
          allowEmptyValue: true
          schema:
            type: array
            items:
              title: Int32
              type: integer
              format: int32
              minimum: 0
        - name: startsBefore
          in: query
          description: Assignment start date must be strictly less than given date.
          schema:
            type: string
            format: date
        - name: startsAfter
          in: query
          description: Assignment start date strictly greater than given date.
          schema:
            type: string
            format: date
        - name: endsBefore
          in: query
          description: Assignment end date must be strictly less than given date.
          schema:
            type: string
            format: date
        - name: endsAfter
          in: query
          description: Assignment end date strictly greater than given date.
          schema:
            type: string
            format: date
        - 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/WtaEmployeeAssignment'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '403':
          description: Forbidden
          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
    page:
      name: page
      in: query
      description: Next page token
      required: false
      schema:
        type: string
        examples:
          - next_token&fields.root=next
          - '2'
    limit:
      name: limit
      in: query
      description: Number of items per page
      required: false
      schema:
        type: integer
        minimum: 0
        maximum: 100
        default: 10
    fields.root:
      name: fields.root
      in: query
      description: Include collection properties.
      required: false
      schema:
        type: string
        enum:
          - count
  schemas:
    WtaEmployeeAssignment:
      title: WtaEmployeeAssignment
      type: object
      required:
        - employee
        - startsOn
        - workContractId
      properties:
        id:
          type: integer
          format: int32
          minimum: 0
        workContractId:
          type: integer
          format: int32
          minimum: 0
        workingTimeArrangement:
          title: WorkingTimeArrangementLite
          allOf:
            - $ref: '#/components/schemas/WorkingTimeArrangementLite'
        startsOn:
          type: string
          format: date
        endsOn:
          type:
            - 'null'
            - string
          format: date
        employee:
          title: WtaEmpoyee
          allOf:
            - $ref: '#/components/schemas/WtaEmployee'
    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.
    WorkingTimeArrangementLite:
      title: WorkingTimeArrangementLite
      type: object
      required:
        - id
        - name
        - unit
      properties:
        id:
          type: integer
          format: int32
          minimum: 0
          readOnly: true
        name:
          type: string
        unit:
          $ref: '#/components/schemas/EventUnit'
    WtaEmployee:
      title: WtaEmployee
      type: object
      required:
        - department
        - displayName
        - employeeNumber
        - establishmentId
        - establishmentName
        - firstName
        - id
        - jobQualificationName
        - lastName
      properties:
        id:
          type: integer
          format: int32
          minimum: 0
        firstName:
          type: string
        lastName:
          type: string
        displayName:
          type: string
          readOnly: true
        jobQualificationName:
          type: string
        employeeNumber:
          type: string
        establishmentId:
          type: integer
          format: int32
          minimum: 0
        establishmentName:
          type: string
        department:
          $ref: '#/components/schemas/WtaDepartment'
    EventUnit:
      title: Event Unit (enum)
      x-internal: true
      x-tags:
        - Core
      type: string
      enum:
        - day
        - hour
        - time
      description: |-
        An event can be set in:
        - Day: "I worked for a half day last Monday".
        - Hour: "I worked for 2 hours last Monday".
        - Time: "I worked between 10:00 AM and 12:00 AM last Monday".
    WtaDepartment:
      title: Department
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int32
          minimum: 0
        name:
          type: string

````