Set a driver's pattern and time off terms
PUT
/drivers/{userId}/rota
const url = 'https://example.com/drivers/example/rota';const options = { method: 'PUT', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
shiftPatternId
UUID v7
string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fshiftPatternFrom
string | null format: date
holidayAllowance
number | null
holidayUnit
string | null
holidayYearStart
string | null
Example
04-01holidayApproval
string | null
sicknessApproval
string | null
carryOverMax
number | null
sicknessAllowance
number | null
Responses
Section titled “Responses”Saved
Media typeapplication/json
object
shiftPatternId
required
UUID v7
string | null format: uuid
shiftPatternFrom
required
string | null format: date
holidayAllowance
required
number | null
holidayUnit
required
string | null
holidayYearStart
required
string | null
holidayApproval
required
string | null
sicknessApproval
required
string | null
carryOverMax
required
number | null
sicknessAllowance
required
number | null
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
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}