Skip to main content
POST
Set a shift policy

Authorizations

Authorization
string
header
required

An API key from Settings, API keys. It starts with rc_live_.

Body

application/json
rule_key
enum<string>
required

max_centihours_per_day: the most hours one person may sign up for in a day, in hundredths of an hour (250 is two and a half hours). max_centihours_per_week: the same for a week, Monday to Sunday. max_bookings_per_day: the most sign-ups one person may have in a day. booking_horizon_days: how many days ahead sign-ups open. booking_cutoff_hours: sign-ups close this many hours before the start. cancellation_notice_hours: giving up a sign-up less than this many hours before the start needs a coordinator's answer.

Available options:
max_centihours_per_day,
max_centihours_per_week,
max_bookings_per_day,
booking_horizon_days,
booking_cutoff_hours,
cancellation_notice_hours
value
integer
required

A whole number in the rule's unit.

Required range: x >= 0
scope
enum<string>
default:tenant

tenant applies to your whole organization.

Available options:
tenant,
role,
location
role_id
string

Required for a role rule, and refused for any other.

location_unit_id
string

Required for a location rule, and refused for any other.

is_enabled
boolean
default:true
notes
string

Response

The rule, changed.

id
string
required
scope
enum<string>
required

tenant: your whole organization. role: one role. location: one location.

Available options:
tenant,
role,
location
rule_key
enum<string>
required

max_centihours_per_day: the most hours one person may sign up for in a day, in hundredths of an hour (250 is two and a half hours). max_centihours_per_week: the same for a week, Monday to Sunday. max_bookings_per_day: the most sign-ups one person may have in a day. booking_horizon_days: how many days ahead sign-ups open. booking_cutoff_hours: sign-ups close this many hours before the start. cancellation_notice_hours: giving up a sign-up less than this many hours before the start needs a coordinator's answer.

Available options:
max_centihours_per_day,
max_centihours_per_week,
max_bookings_per_day,
booking_horizon_days,
booking_cutoff_hours,
cancellation_notice_hours
value
integer
required

A whole number in the rule's unit.

Required range: x >= 0
is_enabled
boolean
required
describes
string
required

The rule in words, such as "2.5 hours in one day".

role_id
string | null
location_unit_id
string | null
notes
string | null