Appointment, bookable appointment and slots operations
- Get preview of an updated idle period charges and fees
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
https://open-api-demo.open-api.perfectgym.com/
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/memberships/{contractId}/self-service/idle-periods/remaining
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/memberships/{contractId}/self-service/idle-periods/remaining
- 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/remaining' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'{ "remainingMaxTerms": { "value": 2, "unit": "WEEK" }, "remainingFreeTerms": { "value": 2, "unit": "WEEK" } }
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/{idlePeriodId}/preview
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/memberships/{contractId}/self-service/idle-periods/{idlePeriodId}/preview
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}'OK
The contract charges applicable following the idle period update
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. |
{ "previewEndDate": "2025-12-31", "previewCharges": [ { … } ], "validationStatus": "IDLEPERIOD_DEACTIVATED_FOR_CONTRACT" }