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>'
{
  "id": 1,
  "workingTimeArrangementId": 1,
  "startsOn": "2023-12-25",
  "endsOn": "2023-12-25",
  "pattern": {
    "shape": "singleWeek",
    "monday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    },
    "tuesday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    },
    "wednesday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    },
    "thursday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    },
    "friday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    },
    "saturday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    },
    "sunday": {
      "id": 1,
      "dayOffType": "off",
      "shifts": [
        {}
      ],
      "workDuration": {
        "value": "<any>",
        "iso": "<any>",
        "unit": "<any>"
      }
    }
  },
  "splitsHalfDays": true
}

Headers

Authorization
string
required

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

Path Parameters

workingTimeArrangementId
integer
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
required

The unique identifier of this Collective Schedule.

Required range: x >= 0
workingTimeArrangementId
integer
required

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

Required range: x >= 0
pattern
object
required

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

  • Single week SchedulePattern
  • Odd-even weeks Schedule Pattern
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

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.

I