WS metric/max-occupancy

Max occupancy

Peak observed occupancy across the whole location.

Returns the peak observed occupancy across the whole location for the period. Operates at the location level — no areaType required. For area-specific peak occupancy, see Max area occupancy.

Body parameters

FieldTypeRequiredDescription
startstring (ISO 8601)yesInclusive start timestamp with timezone
endstring (ISO 8601)yesInclusive end timestamp with timezone
entitiesstring[]yesArray of location, organisation, or recording IDs (matching entityType)
entityType"location" | "organisation"yesAggregation level
facetsstring[]yesWhat to include: segments, summary, aggregates, thumbnails, thumbnails-with-statelems
aggregationPeriodstringyesTime granularity — see aggregation period options
breakdownByDimensionsstring[]noSplit data by: entity, taxonomy, age, gender, role
rolesstring[]conditionalRequired when breakdownByDimensions includes role
gendersstring[]conditionalRequired when breakdownByDimensions includes gender
agesstring[]conditionalRequired when breakdownByDimensions includes age
insideRecordingTimesbooleannotrue to restrict to opening hours only. Default false

Example request

{
  "action": "metric",
  "data": {
    "id": "req-mo-001",
    "route": "max-occupancy",
    "body": {
      "start": "2024-04-01T00:00:00.000Z",
      "end": "2024-04-07T23:59:59.000Z",
      "entities": ["64a1b2c3d4e5f6a7b8c9d0e3"],
      "entityType": "location",
      "facets": ["segments", "summary"],
      "aggregationPeriod": "day"
    }
  }
}

Example response

req-mo-001|0|0|{
  "segments": [
    { "index": "2024-04-01T00:00:00.000", "location": "64a1b2c3d4e5f6a7b8c9d0e3", "area_max_occupancy": 87 },
    { "index": "2024-04-02T00:00:00.000", "location": "64a1b2c3d4e5f6a7b8c9d0e3", "area_max_occupancy": 74 }
  ],
  "summary": [
    { "location": "64a1b2c3d4e5f6a7b8c9d0e3", "area_max_occupancy": 102 }
  ],
  "meta": {
    "units": {
      "area_max_occupancy": "peopleCount"
    }
  }
}

The field name uses the area_ prefix because store-wide peak occupancy is computed by the same handler as the area version (with an implicit areaType: "location-dwell").

Update frequency

Updated once every 24 hours, at 04:00 UK time.