# List EGYM sync errors

`GET /api/configuration/egym/sync-errors`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`), Integrations (`INTEGRATIONS`) (any one of these products, not all)
- **Features:** Front of House Generic Access (`FOHGENERIC`), `EGYMSYNC` (any one of these features, not all)

HTML version: [List EGYM sync errors](https://support.gladstonesoftware.cloud/reference/configuration/list-egym-sync-errors)

## Overview

Lists members whose records failed to sync to EGYM and still need action, newest first, with each member's name and email address and the reason for the failure. Each error is classified as `Gladstone` (a problem with the member's record), `EGYM` (EGYM rejected the member) or `Connection` (EGYM could not be reached). Errors that have been resolved are not returned.

The response also tells you which empty state applies: `hasSyncStarted` is `false` until a site has been added to EGYM or a member has been synced, so you can tell "nothing has run yet" from "no outstanding errors". It becomes `true` as soon as a site is added, before that site's initial sync has run.

The response carries member personal data (names and email addresses), so treat it accordingly. The equivalent Operator screen is described in [How to Review EGYM Sync Errors](../../api-integrations/how-to-review-egym-sync-errors.md).

## Endpoint

`GET {base_url}/api/configuration/egym/sync-errors`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `search` | string | No | Returns only errors whose member ID, first name, surname, full name ("Jane Doe") or email address contains this text, ignoring case. Leading and trailing spaces are removed. Omit it, or send it blank, to return all errors. |
| `errorType` | string | No | Comma-separated list of error types to return: any of `Gladstone`, `EGYM` and `Connection`, ignoring case. Omit it to return all types. A value that matches none of the three returns no errors rather than an error; in particular, the raw code `409` is not a type. |
| `maxResults` | integer | No | The maximum number of errors to return. Defaults to `500` when omitted, zero or negative; values above `1000` are treated as `1000`. Filters are applied before the limit, so the most recent matching errors are returned. |

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/configuration/egym/sync-errors?errorType=Gladstone,EGYM&maxResults=100' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `hasSyncStarted` | boolean | `false` while no site has been added to EGYM and no member has been synced. `true` from the moment a site is added, even before its initial sync runs, so `true` with an empty `errors` array does not on its own prove that a sync has completed. Not affected by `search` or `errorType`. |
| `isTruncated` | boolean | `true` when more matching errors exist than were returned. Narrow the request with `search` or `errorType`, or raise `maxResults` up to `1000`. |
| `errors[].id` | integer | Identifier of the error record. Unique; use it as a row key. |
| `errors[].memberId` | integer | The Gladstone member the error concerns. |
| `errors[].name` | string | The member's first names and surname, separated by a space. Empty if the member no longer exists in Gladstone. |
| `errors[].email` | string | The member's home email address. `null` if the member has none or no longer exists. |
| `errors[].errorDate` | string (date-time) | When the failure happened, in UTC. Errors are returned newest first. |
| `errors[].errorType` | string | `Gladstone`: the member's record cannot be sent as it is, for example because the first name, surname or email address is missing; also used for any failure not in the other two types. `EGYM`: EGYM rejected the member, for example code `409` when EGYM already holds an account with the same membership ID or email address. `Connection`: the member could not be sent to EGYM at the time. |
| `errors[].errorDetails` | string | A description of the failure. For `EGYM` errors it starts with `EGYM` and the code EGYM returned, for example `EGYM 409: …`. |
| `errors[].siteId` | string | The site the failure relates to, as in [List EGYM sites](list-egym-sites.md). May be `null` when no site could be determined. |

## Sample response

```json title="200 OK"
{
  "hasSyncStarted": true,
  "isTruncated": false,
  "errors": [
    {
      "id": 4182,
      "memberId": 10432,
      "name": "Jane Doe",
      "email": "jane.doe@example.com",
      "errorDate": "2026-10-14T09:12:44",
      "errorType": "EGYM",
      "errorDetails": "EGYM 409: …",
      "siteId": "SWIM01"
    }
  ]
}
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `401` | Unauthorised | The `Authorization` header is missing or the token is invalid or expired. |
| `403` | Forbidden | The token is a member or anonymous token, or does not carry the products or features this endpoint requires. |
| `500` | Internal server error | An unexpected server-side failure. The body is empty. The call reads only, so it is safe to retry. |

## Notes

- `Connection` errors are not retried automatically.
