Skip to content

Magicline API (1.26.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
Download OpenAPI description
Languages
Servers
Demo tenant

https://open-api-demo.open-api.magicline.com/

Mock server

https://redocly.sportalliance.com/_mock/apis/magicline/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

Get preview of an updated idle period charges and fees

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_IDLE_PERIOD_READ

Get preview of an updated idle period charges and fees

Security
ApiKeyAuth
Path
contractIdinteger(int64)required

Unique ID of the contract

idlePeriodIdinteger(int64)required

Unique ID of the idle period

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
reasonIdinteger(int64)required

ID of an idle period reason

Example: 1
endDatestring(date)

End date of the idle period. This field is only utilized when shortening an existing idle period (i.e., the start date remains unchanged, but the new end date is earlier than the original). If an endDate is set, unlimited = false is enforced.

Example: "2025-12-31"
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"
  }'

Responses

OK

Bodyapplication/json
previewEndDatestring(date)

Represents the updated contract end date

Example: "2025-12-31"
previewChargesArray of objects(AccountPreviewItem)

The contract charges applicable following the idle period update

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"
accountBalanceBeforeUpdateobject(Money)

The customer's account balance before the idle period update

accountBalanceAfterUpdateobject(Money)

The customer's account balance after the idle period update

Response
application/json
{ "previewEndDate": "2025-12-31", "previewCharges": [ { … } ], "validationStatus": "IDLEPERIOD_DEACTIVATED_FOR_CONTRACT", "accountBalanceBeforeUpdate": { "amount": 20, "currency": "EUR" }, "accountBalanceAfterUpdate": { "amount": 20, "currency": "EUR" } }

Create contract withdrawal amendment

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_WRITE

Creates contract withdrawal amendment for specified 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.magicline.com/v1/memberships/{customerId}/self-service/contract-withdrawal/{contractId}' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

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

Preview a membership contract due-date change

Request

Required Scopes: MEMBERSHIP_SELF_SERVICE_DUE_DATE_WRITE

Returns the expected charges and payment schedule without applying the due-date change. The due date of a pro-rata charge is the current date.

Security
ApiKeyAuth
Path
contractIdinteger(int64)required

Unique ID of the contract

Bodyapplication/jsonrequired
targetDueDayinteger(int32)required

Requested due day. Use ISO weekday 1 through 7 for weekly payment frequencies, or day of month 1 through 28 for monthly and yearly payment frequencies.

Example: 15
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
  }'

Responses

OK

Bodyapplication/json
applyDatestring(date)required

Date on which the due-date change takes effect

Example: "2026-09-15"
newDueDayinteger(int32)required

New due day

Example: 15
newNextBillingDatestring(date)

Earliest regular billing date after the due-date change; null when it cannot be determined

Example: "2026-10-15"
proRataChargeobject(DueDateChangeCharge)

Pro-rata charge resulting from the due-date change; null when no pro-rata charge results

upcomingChargesArray of objects(DueDateChangeCharge)required

Upcoming charges after the due-date change, including proRataCharge when present

upcomingCharges[].​dueDatestring(date)required

Date on which the charge is due

Example: "2026-09-15"
upcomingCharges[].​paidPeriodFromstring(date)required

First day covered by the charge

Example: "2026-09-01"
upcomingCharges[].​paidPeriodTostring(date)required

Last day covered by the charge

Example: "2026-09-14"
upcomingCharges[].​amountobject(Money)required

Amount and currency of the charge

upcomingCharges[].​amount.​amountnumberrequired

Amount of the finance data tuple

Example: 20
upcomingCharges[].​amount.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
subContractsChargesArray of objects(DueDateChangeSubContractCharges)required

Charges for each affected sub-contract

subContractsCharges[].​contractIdinteger(int64)required

Unique ID of the affected sub-contract

Example: 123123213
subContractsCharges[].​proRataChargeobject(DueDateChangeCharge)

Pro-rata charge created for the sub-contract; null when no pro-rata charge is created

subContractsCharges[].​upcomingChargesArray of objects(DueDateChangeCharge)required

All upcoming charges of the sub-contract after applying the due-date change

subContractsCharges[].​upcomingCharges[].​dueDatestring(date)required

Date on which the charge is due

Example: "2026-09-15"
subContractsCharges[].​upcomingCharges[].​paidPeriodFromstring(date)required

First day covered by the charge

Example: "2026-09-01"
subContractsCharges[].​upcomingCharges[].​paidPeriodTostring(date)required

Last day covered by the charge

Example: "2026-09-14"
subContractsCharges[].​upcomingCharges[].​amountobject(Money)required

Amount and currency of the charge

subContractsCharges[].​upcomingCharges[].​amount.​amountnumberrequired

Amount of the finance data tuple

Example: 20
subContractsCharges[].​upcomingCharges[].​amount.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
Response
application/json
{ "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": [ { … } ] }
Operations

Online offers

Online offer operations

Operations
Operations
Operations

Trial Offers

Get trial offers information

Operations