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_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" }

Get the idle periods of the contract

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_READ

Get contract idle periods. Amendments are returned, when a idle period is in status pending verification

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

Responses

OK

Bodyapplication/json
pastIdlePeriodsArray of objects(IdlePeriod)required

Past idle period list

pastIdlePeriods[].​idinteger(int64)required

Unique ID of the idle period or amendment, depending on the state

Example: 203
pastIdlePeriods[].​startDatestring(date)required

Start date of the idle period

pastIdlePeriods[].​endDatestring(date)required

End date of the idle period

pastIdlePeriods[].​unlimitedboolean

Indicates whether the idle period is unlimited

Example: false
pastIdlePeriods[].​documentUrlstring

Temporal download-url for the idle period document, restricted to 15 minutes

pastIdlePeriods[].​statestringrequired

State of the idle period

Enum ValueDescription
ACCEPTED

The idle period is accepted

PENDING_VERIFICATION

The idle period verification is pending

Example: "PENDING_VERIFICATION"
pastIdlePeriods[].​idlePeriodFeeCalculationConfigobject(IdlePeriodFeeCalculationConfig)

Configuration for idle period fee calculation

pastIdlePeriods[].​idlePeriodFeeobject(IdlePeriodFee)

Fee details for the idle period

pastIdlePeriods[].​idlePeriodReasonobject(IdlePeriodReason)required

The idle period reason details

pastIdlePeriods[].​idlePeriodReason.​idinteger(int64)required

Unique ID of the idle period reason

Example: 203
pastIdlePeriods[].​idlePeriodReason.​namestringrequired

Name of the idle period reason

Example: "Vacation"
pastIdlePeriods[].​idlePeriodReason.​documentRequiredbooleanrequired

Whether the idle period reason requires a document of proof

pastIdlePeriods[].​usedFreeTermsInDaysinteger(int32)

Number of free term days used by this idle period

Example: 14
pastIdlePeriods[].​reasonstringDeprecatedrequired

Reason of the idle period

Example: "Vacation"
pastIdlePeriods[].​feeobject(Money)Deprecatedrequired

Represents a financial data

pastIdlePeriods[].​fee.​amountnumberrequired

Amount of the finance data tuple

Example: 20
pastIdlePeriods[].​fee.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
currentAndUpcomingIdlePeriodsArray of objects(IdlePeriod)required

Current and upcoming idle period list

currentAndUpcomingIdlePeriods[].​idinteger(int64)required

Unique ID of the idle period or amendment, depending on the state

Example: 203
currentAndUpcomingIdlePeriods[].​startDatestring(date)required

Start date of the idle period

currentAndUpcomingIdlePeriods[].​endDatestring(date)required

End date of the idle period

currentAndUpcomingIdlePeriods[].​unlimitedboolean

Indicates whether the idle period is unlimited

Example: false
currentAndUpcomingIdlePeriods[].​documentUrlstring

Temporal download-url for the idle period document, restricted to 15 minutes

currentAndUpcomingIdlePeriods[].​statestringrequired

State of the idle period

Enum ValueDescription
ACCEPTED

The idle period is accepted

PENDING_VERIFICATION

The idle period verification is pending

Example: "PENDING_VERIFICATION"
currentAndUpcomingIdlePeriods[].​idlePeriodFeeCalculationConfigobject(IdlePeriodFeeCalculationConfig)

Configuration for idle period fee calculation

currentAndUpcomingIdlePeriods[].​idlePeriodFeeobject(IdlePeriodFee)

Fee details for the idle period

currentAndUpcomingIdlePeriods[].​idlePeriodReasonobject(IdlePeriodReason)required

The idle period reason details

currentAndUpcomingIdlePeriods[].​idlePeriodReason.​idinteger(int64)required

Unique ID of the idle period reason

Example: 203
currentAndUpcomingIdlePeriods[].​idlePeriodReason.​namestringrequired

Name of the idle period reason

Example: "Vacation"
currentAndUpcomingIdlePeriods[].​idlePeriodReason.​documentRequiredbooleanrequired

Whether the idle period reason requires a document of proof

currentAndUpcomingIdlePeriods[].​usedFreeTermsInDaysinteger(int32)

Number of free term days used by this idle period

Example: 14
currentAndUpcomingIdlePeriods[].​reasonstringDeprecatedrequired

Reason of the idle period

Example: "Vacation"
currentAndUpcomingIdlePeriods[].​feeobject(Money)Deprecatedrequired

Represents a financial data

currentAndUpcomingIdlePeriods[].​fee.​amountnumberrequired

Amount of the finance data tuple

Example: 20
currentAndUpcomingIdlePeriods[].​fee.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
Response
application/json
{ "pastIdlePeriods": [ {} ], "currentAndUpcomingIdlePeriods": [ {} ] }

Create a contract idle period amendment

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_WRITE

Create a contract idle period amendment. When the amendment is accepted, it will become an idle period. ATTENTION: Please see https://developer.perfectgym.com/apis/openapi/general-information#multipartform-data-requests

Security
ApiKeyAuth
Path
contractIdinteger(int64)required

Unique ID of the contract

Bodymultipart/form-data
dataobject(IdlePeriodCreateRequest)required

Represents an idle period create request

data.​startDatestring(date)required

Start date of the idle period

data.​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"
data.​termValueinteger(int32)

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

Example: 1
data.​unlimitedboolean

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

Example: true
data.​reasonIdinteger(int64)required

ID of an idle period reason

Example: 1
documentstring(binary)

Idle period proposal document (jpeg, png, pdf, heic)

curl -i -X POST \
  'https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods' \
  -H 'Content-Type: multipart/form-data' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -F 'data[startDate]=2019-08-24' \
  -F 'data[temporalUnit]=WEEK' \
  -F 'data[termValue]=1' \
  -F 'data[unlimited]=true' \
  -F 'data[reasonId]=1' \
  -F document=string

Responses

OK

Bodyapplication/json
idinteger(int64)required

Unique ID of the idle period or amendment, depending on the state

Example: 203
startDatestring(date)required

Start date of the idle period

endDatestring(date)required

End date of the idle period

unlimitedboolean

Indicates whether the idle period is unlimited

Example: false
documentUrlstring

Temporal download-url for the idle period document, restricted to 15 minutes

statestringrequired

State of the idle period

Enum ValueDescription
ACCEPTED

The idle period is accepted

PENDING_VERIFICATION

The idle period verification is pending

Example: "PENDING_VERIFICATION"
idlePeriodFeeCalculationConfigobject(IdlePeriodFeeCalculationConfig)

Configuration for idle period fee calculation

idlePeriodFeeobject(IdlePeriodFee)

Fee details for the idle period

idlePeriodReasonobject(IdlePeriodReason)required

The idle period reason details

idlePeriodReason.​idinteger(int64)required

Unique ID of the idle period reason

Example: 203
idlePeriodReason.​namestringrequired

Name of the idle period reason

Example: "Vacation"
idlePeriodReason.​documentRequiredbooleanrequired

Whether the idle period reason requires a document of proof

usedFreeTermsInDaysinteger(int32)

Number of free term days used by this idle period

Example: 14
reasonstringDeprecatedrequired

Reason of the idle period

Example: "Vacation"
feeobject(Money)Deprecatedrequired

Represents a financial data

fee.​amountnumberrequired

Amount of the finance data tuple

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

Currency of the finance data tuple

Example: "EUR"
Response
application/json
{ "id": 203, "startDate": "2019-08-24", "endDate": "2019-08-24", "reason": "Vacation", "fee": { "amount": 20, "currency": "EUR" }, "unlimited": false, "documentUrl": "string", "state": "PENDING_VERIFICATION", "idlePeriodFeeCalculationConfig": { "idlePeriodAmount": {}, "idlePeriodAmountPerTermUnit": {}, "defaultTemporalUnit": "WEEK", "dynamicIdlePeriodAmountPercentage": 10, "recurringIdlePeriodCharges": false }, "idlePeriodFee": { "idlePeriodFeeCalculationType": "ABSOLUTE", "idlePeriodTotalAmount": {}, "idlePeriodFeeCalculationAmount": {}, "idlePeriodFeeCalculationTerm": {}, "idlePeriodFeeCalculationPercentage": 10 }, "idlePeriodReason": { "id": 203, "name": "Vacation", "documentRequired": true }, "usedFreeTermsInDays": 14 }
Operations

Online offers

Online offer operations

Operations
Operations
Operations

Trial Offers

Get trial offers information

Operations