Skip to content

PerfectGym Next API (1.10.0)

  • Appointment, bookable appointment and slots operations
  • Redeem checkin vouchers
  • Class and slots operations
  • Cross studio operations
  • Get customers and contracts
  • Retrieve customer accounting details
  • Retrieve customer communication details
  • Get device information
  • Employee operations
  • Debt collection operations
  • Leads operations
  • Manage membership contracts
  • Membership operations
  • Payment operations
  • Get studio information
  • Get trial offers information
Download OpenAPI description
Languages
Servers
Demo tenant

https://open-api-demo.open-api.perfectgym.com/

Mock server

https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/

Appointments

Appointment, bookable appointment and slots operations

Operations

Checkin vouchers

Redeem checkin vouchers

Operations
Operations

Cross Studio

Cross studio operations

Operations

Customers

Get customers and contracts

Operations

Customers Account

Retrieve customer accounting details

Operations

Customers Communication

Retrieve customer communication details

Operations
Operations
Operations
Operations
Operations
Operations

Membership Self-service

Manage membership contracts

Operations

Get contract's remaining idle periods

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_READ

Returns contract's remaining idle periods

Security
ApiKeyAuth
Path
contractIdinteger(int64)required

Unique ID of the contract

curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods/remaining' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
remainingMaxTermsobject(Term)

Represents remaining max amount of idle period terms

remainingFreeTermsobject(Term)required

Represents remaining free idle periods

remainingFreeTerms.​valueinteger(int32)required

The value of the term

Example: 2
remainingFreeTerms.​unitstringrequired

Represents a temporal unit

Enum ValueDescription
MONTH

Represents month unit

YEAR

Represents year unit

WEEK

Represents a week unit

DAY

Represents a day unit

Example: "WEEK"
Response
application/json
{ "remainingMaxTerms": { "value": 2, "unit": "WEEK" }, "remainingFreeTerms": { "value": 2, "unit": "WEEK" } }

Get preview of an updated idle period charges and fees

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_READ

Get preview of an updated idle period charges and fees

Security
ApiKeyAuth
Path
contractIdinteger(int64)required

Unique ID of the contract

idlePeriodIdinteger(int64)required

Unique ID of the idle period

Bodyapplication/jsonrequired
startDatestring(date)required

Start date of the idle period

temporalUnitstring

Represents the temporal unit of an idle period

Enum ValueDescription
MONTH

Represents a monthly temporal unit of the idle period. Can be used for month pickers only. Supports only full months.

WEEK

Represents a weekly temporal unit of the idle period. Can be used for week pickers only. Supports only full weeks.

DAY

Represents a daily temporal unit of the idle period. Can be used for day pickers only.

Example: "WEEK"
termValueinteger(int32)

Duration term of the idle period. The field is related to the temporal unit

Example: 1
unlimitedboolean

If true, the idle period has no defined end date. In that case, termValue and temporalUnit are empty.

Example: true
reasonIdinteger(int64)required

ID of an idle period reason

Example: 1
endDatestring(date)

End date of the idle period. This field is only utilized when shortening an existing idle period (i.e., the start date remains unchanged, but the new end date is earlier than the original).

Example: "2025-12-31"
curl -i -X PUT \
  'https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods/{idlePeriodId}/preview' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "startDate": "2019-08-24",
    "temporalUnit": "WEEK",
    "termValue": 1,
    "unlimited": true,
    "reasonId": 1,
    "endDate": "2025-12-31"
  }'

Responses

OK

Bodyapplication/json
previewEndDatestring(date)

Represents the updated contract end date

Example: "2025-12-31"
previewChargesArray of objects(AccountPreviewItem)

The contract charges applicable following the idle period update

validationStatusstringrequired

Status of the idle period validation

Enum ValueDescription
IDLEPERIOD_DEACTIVATED_FOR_CONTRACT

Idle periods are deactivated for the contract.

IDLEPERIOD_ENDDATE_ONLY_FOR_SHORTENING

The endDate field is restricted to shortening existing idle periods.

IDLEPERIOD_MAXIMUM_YEARS_VIOLATED

5 years is a hard limit for the length of the idle period.

IDLEPERIOD_EXPECTED_STARTDATE_MISMATCH

The idle period start date does not match the expected start date.

IDLEPERIOD_DEADLINE_VIOLATED

The start date violates the submission deadline.

IDLEPERIOD_ENDDATE_AND_TERM_PROVIDED

End date and term (temporal unit and term value) cannot be provided at the same time.

IDLEPERIOD_CREATABLE

The idle period can be created.

IDLEPERIOD_TERMVALUE_MISSING

The value for the term is missing.

IDLEPERIOD_PENDING_VERIFICATION

Idle periods cannot be created if a pending verification for an amendment exists.

IDLEPERIOD_MAXIMUM_TERMS_VIOLATED

The idle period violates the maximum terms value.

Example: "IDLEPERIOD_DEACTIVATED_FOR_CONTRACT"
Response
application/json
{ "previewEndDate": "2025-12-31", "previewCharges": [ {} ], "validationStatus": "IDLEPERIOD_DEACTIVATED_FOR_CONTRACT" }
Operations
Operations
Operations

Trial Offers

Get trial offers information

Operations