How long visits to one building last: the number of visits in each duration band, and each band's share of all visits, over a range of dates.
A visit is one stay in the building, measured in exact minutes from arrival to departure, and several can happen in one day. Each visit is an event, so a count of visits is not a count of people.
Durations are grouped into bands bin_minutes wide, starting at zero. A band includes its lower edge and not its upper one, so a visit of exactly 60 minutes is in 60-120. Visits of 720 minutes (12 hours) or longer share the last band, 720+. Every band is returned in order, including empty ones at zero, so the same bin_minutes always gives the same rows.
For wider or uneven bands, request a narrower bin_minutes and add neighbouring bands together. For example, with bin_minutes=15, visits of 45 to 90 minutes are the sum of 45-60, 60-75 and 75-90.
start and end are dates in the building's local time, and both are included. The range must cover at least two days and at most two years (731 days). days_of_week limits the visits counted to those days, and the range must include at least one of them.
The response has three parts:
data: one row per band, with its label (bucket), itsvisit_count, and itsshareof all the visits in the response, from 0 to 1.applied: the parameters used, including any defaults you left out.coverage:n_visits, the total across all bands, anddata_complete_through, the latest date there is data for this building. If that is beforeend, the building has no data for the rest of your range yet.
Figures for the most recent days can change from one day to the next as more activity is taken into account. Figures for older dates are stable, so allow for this when comparing two requests that cover recent dates.
HTTP compression is enabled for responses larger than 500 bytes when the request includes "gzip" in the Accept-Encoding header.
The visits endpoint is rate-limited to 60 requests per minute.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Bad request: no tenant ID could be determined from the request or the credentials, or both an Authorization header and an X-API-Key header were sent. Send one or the other.
401Missing or invalid credentials: no token or key, an invalid or expired token, or an API key that isn't recognised or has been revoked (Invalid API key) or is past its expiration date (API key has expired).
403The credentials are valid but don't grant this data: a tenant ID other than your organization's, or no access to the Analyze API or to occupancy data for any building. Contact Lambent to change what your credentials can access.
404No building with that ID is available to your credentials. This is the same whether the building doesn't exist or your credentials don't include it.
429Too many requests. The limit is 60 per minute; wait before retrying.
500An unexpected error on our side. Retry, and contact Lambent if it persists.
503The credentials couldn't be verified right now (Unable to verify token, Unable to verify access or Unable to verify API key). They may well be valid, so retry after the number of seconds in the Retry-After header rather than requesting new ones.