Skip to content

GET /v1/insights/people/{userId}/attendance

Returns the dates one person booked in each office, month by month, for up to 12 months.

Months come newest first and include months with no bookings. By default you get the reference month and the 11 before it. Bookings run up to the Sunday of the reference week, so later days that week can appear. A month’s bookedDays counts each date once, even if it appears at two offices.

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.

GET https://api.officelycrew.com/v1/insights/people/{userId}/attendance

January to October:

Terminal window
curl "https://api.officelycrew.com/v1/insights/people/usr_alex/attendance?fromMonth=2026-01-01&toMonth=2026-10-01" \
-H "Authorization: Bearer $OFFICELY_API_TOKEN"
Parameter Type Required Default Description
userId string ✓ — The person’s id from GET /v1/users.
Parameter Type Required Default Description
officeIds string[] — — Only count bookings in these offices. Up to 20 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.
fromMonth date — — First month, as the first day of the month (for example 2026-01-01). Send it with toMonth. Defaults to 11 months before the reference month. YYYY-MM-DD.
toMonth date — — Last month, as the first day of the month. At most 12 months in total, and not after the reference month. Defaults to the reference month. YYYY-MM-DD.
  • fromMonth and toMonth must be supplied together and must each be the first day of a real calendar month.
  • fromMonth ≤ toMonth, with no more than 12 calendar months inclusive.
  • Explicit toMonth after the reference month is rejected.

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.
└ userId string The person’s ID.
└ months[] object[] Newest month first, including months with no bookings.
└ months[].monthStarting string (date) First day of the month.
└ months[].bookedDays integer Days booked. A date at two offices counts once.
└ months[].offices[] object[] Offices booked that month.
└ months[].offices[].office object The office. name falls back to the ID if the office has gone.
└ months[].offices[].office.id string Stable ID in this workspace.
└ months[].offices[].office.name string Display name.
└ months[].offices[].dates string (date)[] Office-local dates booked, ascending.
└ months[].offices[].bookedDays integer Days booked at this office that month.
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.
└ fromMonth string (date) First month returned.
└ toMonth string (date) Last month returned.
Header Description
Cache-Control Always no-store.
X-Request-Id ID of this request. Quote it when you contact support.

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": {
"userId": "usr_alex",
"months": [
{
"monthStarting": "2026-10-01",
"bookedDays": 5,
"offices": [
{
"office": {
"id": "office_london",
"name": "London"
},
"dates": [
"2026-10-01",
"2026-10-05"
],
"bookedDays": 5
}
]
}
]
},
"meta": {
"generatedAt": "2026-10-15T12:00:00Z",
"referenceDate": "2026-10-15",
"selection": {
"officeIds": [
"office_london"
],
"teamIds": [],
"userIds": []
},
"fromMonth": "2026-10-01",
"toMonth": "2026-10-01"
}
}

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 The person, or an ID in a filter, isn’t in this workspace.
405 METHOD_NOT_ALLOWED Only GET is supported.
422 — The query is valid but can’t be fulfilled. The code says why.
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.
Did this answer your question?

Still need help? Chat to our support team.

Contact support