Metrics

The Metrics endpoints provide historical occupancy data for Occuspace-enabled locations. Each endpoint supports flexible date ranges, intervals, and optional filters for hour of day and day of week.

circle-info

There are a variety of different data sets and aggregations provided by Occuspace in this API, and it is important to use the correct configuration for your given use case. We highly encourage our customers to reach out to us when starting to use this API. Occuspace Customer Success Managers can help identify which particular metric, data set, and aggregation makes the most sense to utilize.

Get Occupancy metrics for a location

get

Returns historical occupancy metrics for a specific location over a given date range and interval. Supports optional hour and day filters for all intervals.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

The ID of the location.

Example: 1560
Query parameters
start_datestring · dateRequired

The start date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-01
end_datestring · dateRequired

The end date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-03
intervalstring · enumOptional

The time interval to aggregate occupancy data by.

Default: dailyExample: dailyPossible values:
limitintegerOptional

Maximum number of data points to return per page. Defaults to 1000 if not specified.

Default: 1000Example: 3
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next or previous page of results.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
start_hour_filterinteger · max: 23Optional

Filter data to only include readings at or after this hour of the day. Valid values are 0-24. Only supported for daily, weekly, and monthly intervals.

Example: 9
end_hour_filterinteger · max: 23Optional

Filter data to only include readings before or at this hour of the day. Valid values are 0-24. Only supported for daily, weekly, and monthly intervals.

Example: 17
days_filterstringOptional

Filter data to only include specific days of the week. Provided as a string of day codes with no separator where 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. For example '23456' means Monday through Friday. Only supported for daily, weekly, and monthly intervals.

Example: 23456Pattern: ^[1-7]+$
Responses
chevron-right
200

Occupancy metrics for the location

application/json
location_idintegerRequired

The ID of the location.

Example: 1560
namestringRequired

The name of the location.

Example: Austin Office
capacityintegerRequired

The total capacity of the location.

Example: 1341
metricstringRequired

The metric type returned.

Example: occupancy
intervalstring · enumRequired

The time interval used to aggregate the data.

Example: dailyPossible values:
days_of_weekinteger[]Required

The days of the week included in the response data. Reflects the days_filter parameter if provided, otherwise includes all days. 1=Sunday through 7=Saturday.

Example: [2,3,4,5,6]
get
/locations/{id}/occupancy

Get Traffic metrics for a location

get

Returns visits for a specific location over a given date range and interval. Traffic represents the total number of people who entered the location during each interval window. Supports optional hour and day filters for all intervals.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

The ID of the location.

Example: 1560
Query parameters
start_datestring · dateRequired

The start date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-01
end_datestring · dateRequired

The end date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-03
intervalstring · enumOptional

The time interval to aggregate traffic data by. Defaults to daily if not specified.

Default: dailyExample: dailyPossible values:
limitintegerOptional

Maximum number of data points to return per page. Defaults to 1000 if not specified.

Default: 1000Example: 3
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next or previous page of results.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
start_hour_filterinteger · max: 23Optional

Filter data to only include readings at or after this hour of the day. Valid values are 0-23. Only supported for daily, weekly, and monthly intervals.

Example: 9
end_hour_filterinteger · max: 23Optional

Filter data to only include readings before or at this hour of the day. Valid values are 0-23. Only supported for daily, weekly, and monthly intervals.

Example: 17
days_filterstringOptional

Filter data to only include specific days of the week. Provided as a string of day codes with no separator where 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. For example '23456' means Monday through Friday. Only supported for daily, weekly, and monthly intervals.

Example: 23456Pattern: ^[1-7]+$
Responses
chevron-right
200

Traffic metrics for the location

application/json
location_idintegerRequired

The ID of the location.

Example: 1560
namestringRequired

The name of the location.

Example: Austin Office
capacityintegerRequired

The total capacity of the location.

Example: 1341
metricstringRequired

The metric type returned.

Example: traffic
intervalstring · enumRequired

The time interval used to aggregate the data.

Example: dailyPossible values:
days_of_weekinteger[]Required

The days of the week included in the response data. Reflects the days_filter parameter if provided, otherwise includes all days. 1=Sunday through 7=Saturday.

Example: [2,3,4,5,6]
get
/locations/{id}/traffic

Get Dwell Time metrics for a location

get

Returns historical dwell time metrics for a specific location over a given date range and interval. Dwell time represents how long people stayed in the location during each interval window, expressed in seconds. Supports optional hour and day filters for all intervals.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

The ID of the location.

Example: 1560
Query parameters
start_datestring · dateRequired

The start date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-01
end_datestring · dateRequired

The end date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-03
intervalstring · enumOptional

The time interval to aggregate dwell time data by. Defaults to daily if not specified.

Default: dailyExample: dailyPossible values:
limitintegerOptional

Maximum number of data points to return per page. Defaults to 1000 if not specified.

Default: 1000Example: 3
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next or previous page of results.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
start_hour_filterinteger · max: 23Optional

Filter data to only include readings at or after this hour of the day. Valid values are 0-23. Only supported for daily, weekly, and monthly intervals.

Example: 9
end_hour_filterinteger · max: 23Optional

Filter data to only include readings before or at this hour of the day. Valid values are 0-23. Only supported for daily, weekly, and monthly intervals.

Example: 17
days_filterstringOptional

Filter data to only include specific days of the week. Provided as a string of day codes with no separator where 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. For example '23456' means Monday through Friday. Only supported for daily, weekly, and monthly intervals.

Example: 23456Pattern: ^[1-7]+$
Responses
chevron-right
200

Dwell time metrics for the location

application/json
location_idintegerRequired

The ID of the location.

Example: 1560
namestringRequired

The name of the location.

Example: Austin Office
capacityintegerRequired

The total capacity of the location.

Example: 1341
metricstringRequired

The metric type returned.

Example: dwell_time
intervalstring · enumRequired

The time interval used to aggregate the data.

Example: dailyPossible values:
days_of_weekinteger[]Required

The days of the week included in the response data. Reflects the days_filter parameter if provided, otherwise includes all days. 1=Sunday through 7=Saturday.

Example: [2,3,4,5,6]
get
/locations/{id}/dwell_time

Get Availability metrics for a location

get

Returns historical availability metrics for a specific location over a given date range and interval. Availability represents the percentage of time the location was unoccupied during each interval window. Null values indicate no data was available for that window, typically on days outside operating hours. Supports optional hour and day filters for daily, weekly, and monthly intervals.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

The ID of the location.

Example: 7444
Query parameters
start_datestring · dateRequired

The start date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-01
end_datestring · dateRequired

The end date of the requested time range in YYYY-MM-DD format.

Example: 2025-12-03
intervalstring · enumOptional

The time interval to aggregate availability data by. Defaults to daily if not specified.

Default: dailyExample: dailyPossible values:
limitintegerOptional

Maximum number of data points to return per page. Defaults to 1000 if not specified.

Default: 1000Example: 3
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next or previous page of results.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
start_hour_filterinteger · max: 23Optional

Filter data to only include readings at or after this hour of the day. Valid values are 0-23. Only supported for daily, weekly, and monthly intervals.

Example: 9
end_hour_filterinteger · max: 23Optional

Filter data to only include readings before or at this hour of the day. Valid values are 0-23. Only supported for daily, weekly, and monthly intervals.

Example: 17
days_filterstringOptional

Filter data to only include specific days of the week. Provided as a string of day codes with no separator where 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. For example '23456' means Monday through Friday. Only supported for daily, weekly, and monthly intervals.

Example: 23456Pattern: ^[1-7]+$
Responses
chevron-right
200

Availability metrics for the location

application/json
location_idintegerRequired

The ID of the location.

Example: 7444
namestringRequired

The name of the location.

Example: Conference Room 100
capacityintegerRequired

The total capacity of the location.

Example: 6
metricstringRequired

The metric type returned.

Example: availability
intervalstring · enumRequired

The time interval used to aggregate the data.

Example: dailyPossible values:
days_of_weekinteger[]Required

The days of the week included in the response data. Reflects the days_filter parameter if provided, otherwise includes all days. 1=Sunday through 7=Saturday.

Example: [2,3,4,5,6]
get
/locations/{id}/availability

Last updated