openapi: 3.1.0
info:
  title: Lucca Timesheet API
  version: '1.0'
  description: |
    Welcome on the documentation for the Lucca Timesheet API.
  contact:
    name: API Support
    url: 'https://www.luccasoftware.com'
    email: no-reply@luccasoftware.com
  license:
    name: Apache 2.0
    url: 'https://www.apache.org/licenses/LICENSE-2.0'
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".
tags:
  - name: TimeEntries
    description: time-entries are the actual working hours observed by a user.
  - name: Timesheets
    description: Collection of time-entries for a User over a week / month.
  - name: Activities
    description: Time-entries referencing axis-sections to describe what the user has done.
  - name: Attendance
    description: Time-entries indicating working hours.
  - name: Workflow
    description: All actions regarding the approval process of timesheets.
  - name: Reports
    description: Reporting features of Lucca Timesheet.
paths:
  /api/v3/timeentries:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    get:
      summary: List multiple time-entries
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/list-timeentries
      tags:
        - TimeEntries
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      count:
                        type: integer
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/TimeEntry'
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      operationId: get-api-v3-timeentries
      description: |-
        List all time-entries satisfying query filters.

        For technical purposes, a time-entry of duration 00:00:00 will be returned for any day if :
        - The day belongs to a Timesheet that is at least submitted,
        - And the day has 00:00:00 total working time (a public holiday, a full-day absence, a working day without any work)

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry).

        Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/retrieve-time-entries) on how to retrieve `time-entries` the right way.
      parameters:
        - $ref: '#/components/parameters/paging'
        - schema:
            type: array
            items:
              type: integer
          in: query
          name: ownerId
          description: Filter out time-entries on its ownerIds
          style: form
          explode: false
        - schema:
            type: string
            example: 'between,2021-01-01,2021-02-01'
          in: query
          name: startsAt
          description: '{comparator},{date-time}. Filter out time-entries on its startsAt.'
        - schema:
            type: string
          in: query
          name: axisSections.id
          description: Filter on a comma-separated list of AxisSections identifiers.
          style: form
        - schema:
            type: array
            items:
              type: string
          in: query
          name: axisSections.code
          description: Filter on a comma-separated list of AxisSections codes.
          style: form
        - schema:
            type: string
            example: 'since,2021-01-01T08:45:23Z'
          in: query
          name: modifiedAt
          description: '{comparator},{date-time}. Filter out time-entries on their modifiedAt.'
        - schema:
            type: string
            example: 'since,2021-01-01T08:45:23Z'
          in: query
          name: archivedAt
          description: '{comparator},{date-time}. Filter out time-entries on their startsAt.'
        - schema:
            type: string
          in: query
          name: orderBy
          description: '{fieldName},{direction}. Defaults to {id},{asc}'
    post:
      summary: Create new time-entries
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/create-new-timeentries
      operationId: post-api-v3-timeentries
      description: |-
        Create one or multiple time-entries. 

        A single request can create time-entries for several different owners.

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry) and any validation error that you might encounter when using this API.

        There are different ways to update time-entries. Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/update-time-entries) on how to update `time-entries` the right way depending on your use case.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - $ref: '#/components/schemas/TimeEntry'
                      - type: object
                        properties:
                          items:
                            type: array
                            items:
                              $ref: '#/components/schemas/TimeEntry'
              examples:
                Example 1:
                  value:
                    data:
                      id: 1234
                      ownerId: 90
                      unit: 2
                      startsAt: '2024-04-22T09:30:00'
                      duration: '03:45:00'
                      creationSource: 2
                      axisSections:
                        - id: 41
                        - id: 127
                      comment:
                        content: This is a comment
                      timeTypeId: null
        '201':
          description: Created
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '403':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    ownerId:
                      type: integer
                      example: 1
                      description: Reference to the time-entry owner.
                    startsAt:
                      type: string
                      description: 'The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).'
                      format: date-time
                    duration:
                      type: string
                      format: timespan
                      description: "Duration of the time-entry in the\_\"c\" format of a C# timespan In other words : d.hh:mm:ss.\nMax: \"1.00:00:00\" (ie 24 hours)."
                    unit:
                      type: integer
                      description: |-
                        Unit in which the time-entry has been entered. 
                        - 0: Days (eg "1/2 day")
                        - 1: Hours (eg "8h15min")
                        - 2: Time (eg "23:45:00") 
                    creationSource:
                      type: integer
                      description: |-
                        Attribute used to identify last modification source :
                        - 0: Automatic fallback on theoretical time-entries from workcycles.
                        - 1: Entered with Lucca Timesheet quick-fill tools.
                        - 2: Manually created or edited (default).
                        - 3: Imported from external sources. Can be read-only for the user depending on Timesheet configuration.
                        - 4: Entered with Lucca Timesheet clock-in clock-out tool. 
                      default: 2
                    axisSections:
                      type:
                        - array
                        - 'null'
                      description: 'Represent the activities that time-entry should be associated with. When not in activity mode, send an empty array, or do not serialize this property.'
                      items:
                        $ref: '#/components/schemas/AxisSection'
                    comment:
                      type:
                        - object
                        - 'null'
                      description: A comment to add additional information about the given time-entry. It will be visible on Lucca Timesheet user interface.
                      properties:
                        content:
                          type: string
                    timeTypeId:
                      type:
                        - integer
                        - 'null'
                      example: 1
                      description: Optional reference of a configured Time Type. To use only if the timesheet is set up to use Time Types. Null otherwise.
                  required:
                    - ownerId
                    - startsAt
                    - duration
                    - unit
                - type: array
                  items:
                    type: object
                    properties:
                      ownerId:
                        type: integer
                        example: 1
                        description: Reference to the time-entry owner.
                      startsAt:
                        type: string
                        description: 'The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).'
                        format: date-time
                      duration:
                        type: string
                        description: "Duration of the time-entry in the\_\"c\" format of a C# timespan In other words : d.hh:mm:ss.\nMax: \"1.00:00:00\" (ie 24 hours)."
                        format: timespan
                      unit:
                        type: integer
                        description: |-
                          Unit in which the time-entry has been entered. 
                          - 0: Days (eg "1/2 day")
                          - 1: Hours (eg "8h15min")
                          - 2: Time (eg "23:45:00") 
                      creationSource:
                        type: integer
                        description: |-
                          Attribute used to identify last modification source :
                          - 0: Automatic fallback on theoretical time-entries from workcycles.
                          - 1: Entered with Lucca Timesheet quick-fill tools.
                          - 2: Manually created or edited (default).
                          - 3: Imported from external sources. Can be read-only for the user depending on Timesheet configuration.
                          - 4: Entered with Lucca Timesheet clock-in clock-out tool. 
                        default: 2
                      axisSections:
                        type:
                          - array
                          - 'null'
                        description: 'Represent the activities that time-entry should be associated with. When not in activity mode, send an empty array, or do not serialize this property.'
                        items:
                          $ref: '#/components/schemas/AxisSection'
                      comment:
                        type:
                          - object
                          - 'null'
                        description: A comment to add additional information about the given time-entry. It will be visible on Lucca Timesheet user interface.
                        properties:
                          content:
                            type: string
                      timeTypeId:
                        type:
                          - integer
                          - 'null'
                        description: Optional reference of a configured Time Type. To use only if the timesheet is set up to use Time Types. Null otherwise.
                        example: 1
                    required:
                      - ownerId
                      - startsAt
                      - duration
                      - unit
            examples:
              Example 1:
                value:
                  ownerId: 90
                  unit: 2
                  startsAt: '2024-04-22T09:30:00'
                  duration: '03:45:00'
                  creationSource: 2
                  axisSections:
                    - id: 41
                    - id: 127
                    - id: 346
                    - id: 347
                  comment:
                    content: This is a comment
                  timeTypeId: null
        description: Create a single of multiple time-entry (toggle body type).
      tags:
        - TimeEntries
    put:
      summary: Update multiple time-entries
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/update-multiple-timeentries
      operationId: put-api-v3-timeentries
      description: |-
        Update one or several time-entries. 

        The "id" field must be sent and correspond to an existing time-entry. 

        A single request can edit time-entries for several different owners.

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry) and any validation error that you might encounter when using this API.

        There are different ways to update time-entries. Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/update-time-entries) on how to update `time-entries` the right way depending on your use case.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    id:
                      type: integer
                      example: 552586
                      description: Unique identifier of the time-entry
                    ownerId:
                      type: integer
                      description: Reference to the time-entry owner.
                      example: 1
                    startsAt:
                      type: string
                      description: 'The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).'
                      format: date-time
                    duration:
                      type: string
                      description: "Duration of the time-entry in the\_\"c\" format of a C# timespan In other words : d.hh:mm:ss.\nMax: \"1.00:00:00\" (ie 24 hours)."
                      format: timespan
                    unit:
                      type: integer
                      description: |-
                        Unit in which the time-entry has been entered. 
                        - 0: Days (eg "1/2 day")
                        - 1: Hours (eg "8h15min")
                        - 2: Time (eg "23:45:00") 
                      example: 1
                    creationSource:
                      type: integer
                      description: |-
                        Attribute used to identify last modification source :
                        - 0: Automatic fallback on theoretical time-entries from workcycles.
                        - 1: Entered with Lucca Timesheet quick-fill tools.
                        - 2: Manually created or edited (default).
                        - 3: Imported from external sources. Can be read-only for the user depending on Timesheet configuration.
                        - 4: Entered with Lucca Timesheet clock-in clock-out tool. 
                      default: 2
                    axisSections:
                      type:
                        - array
                        - 'null'
                      description: 'Represent the activities that time-entry should be associated with. When not in activity mode, send an empty array, or do not serialize this property.'
                      items:
                        $ref: '#/components/schemas/AxisSection'
                    comment:
                      type:
                        - object
                        - 'null'
                      description: A comment to add additional information about the given time-entry. It will be visible on Lucca Timesheet user interface.
                      properties:
                        content:
                          type: string
                    timeTypeId:
                      type:
                        - integer
                        - 'null'
                      description: Optional reference of a configured Time Type. To use only if the timesheet is set up to use Time Types. Null otherwise.
                      example: 1
                  required:
                    - id
                    - ownerId
                    - startsAt
                    - duration
                    - unit
                - type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique identifier of the time-entry
                        example: 552586
                      ownerId:
                        type: integer
                        description: Reference to the time-entry owner.
                        example: 1
                      startsAt:
                        type: string
                        description: 'The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).'
                        format: date-time
                      duration:
                        type: string
                        description: "Duration of the time-entry in the\_\"c\" format of a C# timespan In other words : d.hh:mm:ss.\nMax: \"1.00:00:00\" (ie 24 hours)."
                        format: timespan
                      unit:
                        type: integer
                        description: |-
                          Unit in which the time-entry has been entered. 
                          - 0: Days (eg "1/2 day")
                          - 1: Hours (eg "8h15min")
                          - 2: Time (eg "23:45:00") 
                        example: 1
                      creationSource:
                        type: integer
                        description: |-
                          Attribute used to identify last modification source :
                          - 0: Automatic fallback on theoretical time-entries from workcycles.
                          - 1: Entered with Lucca Timesheet quick-fill tools.
                          - 2: Manually created or edited (default).
                          - 3: Imported from external sources. Can be read-only for the user depending on Timesheet configuration.
                          - 4: Entered with Lucca Timesheet clock-in clock-out tool. 
                        default: 2
                      axisSections:
                        type:
                          - array
                          - 'null'
                        description: 'Represent the activities that time-entry should be associated with. When not in activity mode, send an empty array, or do not serialize this property.'
                        items:
                          $ref: '#/components/schemas/AxisSection'
                      comment:
                        type:
                          - object
                          - 'null'
                        description: A comment to add additional information about the given time-entry. It will be visible on Lucca Timesheet user interface.
                        properties:
                          content:
                            type: string
                      timeTypeId:
                        type:
                          - integer
                          - 'null'
                        description: Optional reference of a configured Time Type. To use only if the timesheet is set up to use Time Types. Null otherwise.
                        example: 1
                    required:
                      - id
                      - ownerId
                      - startsAt
                      - duration
                      - unit
            examples:
              Example 1:
                value:
                  id: 552586
                  ownerId: 90
                  unit: 2
                  startsAt: '2024-04-22T08:30:00'
                  duration: '04:45:00'
                  creationSource: 2
                  axisSections:
                    - id: 42
                    - id: 127
                    - id: 346
                    - id: 347
                  comment:
                    content: This is another comment
                  timeTypeId: 1
        description: You can either update a single or multiple time-entries. Pick the correct body type accordingly.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - $ref: '#/components/schemas/TimeEntry'
                      - type: object
                        properties:
                          items:
                            type: array
                            items:
                              $ref: '#/components/schemas/TimeEntry'
              examples: {}
        '201':
          description: Created
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '403':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      tags:
        - TimeEntries
    delete:
      summary: Delete multiple time-entries
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/delete-multiple-timeentries
      operationId: delete-api-v3-timeentries
      description: |-
        Delete one or several time-entries. Deletion is irrevocable.

        The "id" field of each time-entry must be sent and correspond to existing time-entries.

        A single request can delete time-entries for several different owners.

        It actually doest not delete entirely the object, but rather sets the "archivedAt" field to the current DateTime.

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry) and any validation error that you might encounter when using this API.

        There are different ways to update time-entries. Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/update-time-entries) on how to update `time-entries` the right way depending on your use case.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                    minimum: 0
                    description: Unique identifiers of the time-entries to delete.
                required:
                  - id
            examples:
              Example 1:
                value:
                  - id: 552586
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '403':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      tags:
        - TimeEntries
  /api/v3/timeentries/{timeEntryId}:
    parameters:
      - $ref: "#/components/parameters/Authorization"
      - schema:
          type: integer
        name: timeEntryId
        in: path
        required: true
        description: Identifier of the time-entry.
    get:
      summary: Get a time-entry by id
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/get-a-timeentry-by-id
      description: |-
        Retrieve a single time-entry identified by its unique identifier.

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry).

        Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/retrieve-time-entries) on how to retrieve `time-entries` the right way.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/TimeEntry'
              examples:
                Example 1:
                  value:
                    data:
                      ownerId: 90
                      unit: 2
                      startsAt: '2024-04-22T08:30:00'
                      duration: '04:45:00'
                      creationSource: 2
                      axisSections:
                        - id: 42
                        - id: 127
                        - id: 346
                        - id: 347
                      comment:
                        id: 59
                        content: This is another comment
                      timeTypeId: 1
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      operationId: get-api-v3-timeentries-timeEntryId
      parameters: []
      tags:
        - TimeEntries
    put:
      summary: Update a time-entry by id
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/update-a-time-entry-by-id
      operationId: put-api-v3-timeentries-timeEntryId
      description: |-
        Update fields of a single time-entry identified by its unique id.

        The "id" field must be sent and correspond to an existing time-entry. 

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry) and any validation error that you might encounter when using this API.

        There are different ways to update time-entries. Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/update-time-entries) on how to update `time-entries` the right way depending on your use case.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/TimeEntry'
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '403':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimeEntry'
            examples:
              Example 1:
                value:
                  ownerId: 90
                  unit: 2
                  startsAt: '2024-04-22T08:30:00'
                  duration: '04:45:00'
                  creationSource: 2
                  axisSections:
                    - id: 42
                    - id: 127
                    - id: 346
                    - id: 347
                  comment:
                    id: 59
                    content: This is another comment
                  timeTypeId: 1
      tags:
        - TimeEntries
    delete:
      summary: Delete a time-entry by id
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/time-entries/delete-a-time-entry-by-id
      operationId: delete-api-v3-timeentries-timeEntryId
      description: |-
        Delete a time-entry. Deletion is irrevocable.

        The "id" field must be set and correspond to an existing time-entry.

        It actually doest not delete entirely the object, but rather sets the "archivedAt" field to the current DateTime.

        Read more about the [time-entry object](/api-reference/legacy/timmi-timesheet/time-entries/time-entry) and any validation error that you might encounter when using this API.

        There are different ways to update time-entries. Please see [this guide](/api-reference/legacy/timmi-timesheet/guides/update-time-entries) on how to update `time-entries` the right way depending on your use case.
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '403':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      tags:
        - TimeEntries
  /api/v3/timmitimesheets:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    get:
      summary: List timesheets
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/timesheets/list-timesheets
      description: |-
        List all timesheets satisfying query filters.

        Please refer to the [Timesheet API reference](reference/Timmi-Timesheet-v3.yaml/components/schemas/Timesheet) for additional information on the Timesheet resource.
      tags:
        - Timesheets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        description: The list of timesheets satisfying query filters.
                        items:
                          $ref: '#/components/schemas/Timesheet'
              examples: {}
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
      operationId: get-api-v3-timesheets
      parameters:
        - schema:
            type: array
            items:
              $ref: '#/components/schemas/Timesheet/properties/ownerId'
          in: query
          name: ownerId
          description: User's identifier.
          style: form
        - schema:
            type: string
            example: 'between,2022-01-01,2022-02-01'
          in: query
          name: startsOn
          description: Filter on the start date of the timesheet.
        - schema:
            type: array
            items:
              $ref: '#/components/schemas/Timesheet/properties/status'
          in: query
          name: status
          description: 'Filter on the timesheet workflow status. 0 for temporary, 1 for pending, 2 for approved, 3 for rejected.'
          style: form
        - schema:
            type: string
            example: 'until,2022-01-01'
          in: query
          name: endsOn
          description: Filter on the end date of the timesheet.
  /api/v3/timmitimesheets/remindable:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    get:
      operationId: get-api-v3-timmitimesheets-remindable
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/timesheets/list-due-timesheets
      summary: List due timesheets
      description: |-
        List timesheets that are not yet submitted (status: 0). 

        You must filter on either `ownerIds`, `managerIds` or `legalEntityIds`.
        As long as a timesheet is not submitted, its unique identifier is equal to zero.

        Please refer to the [Timesheet API reference](reference/Timmi-Timesheet-v3.yaml/components/schemas/Timesheet) for additional information on the Timesheet resource.
      tags:
        - Timesheets
      parameters:
        - name: ownerIds
          in: query
          schema:
            type: array
            items:
              type: integer
          description: List unique identifier of owners.
        - name: legalEntityIds
          in: query
          schema:
            type: array
            items:
              type: integer
          description: List unique identifier of owners' legal establishments.
        - name: managerIds
          in: query
          schema:
            type: array
            items:
              type: integer
          description: List unique identifier of owners' managers.
        - schema:
            type: string
            format: date
          in: query
          name: start
          description: Prevent older timesheets to be returned.
        - schema:
            type: string
            format: date
          in: query
          name: end
          description: Prevent earlier timesheets to be returned (date excluded). Defaults to today when not sent.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/Timesheet'
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
  /timmi/services/workflow/remind:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Remind Timesheets
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/workflow/remind-timesheets
      responses:
        '200':
          $ref: '#/components/responses/ResponseWorkflowService'
        '400':
          $ref: '#/components/responses/ResponseWorkflowService'
        '401':
          $ref: '#/components/responses/ResponseWorkflowService'
        '403':
          $ref: '#/components/responses/ResponseWorkflowService'
        '404':
          $ref: '#/components/responses/ResponseWorkflowService'
        '500':
          $ref: '#/components/responses/ResponseWorkflowService'
      operationId: post-timmi-services-workflow-remind
      description: Remind users of a due timesheet. Sends him/her an email.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timesheets:
                  type: array
                  items:
                    type: object
                    properties:
                      startsAt:
                        type: string
                        format: date
                        example: '2024-06-01'
                      endsAt:
                        type: string
                        format: date
                        example: '2024-07-01'
                      ownerId:
                        type: integer
                        minimum: 1
        description: 'Timesheets are identified by startsAt, endsAt & ownerId.'
      tags:
        - Workflow
  /timmi/services/workflow/submit:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Submit Timesheets
      responses:
        '200':
          $ref: '#/components/responses/ResponseWorkflowService'
        '400':
          $ref: '#/components/responses/ResponseWorkflowService'
        '401':
          $ref: '#/components/responses/ResponseWorkflowService'
        '403':
          $ref: '#/components/responses/ResponseWorkflowService'
        '404':
          $ref: '#/components/responses/ResponseWorkflowService'
        '500':
          $ref: '#/components/responses/ResponseWorkflowService'
      operationId: post-timmi-services-workflow-submit
      description: |-
        Timesheet is created and its status is set to `1` (pending approval). In some cases, timesheet may then be automatically approved (`status: 2`), depending on the application settings.

        Once submitted, all comprised time-entries for user can no longer be modified. In order to be able to modify them, the timesheet must first be rejected through `cancel`, `deny` or `invalidate` operations (depends on the current timesheet status).
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/workflow/submit-timesheets-v3
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timesheets:
                  type: array
                  items:
                    type: object
                    properties:
                      startsAt:
                        type: string
                        format: date
                      endsAt:
                        type: string
                        format: date
                      ownerId:
                        type: integer
                        minimum: 1
                      transfers:
                        type: array
                        minItems: 0
                        items:
                          $ref: '#/components/schemas/Transfer'
                    required:
                      - startsAt
                      - endsAt
                      - ownerId
        description: 'Timesheets are identified by startsAt, endsAt & ownerId.'
      tags:
        - Workflow
  /timmi/services/workflow/cancel:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Cancel Timesheets by id
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/workflow/cancel-timesheets-v3
      responses:
        '200':
          $ref: '#/components/responses/ResponseWorkflowService'
        '400':
          $ref: '#/components/responses/ResponseWorkflowService'
        '401':
          $ref: '#/components/responses/ResponseWorkflowService'
        '403':
          $ref: '#/components/responses/ResponseWorkflowService'
        '404':
          $ref: '#/components/responses/ResponseWorkflowService'
        '500':
          $ref: '#/components/responses/ResponseWorkflowService'
      operationId: post-timmi-services-workflow-cancel
      description: |-
        Timesheet is created and its status is set to `1` (pending approval). In some cases, timesheet may then be automatically approved (`status: 2`), depending on the application settings.

        Once submitted, all comprised time-entries for user can no longer be modified. In order to be able to modify them, the timesheet must first be rejected through `cancel`, `deny` or `invalidate` operations (depends on the current timesheet status).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timesheets:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                      comment:
                        type: string
                    required:
                      - id
        description: ''
      tags:
        - Workflow
  /timmi/services/workflow/approve:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Approve Timesheets by id
      responses:
        '200':
          $ref: '#/components/responses/ResponseWorkflowService'
        '400':
          $ref: '#/components/responses/ResponseWorkflowService'
        '401':
          $ref: '#/components/responses/ResponseWorkflowService'
        '403':
          $ref: '#/components/responses/ResponseWorkflowService'
        '404':
          $ref: '#/components/responses/ResponseWorkflowService'
        '500':
          $ref: '#/components/responses/ResponseWorkflowService'
      operationId: post-timmi-services-workflow-approve
      description: |-
        Timesheet is created and its status is set to `1` (pending approval). In some cases, timesheet may then be automatically approved (`status: 2`), depending on the application settings.

        Once submitted, all comprised time-entries for user can no longer be modified. In order to be able to modify them, the timesheet must first be rejected through `cancel`, `deny` or `invalidate` operations (depends on the current timesheet status).
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/workflow/approve-timesheets-v3
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timesheets:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                      transfers:
                        type: array
                        items:
                          $ref: '#/components/schemas/Transfer'
                    required:
                      - id
        description: ''
      tags:
        - Workflow
  /timmi/services/workflow/deny:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Deny Timesheets by id
      responses:
        '200':
          $ref: '#/components/responses/ResponseWorkflowService'
        '400':
          $ref: '#/components/responses/ResponseWorkflowService'
        '401':
          $ref: '#/components/responses/ResponseWorkflowService'
        '403':
          $ref: '#/components/responses/ResponseWorkflowService'
        '404':
          $ref: '#/components/responses/ResponseWorkflowService'
        '500':
          $ref: '#/components/responses/ResponseWorkflowService'
      operationId: post-timmi-services-workflow-deny
      description: |-
        Denies a submitted timesheet pending approval. Sets its status to `3` (rejected) and a new timesheet may be submitted for this User and [StartsOn - EndsOn[.

        Comment is mandatory.
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/workflow/deny-timesheets-v3
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timesheets:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                      comment:
                        type: string
                    required:
                      - id
                      - comment
      tags:
        - Workflow
  /timmi/services/workflow/invalidate:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Invalidate Timesheets by id
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/workflow/invalidate-timesheets-v3
      responses:
        '200':
          $ref: '#/components/responses/ResponseWorkflowService'
        '400':
          $ref: '#/components/responses/ResponseWorkflowService'
        '401':
          $ref: '#/components/responses/ResponseWorkflowService'
        '403':
          $ref: '#/components/responses/ResponseWorkflowService'
        '404':
          $ref: '#/components/responses/ResponseWorkflowService'
        '500':
          $ref: '#/components/responses/ResponseWorkflowService'
      operationId: post-timmi-services-workflow-invalidate
      description: |-
        Rejects an approved timesheet. Sets its status to `3` (rejected). A new timesheet may then be submitted for this User and [StartsOn - EndsOn[.

        Comment is mandatory.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timesheets:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                    required:
                      - id
                comment:
                  type: string
                  description: Mandatory comment to explain invalidation
              required:
                - comment
      tags:
        - Workflow
  /timmi-timesheet/api/reports:
    parameters:
      - $ref: "#/components/parameters/Authorization"
    post:
      summary: Create a new Report
      operationId: post-timmi-timesheet-api-reports
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/reports/create-a-report
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      description: |-
        <Info>
          This endpoint does not adhere to the "v3 API endpoints" principles. 
          The "fields" query parameter is not supported, but all fields are 
          systematically returned.
        </Info>

        Starts the creation of a a report, based on based on an existing report-template. So you first need to retrieve the report-template unique identifier `templateId`.

        Please see [this guide](../docs/Use-cases/Timmi%20Timesheet/Downloading-a-report.md) on how to download reports.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Report'
      tags:
        - Reports
  /timmi-timesheet/api/reports/{reportId}/download-csv:
    parameters:
      - $ref: "#/components/parameters/Authorization"
      - schema:
          type: integer
        name: reportId
        in: path
        required: true
        description: Identifier of the report.
    get:
      summary: Download Report as CSV
      tags:
        - Reports
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/reports/download-report-as-csv
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: get-timmi-timesheet-api-reports-reportId-download-csv
      description: |-
        <Info>
          This endpoint does not adhere to the "v3 API endpoints" principles. 
          The "fields" query parameter is not supported, but all fields are 
          systematically returned.
        </Info>

        Download a report content as an CSV file `.csv`.

        Column delimiter and numbers formating depends on the authentified user's culture.
  /timmi-timesheet/api/reports/{reportId}/download-excel:
    parameters:
      - $ref: "#/components/parameters/Authorization"
      - schema:
          type: integer
        name: reportId
        in: path
        required: true
        description: Identifier of the report.
    get:
      summary: Download Report as Excel
      tags:
        - Reports
      x-mint:
        href: /api-reference/legacy/timmi-timesheet/reports/download-report-as-excel
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: get-timmi-timesheet-api-reports-reportId-download-excel
      description: |-
        <Info>
          This endpoint does not adhere to the "v3 API endpoints" principles. 
          The "fields" query parameter is not supported, but all fields are 
          systematically returned.
        </Info>

        Download a report content as an Excel file `.xls`.

        Column delimiter and numbers formating depends on the authentified user's culture.
components:
  schemas:
    TimeEntry:
      title: The time-entry resource
      type: object
      description: |-
        time-entries are the working time sequences spent by a user on any given day.

        time-entries come in different **units** and **submission modes** that should match the timesheet configuration of a given owner on a given day.

        ## About units & duration

        Lucca Timesheet supports up to 3 different units when it comes to entering time-entries. These are:
        - `0: Days` In this case, the user does not enter the exact hours he/she started working, but rather the total duration spent as a fraction of a day. For example: "John worked half a day on Monday".
        - `1: Hours` In this case, the user still does not enter the exact hours, but only the duration spent in hours. For example: "John worked 7h30min yesterday".
        - `2: Time` In this unit, the user has to enter the actual time he/she started working, as well as the end time. For example: "John started working at 08:00 for 3 hours, thus ending at 11:00".

        ```csharp
        enum TimeEntryUnit:
        {
            Days = 0,
            Hours = 1,
            Time = 2
        }
        ```

        Whichever the unit, the time-entry is mainly determined by three properties:
        - `(int) ownerId`: The user it belongs to.
        - `(date-time) startsAt`: The date and time when the user started working. In `Days` and `Hours` units, the time part can only be `00:00:00` for "morning" (AM) or `12:00:00` for the "afternoon" (PM).
        - `(duration) duration`: The total time spent by the user from the time he/she started. In all units, this property is serialized as a string compliant with the Timespan formating: `d.hh:mm:ss` where `d` is the number of days (can be omitted if equal to zero which is in most cases), `hh` the number of hours, `mm` the number of minutes, and `ss` the number of seconds.


        Some examples :
        ```js
        // TIME UNIT
        // Case: "John (id: 416) worked between 09:45 and 12:15 on January, 1st 2021."
        var timeEntry = {
          "ownerId": 416,
          "startsAt": "2021-01-01 09:45:00",
          "duration: "02:30:00",
          "unit": 2
        };

        // HOURS UNIT
        // Case: "John (id: 416) spent 4h45min working on January, 1st 2021 in the morning"
        var timeEntry = {
          "ownerId": 416,
          "startsAt": "2021-01-01 00:00:00",
          "duration: "04:45:00",
          "unit": 1
        }

        // DAYS UNIT
        // Case: "John (id: 416) worked on the afternoon of January, 1st 2021"
        var timeEntry = {
          "ownerId": 416,
          "startsAt": "2021-01-01 12:00:00",
          "duration: "12:00:00",
          "unit": 0
        }
        ```

        ## About submission modes

        There are 2 submission modes in Lucca Timesheet:
        - **Attendance**: the user is expected to enter the sequences of work without much detail.
        - **Activities**: the user is expected to enter the time spent on each task / project / whatever.

        Therefore, time-entries in activities mode have a supplementary property: the set of task / project / cost center / ... the user worked on. These analytical items are called AxisSections. [More info here](reference/Timmi-Timesheet-v3.yaml/components/schemas/AxisSection).

        The time-entry is NOT determined by the `axisSection[]` it is associated with as a user can change the `axisSection[]`.


        ```json
        {
          "ownerId": 416,
          "startsAt": "2021-01-01 00:00:00",
          "duration: "04:45:00",
          "unit": 1,
          "axisSections": [
            {
              "name": "R&D",
              "axis": {
                "name": "Cost centers"
              }
            },
            {
              "name": "My awesome project",
              "axis": {
                "name": "Projects"
              }
            },
            {
              "name": "Testing",
              "axis": {
                "name": "Tasks"
              }
            }
          ]
        }
        ```

        ## About time types
        Each time-entry can reference a time type via its `timeTypeId` property.

        Time types are a configured working time classification. It is generally used as a way of discriminating different types of working hours regarding compensation:
        - Attendance
        - Travels
        - etc...

        Time types can only be used on users that belong to a specific regulation (ie time and attendance policy) mode: `timeTrackingMode: typed`. Whenever it is not the case, the `timeTypeId` property should be left `null`.

        ## Validation rules

        #### Locked timeentries after timesheet submission
        A time-entry cannot be modified if its `startsAt` date belongs to an already submitted or approved timesheet.

        #### StartsAt and timezones
        The `startsAt` date-time property must be considered a [floating](https://www.w3.org/International/wiki/FloatingTime) date-time. As such, no UTC offset should be sent when creating or editing a time-entry.

        #### Max duration
        A time-entry cannot have a duration longer than 24h00 (ie one full day). 

        #### Cut at midnight
        A time-entry cannot overlap 2 different days (example `startsAt = 18:00:00` and `duration = 10:00:00`). It should be two distinct time-entries cut at `00:00:00`.

        #### Mandatory axisSection on activity timesheets
        A time-entry must have axisSection if the corresponding timesheet is in activity mode, and vice-versa.

        #### Inactive axisSection
        A time-entry cannot be modified if one of its axisSection is no longer active (`active=false`).

        #### Incompatible axisSections
        A time-entry cannot have nested axisSections that does not meet a correct parent-child tree structure.

        ## Fields
      examples:
        - id: 552586
          ownerId: 90
          owner:
            id: 90
            name: Hélène Girard
            url: 'https://example.ilucca.net/api/v3/timesheetusers/90'
          unit: 2
          startsAt: '2024-04-22T09:30:00'
          duration: '03:45:00'
          endsAt: '2024-04-22T13:15:00'
          authorId: 90
          createdAt: '2024-07-04T11:59:51.09'
          modifierId: 90
          modifiedAt: '2024-07-04T17:00:54.4'
          archivedAt: null
          creationSource: 2
          layer: 0
          axisSections:
            - id: 41
              name: Conception
              url: 'https://example.ilucca.net/api/v3/axissections/41'
            - id: 127
              name: Animal Logic
              url: 'https://example.ilucca.net/api/v3/axissections/127'
            - id: 346
              name: 'Projet Rose  : KPI - tableau de bord'
              url: 'https://example.ilucca.net/api/v3/axissections/346'
            - id: 347
              name: Art Direction
              url: 'https://example.ilucca.net/api/v3/axissections/347'
          comment:
            id: 59
            name: This is a comment
            url: 'https://example.ilucca.net/api/v3/timeentrycomments/59'
          timeTypeId: null
          timesheetId: 10967
          timesheet:
            id: 10967
            name: 90 - avril 2024 - Submitted
            url: 'https://example.ilucca.net/api/v3/timmitimesheets/10967'
      x-tags:
        - TimeEntries
      properties:
        id:
          type: integer
          minimum: 1
          description: Unique identifier for this object.
          readOnly: true
        ownerId:
          type: integer
          minimum: 1
          description: Reference to the time-entry owner.
          example: 199
        owner:
          $ref: '#/components/schemas/TimesheetUser'
          description: The owner of this time-entry.
        unit:
          type: integer
          enum:
            - 0
            - 1
            - 2
          example: 2
          description: |-
            Unit in which the time-entry has been entered. 
            - 0: Days (eg "1/2 day")
            - 1: Hours (eg "8h15min")
            - 2: Time (eg "23:45:00") 
        startsAt:
          type: string
          format: date-time
          description: 'The timeEntry start date and time. Please do NOT send any offset/timezone information ("Z", "+01:00", etc...).'
          example: '2022-01-01T08:00:00'
        duration:
          type: string
          format: timespan
          default: '00:00:00'
          example: '03:45:00'
          description: "Duration of the time-entry in the\_\"c\" format of a C# timespan In other words : d.hh:mm:ss.\nMax: \"1.00:00:00\" (ie 24 hours)."
        endsAt:
          type: string
          format: date-time
          description: Automatically set as startsAs + duration when editing a timeentry.
          example: '2022-01-01T11:45:00'
          readOnly: true
        authorId:
          type: integer
          description: Identifier of the user who initially created this time-entry.
          example: 199
          readOnly: true
        createdAt:
          type: string
          format: date-time
          description: Date and time when time-entry was first created. (Central European Time)
          example: '2022-01-01T18:35:10'
          readOnly: true
        modifierId:
          type: integer
          description: The unique identifier of the user who last updated the time-entry.
          readOnly: true
        modifiedAt:
          type: string
          description: 'Date and time when time-entry was last modified. (Central European Time). The time-entry is modified by any change made to the time-entry, including when corresponding timesheet is sent for approbation (status=1) and when the timesheet is completely approved (status=2).'
          format: date-time
          example: '2022-01-01T18:42:14'
          readOnly: true
        archivedAt:
          type: string
          description: 'Date and time when time-entry was deleted (Central European Time). When null, implies that the time-entry still has not been deleted (and maybe never will).'
          format: date-time
          example: '2022-01-01T18:41:12'
          readOnly: true
        creationSource:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Attribute used to identify last modification source :
            - 0: Automatic fallback on theoretical time-entries from workcycles.
            - 1: Entered with Lucca Timesheet quick-fill tools.
            - 2: Manually created or edited (default).
            - 3: Imported from external sources. Is read-only on Lucca Timesheet user interfaces only if Timesheet regulation is in following modes : attendance schedule with clock-in clock-out, and activity schedule.
            - 4: Entered with Lucca Timesheet clock-in clock-out tool. 
          default: 2
        layer:
          type: integer
          description: |-
            Used to store the original workcycle at the time of time-entry modification. In 99.999% of use cases, you will want the 0 : Actual time-entry.
            - 0: Actual time-entry.
            - 1: Theoretical workcycle.
          readOnly: true
        axisSections:
          type:
            - array
            - 'null'
          description: 'Represent the activities that time-entry should be associated with. When not in activity mode, send an empty array, or do not serialize this property.'
          items:
            $ref: '#/components/schemas/AxisSection'
        comment:
          type:
            - 'null'
            - object
          description: A comment to add additional information about the given time-entry. It will be visible on Lucca Timesheet user interface.
          properties:
            id:
              type: integer
              readOnly: true
            content:
              type: string
              description: Comment content
            authorId:
              type: integer
              description: Identifier of the user who initially created this comment
              readOnly: true
            createdAt:
              type: string
              format: date-time
              description: Date and time when the comment was first created. (Central European Time)
              readOnly: true
        timeTypeId:
          type:
            - integer
            - 'null'
          description: Optional reference of a configured Time Type. To use only if the timesheet is set up to use Time Types. Null otherwise.
        timesheetId:
          type: integer
          description: The reference to the timeshet this timeentry is associated with when the timesheet is at least sent for approval. Is null if the timesheet is still pending submission.
          readOnly: true
      required:
        - ownerId
        - unit
        - startsAt
        - duration
    Timesheet:
      title: The Timesheet resource
      type: object
      description: |-
        ## Definitions

        Timesheets are time-entries containers. A timesheet belongs to a single user `owner` and ranges over several days `[startsOn - endsOn[` (endsOn excluded). Its range depends on the submission frequency set up in Lucca Timesheet (weekly / monthly).

        A timesheet purpose is to ease the approval workflow: rather than approving each time-entry individually, they are approved in a weekly / monthly batch.

        The approval workflow looks like this:

        ![Lucca Timesheet - Approval workflow](https://stoplight.io/api/v1/projects/cHJqOjEwNjgxNg/images/xfjxCP2RUa4)

        Thus, a timesheet:
        - is created upon submission ;
        - is "pending approval" or "submitted" (`status: 1`) as long as all approvers have not approved it ;
        - is "approved" (`status: 2`) once all approvers have approved it ;
        - may become "rejected" (`status: 3`) whenever:
          - the submitter cancels the submission, which is possible as long as the timesheet is not fully approved ;
          - one of the approvers denies the timesheet ;
          - an administrator invalidates the timesheet, which is only possible once the timesheet is fully approved.

        Once a timesheet is rejected, a new one has to be submitted and the workflow starts again.

        Timesheets are created and their status are set to `submitted`. In some cases, timesheets may then be automatically `approved`, depending on the approval workflow settings.

        Once submitted, all timeentries on the period for that user can no longer be modified. In order to be able to modify them, the timesheet must first be rejected through `cancel`, `deny` or `invalidate` operations (depends on the current timesheet status).

        ## Available guide

        Please see [this guide](../docs/Use-cases/Timmi%20Timesheet/Mass-submit-timesheets.md) on how to submit timesheets the right way.

        ## Fields
      x-tags:
        - Timesheets
      examples:
        - id: 10959
          name: 45 - avril 2024 - Approved
          ownerId: 45
          owner:
            id: 45
            name: Noël Flantier
            url: 'https://example.ilucca.net/api/v3/timesheetusers/45'
          startsOn: '2024-04-29T00:00:00'
          endsOn: '2024-05-06T00:00:00'
          statuteId: 4
          expectedNextActorId: null
          expectedNextActor: null
          status: 2
          timeEntries:
            - id: 551915
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551915'
            - id: 551916
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551916'
            - id: 551917
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551917'
            - id: 551918
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551918'
            - id: 551919
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551919'
            - id: 551920
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551920'
            - id: 551921
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551921'
            - id: 551922
              name: ''
              url: 'https://example.ilucca.net/api/v3/timeentries/551922'
      properties:
        id:
          type: integer
          description: Uniquer identifier of the timesheet.
          readOnly: true
        name:
          type: string
          description: Human-readable description of the Timesheet
          example: 45 - January 2016 - Approved
          readOnly: true
        ownerId:
          type: integer
          minimum: 1
          description: Reference to the Timesheet owner.
          readOnly: true
        owner:
          allOf:
            - $ref: '#/components/schemas/TimesheetUser'
            - type: object
              properties:
                manager:
                  $ref: '#/components/schemas/TimesheetUser'
        startsOn:
          type: string
          format: date
          description: The Timesheet starting date (included).
          readOnly: true
        endsOn:
          type: string
          description: The Timesheet ending date (excluded).
          format: date
          readOnly: true
        expectedNextActorId:
          type: integer
          description: Reference to the TimesheetUser responsible for the next approval workflow step. Is null if status <> 1
          readOnly: true
        expectedNextActor:
          $ref: '#/components/schemas/TimesheetUser'
          description: Reference to the TimesheetUser responsible for the next approval workflow step. Is null if status <> 1
        status:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |
            Approval workflow status for this timesheet
            - 0: the timesheet is yet to be submitted
            - 1: the timesheet has been submitted and approval is still pending
            - 2: the timesheet has been submitted and approved.
            - 3: the timesheet has been rejected (cancelled after submission, denied upon approval or invalidated after having been approved)
          readOnly: true
        statuteId:
          type: integer
          description: Reference to the applicable "statute" (configuration).
          readOnly: true
    Report:
      title: The Report resource
      type: object
      description: |-
        A report is generated from an existing report-template, referenced by its unique identifier `templateId`.

        ## Status

        The generation of a report content is a background process. As long as this process is not complete, the report status stays `pending`. Once the report is complete, its status is set to `done`. May an error be encountered while generating its content, then its status is set to `error`.

        The report content can only be viewed and downloaded once it is `done`.

        ## Start & end dates

        Start `startsOn` and end `endsOn` dates can be left `null`. In this case, default dates from the report-template are applied.

        ## Filters

        Filters are usually set in the report-template. But these can be overriden for a given report.

        ## Fields
      x-tags:
        - Reports
      properties:
        id:
          type: integer
          description: Unique identifier of the report generated
          readOnly: true
        templateId:
          type: string
          description: Reference to a ReportTemplate to generate a report from.
        status:
          type: string
          enum:
            - pending
            - done
            - error
          description: Status of a generated report.
          readOnly: true
        name:
          type: string
          description: Name given to the generated report.
          readOnly: true
        startsOn:
          type: string
          format: date
          description: Starting date of the generated report. Default dates of the report-template are applied if left null.
        endsOn:
          type: string
          format: date
          description: Ending date of the generated report. Default of the report-template are applied if left null.
        filters:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              kind:
                type: string
              values:
                type: array
                items:
                  type: number
        columns:
          type: array
          items:
            type: object
            properties:
              kind:
                type: string
              name:
                type: string
              category:
                type: string
              isRequired:
                type: boolean
              isDefault:
                type: boolean
              isPeriodic:
                type: boolean
                description: Periodic columns will be duplicated as many times as there are occurrences of periodicity in the report.
            readOnly: true
          readOnly: true
      required:
        - templateId
    AxisSection:
      title: The AxisSection resource
      type: object
      properties:
        id:
          type: integer
          minimum: 1
        code:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        multilingualName:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
        ownerId:
          type: integer
          minimum: 1
          readOnly: true
        startOn:
          type: string
          format: date-time
          readOnly: true
        endOn:
          type: string
          format: date-time
          readOnly: true
        active:
          type: boolean
          readOnly: true
        axisId:
          type: integer
          readOnly: true
        parentAxisSections:
          type: array
          items:
            type: object
            description: Axis-section objects
          readOnly: true
        childrenAxisSections:
          type: array
          items:
            type: object
            description: Axis-section objects
          readOnly: true
      x-tags:
        - TimeEntries
      description: 'You can [read more about this resource here](/api-reference/legacy/organization/axis-sections/get-started).'
    TimesheetUser:
      title: Timesheet User
      type: object
      properties:
        id:
          type: integer
          minimum: 1
          description: Unique identifier of this User.
        firstName:
          type: string
          description: Given name.
        lastName:
          type: string
          description: Family name
        mail:
          type: string
          format: email
          description: Email address.
        legalEntityId:
          type: integer
          description: Unique identifier of the legal establishment this user currently has a work contract with.
      description: A Timesheet limited model of a user
    Transfer:
      title: Transfer
      type: object
      description: Transfer defines a change in pay's element distribution
      properties:
        transferAuthorizationId:
          type: integer
          description: Unique identifier of the associated transfer authorization.
        amount:
          type: string
          description: 'Format: d.hh:mm:ss. Max: "1.00:00:00" (ie 24 hours).'
          format: timespan
          default: '00:00:00'
          example: '03:45:00'
        comment:
          type: string
  responses:
    ResponseProblem:
      description: Problem
      content:
        application/json:
          schema:
            type: object
            properties:
              Status:
                type: integer
                description: HTTP status code.
                example: 401
              Message:
                type: string
                description: Human readable error message.
                example: Unauthorized
    ResponseWorkflowService:
      description: Workflow response
      content:
        application/json:
          schema:
            type: object
            properties:
              Status:
                type: integer
                description: HTTP status code.
              Message:
                type:
                  - string
                  - 'null'
                description: Human readable error message (when error).
              Items:
                type: array
                items:
                  type: object
                  properties:
                    Id:
                      type: integer
                    ExceptionMessage:
                      type: string
                    Status:
                      type: integer
                      enum:
                        - 0
                    Title:
                      type: string
                    Url:
                      type: string
                      format: uri
                      description: URL of the relevant timesheet.
  parameters:
    paging:
      name: paging
      in: query
      required: true
      schema:
        type: string
        example: '2000,500'
      description: '{offset},{limit}. Defaults to 0,1000.'
    Authorization:
      name: Authorization
      required: true
      description: |-
        API key. Value must be formatted like so: `lucca application={api_key}`.
      in: header
      schema:
        type: string
