Search Calendar Events

Calendar events are company-wide holidays and closures (and similar events) that affect work schedules and time off. Use this API to read those events and keep Bob's external calendars in sync.

Each event is tied to a calendarId and siteId. To see which calendars and sites exist in your company (and their IDs), call the Get a specific company list by name endpoint with listName = calendar or site.

Events for a specific employee

To get the events that apply to a specific employee, you need to find out the calendar linked to the employee. The employee uses their site's default holiday calendar unless a calendar is set on the employment table.

Read the following fields with the Search employee by ID endpoint (POST /v1/people/{identifier}): payroll.employment.calendarId and work.siteId.

Then fetch the employee's assigned calendar events:

  • If payroll.employment.calendarId is null — filter by /calendarEvent/siteId using work.siteId.
  • If payroll.employment.calendarId is set — filter by /calendarEvent/calendarId using that value.

Start date range span: The mandatory from / to pair on /calendarEvent/startDate must describe at most 366 calendar days inclusive (both endpoints count). If the span is longer, the API returns 400 Bad Request with key exception.calendar.publicApi.dateRangeTooLong. For multi-year exports, run several searches (for example one per calendar year or successive 366-day windows) and merge results client-side.

When a filter uses a fieldId that is not supported for search (for example /calendarEvent/visibility), the API returns 400 with key exception.calendar.publicApi.unsupportedFilterField and the rejected path(s) in args.

OpenAPI / ReadMe: When these examples are emitted as YAML, each entry under filter values must stay a double-quoted scalar (e.g. - "2024-01-31"). Bare dates like - 2024-01-31 are interpreted as timestamps by some doc hosts and surface as 2024-01-31T00:00:00.000Z, which is incorrect for this API (dates must be plain YYYY-MM-DD JSON strings in the request body).

Body Params

Request body for calendar event search. filters is required and must always include a date range on /calendarEvent/startDate as a from/to pair (other filters may be added on top). fields is optional — omit it to return every field; limit and cursor are optional and fall back to server-defined paging (see examples for typical payloads).

Request body for calendar event search. filters is required and must always include a date range on /calendarEvent/startDate as a from/to pair (other filters may be added on top). fields is optional — omit it to return every field; limit and cursor are optional and fall back to server-defined paging (see examples for typical payloads).

fields
array of objects | null
Defaults to /calendarEvent/id,/calendarEvent/name,/calendarEvent/startDate,/calendarEvent/endDate,/calendarEvent/eventType,/calendarEvent/siteId

List of field IDs to include in each result item (see CalendarEventFieldId for the available field IDs — they match the keys on each item in the response). When omitted, all available fields are returned.

fields

Field IDs that can be requested in fields on the search request and that can appear as keys on each result item. Use these IDs to project a subset of the response and to discover the available calendar event fields.

Field IDs that can be requested in fields on the search request and that can appear as keys on each result item. Use these IDs to project a subset of the response and to discover the available calendar event fields.

Field IDs that can be requested in fields on the search request and that can appear as keys on each result item. Use these IDs to project a subset of the response and to discover the available calendar event fields.

Field IDs that can be requested in fields on the search request and that can appear as keys on each result item. Use these IDs to project a subset of the response and to discover the available calendar event fields.

Field IDs that can be requested in fields on the search request and that can appear as keys on each result item. Use these IDs to project a subset of the response and to discover the available calendar event fields.

Field IDs that can be requested in fields on the search request and that can appear as keys on each result item. Use these IDs to project a subset of the response and to discover the available calendar event fields.

filters
array of objects
required
length ≥ 2
Defaults to [object Object],[object Object]

Filters to apply to the search results.

You MUST always provide a date range as exactly two filters on /calendarEvent/startDate — one with operator from and one with operator to. Both are mandatory; requests without this pair are rejected with 400 Bad Request.

The inclusive number of days from the from date through the to date must be between 1 and 366; otherwise you receive 400 with exception.calendar.publicApi.invalidDateRange (empty or inverted range) or exception.calendar.publicApi.dateRangeTooLong (more than 366 days).

On top of the mandatory date range you may add more optional filters.

Any other fieldId under filters (for example /calendarEvent/visibility) is rejected with 400 and exception.calendar.publicApi.unsupportedFilterField.

Example minimal payload: [{"fieldId":"/calendarEvent/startDate","operator":"from","values":["2024-01-01"]}, {"fieldId":"/calendarEvent/startDate","operator":"to","values":["2024-01-31"]}]

filters*
string
enum
required

Field ID to filter by.

Allowed:
string
required
length between 1 and 64

Comparison operator for this filter (e.g. from, to, eq, in).

values
array of strings
required

Filter values, always sent as JSON strings.

  • For date filters (/calendarEvent/startDate with operator from or to): provide exactly one ISO 8601 calendar date string YYYY-MM-DD (e.g. "2024-01-31") — no time-of-day, no timezone offset. The paired mandatory from/to range on startDate must cover at most 366 inclusive days.
  • For /calendarEvent/siteId: provide one or more site IDs as strings. Use the company sites list endpoint to discover the valid IDs for the company.
  • For /calendarEvent/calendarId: provide one or more holiday calendar IDs as strings. Use the holiday calendars list endpoint to discover the valid IDs for the company.
  • For /calendarEvent/employeeId: provide one or more Bob employee IDs as strings. IDs must be sent as strings even when they look numeric, so that large IDs are not truncated by JSON number precision in clients.
  • For enum-style filters (/calendarEvent/eventType): provide one or more string values from the supported list (see CalendarEventType).
values*
string
enum
required

Field ID to filter by.

Allowed:
string
required
length between 1 and 64

Comparison operator for this filter (e.g. from, to, eq, in).

values
array of strings
required

Filter values, always sent as JSON strings.

  • For date filters (/calendarEvent/startDate with operator from or to): provide exactly one ISO 8601 calendar date string YYYY-MM-DD (e.g. "2024-01-31") — no time-of-day, no timezone offset. The paired mandatory from/to range on startDate must cover at most 366 inclusive days.
  • For /calendarEvent/siteId: provide one or more site IDs as strings. Use the company sites list endpoint to discover the valid IDs for the company.
  • For /calendarEvent/calendarId: provide one or more holiday calendar IDs as strings. Use the holiday calendars list endpoint to discover the valid IDs for the company.
  • For /calendarEvent/employeeId: provide one or more Bob employee IDs as strings. IDs must be sent as strings even when they look numeric, so that large IDs are not truncated by JSON number precision in clients.
  • For enum-style filters (/calendarEvent/eventType): provide one or more string values from the supported list (see CalendarEventType).
values*
integer | null
1 to 500
Defaults to 50

Maximum number of results per page (allowed range 1–500). When omitted, the server applies its own default (often 50).

string | null

Opaque cursor from a previous response's response_metadata.next_cursor. Omit on the first request; when present it must be a non-empty opaque token (empty string is not valid).

Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json