Skip to content

Filters and dates

Filter by office, team and person with comma-separated IDs, and use YYYY-MM-DD dates, which are office-local days rather than UTC instants.

Parameter Takes Up to
officeIds id from GET /v1/offices 20
teamIds id from GET /v1/teams; current membership 20
userIds id from GET /v1/users (not platformUserId) 100
  • IDs in one list are alternatives: officeIds=a,b means office a or b.
  • Different filters combine: teamIds=t&userIds=u means people in team t and in the user list. A valid combination with no matches returns no rows.
  • Send each parameter once. Empty lists, duplicate IDs and unknown parameters get 400 INVALID_QUERY.
  • An ID that doesn’t exist, or belongs to another workspace, gets 404 NOT_FOUND.

What officeIds does depends on the endpoint:

Endpoint officeIds means
/v1/insights/offices Count bookings in these offices
/v1/insights/people People who belong to one of these offices, counting only bookings there
/v1/users People whose home office (first office) is one of these
/v1/insights/people/{userId} and /attendance Count only bookings in these offices
/v1/insights/work-statuses Drop office rows at other offices; keep remote, leave and other rows. Add types=office for office bookings only

The preview /v1/work-statuses is different: it takes officeId and status, repeated once per value.

  • Dates are YYYY-MM-DD labels in each office’s own time zone, not UTC instants.
  • Timestamps such as generatedAt are RFC 3339, for example 2026-10-15T12:00:00Z.
  • Ranges include both ends: from=2026-10-01&to=2026-10-31 is 31 days.

referenceDate is the day a report is calculated from. It defaults to today’s date in UTC, can’t be in the future, and is echoed in meta.referenceDate. It anchors preset periods, “this week” and “last four weeks” figures, and default month ranges. It doesn’t recreate the workspace as it was: names, teams and offices are always current.

Endpoint Window Limit
/v1/insights/offices period: 7_days, 30_days (default) or 90_days, ending on referenceDate; or custom with from and to 366 days
/v1/insights/work-statuses from and to, both required. Future bookings allowed 366 days; to at most 366 days after referenceDate
/v1/insights/people/{userId}/attendance fromMonth and toMonth together, each the first of a month. Default: the reference month and the 11 before 12 months; no future months
/v1/work-statuses (preview) from and to, both required 31 days

A range that’s too long gets 422 DATE_RANGE_TOO_LARGE. Office insights compare with the period of the same length immediately before, shown in meta.comparisonRange.

Terminal window
curl "https://api.officelycrew.com/v1/insights/offices?period=custom&from=2026-09-01&to=2026-09-30" \
-H "Authorization: Bearer $OFFICELY_API_TOKEN"
Did this answer your question?

Still need help? Chat to our support team.

Contact support