Skip to content

PerfectGym Next API (1.20.1)

  • 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
  • Retrieve customer transaction details
  • Get device information
  • Employee operations
  • Debt collection operations
  • Leads operations
  • Get member lists
  • Manage membership contracts
  • Membership operations
  • Online offer 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

Customers Transactions

Retrieve customer transaction details

Operations
Operations
Operations
Operations
Operations
Operations

Membership Self-service

Manage membership contracts

Operations

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_WRITE

Withdraws contract cancelation amendment or reverts cancelation for specific contract id

Security
ApiKeyAuth
Path
customerIdinteger(int64)required

Unique ID of the customer

contractIdinteger(int64)required

Unique ID of the contract

curl -i -X POST \
  'https://open-api-demo.open-api.perfectgym.com/v1/memberships/{customerId}/self-service/withdraw-ordinary-contract-cancelation/{contractId}' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
successstring
Response
application/json
{ "success": "string" }

Get the idle period configuration of the contract

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_CONFIG_READ

Get the idle period configuration of the contract

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/config' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
temporalUnitstringrequired

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"
maxTermsinteger(int32)required

The maximum number of terms allowed when creating or updating a single idle period.

Example: 6
maxTermPerReferencePeriodinteger(int32)

The maximum number of terms allowed in a reference period

Example: 4
referencePeriodstringrequired

Represents the reference period for idle period term limits

Enum ValueDescription
CONTRACT_YEAR

The reference period is a full year from contract's start date or its last anniversary

CALENDAR_YEAR

The reference period is a calendar year (January to December)

Example: "CALENDAR_YEAR"
firstPossibleStartDatestring(date)required

The first possible start date of the idle period

Example: "2023-08-01"
nextPossibleStartDateOnlybooleanrequired

Whether the given first possible start date of the idle period is the only allowed start date

idlePeriodFeeobject(Money)required

Represents a financial data

idlePeriodFee.​amountnumberrequired

Amount of the finance data tuple

Example: 20
idlePeriodFee.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
accessRefusalbooleanrequired

Whether the studio access is refused for the customer during the idle period

idlePeriodReasonsArray of objects(IdlePeriodReason)required

List of idle period reasons

idlePeriodReasons[].​idinteger(int64)required

Unique ID of the idle period reason

Example: 203
idlePeriodReasons[].​namestringrequired

Name of the idle period reason

Example: "Vacation"
idlePeriodReasons[].​documentRequiredbooleanrequired

Whether the idle period reason requires a document of proof

idlePeriodCreationStatusstringrequired

Status of the amendment configuration.

Enum ValueDescription
READ

No changes to data are possible.

CHANGES_REQUIRE_VERIFICATION

Data can be changed, but needs verification to be applied to the customer.

CHANGES_WITHOUT_VERIFICATION

Data can be changed, will be applied to the customer with immediate effect.

Example: "CHANGES_REQUIRE_VERIFICATION"
contractHasExtensionbooleanrequired

Whether the idle period extends the original contract end date

unlimitedAllowedbooleanrequired

Whether the unlimited idle period can be created. For unlimited idle periods, the limitations imposed by maxTerm and maxTermPerReferencePeriod do not apply.

Example: true
freeTermsobject(Term)required

Count of free idle period terms

freeTerms.​valueinteger(int32)required

The value of the term

Example: 2
freeTerms.​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"
dayBasedTermShorteningAllowedbooleanrequired

Whether day-based term shortening via end date field is allowed during idle period update, independent of the idle period configuration temporal unit restriction.

Example: false
idlePeriodFeeCalculationConfigobject(IdlePeriodFeeCalculationConfig)required

Configuration for idle period fee calculation

idlePeriodFeeCalculationConfig.​idlePeriodAmountobject(Money)required

The idle period amount

idlePeriodFeeCalculationConfig.​idlePeriodAmount.​amountnumberrequired

Amount of the finance data tuple

Example: 20
idlePeriodFeeCalculationConfig.​idlePeriodAmount.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
idlePeriodFeeCalculationConfig.​idlePeriodAmountPerTermUnitobject(Money)

The idle period amount per term unit

idlePeriodFeeCalculationConfig.​defaultTemporalUnitstring

The default temporal unit for the 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"
idlePeriodFeeCalculationConfig.​dynamicIdlePeriodAmountPercentagenumber

The dynamic idle period amount percentage

Example: 10
idlePeriodFeeCalculationConfig.​recurringIdlePeriodChargesboolean

Indicates whether recurring idle period charges are enabled

Example: false
Response
application/json
{ "temporalUnit": "WEEK", "maxTerms": 6, "maxTermPerReferencePeriod": 4, "referencePeriod": "CALENDAR_YEAR", "firstPossibleStartDate": "2023-08-01", "nextPossibleStartDateOnly": true, "idlePeriodFee": { "amount": 20, "currency": "EUR" }, "accessRefusal": true, "idlePeriodReasons": [ {} ], "idlePeriodCreationStatus": "CHANGES_REQUIRE_VERIFICATION", "contractHasExtension": true, "unlimitedAllowed": true, "freeTerms": { "value": 2, "unit": "WEEK" }, "dayBasedTermShorteningAllowed": false, "idlePeriodFeeCalculationConfig": { "idlePeriodAmount": {}, "idlePeriodAmountPerTermUnit": {}, "defaultTemporalUnit": "WEEK", "dynamicIdlePeriodAmountPercentage": 10, "recurringIdlePeriodCharges": false } }

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_WRITE

Validate if an idle period or idle period amendment can be created with the data from the idle period request

Security
ApiKeyAuth
Path
contractIdinteger(int64)required

Unique ID of the contract

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
curl -i -X POST \
  'https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods/validate' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "startDate": "2019-08-24",
    "temporalUnit": "WEEK",
    "termValue": 1,
    "unlimited": true
  }'

Responses

OK

Bodyapplication/json
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
{ "validationStatus": "IDLEPERIOD_DEACTIVATED_FOR_CONTRACT" }
Operations

Online offers

Online offer operations

Operations
Operations
Operations

Trial Offers

Get trial offers information

Operations