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

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

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}/collective-schedules/{collectiveScheduleId}', 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}/collective-schedules/{collectiveScheduleId}",
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}/collective-schedules/{collectiveScheduleId}"

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}/collective-schedules/{collectiveScheduleId}")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

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

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,
  "workingTimeArrangementId": 1,
  "pattern": {
    "monday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    },
    "tuesday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    },
    "wednesday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    },
    "thursday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    },
    "friday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    },
    "saturday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    },
    "sunday": {
      "id": 1,
      "shifts": [
        {
          "duration": {
            "value": 1,
            "iso": "<string>"
          },
          "startsAt": "<string>"
        }
      ],
      "workDuration": {
        "value": 1,
        "iso": "<string>"
      }
    }
  },
  "splitsHalfDays": true,
  "startsOn": "2023-12-25",
  "endsOn": "2023-12-25"
}
{
"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
collectiveScheduleId
integer
required

The unique identifier of the Collective Schedule for this Working Time Arrangement.

Response

OK

A Collective Schedule describes the employees' expected working hours over a week.

It comes in two shapes:

  • "Single Week": Working hours are identical every week.
  • "Odd / Even Weeks": Working hours depend on the oddness of the week.
id
integer<int32>
required
read-only

The unique identifier of this Collective Schedule.

Required range: x >= 0
workingTimeArrangementId
integer<int32>
required
read-only

The unique identifier of the Working Time Arrangement this Collective Schedule belongs to.

Required range: x >= 0
pattern
Single week SchedulePattern · object
required

The Pattern this Collective Schedule implements. Depends on the Shape.

splitsHalfDays
boolean
required

Should half-days be discriminated? In other words, should shifts belong to half days rather than just the day itself?

startsOn
string<date> | null

The date (included) from which this Collective Schedule is applicable. Must be left null for the very first Collective Schedule of a Working Time Arrangement.

endsOn
string<date> | null
read-only

The date (included) from which this Collective Schedule is no longer applicable. Is null for the last Collective Schedule of a Working Time Arrangement. Can not be modified as its equal to the day before the next applicable Collective Schedule for this Working Time Arrangement.