Design a shift pattern
POST
/shift-patterns
const url = 'https://example.com/shift-patterns';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","colour":"example","cycleWeeks":1,"days":[{"week":1,"weekday":1,"start":"07:30","end":"07:30"}],"breakMinutes":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/shift-patterns \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "name": "example", "colour": "example", "cycleWeeks": 1, "days": [ { "week": 1, "weekday": 1, "start": "07:30", "end": "07:30" } ], "breakMinutes": 1 }'The working days of a cycle of one to four weeks, each with its hours. Days in weeks past the cycle are dropped.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
colour
string | null
cycleWeeks
integer
days
required
Array<object>
object
week
required
integer
weekday
required
integer
start
required
string
Example
07:30end
required
string
Example
07:30breakMinutes
integer | null
Responses
Section titled “Responses”Made
Media typeapplication/json
object
id
required
UUID v7
string format: uuid
name
required
string
colour
required
string | null
cycleWeeks
required
integer
days
required
Array<object>
object
week
required
integer
weekday
required
integer
start
required
string
end
required
string
breakMinutes
required
integer | null
driverUserIds
required
Array<string>
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "days": [ { "start": "07:30", "end": "07:30" } ]}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"}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" } ]}