GET /v1/insights/offices
Returns the numbers behind the Insights office dashboard: people, bookings, daily usage, the busiest day, a daily series and weekday averages, each compared with the period before.
Metrics count bookings, whether or not people checked in. Leave out officeIds to cover all current offices. The selected offices must share the same operating weekdays, or you get 422 INCOMPATIBLE_OFFICE_WEEKDAYS. No bookings gives a zero report with mostPopularDay: null.
Rate limit: 5 requests a minute (standard tier). See Rate limits.
Try it with your token in the interactive docs: select Authorize, paste the token without Bearer, then Try it out.
Request
Section titled “Request”GET https://api.officelycrew.com/v1/insights/officesLast 30 days, one office and team:
curl "https://api.officelycrew.com/v1/insights/offices?officeIds=office_london&teamIds=team_product&period=30_days&referenceDate=2026-10-15" \ -H "Authorization: Bearer $OFFICELY_API_TOKEN"A custom month:
curl "https://api.officelycrew.com/v1/insights/offices?period=custom&from=2026-09-01&to=2026-09-30" \ -H "Authorization: Bearer $OFFICELY_API_TOKEN"Query parameters
Section titled “Query parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
officeIds |
string[] | — | — | Only count bookings in these offices. Leave out for all current offices. Up to 20 IDs. Comma-separated. |
teamIds |
string[] | — | — | Only people currently in one of these teams. Up to 20 IDs. Comma-separated. |
userIds |
string[] | — | — | Only these people. Use id from GET /v1/users, not platformUserId. Up to 100 IDs. Comma-separated. |
referenceDate |
date | — | — | The day the report is calculated from. Defaults to today (UTC). Can’t be in the future. YYYY-MM-DD. |
period |
string | — | 30_days |
Reporting window that ends on, and includes, referenceDate. custom needs from and to. One of: 7_days, 30_days, 90_days, custom. |
from |
date | — | — | First date when period=custom. Not allowed with a preset period. YYYY-MM-DD. |
to |
date | — | — | Last date when period=custom, on or after from. The range can be at most 366 days. YYYY-MM-DD. |
Rules across parameters
Section titled “Rules across parameters”period=customrequires both from and to; presets forbid from and to.- Ranges are inclusive, from ≤ to, and at most 366 days.
- All selected offices must have identical operating weekdays; otherwise return 422
INCOMPATIBLE_OFFICE_WEEKDAYS. Zero eligible offices returns an empty/zero report with an emptyworkingWeekdaysarray.
Response
Section titled “Response”200 with { "data", "meta" }. Every listed field is always present. A value that is unavailable or doesn’t apply is null.
| Field | Type | Description |
|---|---|---|
data |
object | The result. |
└ totalOfficeUsers |
object | Distinct people with a booking in the range. |
└ totalOfficeUsers.value |
integer | This period. |
└ totalOfficeUsers.previousValue |
integer | The comparison period. |
└ totalOfficeUsers.changePercent |
number | null | Change in %, rounded to the nearest tenth. 0 when both are 0; null when growing from 0. |
└ totalBookings |
object | Bookings (person, office and date). Its changePercent is the dashboard’s Office attendance figure. |
└ totalBookings.value |
integer | This period. |
└ totalBookings.previousValue |
integer | The comparison period. |
└ totalBookings.changePercent |
number | null | Change in %, rounded to the nearest tenth. 0 when both are 0; null when growing from 0. |
└ averageDailyUsage |
object | People a working day, rounded to the nearest tenth. 0 when the range has no working days. |
└ averageDailyUsage.value |
number | This period. |
└ averageDailyUsage.previousValue |
number | The comparison period. |
└ averageDailyUsage.changePercent |
number | null | Change in people a working day, in %, rounded to the nearest tenth. 0 when both are 0. null when growing from 0, or when either range has no working days. |
└ mostPopularDay |
string | null | Working weekday with the highest averageBookedCount. Earliest weekday wins a tie; null with no bookings on working days. One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. |
└ attendance[] |
object[] | One row per date in the range, including days with no bookings. |
└ attendance[].date |
string (date) | Office-local date. |
└ attendance[].bookedCount |
integer | Bookings that day. |
└ averageNumberOfPeoplePerDay[] |
object[] | One row per operating weekday. |
└ averageNumberOfPeoplePerDay[].weekday |
string | Day of the week. One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. |
└ averageNumberOfPeoplePerDay[].bookedCount |
integer | Bookings on that weekday in the range. |
└ averageNumberOfPeoplePerDay[].workingDayCount |
integer | Working days on that weekday in the range. |
└ averageNumberOfPeoplePerDay[].averageBookedCount |
number | Average bookings on that weekday, rounded to the nearest tenth. |
meta |
object | How the request was read. |
└ generatedAt |
string (date-time) | When the response was generated, not how fresh every record is. |
└ referenceDate |
string (date) | The reference date used. Repeat it on cursor requests. |
└ selection |
object | The filters you sent, as IDs. An empty array means that filter wasn’t sent. |
└ selection.officeIds |
string[] | The officeIds you sent. |
└ selection.teamIds |
string[] | The teamIds you sent. |
└ selection.userIds |
string[] | The userIds you sent. |
└ range |
object | The dates covered, inclusive. |
└ range.from |
string (date) | First date of the window. |
└ range.to |
string (date) | Last date of the window. |
└ range.days |
integer | Number of calendar days, inclusive. |
└ comparisonRange |
object | The period of the same length right before range, used for previousValue. |
└ comparisonRange.from |
string (date) | First date of the window. |
└ comparisonRange.to |
string (date) | Last date of the window. |
└ comparisonRange.days |
integer | Number of calendar days, inclusive. |
└ workingWeekdays |
string[] | Operating weekdays shared by the selected offices, used for the averages. Each one of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. |
Response headers
Section titled “Response headers”| Header | Description |
|---|---|
Cache-Control |
Always no-store. |
X-Request-Id |
ID of this request. Quote it when you contact support. |
Example response
Section titled “Example response”A synthetic example from the contract, /openapi.json. Lists longer than 2 items are cut to their first 2 here; the contract has the full example.
{ "data": { "totalOfficeUsers": { "value": 1, "previousValue": 1, "changePercent": 0 }, "totalBookings": { "value": 2, "previousValue": 2, "changePercent": 0 }, "averageDailyUsage": { "value": 0.4, "previousValue": 0.4, "changePercent": 0 }, "mostPopularDay": "Monday", "attendance": [ { "date": "2026-10-09", "bookedCount": 0 }, { "date": "2026-10-10", "bookedCount": 0 } ], "averageNumberOfPeoplePerDay": [ { "weekday": "Monday", "bookedCount": 1, "workingDayCount": 1, "averageBookedCount": 1 }, { "weekday": "Tuesday", "bookedCount": 0, "workingDayCount": 1, "averageBookedCount": 0 } ] }, "meta": { "generatedAt": "2026-10-15T12:00:00Z", "referenceDate": "2026-10-15", "selection": { "officeIds": [ "office_london" ], "teamIds": [], "userIds": [] }, "range": { "from": "2026-10-09", "to": "2026-10-15", "days": 7 }, "comparisonRange": { "from": "2026-10-02", "to": "2026-10-08", "days": 7 }, "workingWeekdays": [ "Monday", "Tuesday" ] }}Errors
Section titled “Errors”Errors are JSON: { "error": { "code", "message" } }. Branch on code, and see Errors for every code.
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_QUERY |
A parameter is missing, invalid, repeated or unknown. |
| 401 | UNAUTHORIZED |
The token is missing, invalid or revoked. |
| 403 | FORBIDDEN |
The request isn’t allowed. |
| 404 | NOT_FOUND |
An ID in a filter isn’t in this workspace. |
| 405 | METHOD_NOT_ALLOWED |
Only GET is supported. |
| 422 | DATE_RANGE_TOO_LARGE |
The date range is longer than the endpoint allows. |
| 422 | INCOMPATIBLE_OFFICE_WEEKDAYS |
The selected offices don’t share the same operating weekdays. |
| 429 | RATE_LIMITED |
Over the rate limit. Wait for the seconds in Retry-After. |
| 500, 502, 503 | INTERNAL_ERROR, BAD_GATEWAY, SERVICE_UNAVAILABLE |
Something went wrong on our side. Retry later, and quote X-Request-Id if it keeps happening. |
Related
Still need help? Chat to our support team.
Contact support