This guide explains how to track member visits using the MMS API V2.
Tracking member visits is essential for:
- Trainer Awareness: Letting trainers know who is currently in the gym.
- Check-ins History: Tracking member attendance over time.
- Challenge/Rewards Programs: Enabling visit-based gamification and rewards.
The MMS API provides endpoints to register when a member enters (check-in) and leaves (check-out) the gym.
When a member enters the gym (e.g., through a turnstile or at the front desk), send a request to the checkin endpoint.
- Testhttps://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/checkins
- Prodhttps://mms.api.egym.com/api/v2/accounts/{accountId}/checkins
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/checkins' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"timestamp": 1672531200000
}'Note:
- The
timestampis mandatory. It represents the time of the event in milliseconds since epoch. - This endpoint triggers any "Member Entered" webhooks or notifications.
When a member leaves the gym, send a request to the checkout endpoint.
- Testhttps://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/checkouts
- Prodhttps://mms.api.egym.com/api/v2/accounts/{accountId}/checkouts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/checkouts' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"timestamp": 1672534800000
}'Note:
- Similar to check-in, the
timestampis mandatory. - This endpoint updates the member's presence status to "not in gym".