Appointment, bookable appointment and slots operations
- Create contract withdrawal amendment
Magicline API (1.28.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
- 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.magicline.com/
https://redocly.sportalliance.com/_mock/apis/magicline/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
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.magicline.com/v1/memberships/{contractId}/self-service/idle-periods/{idlePeriodId}/preview
- Mock server
https://redocly.sportalliance.com/_mock/apis/magicline/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.magicline.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", "accountBalanceBeforeUpdate": { "amount": 20, "currency": "EUR" }, "accountBalanceAfterUpdate": { "amount": 20, "currency": "EUR" } }
- Demo tenant
https://open-api-demo.open-api.magicline.com/v1/memberships/{customerId}/self-service/contract-withdrawal/{contractId}
- Mock server
https://redocly.sportalliance.com/_mock/apis/magicline/openapi/openapi/v1/memberships/{customerId}/self-service/contract-withdrawal/{contractId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://open-api-demo.open-api.magicline.com/v1/memberships/{customerId}/self-service/contract-withdrawal/{contractId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'Request
Required Scopes: MEMBERSHIP_SELF_SERVICE_DUE_DATE_WRITE
Returns the expected charges and payment schedule without applying the due-date change. For monthly and yearly payment frequencies, targetDueDay accepts 1 through 31. The apply date is the first matching date strictly after today in the contract's studio time zone, using the last day of a shorter month while retaining the requested due day. For example, a request on February 2 in a non-leap year with targetDueDay=29 takes effect on February 28. If the adjusted date is today or has passed, the corresponding date in the next month is used. The due date of a pro-rata charge is the current date.
- Demo tenant
https://open-api-demo.open-api.magicline.com/v1/memberships/{contractId}/self-service/due-date/preview
- Mock server
https://redocly.sportalliance.com/_mock/apis/magicline/openapi/openapi/v1/memberships/{contractId}/self-service/due-date/preview
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://open-api-demo.open-api.magicline.com/v1/memberships/{contractId}/self-service/due-date/preview' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"targetDueDay": 15
}'OK
Date on which the due-date change takes effect. The first matching date strictly after today in the contract's studio time zone is used. For monthly and yearly frequencies, a requested day absent from the month uses that month's last day.
Requested new due day, retained even when applyDate uses the last day of a shorter month
Earliest regular billing date after the due-date change; null when it cannot be determined
Pro-rata charge resulting from the due-date change; null when no pro-rata charge results
Upcoming charges after the due-date change, including proRataCharge when present
First day covered by the charge
Last day covered by the charge
Charges for each affected sub-contract
Unique ID of the affected sub-contract
Pro-rata charge created for the sub-contract; null when no pro-rata charge is created
All upcoming charges of the sub-contract after applying the due-date change
Date on which the charge is due
First day covered by the charge
Last day covered by the charge
Amount and currency of the charge
{ "applyDate": "2026-09-15", "newDueDay": 15, "newNextBillingDate": "2026-10-15", "proRataCharge": { "dueDate": "2026-09-15", "paidPeriodFrom": "2026-09-01", "paidPeriodTo": "2026-09-14", "amount": { … } }, "upcomingCharges": [ { … } ], "subContractsCharges": [ { … } ] }