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
Mock server
https://redocly.sportalliance.com/_mock/apis/magicline/connectapi/connectapi/
Generated server url
https://connectdemo.api.magicline.com/

Campaigns

List your marketing campaigns

Operations

Terminal

/terminal

Operations

TrialSessions

Allow prospects to book a trial session

Operations

Book a trial session

Request

Book a free slot. Might return errorCode CONFLICT if configured resources are overbooked for this slot. In this case its advised to reload free slots and let the user select a different slot. If you get a validation error make sure all required fields are filled. Required fields are returned by the /config/validation endpoint.

Bodyapplication/jsonrequired
studioIdinteger(int64)required
Example: 1
startDateTimestring(date-time)required
Example: "2019-04-15T07:00:00Z"
leadCustomerobject(CommonTrialSessionLeadCustomerDto)required
leadCustomer.​studioIdinteger(int64)

Only set if lead is fetched

leadCustomer.​firstnamestring[ 0 .. 100 ] charactersrequired
Example: "Max"
leadCustomer.​secondFirstnamestring[ 0 .. 100 ] characters
Example: "Martin"
leadCustomer.​lastnamestring[ 0 .. 100 ] charactersrequired
Example: "Mustermann"
leadCustomer.​secondLastnamestring[ 0 .. 100 ] characters
Example: "Muster"
leadCustomer.​taxIdstring[ 0 .. 300 ] characters
Example: "56982134w"
leadCustomer.​placeOfBirthstring[ 0 .. 300 ] characters
Example: "Rom"
leadCustomer.​countryOfBirthstring
Enum"UNDEFINED""AC""AD""AE""AF""AG""AI""AL""AM""AN"
Example: "FR"
leadCustomer.​genderstring
Enum"MALE""FEMALE""UNISEX"
Example: "MALE"
leadCustomer.​dateOfBirthstring(date)
Example: "1985-05-29"
leadCustomer.​emailstring[ 0 .. 300 ] characters
Example: "mm@test.de"
leadCustomer.​phonestring[ 0 .. 300 ] characters
Example: "+49 40 123 555"
leadCustomer.​addressobject(CommonTrialSessionLeadAddressDto)
leadCustomer.​customerUUIDstring[ 0 .. 300 ] characters

Should only be set if booking page has been called with URL param identityToken. If no lead exists with this UUID a new one will be created.

Example: "2340b1cc-3fe7-4f81-8eca-f92181dd2bb4"
leadCustomer.​privacyConfigurationobject(PublicApiPrivacyConfigurationDto)

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

leadCustomer.​communicationPreferencesArray of objects(CustomerCommunicationPreferencesData)

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

notestring[ 0 .. 300 ] characters
Example: "become fit"
referrerIdinteger(int64)
Example: 10
participantsinteger(int32)
Example: 2
sourceCampaignIdinteger(int64)
Example: 2
referralCodestring[ 0 .. 300 ] characters
Example: "ABCXYZ"
curl -i -X POST \
  https://redocly.sportalliance.com/_mock/apis/magicline/connectapi/connectapi/connect/v1/trialsession/book \
  -H 'Content-Type: application/json' \
  -d '{
    "studioId": 1,
    "startDateTime": "2019-04-15T07:00:00Z",
    "leadCustomer": {
      "studioId": 0,
      "firstname": "Max",
      "secondFirstname": "Martin",
      "lastname": "Mustermann",
      "secondLastname": "Muster",
      "taxId": "56982134w",
      "placeOfBirth": "Rom",
      "countryOfBirth": "FR",
      "gender": "MALE",
      "dateOfBirth": "1985-05-29",
      "email": "mm@test.de",
      "phone": "+49 40 123 555",
      "address": {
        "street": "Heinrichstraße",
        "houseNumber": "1b",
        "zip": "20095",
        "city": "Hamburg",
        "country": "DE",
        "details": {
          "additionalInformation": "string",
          "streetType": "string",
          "block": "string",
          "portal": "string",
          "stairway": "string",
          "floor": "string",
          "door": "string",
          "province": "string",
          "provinceCode": "string",
          "secondStreet": "string",
          "buildingName": "string",
          "cityPart": "string",
          "district": "string"
        }
      },
      "customerUUID": "2340b1cc-3fe7-4f81-8eca-f92181dd2bb4",
      "privacyConfiguration": {
        "letter": true,
        "email": true,
        "textMessage": true,
        "phone": true,
        "mySportsMessage": true
      },
      "communicationPreferences": [
        {
          "messageCategoryId": 0,
          "activeCommunicationChannels": [
            "LETTER"
          ]
        }
      ]
    },
    "note": "become fit",
    "referrerId": 10,
    "participants": 2,
    "sourceCampaignId": 2,
    "referralCode": "ABCXYZ"
  }'

Responses

OK

Body*/*
idinteger(int64)required

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

customerNumberstring

Customer number of prospect

uuidstring(uuid)

Can be used to execute follow up actions (Booking of appointment, singing a contract with this exact customer.

Example: "2340b1cc-3fe7-4f81-8eca-f92181dd2bb4"

Get free slots for a trial session

Request

Returns free slots for a studio where a trial session appointment can be booked.

Query
studioIdinteger(int64)required
Example: studioId=1
startDatestring(date)required
Example: startDate=2021-05-15
endDatestring(date)required
Example: endDate=2021-05-21
curl -i -X GET \
  'https://redocly.sportalliance.com/_mock/apis/magicline/connectapi/connectapi/connect/v1/trialsession?endDate=2021-05-21&startDate=2021-05-15&studioId=1'

Responses

OK

Body*/*
namestring

Display name of trial session

descriptionstring

Short description how the trial session looks like

slotsArray of objects(ConnectApiBookableItemSlotDto)

Get mandatory field configuration

Request

Returns the configuration which needs to be considered e.g. for form fields and their validation.

Query
studioIdinteger(int64)required
Example: studioId=1
curl -i -X GET \
  'https://redocly.sportalliance.com/_mock/apis/magicline/connectapi/connectapi/connect/v1/trialsession/config/validation?studioId=1'

Responses

OK

Body*/*
nameModestring

Defines validation mode for full name. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
genderModestring

Defines validation mode for gender. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
dateOfBirthModestring

Defines validation mode for birthdate. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
placeOfBirthModestring

Defines validation mode fro place of birth. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
emailModestring

Defines validation mode for email address. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
telephoneModestring

Defines validation mode for telephone number. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
addressModestring

Defines validation mode for full address. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
zipModestring

Defines validation mode for zip code. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"
minimumAgeinteger(int32)

minimum age to book a trial session (dateOfBirthMode is mandatory if value is set)

taxIdModestring

Defines validation mode for tax id. INACTIVE: hide it, OPTIONAL: Show it as optional form field, MANDATORY: Show it as mandatory form field.

Enum"INACTIVE""OPTIONAL""MANDATORY"

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

Previews

Operations

Leads

Operations

Studios

Operations

I18n

Operations

FeatureCheck

Operations

BankAccount

Operations