Pages

Mindbody online api integration Asp.net



Singup in MINDBODY and Get your API credentials

Before you can start integrating your MINDBODY data you will need credentials to access the MINDBODY API. If you are just developing for a single business, follow the steps below. If you want to access the data for more than one business you will need to contact MINDBODY directly for this information.
  • Complete the sign up form at the MINDBODY Partner Program website and write down your sourcename and key.Click Here
  • This next step can be tricky. You have to make a call to the SiteService on the MINDBODY SOAP server to get an activation code. I made a form you can fill out instead. (UPDATE: MINDBODY has included this tool on the partner program website) You need the sourcename and key that you wrote down in the first step as well as your site id. If you don’t know what your site id is, log in to your MINDBODY account and check the URL. Your site id comes after “?studioid=” at the end of the URL.
  • Give the activation link and code to the person with the ‘owner’ account for the MINDBODY site you want to access the data of.
    Some API methods require user credentials as well. Set up a user for your application by following these steps.

Step:

  • Log in to MINDBODY
  • Go to Toolbox -> Setup -> Staff -> Staff Management
  • Click Add New Staff Member


  • Enter something for the first and last name. I used first name “web” last name “developer”.
  • Create a staff login with a new username and password and write these down.


  • Save your new staff member.

Schedule

  • Clients can quickly see the latest schedule and sign up or pay for a class without ever leaving your website.
  • Calendar or list view options
  • Shows single or multi-locations
  • Automatically switches to mobile view when viewed from iPhone or Android phone
  • Shows classes and enrollments
  • Pick which day the schedule starts
  • Choose timeframe displayed
  • Class type and instructor filtering
  • Filter by day and/or time of day
  • Option to create a ‘Today’s Schedule’ widget
  • Changes made in MINDBODY auto-update in real-time

Enrollments

  • Clients can register and pay for the enrollments on the spot.
  • Set the timeframe, allows for up to a year.
  • Ability to hide enrollments already underway.
  • Select a summary or detailed views.
  • Narrow view also available for sidebars
  • Filter by day and/or time of day
  • Type and instructor filtering
  • Shows single or multi-locations
  • Automatically switches to mobile view when viewed from iPhone or Android phone
  • Changes made in MINDBODY auto-update in real-time

Appointments

  • Clients can search for and book appointments
  • Supports new client sign-ups and purchases
  • Choose how many days are displayed
  • Instructor and session type filtering
  • Supports 'request' and 'book' appointment modes in MINDBODY
  • Shows single or multi-locations
  • Automatically switches to mobile view when viewed from iPhone or Android phone
  • Changes made in MINDBODY auto-update in real-time

Registration

  • Clients can do paperless registration and get set up in your MINDBODY account.
  • Supports liability release agreements that are created/stored in MINDBODY
  • Creates profile in MINDBODY with information inputted by new registrant
  • Creates PDF of info supplied in profile in MINDBODY
  • Get notified of new registrants

Prospect

  • Leads fill this out when contacting you
  • Get notified of new prospects for better response time
  • Perfect for newsletter sign ups
  • Customize client indexes

Staff List

  • Lists bios, photos and schedules of staff on a webpage
  • Staff bios, photos and schedule from MINDBODY get pulled down into the website
  • Changes to MINDBODY automatically update on the website
  • Sort and order staff when displayed by widget on the website

Class List

  • Lists class descriptions, photos and schedules of classes on a webpage
  • Class descriptions, photos and schedule from MINDBODY get pulled down into the website
  • Changes to MINDBODY automatically update on the website

Simple basics of SOAP over view

SOAP is a platform independent protocol for exchanging information between websites. It’s fairly simple and easy to use once you understand how SOAP works. In your situation you want to access your data stored on MINDBODY’s servers. MINDBODY has provided a SOAP server that you can send XML formatted messages to and receive responses from over the http protocol.

Your SOAP messages are written in XML which is a markup language similar to HTML. Luckily using ASP.net we can abstract away the need to interact with the XML directly so it should make it a lot easier to work with.


API reference documentation

You need to know where to send your SOAP requests. In SOAP jargon these destinations are known as endpoints. You can find the endpoints here
Click here to open API documentation

Problem with API

Synchronize a web-application built for saving meditation and yoga related classes information of customers with MindBody API. The customers will signup into MindBody and their data should be captured from there and updated into the web-application database. The customers should be able to book appointments from the web-application which should be updated into the MindBody database.

Solution Provided

The credentials for Mind-body developer API were obtained. The source name, password, siteId, were all supplied to the SOAP request call . Then a query was fired on the MindBody database as a part of the request to fetch all the customers profile information present in MindBody. The data was retrieved in CSV format. Then a validation was implemented to check if the emails of the customers were present in the web-application database. If no then these records were created in the web-application database. The MindBody client id was inserted too. If the record of the customer was found then the record was updated with the MindBody client id received from the API.

A cron job was setup to sync the database daily with Mindbody looking for new customers. The client id from Mind Body was used for mapping between the application and the API.

The customers had access to an appointment form where they could select the location, and the appointment date for booking. Then a request was made to the MindBody server passing the location, date, staff id, client id to add the new appointment in the MindBody database. The status of the API was tracked to track the success / failure of the request.

The application helped the client streamline his business in terms of managing all the user related activities and sessions for yoga and meditation.