Rest time means not being assigned to shifts.

Rest between two shifts

Triggered by the end of a shift, a rest period will start.

Eg: For the night shift, there must be 15 hours of rest.

minimum rest after night shift
{
  "rests": [
    {
      "tags": [
        "NIGHT"
      ],
      "sequence": "AFTER",
      "min": "PT15H"
    }
  ]
}
min rest tolerances: 15hours and 22 hours
{
  "rests": [
    {
      "tags": [
        "NIGHT"
      ],
      "min": "PT15H",
      "frequency": 1 
    },
    {
      "tags": [
        "NIGHT"
      ],
      "min": "PT22H",
      "frequency": 1
    }
  ]
}

Weekly rest

For every week (or any other defined period), have at least x duration of rest time.

weekly rest with exclusion of non productive work
{
  "rests": [
    {
      "excludes": [
        "SHIFT-NO-WORK"
      ],
      "period": {
        "from": "2024-01-01T00:00:00",
        "to": "2024-01-08T00:00:00"
      },
      "min": "PT35H"
    }
  ]
}
saturday night to monday 11am
{
  "rests": [
    {
      "excludes": [
        "SHIFT-NO-WORK"
      ],
      "period": {
        "from": "2024-01-01T00:00:00",
        "to": "2024-01-09T11:00:00"
      },
      "min": "PT35H"
    }
  ]
}

Consecutive rest

If you need a rest period that requires a consecutive period, then you need to set the minConsecutive duration. This can be combined with the regular min rest. Optionally you can also set the max frequency of the rest which determines the total number of occurances of a rest.

consecutive min
{
  "rests": [
    {
      "periodType": "WEEKLY",
      "tags": [
        "ALL"
      ],
      "min": "PT20H",
      "minConsecutive": "PT10H",
      "frequency": 3,
      "sequence": "AFTER"
    }
  ]
}