This guide explains how to pull member account data from EGYM to your system. Use this approach when you are a non-MMS partner who needs to retrieve membership data that was sent to EGYM by MMS partners.
The list members endpoint allows you to fetch member accounts from EGYM. This is useful when:
- You need to access member information managed by gym management systems
- You need to perform an initial bulk import of member data
- You want to keep your system synchronized with EGYM on a regular schedule
The list member account endpoint uses offset-based pagination. To retrieve all members, you'll need to make multiple requests with increasing offset values.
limit- Number of records per page (use the default or specify your own)offset- Starting position for the current page (0 for first page)hasNext- Response field indicating if more pages are available
For a gym with 29 member accounts and a limit of 10 per page:
First page:
GET /api/v2/accounts?offset=0&limit=10Response: 10 members, "hasNext": true
Second page:
GET /api/v2/accounts?offset=10&limit=10Response: 10 members, "hasNext": true
Third page (last):
GET /api/v2/accounts?offset=20&limit=10Response: 9 members, "hasNext": false
Continue fetching pages until hasNext is false.
Perform an initial sync when you first integrate with EGYM or need to rebuild your local member database.
- Call the list members endpoint without time filters
- Process the first page of member accounts
- Continue making requests with increasing
offsetvalues untilhasNextisfalse - Store the timestamp when the sync completed for future incremental syncs
# First request
GET /api/v2/accounts?offset=0&limit=100
# Continue until hasNext is false
GET /api/v2/accounts?offset=100&limit=100
GET /api/v2/accounts?offset=200&limit=100
...For ongoing synchronization, use time-based filters to fetch only members that have been created or updated since your last sync.
Set up a scheduled job (e.g., every 10 minutes) to pull updates:
- First run (optional): Perform initial sync and store the timestamp
- Schedule regular calls: Set up your job to run at your desired interval (e.g., every 10 minutes)
- Use time windows: Include time filters in each call:
fromTimestamp- Timestamp of your last successful synctoTimestamp- Current timestamp (store this for the next sync)
- Fetch all pages: Make subsequent paginated requests using the same time window until
hasNextisfalse
# First sync at 10:00
GET /api/v2/accounts?fromTimestamp=2024-01-01T09:50:00Z&toTimestamp=2024-01-01T10:00:00Z&offset=0
# Next sync at 10:10
GET /api/v2/accounts?fromTimestamp=2024-01-01T10:00:00Z&toTimestamp=2024-01-01T10:10:00Z&offset=0
# Continue...Important: Always use the same time window parameters (fromTimestamp and toTimestamp) across all paginated requests in a single sync run. Don't update the timestamps while fetching pages.
Choose appropriate sync intervals - Balance between data freshness and API load (e.g., every 5-15 minutes)
Handle errors gracefully - If a sync fails, retry with the same time window to avoid missing data
Store sync timestamps - Keep track of your last successful sync to ensure no data gaps
Monitor hasNext - Always check the
hasNextfield to ensure you've retrieved all available dataConsider webhooks - For real-time updates, combine periodic syncs with webhook subscriptions to receive immediate notifications of events like check-ins and membership changes
- Push member data to EGYM - Learn how to create and update member accounts
- API Reference - Complete endpoint documentation
- Integration Types - Understand PUSH vs PULL integration patterns