Magicline Connect API (1.0.0)

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

Terminal

/terminal

Operations

TrialSessions

Allow prospects to book a trial session

Operations

Tenant

Tenant information

Operations

Referral

Additional referral information for member creation

Operations

Image

Allow prospect to upload image

Operations

Promotions

Getting information about external promotion participation

Operations

AddressData

/addressdata

Operations

ContractVoucher

/contractvoucher

Operations

Validation

/validation

Operations

Contracts

Cancel contracts

Operations

CreditCard Tokenization

Store credit cards for new members

Operations

BankAccount

Operations

FeatureCheck

Operations

I18n

Operations

Leads

Operations

Studios

Operations

Previews

Operations

getPreview

Request

Query
landingPageConfigurationIdinteger(int64)
checkoutPageConfigurationIdinteger(int64)
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/v2/preview?checkoutPageConfigurationId=0&landingPageConfigurationId=0' \
  -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*/*
ageAdjustedPricenumber

The adjusted price, if age-based discounts are configured and the customer is eligible, null otherwise

basePricenumber

base price of contract

companyAmountnumber

Amount the company has to pay

companyAmountPreUseChargenumber

Amount the company has to pay for pre use charge

companyAmountWithoutDiscountnumber

Amount the company has to pay without discount

companyFeeSplitTypestring

Type of company fee split (percentage or absolute), if valid a company discount voucher is provided

Enum"ABSOLUTE""PERCENTAGE"
companyFeeSplitValuenumber

Company fee split value, if a valid company discount voucher is provided

companyNamestring

Name of the company that will pay the company amount

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)

creditValuenumber

Voucher credit value, if a valid credit voucher is provided

discountTypestring

Type of discount (percentage or absolute), if valid a (company) discount voucher is provided

Enum"ABSOLUTE""PERCENTAGE"
discountValuenumber

Discount value, if a valid (company) discount voucher is provided

discountedBasePricenumber

Discounted base price, if a valid (company) discount voucher is provided

discountedPreUseChargenumber

Discounted pre use charge, if a valid (company) discount voucher is provided

effectivePeriodTimeBasedTerminteger(int32)

Effective period: term in which a discount is applied if type is time base

effectivePeriodTimeBasedTermUnitstring

Effective period: term unit in which a discount is applied if type is time base

Enum"DAY""WEEK""MONTH""YEAR"
flatFeePreviewsArray of objects(ConnectApiFlatFeePreviewDto)

Flat fee previews, including discount if a valid discount voucher is provided

memberAmountnumber

Amount the member has to pay

memberAmountPreUseChargenumber

Amount the member has to pay for pre use charge

memberAmountWithoutDiscountnumber

Amount the member has to pay without discount

moduleConsentTextBlocksArray of objects(ConnectApiSignableTextBlockDto)

Consent texts for modules that are part of the contract

preUseChargenumber

Charge for the time between startdateofuse and startdate

selectedOptionalModulesPreviewsArray of objects(ConnectApiModuleContractPreviewDto)

Optional module contract preview including discount, company split or credit, if a valid voucher is provided

voucherBonusPeriodobject(ConnectApiRateBonusPeriodDto)

Bonus period applied with the (company) discount voucher, if valid a (company) discount voucher is provided

voucherEffectivePeriodstring

Effective period type in which a discount is applied

Enum"UNLIMITED""INITIAL_TERM""TIME_BASED"
voucherErrorCodestring

An error code, if the voucher code is invalid

Enum"ENTITY_NOT_FOUND""CONFLICT""BAD_REQUEST""REQUIRED_PARAMETER_MISSING""VALIDATION_FAILED""FORBIDDEN""OPERATION_NOT_ALLOWED_FOR_STUDIO""SERVER_ERROR""FEATURE_DISABLED""STUDIO_NOT_IN_GERMANY"
voucherErrorMessagestring

A readable, non-localized error message, if the voucher code is invalid

voucherRemarksstring

Voucher remarks, if a valid voucher code is provided

voucherSuccessMessagestring

Textual representation of the voucher conditions, if a valid voucher is provided

voucherTextBlocksArray of objects(ConnectApiSignableTextBlockDto)

Voucher related text blocks, if a valid voucher is provided

voucherTypestring

Type of a voucher, if a valid voucher code is provided

Enum"CONTRACT""CREDIT""DISCOUNT""COMPANY_FEE_SPLIT""CHECKIN"