Appointment, bookable appointment and slots operations
- Get the idle periods of the contract
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
https://open-api-demo.open-api.perfectgym.com/
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/
Represents the temporal unit of an idle period
| Enum Value | Description |
|---|---|
| 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. |
Duration term of the idle period. The field is related to the temporal unit
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods/validate
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/memberships/{contractId}/self-service/idle-periods/validate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}'OK
Status of the idle period validation
| Enum Value | Description |
|---|---|
| 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. |
{ "validationStatus": "IDLEPERIOD_DEACTIVATED_FOR_CONTRACT" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/memberships/{contractId}/self-service/idle-periods
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'OK
Past idle period list
Unique ID of the idle period or amendment, depending on the state
Temporal download-url for the idle period document, restricted to 15 minutes
State of the idle period
| Enum Value | Description |
|---|---|
| ACCEPTED | The idle period is accepted |
| PENDING_VERIFICATION | The idle period verification is pending |
Configuration for idle period fee calculation
The idle period reason details
Unique ID of the idle period reason
Name of the idle period reason
Number of free term days used by this idle period
Current and upcoming idle period list
Unique ID of the idle period or amendment, depending on the state
Indicates whether the idle period is unlimited
Temporal download-url for the idle period document, restricted to 15 minutes
State of the idle period
| Enum Value | Description |
|---|---|
| ACCEPTED | The idle period is accepted |
| PENDING_VERIFICATION | The idle period verification is pending |
Configuration for idle period fee calculation
The idle period reason details
Unique ID of the idle period reason
Name of the idle period reason
Number of free term days used by this idle period
Reason of the idle period
Represents a financial data
{ "pastIdlePeriods": [ { … } ], "currentAndUpcomingIdlePeriods": [ { … } ] }
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
Represents an idle period create request
Represents the temporal unit of an idle period
| Enum Value | Description |
|---|---|
| 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. |
Duration term of the idle period. The field is related to the temporal unit
If true, the idle period has no defined end date. In that case, termValue and temporalUnit are empty.
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/memberships/{contractId}/self-service/idle-periods
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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=stringOK
Unique ID of the idle period or amendment, depending on the state
State of the idle period
| Enum Value | Description |
|---|---|
| ACCEPTED | The idle period is accepted |
| PENDING_VERIFICATION | The idle period verification is pending |
Configuration for idle period fee calculation
The idle period reason details
{ "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 }