Magicline API

  • Appointment, bookable appointment and slots operations
  • Class and slots operations
  • Cross studio operations
  • Get customers and contracts
  • Retrieve customer accounting details
  • Retrieve customer communication details
  • Get device information
  • Debt collection operations
  • Manage membership contracts
  • Get studio information
  • Get trial offers information
Download OpenAPI description
Languages
Servers
Mock server
https://developer.sportalliance.com/_mock/apis/magicline/openapi/openapi/
Demo tenant
https://open-api-demo.open-api.magicline.com/

Appointments

Appointment, bookable appointment and slots operations

Operations

Classes

Class and slots 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

Create communication thread

Request

Required Scopes: COMMUNICATION_WRITE

Creates new thread with a new communication for a customer

Path
customerIdinteger(int64)required

The ID of the customer

Bodyapplication/jsonrequired
communicationThreadStatusstringrequired

The status of a communication thread

Enum ValueDescription
CREATED

The thread is created

CLOSED

The thread is closed

ONGOING

The thread is in ongoing progress

Example: "CREATED"
ticketNumberstring

The ticket number of the third party ticketing system

Example: "A123456"
subjectstringrequired

The subject of the communication

Example: "Complaint"
contentstringrequired

The content of the communication

Example: "I received two invoices this month, but I only made one purchase."
communicationDirectionstringrequired

The direction of the communication

Enum ValueDescription
INCOMING

The communication is incoming from the customer

OUTGOING

The communication is outgoing to the customer

Example: "INCOMING"
ticketLinkstring

The link to the ticket in the third party ticketing system

Example: "https://ticketing-system.com/ticket/A123456"
communicationChannelstringrequired

The channel of the communication

Enum ValueDescription
OTHER

Communication via other means

LETTER

Communication via letter

TEXT_MESSAGE

Communication via text message

PHONE

Communication via phone

CHAT

Communication via chat

EMAIL

Communication via email

FAX

Communication via fax

CONVERSATION

Communication via conversation

Example: "LETTER"
agentstring

The employee/agent handling the communication

Example: "Peter Meyer"
communicationDateTimestring(date-time)

When this field is not null it will be used as the date time of the communication instead of the current time

Example: "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
curl -i -X POST \
  'https://developer.sportalliance.com/_mock/apis/magicline/openapi/openapi/v1/communications/{customerId}/threads' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "communicationThreadStatus": "CREATED",
    "ticketNumber": "A123456",
    "subject": "Complaint",
    "content": "I received two invoices this month, but I only made one purchase.",
    "communicationDirection": "INCOMING",
    "ticketLink": "https://ticketing-system.com/ticket/A123456",
    "communicationChannel": "LETTER",
    "agent": "Peter Meyer",
    "communicationDateTime": "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
  }'

Responses

OK

Bodyapplication/json
customerIdinteger(int64)required

The customer's ID

Example: 1
communicationIdinteger(int64)required

The ID of the communication

Example: 1
threadIdinteger(int64)required

The ID of the communication thread

Example: 1
communicationThreadStatusstringrequired

The status of a communication thread

Enum ValueDescription
CREATED

The thread is created

CLOSED

The thread is closed

ONGOING

The thread is in ongoing progress

Example: "CREATED"
ticketNumberstring

The ticket number of the third party ticketing system

Example: "A123456"
subjectstringrequired

The subject of the communication

Example: "Complaint"
contentstringrequired

The content of the communication

Example: "I received two invoices this month, but I only made one purchase."
communicationDirectionstringrequired

The direction of the communication

Enum ValueDescription
INCOMING

The communication is incoming from the customer

OUTGOING

The communication is outgoing to the customer

Example: "INCOMING"
ticketLinkstring

The link to the ticket in the third party ticketing system

Example: "https://ticketing-system.com/ticket/A123456"
communicationChannelstringrequired

The channel of the communication

Enum ValueDescription
OTHER

Communication via other means

LETTER

Communication via letter

TEXT_MESSAGE

Communication via text message

PHONE

Communication via phone

CHAT

Communication via chat

EMAIL

Communication via email

FAX

Communication via fax

CONVERSATION

Communication via conversation

Example: "LETTER"
agentstring

The employee/agent handling the communication

Example: "Peter Meyer"
Response
application/json
{ "customerId": 1, "communicationId": 1, "threadId": 1, "communicationThreadStatus": "CREATED", "ticketNumber": "A123456", "subject": "Complaint", "content": "I received two invoices this month, but I only made one purchase.", "communicationDirection": "INCOMING", "ticketLink": "https://ticketing-system.com/ticket/A123456", "communicationChannel": "LETTER", "agent": "Peter Meyer" }

Update communication thread

Request

Required Scopes: COMMUNICATION_WRITE

Adds new communication for a customer to an existing communication thread and updates the thread

Path
customerIdinteger(int64)required

The ID of the customer

threadIdinteger(int64)required

The ID of the communication thread

Bodyapplication/jsonrequired
communicationThreadStatusstringrequired

The status of a communication thread

Enum ValueDescription
CREATED

The thread is created

CLOSED

The thread is closed

ONGOING

The thread is in ongoing progress

Example: "CREATED"
ticketNumberstring

The ticket number of the third party ticketing system

Example: "A123456"
subjectstringrequired

The subject of the communication

Example: "Complaint"
contentstringrequired

The content of the communication

Example: "I received two invoices this month, but I only made one purchase."
communicationDirectionstringrequired

The direction of the communication

Enum ValueDescription
INCOMING

The communication is incoming from the customer

OUTGOING

The communication is outgoing to the customer

Example: "INCOMING"
ticketLinkstring

The link to the ticket in the third party ticketing system

Example: "https://ticketing-system.com/ticket/A123456"
communicationChannelstringrequired

The channel of the communication

Enum ValueDescription
OTHER

Communication via other means

LETTER

Communication via letter

TEXT_MESSAGE

Communication via text message

PHONE

Communication via phone

CHAT

Communication via chat

EMAIL

Communication via email

FAX

Communication via fax

CONVERSATION

Communication via conversation

Example: "LETTER"
agentstring

The employee/agent handling the communication

Example: "Peter Meyer"
communicationDateTimestring(date-time)

When this field is not null it will be used as the date time of the communication instead of the current time

Example: "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
curl -i -X PUT \
  'https://developer.sportalliance.com/_mock/apis/magicline/openapi/openapi/v1/communications/{customerId}/threads/{threadId}' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "communicationThreadStatus": "CREATED",
    "ticketNumber": "A123456",
    "subject": "Complaint",
    "content": "I received two invoices this month, but I only made one purchase.",
    "communicationDirection": "INCOMING",
    "ticketLink": "https://ticketing-system.com/ticket/A123456",
    "communicationChannel": "LETTER",
    "agent": "Peter Meyer",
    "communicationDateTime": "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
  }'

Responses

OK

Bodyapplication/json
customerIdinteger(int64)required

The customer's ID

Example: 1
communicationIdinteger(int64)required

The ID of the communication

Example: 1
threadIdinteger(int64)required

The ID of the communication thread

Example: 1
communicationThreadStatusstringrequired

The status of a communication thread

Enum ValueDescription
CREATED

The thread is created

CLOSED

The thread is closed

ONGOING

The thread is in ongoing progress

Example: "CREATED"
ticketNumberstring

The ticket number of the third party ticketing system

Example: "A123456"
subjectstringrequired

The subject of the communication

Example: "Complaint"
contentstringrequired

The content of the communication

Example: "I received two invoices this month, but I only made one purchase."
communicationDirectionstringrequired

The direction of the communication

Enum ValueDescription
INCOMING

The communication is incoming from the customer

OUTGOING

The communication is outgoing to the customer

Example: "INCOMING"
ticketLinkstring

The link to the ticket in the third party ticketing system

Example: "https://ticketing-system.com/ticket/A123456"
communicationChannelstringrequired

The channel of the communication

Enum ValueDescription
OTHER

Communication via other means

LETTER

Communication via letter

TEXT_MESSAGE

Communication via text message

PHONE

Communication via phone

CHAT

Communication via chat

EMAIL

Communication via email

FAX

Communication via fax

CONVERSATION

Communication via conversation

Example: "LETTER"
agentstring

The employee/agent handling the communication

Example: "Peter Meyer"
Response
application/json
{ "customerId": 1, "communicationId": 1, "threadId": 1, "communicationThreadStatus": "CREATED", "ticketNumber": "A123456", "subject": "Complaint", "content": "I received two invoices this month, but I only made one purchase.", "communicationDirection": "INCOMING", "ticketLink": "https://ticketing-system.com/ticket/A123456", "communicationChannel": "LETTER", "agent": "Peter Meyer" }

Get communication preferences

Request

Required Scopes: COMMUNICATION_PREFERENCES_READ

Get communication preferences for a customer

Path
customerIdinteger(int64)required

The ID of the customer

curl -i -X GET \
  'https://developer.sportalliance.com/_mock/apis/magicline/openapi/openapi/v1/communications/{customerId}/communication-preferences' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/jsonArray [
messageCategorystring

The message category of the communication preference

Enum ValueDescription
APPOINTMENT

The message category is appointment related

NEWSLETTER

The message category is newsletter related

CONTRACT

The message category is contract related

LOYALTY_PROGRAM

The message category is loyalty program related

GENERAL

The message category is general

Example: "CONTRACT"
channelsArray of objects(CommunicationChannelWrapper)

The communication channels related to the message category of the communication preference

]
Response
application/json
[ { "messageCategory": "CONTRACT", "channels": [] } ]

Update communication preferences

Request

Required Scopes: COMMUNICATION_PREFERENCES_WRITE

Update communication preferences for a customer

Path
customerIdinteger(int64)required

The ID of the customer

Bodyapplication/jsonrequiredArray [
messageCategorystring

The message category of the communication preference

Enum ValueDescription
APPOINTMENT

The message category is appointment related

NEWSLETTER

The message category is newsletter related

CONTRACT

The message category is contract related

LOYALTY_PROGRAM

The message category is loyalty program related

GENERAL

The message category is general

Example: "CONTRACT"
channelsArray of objects(CommunicationChannelWrapper)

The communication channels related to the message category of the communication preference

]
curl -i -X PUT \
  'https://developer.sportalliance.com/_mock/apis/magicline/openapi/openapi/v1/communications/{customerId}/communication-preferences' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '[
    {
      "messageCategory": "CONTRACT",
      "channels": [
        {
          "communicationChannel": "EMAIL",
          "customerOverridable": true,
          "active": true
        }
      ]
    }
  ]'

Responses

OK

Bodyapplication/jsonArray [
messageCategorystring

The message category of the communication preference

Enum ValueDescription
APPOINTMENT

The message category is appointment related

NEWSLETTER

The message category is newsletter related

CONTRACT

The message category is contract related

LOYALTY_PROGRAM

The message category is loyalty program related

GENERAL

The message category is general

Example: "CONTRACT"
channelsArray of objects(CommunicationChannelWrapper)

The communication channels related to the message category of the communication preference

]
Response
application/json
[ { "messageCategory": "CONTRACT", "channels": [] } ]

Customers Self-service

Operations

Devices

Get device information

Operations

Finance

Debt collection operations

Operations

Membership Self-service

Manage membership contracts

Operations

Studios

Get studio information

Operations

Trial Offers

Get trial offers information

Operations