AI Insights & CCTV

Core Platform
insights_checkinsAI Insights & CCTV

Retrieves facility check-in / visit history from the Member Management System (MMS) partner integration.

Shows member swipes and visits recorded by door readers, kiosks, apps, or manual entry. Each check-in represents a verified visit event pushed from the MMS.

Data returned per check-in:

  • checkInId, facilityId, externalMemberId, timestamp (ISO 8601)
  • check_in_type: member, class, staff, guest, trial
  • source: how it was captured (manual, tag, rfid, kiosk, app, door_reader, booking)
  • class_id: optional, if tied to a class booking

Member enrichment:
Members are returned as a separate array (matched by externalMemberId) with:

  • firstName, lastName, gender, dateOfBirth
  • membershipStatus, membershipPlans, memberType
  • profilePicture, mobilePhone

Filtering:

  • Date range via startDate/endDate
  • checkInType: filter by visit type (e.g., only "member" check-ins)
  • source: filter by capture method (e.g., only "door_reader" swipes)

Use cases:

  • Analyze daily visit volume and patterns
  • Cross-reference check-in data with AI face detection data (insights_timeline_search)
  • Identify members who check in but don't appear on cameras (or vice versa)
  • Track class attendance via class-type check-ins
  • Verify visit frequency for membership disputes

Parameters

NameTypeDescription
facilityId*stringFacility ID to query
startDatestringStart date in YYYY-MM-DD format (default: 2 days ago)
endDatestringEnd date in YYYY-MM-DD format (default: today)
timezonestringIANA timezone (default: Pacific/Auckland)
limitnumberMax check-ins to return (default 100, max 500)
checkInType"member" | "class" | "staff" | "guest" | "trial"Filter by check-in type (member, class, staff, guest, trial)
source"manual" | "tag" | "rfid" | "kiosk" | "app" | "door_reader" | "booking"Filter by capture source (manual, tag, rfid, kiosk, app, door_reader, booking)
nextTokenstringPagination token from a previous response
insights_match_unidentifiedAI Insights & CCTV

Correlates unidentified people (from AI vision) with MMS check-in records by timestamp proximity to find likely identity matches.

How it works:
For each unidentified person with multiple visits, the tool looks for check-in swipes that occurred within a configurable lookback window (default 60 minutes) before each detection. If the same member consistently checks in before the same unidentified person is detected, the probability of a match increases.

Use cases:

  • Find unidentified people who are actually known members without profile photos
  • Identify duplicate unidentified profiles that belong to the same member
  • Generate a report of likely matches for manual review before auto-linking
  • Audit facility identification coverage

Configurable parameters:

  • lookbackMinutes: How far before a detection to search for check-ins (default 60)
  • minVisits: Minimum detection sessions required (default 3). More visits = more reliable matching.
  • minProbability: Minimum match score to include (default 0.3)

Output includes:

  • Ranked matches with probability scores and confidence tiers (high/medium/low)
  • Matched timestamp samples showing detection vs check-in times
  • Duplicate groups: multiple unidentified profiles matching the same member
  • Processing metadata (volumes, timing)

Confidence levels:

  • high (80%+, 0-1 other candidates): strong match, candidate for auto-linking
  • medium (50-79%): worth manual review
  • low (30-49%): needs more data, informational only

Important: This is a read-only analysis tool. It does not modify any records or link profiles.

Part of the AI Insights & People module.

Parameters

NameTypeDescription
facilityId*stringFacility ID to analyze
startDatestringStart date YYYY-MM-DD (default: 30 days ago)
endDatestringEnd date YYYY-MM-DD (default: today)
timezonestringIANA timezone (default: Pacific/Auckland)
lookbackMinutesnumberMinutes before detection to search for matching check-ins (default: 60)
minVisitsnumberMinimum detection sessions for an unidentified person to be considered (default: 3)
minProbabilitynumberMinimum match probability to include in results, 0-1 (default: 0.5)
insights_person_activityAI Insights & CCTV

Retrieves the face detection history for a specific person over a date range — their visit log.

Shows every time the person was detected by cameras, with timestamps, which camera saw them, and optionally images and demographics.

Detail levels (use the 'detail' parameter):

  • "summary": Per detection: timestamp, camera ID, start/end unix only. Minimal payload for counting visits and calculating patterns.
  • "standard" (default): Adds image URLs, similarity score, dominantGender (from multi-frame DeepFace analysis), genderBreakdown, age range. Good for reviewing visit quality.
  • "full": Everything including raw emotion data per detection.

Data returned:

  • detections: Array of face detection records (capped at 200 per request)
  • person: The person's profile (enriched with membership data)
  • devices: Camera devices the person was seen on (sensitive fields stripped)
  • meta: Query parameters (timezone, date range, unix timestamps)
  • nextToken: Pagination token for fetching the next page

Use cases:

  • Track visit frequency for a specific member over time
  • Analyze which areas/cameras a person visits most
  • Check when an expired member was last actively using the facility
  • Verify visit patterns for membership disputes

Use after insights_person_get or insights_timeline_search to drill into a specific person's history.

Part of the AI Insights & People module.

Parameters

NameTypeDescription
facilityId*stringFacility ID the person belongs to
personId*stringPerson ID to query activity for
startDatestringStart date in YYYY-MM-DD format (default: 7 days ago)
endDatestringEnd date in YYYY-MM-DD format (default: today)
timezonestringIANA timezone (default: Pacific/Auckland)
limitnumberMax detections to return (default 50, max 200)
nextTokenstringPagination token from a previous response
detail"summary" | "standard" | "full"Response detail level. "summary" = timestamps/cameras only, "standard" (default) = adds images/demographics, "full" = everything
insights_person_getAI Insights & CCTV

Retrieves the full profile of a specific person in the AI Insights system, enriched with membership data.

Returns identity information, membership details, and system metadata for a single person.

Data returned:

  • Identity: personID, firstName, lastName, clubID
  • Face: avatar/profile picture URL, collectionId, isIdentified, type (identified/unidentified)
  • Membership: memberId, memberID (external), membershipStatus, membershipPlans (with start/end dates), memberType, mobilePhone
  • Timestamps: created, updated (unix timestamps)

When to use:

  • After finding a person via insights_people_search or insights_timeline_search
  • To get the full profile before querying their activity history with insights_person_activity
  • To check membership details, plans, and contact information

Parameters

NameTypeDescription
facilityId*stringFacility ID the person belongs to
personId*stringPerson ID to retrieve
insights_report_snapshotsAI Insights & CCTV

Retrieves facility-wide AI Insights report snapshots for a date range.

This is the best starting point for understanding facility activity. Returns aggregated KPIs and breakdowns for the specified period.

Detail levels (use the 'detail' parameter):

  • "summary": KPIs only (~320 bytes) — totalDetections, uniquePeople, gender split, identified/unsure counts, avgDurationSecs
  • "standard" (default): KPIs + per-camera counts and age demographics (~3KB)
  • "full": Everything including per-camera emotion distributions, hourly detection patterns (24-value arrays), and daily breakdowns (~40-170KB depending on date range)

KPIs returned:

  • totalDetections, totalTracks, uniquePeople, uniquePeopleMale, uniquePeopleFemale
  • avgDurationSecs (average visit duration in seconds)
  • identifiedCount, unsureCount, blacklistCount, unknownCount, checkInCount, expiredCount

Per-camera data (standard/full):

  • Detection counts, unique people, age buckets by gender (18-24, 25-34, 35-44, 45-54, 55+)

Full detail additionally includes:

  • Emotion distributions by gender per camera (ANGRY, DISGUST, FEAR, HAPPY, NEUTRAL, SAD, SURPRISE — totalConfidence / count = average confidence)
  • Hourly detection/track/unique people patterns (24-element arrays, index = hour of day)
  • Daily breakdowns with per-camera sub-detail

Use "summary" first to assess the facility, then "full" for deep analysis on specific areas.

Part of the AI Insights & People module.

Parameters

NameTypeDescription
facilityId*stringFacility ID to query
startDate*stringStart date in YYYY-MM-DD format
endDate*stringEnd date in YYYY-MM-DD format
detail"summary" | "standard" | "full"Response detail level. "summary" = KPIs only, "standard" (default) = KPIs + per-camera counts, "full" = everything including emotions and hourly patterns