Skip to main content
GET
/
schedule
/
api
/
working-time-arrangements
/
{workingTimeArrangementId}
Get a Working Time Arrangement by id.
curl --request GET \
  --url https://{host}/schedule/api/working-time-arrangements/{workingTimeArrangementId} \
  --header 'Authorization: <authorization>'
import requests

url = "https://{host}/schedule/api/working-time-arrangements/{workingTimeArrangementId}"

headers = {"Authorization": "<authorization>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://{host}/schedule/api/working-time-arrangements/{workingTimeArrangementId}', 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}/schedule/api/working-time-arrangements/{workingTimeArrangementId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://{host}/schedule/api/working-time-arrangements/{workingTimeArrangementId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<authorization>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{host}/schedule/api/working-time-arrangements/{workingTimeArrangementId}")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/schedule/api/working-time-arrangements/{workingTimeArrangementId}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "id": 1,
  "name": "<string>",
  "description": "<string>",
  "fullTimeEquivalent": 0.5,
  "publicHolidaysCalendar": {
    "id": 1,
    "name": "<string>"
  },
  "isPartTime": true,
  "isArchived": true,
  "isScheduleValid": true,
  "authorizedCommands": [],
  "referencePeriod": {},
  "contractWorkingTimeDuration": {
    "value": 1,
    "iso": "<string>"
  },
  "referenceWorkingTimeDuration": {
    "value": 1,
    "iso": "<string>"
  },
  "fullDayAbsence": {
    "duration": {
      "value": 1,
      "iso": "<string>"
    },
    "absenceAccountIds": [
      1
    ],
    "absenceCategoryIds": [
      1
    ]
  },
  "currentAssignmentsCount": 123,
  "timesheetRegulation": {
    "id": 1,
    "name": "<string>"
  },
  "currentSchedulePatternSummary": {
    "days": [
      {
        "workDuration": 1
      }
    ]
  }
}
{
"type": "<string>",
"title": "<string>",
"detail": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"detail": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"detail": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"detail": "<string>"
}

Headers

Authorization
string
required

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

Path Parameters

workingTimeArrangementId
integer<int32>
required

The unique identifier of the Working Time Arrangement.

Required range: x >= 0

Response

OK

A working time arrangement is an object aimed at drawing employees populations regarding time management rules.

It is attached to employees through their work contract and essentially dictates:

  • their contractual working time, ie how many hours / days they are paid for each week / year.
  • a full time equivalent based on the the ratio between this contractual work duration and a "full time work duration".
  • a succession of Collective Schedules that describe their usual working hours.
  • the applicable regulation in Lucca Timesheet.
id
integer<int32>
required

The unique identifier of this Working Time Arrangement.

Required range: x >= 0
name
string
required

The unique name for this Working Time Arrangement.

Required string length: 3 - 1000
description
string | null
required

An optional description.

Maximum string length: 5000
unit
enum<string>
required

An event can be set in:

  • Day: "I worked for a half day last Monday".
  • Hour: "I worked for 2 hours last Monday".
  • Time: "I worked between 10:00 AM and 12:00 AM last Monday".
Available options:
day,
hour,
time
fullTimeEquivalent
number<decimal>
required

By default, equal to the ratio between the Contract Working Time Duration and the Reference Working Time Duration.

Required range: 0 <= x <= 1Must be a multiple of 0.0001
publicHolidaysCalendar
PublicHolidayCalendar, · object
required

Unique identifier of the Public Holidays Calendar applicable to these employees.

isPartTime
boolean
required
read-only

True whenever the Full Time Equivalent is below 1 (eg <100%).

isArchived
boolean
required
read-only

True whenever this Working Time Arrangement should no longer be given to employees.

isScheduleValid
boolean
required
read-only

False if there is not at least one Collective Schedule. In this case, the Working Time Arrangement can't be given to any employee through his Work Contract.

authorizedCommands
enum<string>[]
required

The actions the current authenticated User can make on this Working Time Arrangement. Depends on his permissions.

Available options:
create,
update,
delete,
archive,
unarchive
referencePeriod
Week · object

The period the Contract Working Time Duration applies over.

contractWorkingTimeDuration
Duration · object

How many hours / days these employees are paid for every Reference Period?

referenceWorkingTimeDuration
Duration · object

The number of hours / days for a full-time employee over the same Reference Period.

fullDayAbsence
FullDayAbsence · object

The fixed duration assigned to absences for one or more accounts or categories.

currentAssignmentsCount
integer<int32>
read-only
timesheetRegulation
Lucca Timesheet regulation · object

The applicable Lucca Timesheet regulation, which contains all rules regarding time tracking management in this application.

currentSchedulePatternSummary
Summary of a Schedule Pattern · object

A summary of the expected working hours, given the currently ongoing Schedule Pattern.