> ## 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.

# Create a new Project Service

> Create a new Project Service on a project.



## OpenAPI

````yaml /openapi-specs/timmi-project.yaml post /timmi-project/api/v4/projects/{id}/project-services
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/v4/projects/{id}/project-services:
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - name: id
        in: path
        description: Id of the project
        required: true
        schema:
          type: string
    post:
      tags:
        - Project services
      summary: Create a new Project Service
      description: Create a new Project Service on a project.
      operationId: post-timmi-project-api-v4-projects-projectId-project-services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectService'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectService'
        '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'
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
  schemas:
    ProjectService:
      title: The Project Service resource
      description: Work item of a project.
      type: object
      x-tags:
        - Project services
      properties:
        id:
          type: integer
          minimum: 1
          readOnly: true
        name:
          type: string
        code:
          type: string
        description:
          type:
            - 'null'
            - string
          description: Optional description of the expected work to be done.
        jobQualificationRateId:
          type: integer
          minimum: 1
          writeOnly: true
        jobQualificationRate:
          description: The expected job qualification rate for assigned users.
          type: object
          readOnly: true
          properties:
            id:
              type: integer
              minimum: 1
              readOnly: true
            standardRateCardId:
              type: integer
              minimum: 1
              readOnly: true
            jobQualificationId:
              type: integer
              minimum: 1
            jobQualification:
              type: object
              properties:
                id:
                  type: integer
                  minimum: 1
                name:
                  type: string
              readOnly: true
            isBillable:
              type: boolean
              readOnly: true
            billingRate:
              $ref: '#/components/schemas/PriceRate'
            costRate:
              $ref: '#/components/schemas/PriceRate'
        status:
          type: string
          enum:
            - ongoing
            - suspended
            - completed
          default: ongoing
          description: >-
            Time submission is disabled whenever a service is suspended or done.
            Once done, the service revised budget is brought to the actual
            amount spent.
          readOnly: true
        initialTimeEstimate:
          $ref: '#/components/schemas/Duration'
          description: >-
            Also serves as maximum billable time on not-to-exceed time and
            materials contracts.
        revisedTimeEstimate:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Duration'
          description: Can only be modified through the estimate-to-complete ressource.
          readOnly: true
        initialBudget:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
          description: Equal to initialTimeEstimate multiplied by the standardRate.
          readOnly: true
        revisedBudget:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
          description: Equal to revisedTimeEstimate multiplied by the standardRate.
          readOnly: true
        estimatedOverrun:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
          description: Difference between revised and initial budgets.
          readOnly: true
        billRate:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PriceRate'
          description: >-
            Required for time and materials contracts. Automatically calculated
            for fixed price contracts.
        price:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
          description: Required for fixed price contracts.
        discount:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Price'
          description: Equal to the plannedRevenue minus the initialBudget.
          readOnly: true
        discountRate:
          type:
            - 'null'
            - number
          multipleOf: 0.1
          readOnly: true
        subContractingRelationship:
          type: string
          enum:
            - none
            - external
            - internal
          default: none
        subcontractType:
          type:
            - string
            - 'null'
          enum:
            - fixedPrice
            - timeAndMaterials
        subcontractingFixedCost:
          oneOf:
            - $ref: '#/components/schemas/Price'
            - type: 'null'
          description: |
            Fixed price of the bought service from the provider.
        subcontractingCostRate:
          oneOf:
            - $ref: '#/components/schemas/PriceRate'
            - type: 'null'
          description: |
            Daily or hourly rate billed from the service provider.
        subcontractingProjectId:
          oneOf:
            - type: integer
              minimum: 1
            - type: 'null'
          description: >
            In case of "internal sub-contracting", i.e. this project-service was
            sub-contracted to another organization in Lucca Project.

            Identifier of the project that represents the externalized services
            in the other organization.
        createdAt:
          type: string
          format: date-time
          description: Timestamp of the service creation.
          readOnly: true
        lastModifiedAt:
          type: string
          format: date-time
          description: Timestamp of the service last update.
          readOnly: true
      required:
        - name
    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
    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'
    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

````