Schedules

Fetch schedules

The schedule resource represents a simplified calendar event or event generation rule, and may be used to configure time based functionality:

  • When access is allowed or restricted ("time restrictions"), set consequence to allow
  • When elevator stops are kept accessible ("permit timer"), set consequence to permit
  • When locks are kept unlocked ("unlock timer"), set consequence to unlock
  • To override an allow, permit or unlock, set override to true. The schedule will then neutralize events of other schedules of the same consequence.

Possible consequences for locks:

  • allow
  • unlock

Possible consequences for elevator stops:

  • allow
  • permit

Possible consequences for elevator groups:

  • allow

There are four types of schedules:

  • Holiday calendar: events that are interpreted based on a region's holiday rules
  • Recurring event: events that are interpreted based on the current weekday based on the time zone of the place they are added to
  • Single event: an event that starts and ends on specific date times regardless of time zone
  • Single all day event: events that are interpreted based on the time zone of the place they're added to

The API makes a few assumptions:

  • If region or observed are set, schedules are treated as holiday calendars
  • If starts_at or ends_at are set, events are treated as single events
  • If starts_at_date or ends_at_date are set, events are treated as single all day events
  • Else, events are treated as recurring events

Validations:

  • Holiday calendars require both region and observed to be set
  • Single events require both starts_at and ends_at as RFC3339 timestamps
  • Single events require both starts_at and ends_at as RFC3339 timestamps
  • Single all day events require both starts_at_date and ends_at_date in the YYYY-MM-DD format
  • Recurring events require at least one weekday, and may specify starts_at_time and ends_at_time in the hh:mm format
  • Starting dates/times must be before ending dates/times

The difference between single events and all day events are that single events are absolute, i.e. independent of the time zone of the place. Single all day events carry no time zone information but are always interpreted based on the time zone of the place.

Note that holidays are interpreted relative to a time zone. It is therefore possible to specify e.g. US observances for a location in Europe.

get/schedules

Query parameters

idsstring

Filter by object IDs

limitinteger

The number of objects to return

offsetinteger

The number of objects to offset

consequence'allow' | 'first_to_arrive' | 'permit' | 'unlock'

Filter by consequence

scheduleable_type'Group' | 'Lock' | 'ElevatorStop'

Filter by the scheduleable type of the schedule. Either both or none of scheduleable_id and scheduleable_type are required.

scheduleable_idinteger

Filter by the scheduleable id of the schedule. Either both or none of scheduleable_id and scheduleable_type are required.

Response

OK

Changes

No recorded changes to this endpoint across all 1 revision of this API.