Update EGYM membership type groups

PUT /api/configuration/egym/membership-type-groups

Success: 204 No Content

Overview

Sets which membership type groups qualify members for the EGYM integration. Only members with an active membership in one of these groups, at a site enabled for EGYM, are sent to EGYM. The groups apply to every EGYM site in your tenant and govern both the initial sync and the ongoing real-time sync.

The call replaces the whole set. Any group not in the request is removed, so to add a group, read the current set with List EGYM membership type groups and send it back with the new identifier included. To remove one, send the set without it.

Sending an empty array removes every group, and is accepted even while sites are enabled for EGYM. From then on no members are sent to EGYM from any site until a group is added again. Members already at EGYM are not removed.

Every identifier is checked before anything is saved: if any is unknown, the request is rejected and the existing set is left unchanged.

Endpoint

PUT {base_url}/api/configuration/egym/membership-type-groups

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Request body

FieldTypeRequiredDescription
[]array of stringYesThe complete set of membership type group identifiers to enable, each the id returned by Get all membership type groups. Maximum 15 characters each. Matching ignores case and surrounding spaces; blank entries are ignored, and repeated identifiers are kept once.

Sample request

cURL
curl -X PUT '{base_url}/api/configuration/egym/membership-type-groups' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '[
  "FULL",
  "STAFF"
]'

Sample response

204 No Content
HTTP/1.1 204 No Content

Errors

Validation failures return a plain JSON string containing the message shown below, not a problem document. The exception is a malformed body, which returns a validation problem document (application/problem+json) with an errors map keyed by field name. In every 400 case, the existing set is left unchanged.

StatusMeaningWhen
400Bad requestThe body is missing, is not valid JSON, or is not an array of strings. Returned as a validation problem document.
400Bad requestAn identifier is longer than 15 characters — Group id '{groupId}' exceeds the maximum length of 15 characters.
400Bad requestOne identifier is not a membership type group in your tenant — Group id '{groupId}' does not exist.
400Bad requestSeveral identifiers are unknown. All of them are named — Group ids '{groupId}', '{groupId}' do not exist.
401UnauthorisedThe Authorization header is missing or the token is invalid or expired.
403ForbiddenThe token is a member or anonymous token, or does not carry the products or features this endpoint requires.
500Internal server errorAn unexpected server-side failure. The body is empty. The call replaces the set, so it is safe to retry with the same body.

This page as markdown · All pages · llms.txt