# Synchronous Exports

Synchronous exports return one JSON page immediately. Use them for incremental syncs and reporting flows that do not need a downloadable file.

Responses are paginated. Each response contains up to 100 rows and may include a `nextCursor` for the next page.

Synchronous event exports are limited to recent data. Smart Strength workouts, Smart Strength assessments, flexibility measurements, and body measurements can go back only one month. Weekly analytics is the exception and can be queried synchronously for up to 365 days.

Important integration rules
- **Do not fetch daily data before 09:00 AM UTC:** Data pipelines finish processing overnight records in the early morning. If you run daily automated exports, schedule them for 09:00 AM UTC or later to ensure you get complete data for the previous day.
- **Event exports require member opt-in:** Event exports (Smart Strength workouts, Smart Strength assessments, body measurements, and flexibility measurements) only include records for members who have opted in to health data and consumer-to-business (C2B) sharing. Records for members without this opt-in are excluded, so a response may contain fewer rows than the total number of events at the gym. Weekly analytics metrics are aggregated and are not subject to this filter.
- **Always store externalAccountId:** Every user-related export includes `externalAccountId`. Save this ID in your database whenever you ingest workouts, assessments, or measurements. When a member opts out, EGYM provides only this ID to request deletion. If you do not save it, you cannot identify whose records to delete.


## Query parameters

All synchronous endpoints use the same query parameters.

| Parameter | Required | Description |
|  --- | --- | --- |
| `startDate` | Yes | Start date in `YYYY-MM-DD` format. |
| `endDate` | Yes | End date in `YYYY-MM-DD` format. Must be the same as or after `startDate`. |
| `cursor` | No | Pagination cursor returned as `nextCursor` by the previous response. |


If the response contains `nextCursor`, call the same endpoint again with the same `startDate` and `endDate` and the returned cursor. When `nextCursor` is `null`, the export is complete.

`startDate` and `endDate` are interpreted as UTC calendar days, and timestamp fields in the response (such as `eventTimestamp`) are returned in UTC.

## Date range limits

| Endpoint | Maximum range | Additional rule |
|  --- | --- | --- |
| `GET /api/v1/data/analytics` | 365 days | None |
| `GET /api/v1/data/smart-strength-workouts` | 30 days | Event data can go back only one month. `startDate` must be within the last month. |
| `GET /api/v1/data/smart-strength-assessments` | 30 days | Event data can go back only one month. `startDate` must be within the last month. |
| `GET /api/v1/data/flexibility-measurements` | 30 days | Event data can go back only one month. `startDate` must be within the last month. |
| `GET /api/v1/data/body-measurements` | 30 days | Event data can go back only one month. `startDate` must be within the last month. |


For event data older than one month, use [Asynchronous Exports](/data-hub/async-exports).

## Weekly analytics

```http
GET /api/v1/data/analytics?startDate=2026-01-01&endDate=2026-03-31
x-api-key: <api-key>
```

```json
{
  "gym": {
    "name": "EGYM Gym Berlin"
  },
  "data": [
    {
      "periodStart": "2026-03-23",
      "periodEnd": "2026-03-29",
      "metricType": "workouts",
      "metricKey": "total",
      "metricSubType": "smart_strength",
      "value": 128.0
    }
  ],
  "nextCursor": null
}
```

## Smart Strength workouts

Store externalAccountId for deletion
Save `externalAccountId` in your database alongside each workout record. If a member opts out of data sharing later, EGYM sends only this ID to request deletion. You must have it saved to find and delete their records.

```http
GET /api/v1/data/smart-strength-workouts?startDate=2026-06-01&endDate=2026-06-15
x-api-key: <api-key>
```

```json
{
  "gym": {
    "name": "EGYM Gym Berlin"
  },
  "data": [
    {
      "eventTimestamp": "2026-06-12T09:21:13Z",
      "externalAccountId": "member-123",
      "mmsMembershipId": "mms-abc-123",
      "isGuestUser": false,
      "firstName": "Alex",
      "lastName": "Example",
      "email": "alex@example.com",
      "machineType": "LEG_PRESS",
      "trainingMethod": "ADAPTIVE",
      "operationMode": "STANDARD",
      "trainingVisualization": "CURVE"
    }
  ],
  "nextCursor": null
}
```

## Smart Strength assessments

Store externalAccountId for deletion
Save `externalAccountId` in your database alongside each assessment record. If a member opts out of data sharing later, EGYM sends only this ID to request deletion. You must have it saved to find and delete their records.

```http
GET /api/v1/data/smart-strength-assessments?startDate=2026-06-01&endDate=2026-06-15
x-api-key: <api-key>
```

Assessment items include the assessed `bodyRegion`, the assessment `typeId`, and the human-readable `activityName`.

```json
{
  "gym": {
    "name": "EGYM Gym Berlin"
  },
  "data": [
    {
      "eventTimestamp": "2026-06-12T09:21:13Z",
      "bodyRegion": "LOWER",
      "typeId": "M4",
      "activityName": "Leg Press",
      "measurementCompleted": true,
      "chainName": "EGYM Chain",
      "firstName": "Alex",
      "lastName": "Example",
      "email": "alex@example.com",
      "externalAccountId": "member-123",
      "mmsMembershipId": "mms-abc-123"
    }
  ],
  "nextCursor": null
}
```

## Body measurements

Store externalAccountId for deletion
Save `externalAccountId` in your database alongside each body measurement record. If a member opts out of data sharing later, EGYM sends only this ID to request deletion. You must have it saved to find and delete their records.

```http
GET /api/v1/data/body-measurements?startDate=2026-06-01&endDate=2026-06-15
x-api-key: <api-key>
```

Body measurement items include `measurementSource`, which identifies where the measurement originated (for example, `SCALE`, `FITNESS_HUB`, or `ASSESSMENT`).

```json
{
  "gym": {
    "name": "EGYM Gym Berlin"
  },
  "data": [
    {
      "externalAccountId": "member-123",
      "mmsMembershipId": "mms-abc-123",
      "eventTimestamp": "2026-06-12T09:21:13Z",
      "measurementSource": "SCALE",
      "isStaff": true,
      "measurementCompleted": true,
      "chainName": "EGYM Chain",
      "firstName": "Alex",
      "lastName": "Example",
      "email": "alex@example.com"
    }
  ],
  "nextCursor": null
}
```

## Flexibility measurements

Store externalAccountId for deletion
Save `externalAccountId` in your database alongside each flexibility measurement record. If a member opts out of data sharing later, EGYM sends only this ID to request deletion. You must have it saved to find and delete their records.

```http
GET /api/v1/data/flexibility-measurements?startDate=2026-06-01&endDate=2026-06-15
x-api-key: <api-key>
```

Flexibility measurement items include `measurementType`, which identifies the assessed movement (for example, `SHOULDER`, `HIP`, or `SQUAT`).

```json
{
  "gym": {
    "name": "EGYM Gym Berlin"
  },
  "data": [
    {
      "externalAccountId": "member-123",
      "mmsMembershipId": "mms-abc-123",
      "eventTimestamp": "2026-06-12T09:21:13Z",
      "measurementType": "SHOULDER",
      "isStaff": true,
      "measurementCompleted": true,
      "chainName": "EGYM Chain",
      "firstName": "Alex",
      "lastName": "Example",
      "email": "alex@example.com"
    }
  ],
  "nextCursor": null
}
```

## Opted-out users

```http
GET /api/v1/data/opted-out-users
x-api-key: <api-key>
```

Returns members at the gym location who have opted out of health data and consumer-to-business (C2B) sharing. Because these members are excluded from all event exports, use this endpoint to find accounts whose previously exported data must be deleted to comply with GDPR and other data protection regulations.

This endpoint takes no query parameters and is not paginated. It returns all opted-out users for the gym location in a single response. Each item contains only `externalAccountId` and `lastSeenAt`, the UTC timestamp when the member was last seen.

### How to delete opted-out member data

1. **What the response contains:** The response includes only `externalAccountId` and `lastSeenAt`; names and emails are omitted.
2. **Match with stored IDs:** Take the `externalAccountId` from this response and look it up in your database against the `externalAccountId` values you saved during your workout, assessment, and measurement exports.
3. **Delete the data:** Delete all stored workouts, assessments, and measurements linked to that `externalAccountId`.


If you did not store `externalAccountId` when originally fetching the data, you will have no way to connect these opt-out records back to the members in your database.

```json
{
  "gym": {
    "name": "EGYM Gym Berlin"
  },
  "data": [
    {
      "externalAccountId": "member-456",
      "lastSeenAt": "2026-05-30T18:42:00Z"
    }
  ]
}
```

Use the [API Reference](/data-hub/api) for the exact fields returned by each endpoint.