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

# Get specific project

> Returns the full representation of a project by id, including all of its work entries.

## Getting a project

Returns the full representation of a project, including every work entry recorded on it — billed as well as unbilled.

Alongside the work entries, the response carries the aggregated values of the project:

* `unbilledValue` — the sum value of all unbilled work entries in cents
* `billedValue` — the sum value of all invoices created from this project in cents
* `totalValue` — the sum of both
* `totalMinutesSpent` and `unbilledMinutesSpent` — the time recorded on hourly work entries


## OpenAPI

````yaml GET /v1/projects/{projectId}
openapi: 3.1.0
info:
  title: infinity.swiss Open API
  version: '1.0'
  summary: ''
servers:
  - url: https://api.infinity.swiss
security:
  - apiKey: []
paths:
  /v1/projects/{projectId}:
    parameters:
      - schema:
          type: string
        name: projectId
        in: path
        description: The id of the specific project.
        required: true
    get:
      tags: []
      summary: Get specific project
      description: >-
        Returns the full representation of a project by id, including all of its
        work entries.
      operationId: get-project-by-id-v1
      responses:
        '200':
          description: The project is returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  project:
                    $ref: '#/components/schemas/Project'
        '401':
          $ref: '#/components/responses/Unauthorised'
        '404':
          $ref: '#/components/responses/ProjectNotFound'
components:
  schemas:
    Project:
      title: Project
      description: >-
        A project collects the work performed for a client, which can then be
        billed on invoices.
      allOf:
        - $ref: '#/components/schemas/ProjectCommonFields'
        - type: object
          properties:
            description:
              type: string
              description: The description of the project.
            incomeAccount:
              type: integer
              description: >-
                The income account used as contra account when work entries of
                this project are billed.
            workEntries:
              type: array
              description: All work entries on this project, billed and unbilled.
              items:
                $ref: '#/components/schemas/WorkEntry'
            totalMinutesSpent:
              type: integer
              description: >-
                The total number of minutes recorded on hourly work entries of
                this project.
            unbilledMinutesSpent:
              type: integer
              description: >-
                The number of minutes recorded on hourly work entries that have
                not been billed yet.
            averageEffectiveRate:
              type: integer
              description: The average effective hourly rate of this project in cents.
    ProjectCommonFields:
      title: ProjectCommonFields
      type: object
      description: Fields shared by the full and the preview representation of a project.
      required:
        - id
        - title
        - client
        - status
        - unbilledValue
        - billedValue
        - totalValue
        - hasUnbilledWork
        - invoiceIds
      properties:
        id:
          type: string
          description: The unique id of this project.
        title:
          type: string
          description: The title of the project.
        client:
          type: string
          description: The contact id of the client this project belongs to.
        status:
          $ref: '#/components/schemas/ProjectStatus'
        currentStage:
          type: string
          description: The id of the project stage this project is currently assigned to.
        unbilledValue:
          type: integer
          description: The sum value of all unbilled work entries in cents.
        billedValue:
          type: integer
          description: The sum value of all invoices created from this project in cents.
        totalValue:
          type: integer
          description: The sum of the billed and unbilled value in cents.
        hasUnbilledWork:
          type: boolean
          description: >-
            Whether this project has any billable work that has not been billed
            yet.
        invoiceIds:
          type: array
          description: The ids of all customer invoices created from this project.
          items:
            type: string
        lastHourlyWorkEntryAddedAt:
          type: string
          format: date
          description: The date of the most recent hourly work entry, if any exist.
    WorkEntry:
      title: WorkEntry
      type: object
      description: A single unit of work that was performed on a project.
      required:
        - id
        - type
        - date
        - description
        - wasBilled
      properties:
        id:
          type: string
          description: The unique id of this work entry within its project.
        type:
          $ref: '#/components/schemas/WorkEntryType'
        date:
          type: string
          format: date
          description: The date the work was performed on, in YYYY-MM-DD format.
        description:
          type: string
          description: >-
            The description of the work that was performed. Appears on the
            invoice when the work entry is billed.
        wasBilled:
          type: boolean
          description: >-
            Whether this work entry has already been billed on an invoice. This
            field is read-only and is set by Infinity when the work is billed.
        price:
          type: integer
          description: >-
            The amount in cents that can be invoiced for this work entry. Only
            present for `fixed-price` work entries.
        rate:
          type: integer
          description: >-
            The hourly rate in cents used for this work entry. Only present for
            `hourly` work entries.
        hours:
          type: integer
          description: >-
            The number of full hours spent. Only present for `hourly` work
            entries.
        minutes:
          type: integer
          description: >-
            The number of minutes spent in addition to `hours`. Only present for
            `hourly` work entries.
        amount:
          type: integer
          description: >-
            The resulting value of this work entry in cents. Not present for
            `unbillable` work entries.
    ProjectStatus:
      title: ProjectStatus
      type: string
      description: The status a project can be in.
      enum:
        - active
        - completed
        - abandoned
    WorkEntryType:
      title: WorkEntryType
      type: string
      description: >-
        The kind of a work entry, which determines how it is valued:

        - `hourly` is valued by an hourly rate and the time spent

        - `fixed-price` is valued by a fixed amount, e.g. for materials or lump
        sum work

        - `unbillable` has no value and cannot be billed
      enum:
        - unbillable
        - fixed-price
        - hourly
  responses:
    Unauthorised:
      description: >-
        An unauthorised request was submitted. You may be using an incorrect or
        expired API token, or are attempting to access a document outside of the
        scope of the token.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                x-stoplight:
                  id: 08hkw8ukmi2lp
                description: Specific error code
          examples:
            Unauthorised request:
              value:
                code: general/unauthorised
    ProjectNotFound:
      description: No project with the given id could be found in this organisation.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                description: Specific error code.
          examples:
            Not found:
              value:
                code: projects/not-found
  securitySchemes:
    apiKey:
      name: x-api-token
      type: apiKey
      in: header
      description: >-
        API token for authentication. Obtain from your Infinity account
        settings.

````