Skip to content

Scope of this API

This API can be used to integrate Magicline operations into third party clients like websites or apps.

Following operations are supported

  • Online contract conclusion
  • Trial session slot booking
  • Lead creation
Download OpenAPI description
Languages
Servers
Generated server url

https://connectdemo.api.magicline.com/

Mock server

https://redocly.sportalliance.com/_mock/apis/magicline/connectapi/connectapi/

Campaigns

List your marketing campaigns

Operations
Operations

TrialSessions

Allow prospects to book a trial session

Operations
Operations

Referral

Additional referral information for member creation

Operations

Image

Allow prospect to upload image

Operations

Promotions

Getting information about external promotion participation

Operations
Operations
Operations
Operations
Operations

Request

Query
recaptchaTokenstringrequired

client generated Google reCAPTCHA token

Bodyapplication/jsonrequired
customerNumberstring
dateOfBirthstring(date)required
firstnamestringrequired
lastnamestringrequired
curl -i -X POST \
  'https://connectdemo.api.magicline.com/connect/v1/contracts?recaptchaToken=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "customerNumber": "string",
    "dateOfBirth": "2019-08-24",
    "firstname": "string",
    "lastname": "string"
  }'

Responses

OK

Body*/*Array [
cancellationDatesArray of strings(date)
cancellationTypestring
Enum"FIXED_DATES""ANY_AFTER_FIRST_DATE"
cancelledboolean
contractIdinteger(int64)
contractNamestring
studioIdinteger(int64)
]

Request

Query
recaptchaTokenstringrequired

client generated Google reCAPTCHA token

Bodyapplication/jsonrequired
additionalInformationstring
cancelationReasonIdinteger(int64)
cancellationDatestring(date)required
cancellationDateTypestring
Enum"NEXT_POSSIBLE_CANCELLATION_DATE""ABSOLUTE_CANCELLATION_DATE"
cancellationTypestringrequired
Enum"ORDINARY_CANCELLATION""EXTRAORDINARY_CANCELLATION"
confirmationEmailstring
contractIdinteger(int64)required
customerNumberstringrequired
dateOfBirthstring(date)required
firstnamestringrequired
lastnamestringrequired
curl -i -X POST \
  'https://connectdemo.api.magicline.com/connect/v1/contracts/cancel?recaptchaToken=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "additionalInformation": "string",
    "cancelationReasonId": 0,
    "cancellationDate": "2019-08-24",
    "cancellationDateType": "NEXT_POSSIBLE_CANCELLATION_DATE",
    "cancellationType": "ORDINARY_CANCELLATION",
    "confirmationEmail": "string",
    "contractId": 0,
    "customerNumber": "string",
    "dateOfBirth": "2019-08-24",
    "firstname": "string",
    "lastname": "string"
  }'

Responses

OK

Body*/*
additionalInformationstring
cancelationReasonobject(CancelationReasonDto)
cancellationDatestring(date)
cancellationReceivedDateTimestring(date-time)
cancellationTypestring
Enum"ORDINARY_CANCELLATION""EXTRAORDINARY_CANCELLATION"
confirmationEmailstring
contractNamestring
customerNumberstring
dateOfBirthstring(date)
firstnamestring
lastnamestring
studioIdinteger(int64)

Request

Query
recaptchaTokenstringrequired

client generated Google reCAPTCHA token

Bodyapplication/jsonrequired
additionalInformationstring
cancelationReasonIdinteger(int64)
cancellationDatestring(date)
cancellationDateTypestringrequired
Enum"NEXT_POSSIBLE_CANCELLATION_DATE""ABSOLUTE_CANCELLATION_DATE"
cancellationTypestringrequired
Enum"ORDINARY_CANCELLATION""EXTRAORDINARY_CANCELLATION"
confirmationEmailstring
customerNumberstring
dateOfBirthstring(date)required
firstnamestringrequired
lastnamestringrequired
studioIdinteger(int64)
curl -i -X POST \
  'https://connectdemo.api.magicline.com/connect/v1/contracts/cancel-request?recaptchaToken=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "additionalInformation": "string",
    "cancelationReasonId": 0,
    "cancellationDate": "2019-08-24",
    "cancellationDateType": "NEXT_POSSIBLE_CANCELLATION_DATE",
    "cancellationType": "ORDINARY_CANCELLATION",
    "confirmationEmail": "string",
    "customerNumber": "string",
    "dateOfBirth": "2019-08-24",
    "firstname": "string",
    "lastname": "string",
    "studioId": 0
  }'

Responses

OK

Body*/*
additionalInformationstring
cancelationReasonobject(CancelationReasonDto)
cancellationDatestring(date)
cancellationDateTypestring
Enum"NEXT_POSSIBLE_CANCELLATION_DATE""ABSOLUTE_CANCELLATION_DATE"
cancellationTypestring
Enum"ORDINARY_CANCELLATION""EXTRAORDINARY_CANCELLATION"
confirmationEmailstring
customerNumberstring
dateOfBirthstring(date)
firstnamestring
lastnamestring
requestReceivedDatestring(date-time)
studioIdinteger(int64)

Request

Path
studioIdinteger(int64)required
curl -i -X GET \
  'https://connectdemo.api.magicline.com/connect/v1/contracts/studios/{studioId}'

Responses

OK

Body*/*
cancellationReasonsArray of objects(CancelationReasonDto)
legalLinksArray of objects(CentralLegalLinkDto)

List rate bundles (german wording: Angebote)

Request

Query
studioIdinteger(int64)required

The Id of the studio to fetch the rate bundles from

Example: studioId=1
curl -i -X GET \
  'https://connectdemo.api.magicline.com/connect/v1/rate-bundle?studioId=1'

Responses

OK

Body*/*Array [
allowedPaymentChoicesArray of stringsunique

Allowed payment types for this rate bundle. Others than in this list will not be accepted when creating a contract. Please note: The Connect API only supports 'DIRECT_DEBIT' and 'CREDIT_CARD'. Therefore, this list will contain these two values at most.

Items Enum"CASH""BANK_TRANSFER""DIRECT_DEBIT""CREDIT_CARD""TWINT"
contractSignaturesRequiredboolean

Indicates if a digital signature for the contract (and SEPA agreement) is mandatory.

contractTextBlocksArray of objects(ConnectApiSignableTextBlockDto)

Important contract details such as privacy details or special conditions. Show them to the customer before contract acceptance

descriptionstringrequired
footnotestring

Contractual or legal comments to be displayed below the offer.

idinteger(int64)required

Id of current data block. See name field parameter or name of Dto!

imageUrlstring

Temporary valid download link for rate bundle image. Expires after 24h

initialPaymentRequiredboolean

An initial payment has to be made in order to gain access to the studio. An email will be sent to the user after contract creation with details how to make the payment.

limitedOfferingPeriodobject(TimePeriodClientDto)

The period in which this rate bundle is offered

maximumNumberOfSelectableModulesinteger(int32)

The maximum value of the selectable modules that the customer can choose.

modulesArray of objects(ConnectApiRateBundleModuleDto)required

Included free modules.

modules[].​consentTextBlockobject(ConnectApiSignableTextBlockDto)
modules[].​descriptionstring
modules[].​idinteger(int64)required

Id of current data block. See name field parameter or name of Dto!

modules[].​imageUrlstring
modules[].​namestringrequired
modules[].​paymentFrequencyDtoobject(ConnectApiPaymentFrequencyDto)required
modules[].​paymentFrequencyDto.​ageBasedAdjustmentDtosArray of objects(AgeBasedAdjustmentDto)

Age-based price adjustments. Price adjustments can be either a percentage by which the base price is being discounted or an absolute price.

modules[].​paymentFrequencyDto.​moneyobject(MoneyDto)

The price for this payment frequency. Only set if "type" is either "RECURRING" or "NON_RECURRING"

modules[].​paymentFrequencyDto.​monthDayWithPricesArray of objects(MonthDayWithPriceDto)

The dates and respective prices on which payments are due. Only set if "type" is "MONTH_DAY"

modules[].​paymentFrequencyDto.​recurringbooleanrequired

Whether the cycle of payments repeats indefinitely. Only relevant if type is "TERM_BASED" or "MONTH_DAY".

modules[].​paymentFrequencyDto.​termobject(TermDto)

The interval in which payments are made. Only set if "type" is "RECURRING"

modules[].​paymentFrequencyDto.​termWithPricesArray of objects(TermWithPriceDto)

The terms and respective prices after which payments are due. Only set if "type" is "TERM_BASED"

modules[].​paymentFrequencyDto.​typestringrequired

The kind of intervals in which payments are made

Enum"NON_RECURRING""RECURRING""MONTH_DAY""TERM_BASED""FREE"
modules[].​paymentFrequencyIdinteger(int64)required
modules[].​publicTrialPeriodDtoobject(PublicTrialPeriodDto)
modules[].​termobject(TermInformationDto)
modules[].​paymentFrequencyTypestringDeprecated
Enum"NON_RECURRING""RECURRING""MONTH_DAY""TERM_BASED""FREE"
modules[].​paymentFrequencyUnitstringDeprecated

is set in combination with RECURRING type

Enum"DAY""WEEK""MONTH""YEAR"
modules[].​paymentFrequencyValueinteger(int32)Deprecated

is set in combination with RECURRING type

modules[].​pricenumberDeprecated
namestringrequired
onlinePaymentTypestring

Under development: Indicates if this RateBundle has some kind of special Payment Handling

Enum"NONE""DIRECT_PAYMENT"
preuseTypestring

[0=NONE, 1=CHARGEABLE, 2=FREE]

Enum"NONE""CHARGEABLE""FREE"
rateCodeDtoArray of objects(ConnectApiRateCodeDto)
selectableModulesArray of objects(ConnectApiRateBundleModuleDto)

Selectable free inclusive modules. Customer is only allowed to choose a fixed value of them. The maximum value of the selected modules describes maximumNumberOfSelectableModules property.

subDescriptionstring
termsArray of objects(ConnectApiRateBundleTermDto)required
terms[].​cancelationStrategystring
Enum"TERM""RECEIPT_DATE"
terms[].​cancellationPeriodinteger(int32)
terms[].​cancellationPeriodUnitstring
Enum"DAY""WEEK""MONTH""YEAR"
terms[].​contractStartDateOfUsestring(date)

This contract start date of use will be used if none will be send, but can be overridden

terms[].​contractVolumeInformationobject(ContractVolumeDto)

Contains the total amount to be paid during the initial runtime of the contract and the average amounts per month and per the rate's payment frequency (e.g. 1 week)

terms[].​defaultContractStartDatestring(date)

This contract start will be used if none will be send, but can be overridden

terms[].​extensionCancellationPeriodinteger(int32)
terms[].​extensionCancellationPeriodUnitstring
Enum"DAY""WEEK""MONTH""YEAR"
terms[].​extensionFixedTerminteger(int32)
terms[].​extensionFixedTermUnitstring
Enum"DAY""WEEK""MONTH""YEAR"
terms[].​extensionTypestring
Enum"NONE""TERM_EXTENSION""SUBSEQUENT_RATE_DETAIL"
terms[].​flatFeesArray of objects(ConnectApiRateBundleTermFlatFeeDto)
terms[].​idinteger(int64)required

Id of current data block. See name field parameter or name of Dto!

terms[].​optionalModulesArray of objects(ConnectApiRateBundleModuleDto)

Optional modules additionally payable.

terms[].​paymentFrequencyDtoobject(ConnectApiPaymentFrequencyDto)required

The payment frequency of this term

terms[].​paymentFrequencyDto.​ageBasedAdjustmentDtosArray of objects(AgeBasedAdjustmentDto)

Age-based price adjustments. Price adjustments can be either a percentage by which the base price is being discounted or an absolute price.

terms[].​paymentFrequencyDto.​moneyobject(MoneyDto)

The price for this payment frequency. Only set if "type" is either "RECURRING" or "NON_RECURRING"

terms[].​paymentFrequencyDto.​monthDayWithPricesArray of objects(MonthDayWithPriceDto)

The dates and respective prices on which payments are due. Only set if "type" is "MONTH_DAY"

terms[].​paymentFrequencyDto.​recurringbooleanrequired

Whether the cycle of payments repeats indefinitely. Only relevant if type is "TERM_BASED" or "MONTH_DAY".

terms[].​paymentFrequencyDto.​termobject(TermDto)

The interval in which payments are made. Only set if "type" is "RECURRING"

terms[].​paymentFrequencyDto.​termWithPricesArray of objects(TermWithPriceDto)

The terms and respective prices after which payments are due. Only set if "type" is "TERM_BASED"

terms[].​paymentFrequencyDto.​typestringrequired

The kind of intervals in which payments are made

Enum"NON_RECURRING""RECURRING""MONTH_DAY""TERM_BASED""FREE"
terms[].​priceAdjustmentRulesArray of objects(PublicApiTermAdjustmentRuleDto)

A list of price adjustment rules which applies to this term. Like a 5% raise every 6 months

terms[].​priceAfterExtensionnumber

The new price after minimum contract duration. Null if not configured.

terms[].​rateBonusPeriodsArray of objects(ConnectApiRateBonusPeriodDto)
terms[].​rateStartPricenumber

price for the first period of the contract, if the term has bonus period at the beginning of the contract then it is equal to 0, otherwise is equal to term price.

terms[].​subsequentRateDtoobject(ConnectApiRateBundleDto)Recursive
terms[].​termobject(TermDto)required
terms[].​term.​terminteger(int32)required
terms[].​term.​termUnitstringrequired
Enum"DAY""WEEK""MONTH""YEAR"
terms[].​termUnitAfterExtensionstring

The new term unit after minimum contract duration. Null if not configured.

Enum"DAY""WEEK""MONTH""YEAR"
terms[].​termValueAfterExtensioninteger(int32)

The new term value after minimum contract duration. Null if not configured.

terms[].​termValueWithoutBonusPeriodinteger(int32)required
terms[].​ageBasedAdjustmentDtosArray of objects(AgeBasedAdjustmentDto)Deprecated

A list of age-based price adjustments for this term. Deprecated, use "paymentFrequencyDto.ageBasedAdjustmentDtos" instead.

terms[].​paymentFrequencyTypestringDeprecated

Deprecated, use "paymentFrequencyDto.type" instead.

Enum"NON_RECURRING""RECURRING""MONTH_DAY""TERM_BASED""FREE"
terms[].​paymentFrequencyUnitstringDeprecated

Is set in combination with RECURRING type. Deprecated, use "paymentFrequencyDto.term.termUnit" instead.

Enum"DAY""WEEK""MONTH""YEAR"
terms[].​paymentFrequencyValueinteger(int32)Deprecated

Is set in combination with RECURRING type. Deprecated, use "paymentFrequencyDto.term.term" instead.

terms[].​pricenumberDeprecated

Deprecated, use "paymentFrequencyDto.money.amount" instead.

terms[].​termUnitstringDeprecatedrequired

Deprecated, use "term.termUnit" instead.

Enum"DAY""WEEK""MONTH""YEAR"
terms[].​termValueinteger(int32)Deprecatedrequired

Deprecated, use "term.term" instead.

]

Create a new customer and a new contract

Request

Bodyapplication/jsonrequired
contractobject(ConnectApiContractDataDto)required
contract.​contractSignatureobject(PublicApiSignatureDto)
contract.​notesstring[ 0 .. 300 ] characters
contract.​optionalRateBundleTermModulesArray of objects(PublicApiSelectedOptionalRateBundleModuleDto)

Selected optional rate bundle term modules additionally payable.

contract.​preuseDatestring(date)
contract.​rateBundleTermIdinteger(int64)required
contract.​selectedRateBundleModulesArray of objects(PublicApiSelectedSelectableRateBundleModuleDto)

Selected free inclusive rate bundle modules.

contract.​sepaSignatureobject(PublicApiSignatureDto)

if not set, the same value as in contractSignature is used

contract.​startDatestring(date)required
contract.​textBlockSignaturesArray of objects(PublicApiSignatureDto)
customerobject(ConnectApiCreatePublicCustomerDto)required
customer.​additionalAddressInformationstring[ 0 .. 300 ] characters

addition for Spain

customer.​bankAccountobject(PublicApiBankAccountDto)

Required in combination with paymentChoice DIRECT_DEBIT

customer.​buildingNamestring[ 0 .. 300 ] characters

addition for Turkish addresses

customer.​citystring[ 0 .. 300 ] charactersrequired
Example: "Hamburg"
customer.​cityPartstring[ 0 .. 300 ] characters

addition for Turkish addresses

customer.​communicationPreferencesArray of objects(ConnectApiCommunicationPreferencesDto)

Communication preferences for the customer. If specified, the list must contain an element for each message category.

customer.​countryCodestring[ 0 .. 300 ] charactersrequired
Example: "DE"
customer.​countryOfBirthstring

Required for italian studios and none-italian nationals

Enum"UNDEFINED""AC""AD""AE""AF""AG""AI""AL""AM""AN"
customer.​creditCardobject(PublicApiCreditCardDto)

Required in combination with paymentChoice CREDIT_CARD

customer.​dateOfBirthstring(date)required

The age must be between 0 and 100 years inclusive.

customer.​districtstring[ 0 .. 300 ] characters

addition for Turkish addressses

customer.​documentIdentificationobject(PublicApiDocumentIdentificationDto)

information from an official document with identifies the customer

customer.​doorstring[ 0 .. 300 ] characters

addition for Spain

customer.​emailstring[ 0 .. 300 ] charactersrequired
customer.​firstnamestring[ 0 .. 100 ] charactersrequired
customer.​floorstring[ 0 .. 300 ] characters

addition for Spain

customer.​genderstring

User will be assigned as UNISEX if no gender is set.

Enum"MALE""FEMALE""UNISEX"
customer.​houseNumberstring[ 0 .. 100 ] charactersrequired
Example: "3-4"
customer.​identityTokenstring(uuid)

[Optional] Should only be set if checkout page has been called with URL param identityToken. If no customer exists with this UUID a new one will be created.

Example: "2340b1cc-3fe7-4f81-8eca-f92181dd2bb4"
customer.​imageObjectKeystring[ 0 .. 300 ] characters

Object key for pre-uploaded image

customer.​languagestring[ 0 .. 300 ] characters

language of customer as ISO 639-1 two-letter code (e.g. es or de)

customer.​lastnamestring[ 0 .. 100 ] charactersrequired
customer.​localestring[ 0 .. 300 ] characters

locale of customer as ISO 639-1 two-letter language and country code (e.g. es_ES or de_DE)

customer.​paymentChoicestringrequired

Only configured values in the rate bundle allowed. For Contract Voucher redemption use CASH

Enum"CASH""BANK_TRANSFER""DIRECT_DEBIT""CREDIT_CARD""TWINT"
Example: "DIRECT_DEBIT"
customer.​placeOfBirthstring[ 0 .. 300 ] characters

Required for italian studios and nationals

customer.​portalstring[ 0 .. 300 ] characters

addition for Spain

customer.​provincestring[ 0 .. 300 ] characters

addition for southern Europe countries/US (e.g. Madrid, California)

customer.​provinceCodestring[ 0 .. 300 ] characters

addition for US states (e.g. CA)

customer.​publicGenderstring
Enum"MALE""FEMALE""UNISEX"
customer.​referralCodestring[ 0 .. 300 ] characters

Referral code to link with recruiter

customer.​secondFirstnamestring[ 0 .. 100 ] characters

addition for Turkey

customer.​secondLastNamestring[ 0 .. 100 ] characters

addition for Spain

customer.​secondStreetstring[ 0 .. 300 ] characters

addition for Turkish addresses

customer.​stairwaystring[ 0 .. 300 ] characters

addition for Spain

customer.​streetstring[ 0 .. 300 ] charactersrequired
Example: "Raboisen"
customer.​streetBlockstring[ 0 .. 300 ] characters

addition for Spain

customer.​streetTypestring[ 0 .. 300 ] characters

addition for Spain (e.g. calle)

customer.​studioCountryCodestring
Enum"UNDEFINED""AC""AD""AE""AF""AG""AI""AL""AM""AN"
customer.​taxIdstring[ 0 .. 300 ] characters

Required if the studio is located in Spain or Italy

customer.​telephone_mobilestring[ 0 .. 300 ] characters

If only one number is available use mobile as default.

customer.​telephone_privatestring[ 0 .. 300 ] characters

If only one number is available use mobile as default.

customer.​zipCodestring[ 0 .. 100 ] charactersrequired
Example: 22099
customer.​identificationobject(ConnectApiIdentificationDto)Deprecated

Deprecated. Use the identityNumber field.

customer.​privacyConfigurationobject(PublicApiPrivacyConfigurationDto)Deprecated

Data privacy configuration for marketing purposes. Deprecated. Use communicationPreferences instead.

landingPageConfigurationIdinteger(int64)
offerUuidstring(uuid)
studioIdinteger(int64)required
voucherCodestring

Only vouchers of type 'Credit' or 'Discount' are supported here.

curl -i -X POST \
  https://connectdemo.api.magicline.com/connect/v1/rate-bundle \
  -H 'Content-Type: application/json' \
  -d '{
    "contract": {
      "contractSignature": {
        "base64Svg": "string",
        "textBlockId": 0
      },
      "notes": "string",
      "optionalRateBundleTermModules": [
        {
          "id": 0
        }
      ],
      "preuseDate": "2019-08-24",
      "rateBundleTermId": 0,
      "selectedRateBundleModules": [
        {
          "id": 0
        }
      ],
      "sepaSignature": {
        "base64Svg": "string",
        "textBlockId": 0
      },
      "startDate": "2019-08-24",
      "textBlockSignatures": [
        {
          "base64Svg": "string",
          "textBlockId": 0
        }
      ]
    },
    "customer": {
      "additionalAddressInformation": "string",
      "bankAccount": {
        "accountHolder": "string",
        "bic": "string",
        "iban": "string"
      },
      "buildingName": "string",
      "city": "Hamburg",
      "cityPart": "string",
      "communicationPreferences": [
        {
          "activeCommunicationChannels": [
            "LETTER"
          ],
          "messageCategoryId": 0
        }
      ],
      "countryCode": "DE",
      "countryOfBirth": "UNDEFINED",
      "creditCard": {
        "accountPaymentInstrumentToken": "string",
        "tokenizationReference": "string"
      },
      "dateOfBirth": "2019-08-24",
      "district": "string",
      "documentIdentification": {
        "documentNumber": "string",
        "documentType": "ID_CARD"
      },
      "door": "string",
      "email": "string",
      "firstname": "string",
      "floor": "string",
      "gender": "MALE",
      "houseNumber": "3-4",
      "identification": {
        "spain_DNI_NIE": "string"
      },
      "identityToken": "2340b1cc-3fe7-4f81-8eca-f92181dd2bb4",
      "imageObjectKey": "string",
      "language": "string",
      "lastname": "string",
      "locale": "string",
      "paymentChoice": "DIRECT_DEBIT",
      "placeOfBirth": "string",
      "portal": "string",
      "privacyConfiguration": {
        "email": true,
        "letter": true,
        "mySportsMessage": true,
        "phone": true,
        "textMessage": true
      },
      "province": "string",
      "provinceCode": "string",
      "publicGender": "MALE",
      "referralCode": "string",
      "secondFirstname": "string",
      "secondLastName": "string",
      "secondStreet": "string",
      "stairway": "string",
      "street": "Raboisen",
      "streetBlock": "string",
      "streetType": "string",
      "studioCountryCode": "UNDEFINED",
      "taxId": "string",
      "telephone_mobile": "string",
      "telephone_private": "string",
      "zipCode": 22099
    },
    "landingPageConfigurationId": 0,
    "offerUuid": "5d19bb70-d72b-45ae-9b5e-c4257877bdbb",
    "studioId": 0,
    "voucherCode": "string"
  }'

Responses

OK

Body*/*
customer idinteger(int64)required
customer member namestringread-only
customer member numberstringrequired
token for additional requests after member creationobject(ConnectApiFollowUpActionTokenDto)read-only
Optional payment url where the user needs to be redirected tostringread-only
Quick registration url for MySportsstring
idinteger(int64)required

Id of current data block. See name field parameter or name of Dto!

Request

curl -i -X GET \
  https://connectdemo.api.magicline.com/connect/v2/contracts/studios

Responses

OK

Body*/*Array [
idinteger(int64)required

Id of current data block. See name field parameter or name of Dto!

studioPublicDtoobject(StudioPublicDto)
]

CreditCard Tokenization

Store credit cards for new members

Operations
Operations
Operations
Operations
Operations
Operations
Operations