Skip to content

Set a driver's pattern and time off terms

PUT
/drivers/{userId}/rota
curl --request PUT \
--url https://example.com/drivers/example/rota \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "shiftPatternId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "shiftPatternFrom": "2026-04-15", "holidayAllowance": 1, "holidayUnit": "days", "holidayYearStart": "04-01", "holidayApproval": "auto", "sicknessApproval": "auto", "carryOverMax": 1, "sicknessAllowance": 1 }'

The shift pattern they work and the Monday its first week began, and any holiday terms agreed with them. Null puts a setting back to the business default.

userId
required
string
Media typeapplication/json
object
shiftPatternId

UUID v7

string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
shiftPatternFrom
string | null format: date
holidayAllowance
number | null
<= 366
holidayUnit
string | null
Allowed values: days weeks
holidayYearStart
string | null
/^(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
Example
04-01
holidayApproval
string | null
Allowed values: auto manual
sicknessApproval
string | null
Allowed values: auto manual
carryOverMax
number | null
<= 366
sicknessAllowance
number | null
<= 366

Saved

Media typeapplication/json
object
shiftPatternId
required

UUID v7

string | null format: uuid
shiftPatternFrom
required
string | null format: date
holidayAllowance
required
number | null
<= 366
holidayUnit
required
string | null
Allowed values: days weeks
holidayYearStart
required
string | null
/^(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
holidayApproval
required
string | null
Allowed values: auto manual
sicknessApproval
required
string | null
Allowed values: auto manual
carryOverMax
required
number | null
<= 366
sicknessAllowance
required
number | null
<= 366
Example
{
"shiftPatternId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"holidayUnit": "days",
"holidayYearStart": "04-01",
"holidayApproval": "auto",
"sicknessApproval": "auto"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not found

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}