> ## 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 financials by project

> Retrieve all financial metrics on projects.

Response contains the sum of all included projects (paginated). The `items` node contains the financial metrics for each project.



## OpenAPI

````yaml /openapi-specs/timmi-project.yaml get /timmi-project/api/projects/financials
openapi: 3.1.0
info:
  title: Lucca Project API (not v3)
  version: '1.0'
  description: >
    Welcome on the documentation for the Lucca Project API.


    It is not conforming to the "v3 API" constraints. Main differences are:

    - All available fields are systematically returned. Fields sets may be
    differente between endpoints for resources collections and single resources.

    - Paging is controlled through the `take` and `offset` parameters.
  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: Clients
    description: Clients the projects are serving.
  - name: Core concepts
    description: Concepts that are commonly used in the whole app.
  - name: Financials
    description: Exposes KPI for project management.
  - name: Organizations
    description: Set of legal establishments sharing the same accounting.
  - name: Project services
    description: Items of work (WBS) for a project.
  - name: Projects
    description: The main resource in Lucca Project.
paths:
  /timmi-project/api/projects/financials:
    parameters:
      - $ref: '#/components/parameters/Authorization'
    get:
      tags:
        - Financials
      summary: List financials by project
      description: >-
        Retrieve all financial metrics on projects.


        Response contains the sum of all included projects (paginated). The
        `items` node contains the financial metrics for each project.
      operationId: get-timmi-project-api-projects-financials
      parameters:
        - name: organizationId
          in: query
          required: true
          schema:
            type: integer
          description: Only return projects in given organization (by id).
        - name: projectContractType
          in: query
          style: form
          explode: false
          schema:
            type: array
            items: b74b309e-d7da-42e8-88d0-e07b9b7501c3
          description: Only return projects with given contract type.
        - name: projectStatus
          in: query
          style: form
          explode: false
          schema:
            type: array
            items: 5bcef649-89e7-450f-b51c-65dad488d662
          description: Only return projects with given status.
        - name: projectOwnerId
          in: query
          schema:
            type: integer
          description: Identifier of the project lead.
        - name: hasProjectAnomaly
          in: query
          schema:
            type: boolean
          description: Only return projects with anomalies (any).
        - name: isProjectDelayedDelivery
          in: query
          schema:
            type: boolean
          description: Only return late projects (risk).
        - name: isProjectBudgetOverrun
          in: query
          schema:
            type: integer
          description: Only return overrun projects (risk)
        - name: isProjectHighlyDiscounted
          in: query
          schema:
            type: boolean
          description: Only return highly discounted projects (risk).
        - name: from
          in: query
          description: Start date.
          schema:
            type: string
            format: date
        - name: till
          in: query
          description: End date.
          schema:
            type: string
            format: date
        - name: projectId
          in: query
          description: Identifier of the project.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
        - name: search
          in: query
          description: Find a project based on its name or code.
          schema:
            type: string
        - name: projectIntersectsPeriod
          description: >
            Only return projects with [startsOn, revisedDeliveryDate] dates
            intersecting given period `?projectIntersectsPeriod={start},{end}`.
            In other words, projects that spread partially or completely over
            passed period.

            Projects with no dates `startsOn: null, revisedDeliveryDate: null`
            will always be returned (these may only be non-billable projects).
          in: query
          style: form
          explode: false
          schema:
            type: array
            minItems: 2
            maxItems: 2
            items:
              type: string
              format: date
            examples:
              - 2022-01-01,2022-01-31
              - 2022-01-01,2022-12-31
        - name: projectOwnerDepartmentId
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              minimum: 0
            minItems: 1
          description: >
            List the identifiers of departments the project owner must belong
            to.
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields_root'
        - name: sort
          in: query
          description: Sort results by property
          schema:
            type: string
            enum:
              - project.id
              - '-project.id'
              - project.name
              - '-project.name'
              - project.owner.lastName
              - '-project.owner.lastName'
              - project.price
              - '-project.price'
              - project.billRate
              - '-project.billRate'
              - discountedSpent
              - '-discountedSpent'
              - totalInvoiced
              - '-totalInvoiced'
              - managementOutstanding
              - '-managementOutstanding'
              - estimatedOverrun
              - '-estimatedOverrun'
              - estimatedRecoveryRate
              - '-estimatedRecoveryRate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/FinancialsCollection'
                  - properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/ProjectFinancials'
                    type: object
        '400':
          $ref: '#/components/responses/ResponseProblem'
        '401':
          $ref: '#/components/responses/ResponseProblem'
        '404':
          $ref: '#/components/responses/ResponseProblem'
        '500':
          $ref: '#/components/responses/ResponseProblem'
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
      required: false
      description: Page number
      schema:
        type: integer
        default: 1
        minimum: 1
    limit:
      name: limit
      in: query
      required: false
      description: Page size
      schema:
        type: integer
        default: 10
    fields_root:
      name: fields.root
      in: query
      required: false
      description: Return total items count (across all pages).
      schema:
        type: string
        enum:
          - count
  schemas:
    FinancialsCollection:
      title: FinancialsCollection
      allOf:
        - type: object
          properties:
            time:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Duration'
              description: Total time spent on all items.
            spent:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: >-
                Total value (standard prices) of the whole time spent on all
                items.
            progress:
              type: number
              multipleOf: 0.01
              description: Ratio of budget spent. Equal to `Spent` / `RevisedBudget`.
            totalInvoiced:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: Total amount of all invoices issued on the items.
            managementOutstanding:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: >-
                Total worth of uninvoiced time spent. Equal to `Spent` -
                `TotalInvoiced`.
            currentOverrun:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: >-
                Value of the budget overrun as of today. Equal to `Spent` -
                `InitialBudget`.
            estimatedOverrun:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: >-
                Value of the estimated budget overrun upon project end. Equal to
                `Spent` - `RevisedBudget`.
            price:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: Total price of all items.
            currentRecoveryRate:
              type: number
              minimum: 0
              multipleOf: 0.01
              description: >-
                Ratio between the total invoiced amount and the worth of all
                time spent. Equal to `TotalInvoiced` / `Spent`.
            initialRecoveryRate:
              type: number
              minimum: 0
              multipleOf: 0.01
              description: >-
                Ratio between the price and the initial budget of all items.
                Equal to `Price` / `InitialBudget`.
            estimatedRecoveryRate:
              type: number
              minimum: 0
              multipleOf: 0.01
              description: >-
                Ratio between the price and the revised budget. Equal to `Price`
                / `RevisedBudget`.
            currentDiscount:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: Ratio of total discount already spent.
            discountedSpent:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: Equal to `Spent` - `CurrentDiscount`.
            spentToComplete:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
              description: Equal to `RevisedBudget` - `Spent`.
            timeToComplete:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Duration'
              description: Equal to `spentToComplete` / `standardPrice`.
        - $ref: '#/components/schemas/CollectionV4'
    ProjectFinancials:
      title: The Project Financials resource
      description: ''
      type: object
      x-tags:
        - Financials
      properties:
        project:
          type: object
          properties:
            id:
              type: number
              minimum: 1
            code:
              type: string
              minLength: 1
            name:
              type: string
              minLength: 1
            client:
              type: object
              properties:
                id:
                  type: number
                  minimum: 1
                code:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                externalCode:
                  type: string
            owner:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: number
                firstName:
                  type: string
                  minLength: 1
                lastName:
                  type: string
                  minLength: 1
                dtContractEnd: {}
                picture:
                  type:
                    - object
                    - 'null'
                  required:
                    - href
                  properties:
                    href:
                      type: string
                      minLength: 1
                establishmentId:
                  type: number
              required:
                - picture
                - establishmentId
              readOnly: true
            status: 04b4207d-fd8d-4168-9564-044912d55b0c
            contractType: af9e8264-3889-4155-8a9c-017cbcf5cb37
            initialDeliveryDate:
              type: string
              format: date
            revisedDeliveryDate:
              type: string
              format: date
            billRate:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/PriceRate'
            initialTimeEstimate:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Duration'
            revisedTimeEstimate:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Duration'
            anomalies:
              type: array
              items:
                type: object
            risks:
              type: array
              uniqueItems: true
              minItems: 1
              items:
                type: object
                properties:
                  type:
                    type: string
                    minLength: 1
                  label:
                    type: string
                    minLength: 1
                required:
                  - type
                  - label
            invoicingWarnings:
              type: array
              items:
                type: object
            initialBudget:
              type: object
              properties:
                amount:
                  type: number
                currencyId:
                  type: string
                  minLength: 1
              required:
                - amount
            revisedBudget:
              type: object
              properties:
                amount:
                  type: number
                currencyId:
                  type: string
                  minLength: 1
            price:
              type: object
              properties:
                amount:
                  type: number
                currencyId:
                  type: string
                  minLength: 1
            invoiceMilestonesTotal: {}
            discount:
              anyOf:
                - type: 'null'
                - $ref: '#/components/schemas/Price'
            startsOn:
              type: string
              minLength: 1
        time:
          description: Total time spent on the project.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Duration'
        spent:
          description: Standard price value of all time spent on the project.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        progress:
          description: Current total progress percentage for the project.
          type: number
          multipleOf: 0.01
        totalInvoiced:
          description: Total amount invoiced to the client for this project.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        managementOutstanding:
          description: >-
            Equal to Spent - TotalInvoiced. In other words, is equal to the
            standard price value of all uninvoiced time spent on the project.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        currentOverrun:
          description: Standard price value of the current budget overrun.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        estimatedOverrun:
          description: Standard price value of the planned total budgeted overrun.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        price:
          description: >-
            Price for this project (estimated based on initial time estimate for
            time and materials contracts).
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        currentRecoveryRate:
          description: Ratio between (accounting) Revenue and (financials) Spent.
          type: number
          multipleOf: 0.01
          minimum: 0
        initialRecoveryRate:
          description: Ratio between Price and InitialBudget.
          type: number
          multipleOf: 0.01
          minimum: 0
        estimatedRecoveryRate:
          description: Ratio between Price and RevisedBudget.
          type: number
          multipleOf: 0.01
          minimum: 0
        currentDiscount:
          description: Ratio of the total discount already "spent".
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        discountedSpent:
          description: Equal to Spent - CurrentDiscount.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        spentToComplete:
          description: Budget remaining (amount). Equal to RevisedBudget - Spent.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
        timeToComplete:
          description: Time budget remaining.
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Duration'
    Duration:
      title: Duration
      description: >-
        Represents a duration in days or hours. ISO value is formatted as an
        [ISO-8601 duration
        string](https://en.wikipedia.org/wiki/ISO_8601#Durations). 

        For example `P5DT8H` represents 128 hours. When sending a duration to
        the server, please only send either a `value` or an `iso`. In most
        cases, the 

        `unit` is set on the project's organization and thus should not be sent
        in the request.
      type: object
      properties:
        value:
          type: number
          format: float
          multipleOf: 0.001
          description: Decimal value
        iso:
          type: string
          format: duration
          description: ISO-8601 formatted string
        unit:
          $ref: '#/components/schemas/DurationUnit'
      examples:
        - value: 128
          iso: P5DT8H
          unit: hour
    Price:
      title: Price
      description: >-
        Represents an amount of money. Is a value object containing a decimal
        number and a currency.
      type: object
      properties:
        amount:
          type: number
        currencyId:
          $ref: '#/components/schemas/CurrencyId'
    CollectionV4:
      title: CollectionV4
      type: object
      properties:
        next:
          type:
            - string
            - 'null'
          format: uri
        prev:
          type:
            - string
            - 'null'
          format: uri
        count:
          type:
            - integer
            - 'null'
          minimum: 0
    PriceRate:
      title: PriceRate
      description: Represents an amount of money per day or hour.
      type: object
      properties:
        price:
          $ref: '#/components/schemas/Price'
        unit:
          allOf:
            - $ref: '#/components/schemas/DurationUnit'
            - readOnly: true
    DurationUnit:
      type: string
      enum:
        - day
        - hour
      description: 'Duration unit: days or hours.'
    CurrencyId:
      title: CurrencyId
      type: string
      enum:
        - EUR
        - USD
        - CAD
        - ...
      readOnly: true
  responses:
    ResponseProblem:
      description: Problem
      content:
        application/json:
          schema:
            description: ''
            type: object
            x-examples:
              example-1:
                type: https://tools.ietf.org/html/rfc7231#section-6.5.1
                title: One or more validation errors occurred.
                status: 400
                traceId: 00-da6c8638331d052ea1c8c0087705b797-56ea5435c7c46706-00
                errors:
                  organizationId:
                    - >-
                      A value for the 'organizationId' parameter or property was
                      not provided.
            properties:
              type:
                type: string
                minLength: 1
                format: uri
              title:
                type: string
              status:
                type: integer
                enum:
                  - 400
                  - 401
                  - 403
                  - 404
                  - 405
                  - 500
              traceId:
                type: string
                minLength: 1
                format: uuid
              errors:
                type: object
                additionalProperties: true

````