Skip to main content
POST
/
timmi-project
/
api
/
v4
/
projects
/
{id}
/
project-services
Create a new Project Service
curl --request POST \
  --url https://{host}/timmi-project/api/v4/projects/{id}/project-services \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "description": "<string>",
  "jobQualificationRateId": 2,
  "initialTimeEstimate": {
    "value": 123,
    "iso": "<string>"
  },
  "billRate": {
    "price": {
      "amount": 123
    }
  },
  "price": {
    "amount": 123
  },
  "subContractingRelationship": "none",
  "subcontractingFixedCost": {
    "amount": 123
  },
  "subcontractingCostRate": {
    "price": {
      "amount": 123
    }
  },
  "subcontractingProjectId": 2
}
'
import requests

url = "https://{host}/timmi-project/api/v4/projects/{id}/project-services"

payload = {
"name": "<string>",
"code": "<string>",
"description": "<string>",
"jobQualificationRateId": 2,
"initialTimeEstimate": {
"value": 123,
"iso": "<string>"
},
"billRate": { "price": { "amount": 123 } },
"price": { "amount": 123 },
"subContractingRelationship": "none",
"subcontractingFixedCost": { "amount": 123 },
"subcontractingCostRate": { "price": { "amount": 123 } },
"subcontractingProjectId": 2
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
description: '<string>',
jobQualificationRateId: 2,
initialTimeEstimate: {value: 123, iso: '<string>'},
billRate: {price: {amount: 123}},
price: {amount: 123},
subContractingRelationship: 'none',
subcontractingFixedCost: {amount: 123},
subcontractingCostRate: {price: {amount: 123}},
subcontractingProjectId: 2
})
};

fetch('https://{host}/timmi-project/api/v4/projects/{id}/project-services', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/timmi-project/api/v4/projects/{id}/project-services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'jobQualificationRateId' => 2,
'initialTimeEstimate' => [
'value' => 123,
'iso' => '<string>'
],
'billRate' => [
'price' => [
'amount' => 123
]
],
'price' => [
'amount' => 123
],
'subContractingRelationship' => 'none',
'subcontractingFixedCost' => [
'amount' => 123
],
'subcontractingCostRate' => [
'price' => [
'amount' => 123
]
],
'subcontractingProjectId' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{host}/timmi-project/api/v4/projects/{id}/project-services"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"jobQualificationRateId\": 2,\n \"initialTimeEstimate\": {\n \"value\": 123,\n \"iso\": \"<string>\"\n },\n \"billRate\": {\n \"price\": {\n \"amount\": 123\n }\n },\n \"price\": {\n \"amount\": 123\n },\n \"subContractingRelationship\": \"none\",\n \"subcontractingFixedCost\": {\n \"amount\": 123\n },\n \"subcontractingCostRate\": {\n \"price\": {\n \"amount\": 123\n }\n },\n \"subcontractingProjectId\": 2\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{host}/timmi-project/api/v4/projects/{id}/project-services")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"jobQualificationRateId\": 2,\n \"initialTimeEstimate\": {\n \"value\": 123,\n \"iso\": \"<string>\"\n },\n \"billRate\": {\n \"price\": {\n \"amount\": 123\n }\n },\n \"price\": {\n \"amount\": 123\n },\n \"subContractingRelationship\": \"none\",\n \"subcontractingFixedCost\": {\n \"amount\": 123\n },\n \"subcontractingCostRate\": {\n \"price\": {\n \"amount\": 123\n }\n },\n \"subcontractingProjectId\": 2\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/timmi-project/api/v4/projects/{id}/project-services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"jobQualificationRateId\": 2,\n \"initialTimeEstimate\": {\n \"value\": 123,\n \"iso\": \"<string>\"\n },\n \"billRate\": {\n \"price\": {\n \"amount\": 123\n }\n },\n \"price\": {\n \"amount\": 123\n },\n \"subContractingRelationship\": \"none\",\n \"subcontractingFixedCost\": {\n \"amount\": 123\n },\n \"subcontractingCostRate\": {\n \"price\": {\n \"amount\": 123\n }\n },\n \"subcontractingProjectId\": 2\n}"

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "id": 2,
  "code": "<string>",
  "description": "<string>",
  "jobQualificationRate": {
    "id": 2,
    "standardRateCardId": 2,
    "jobQualificationId": 2,
    "jobQualification": {
      "id": 2,
      "name": "<string>"
    },
    "isBillable": true,
    "billingRate": {
      "price": {
        "amount": 123
      }
    },
    "costRate": {
      "price": {
        "amount": 123
      }
    }
  },
  "status": "ongoing",
  "initialTimeEstimate": {
    "value": 123,
    "iso": "<string>"
  },
  "revisedTimeEstimate": {
    "value": 128,
    "iso": "P5DT8H",
    "unit": "hour"
  },
  "initialBudget": {
    "amount": 123
  },
  "revisedBudget": {
    "amount": 123
  },
  "estimatedOverrun": {
    "amount": 123
  },
  "billRate": {
    "price": {
      "amount": 123
    }
  },
  "price": {
    "amount": 123
  },
  "discount": {
    "amount": 123
  },
  "discountRate": 123,
  "subContractingRelationship": "none",
  "subcontractingFixedCost": {
    "amount": 123
  },
  "subcontractingCostRate": {
    "price": {
      "amount": 123
    }
  },
  "subcontractingProjectId": 2,
  "createdAt": "2023-11-07T05:31:56Z",
  "lastModifiedAt": "2023-11-07T05:31:56Z"
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Path Parameters

id
string
required

Id of the project

Body

application/json

Work item of a project.

name
string
required
code
string
description
null | string

Optional description of the expected work to be done.

jobQualificationRateId
integer
write-only
Required range: x >= 1
initialTimeEstimate
Duration · object

Also serves as maximum billable time on not-to-exceed time and materials contracts.

Example:
{
"value": 128,
"iso": "P5DT8H",
"unit": "hour"
}
billRate
null | PriceRate · object

Required for time and materials contracts. Automatically calculated for fixed price contracts.

price
null | Price · object

Required for fixed price contracts.

subContractingRelationship
enum<string>
default:none
Available options:
none,
external,
internal
subcontractType
enum<string> | null
Available options:
fixedPrice,
timeAndMaterials
subcontractingFixedCost
Price · object | null

Fixed price of the bought service from the provider.

subcontractingCostRate
PriceRate · object | null

Daily or hourly rate billed from the service provider.

subcontractingProjectId
integer | null

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.

Required range: x >= 1

Response

Created

Work item of a project.

name
string
required
id
integer
read-only
Required range: x >= 1
code
string
description
null | string

Optional description of the expected work to be done.

jobQualificationRate
object
read-only

The expected job qualification rate for assigned users.

status
enum<string>
default:ongoing
read-only

Time submission is disabled whenever a service is suspended or done. Once done, the service revised budget is brought to the actual amount spent.

Available options:
ongoing,
suspended,
completed
initialTimeEstimate
Duration · object

Also serves as maximum billable time on not-to-exceed time and materials contracts.

Example:
{
"value": 128,
"iso": "P5DT8H",
"unit": "hour"
}
revisedTimeEstimate
null | Duration · object

Can only be modified through the estimate-to-complete ressource.

Example:
{
"value": 128,
"iso": "P5DT8H",
"unit": "hour"
}
initialBudget
null | Price · object

Equal to initialTimeEstimate multiplied by the standardRate.

revisedBudget
null | Price · object

Equal to revisedTimeEstimate multiplied by the standardRate.

estimatedOverrun
null | Price · object

Difference between revised and initial budgets.

billRate
null | PriceRate · object

Required for time and materials contracts. Automatically calculated for fixed price contracts.

price
null | Price · object

Required for fixed price contracts.

discount
null | Price · object

Equal to the plannedRevenue minus the initialBudget.

discountRate
null | number
read-only
Must be a multiple of 0.1
subContractingRelationship
enum<string>
default:none
Available options:
none,
external,
internal
subcontractType
enum<string> | null
Available options:
fixedPrice,
timeAndMaterials
subcontractingFixedCost
Price · object | null

Fixed price of the bought service from the provider.

subcontractingCostRate
PriceRate · object | null

Daily or hourly rate billed from the service provider.

subcontractingProjectId
integer | null

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.

Required range: x >= 1
createdAt
string<date-time>
read-only

Timestamp of the service creation.

lastModifiedAt
string<date-time>
read-only

Timestamp of the service last update.