OpenStudio

1 About

A couple of things to keep in mind when working with the OpenStudio API

  • All returned data is encoded using UTF-8
  • Weeks start on Monday
  • All calls to can be made as JSON and XML

2 Schedule_Get

The schedule API is a one way API that allows you to get information from the schedule in OpenStudio.

2.1 Get Call

Calls can be made as JSON and as XML. Both return the same data, just formatted according to the call you
make.

JSON https://<hosting location>/api/schedule_get.json
XML https://<hosting location>/api/schedule_get.xml

2.1.1 Mandatory Variables

user API user
key Key for API user
week ISO week number of year, 1 - 52 (or 53 if applicable)
year year as YYYY

2.1.2 Optional Variables

TeacherID If specified, only returns classes containing the specified teacher. This works for
regular and substitute teachers
ClassTypeID If specified, only returns classes of the specified type
LocationID If specified, only returns classes for the specified location
LevelID If specified, only return classes with the specified level
SortBy Accepted values: 'location' or 'time' 
location: Sort by location and then time
time: Sort by time and then location

2.1.3 Example Calls

https://<hosting location>/api/schedule_get.xml?user=test&key=test&week=1&year=2014
https://<hosting location>/api/schedule_get.xml?user=test&key=test&week=1&year=2014&TeacherID=1&ClassTypeID=1

2.2 Return

The global structure for the returned values is as follows. The actual returned values differ slightly
depending on whether called as XML or JSON.

data (top level) classtypes1    
  teachers2    
  locations3    
  classes Monday - Sunday date (YYYY-MM-DD)
      classes4

 

  1. The following data is provided for classtypes
    Variable Type Description
    id String ID of classtype
    Name String Name of classtype
    Link String URL to classtype page on website (optional)
    Description String Description of classtype
    LinkThumbLarge String URL to large thumbnail for class (400px * 400px)
    LinkThumbSmall String URL to small thumbnail for class (50px * 50px)
  2. The following data is provided for teachers

    Variable Type Description
    id String ID of teacher
    Name String Name of teacher
    Bio String Biography of teacher
    LinkToBio String URL to teachers' online biography
    LinkThumbLarge String URL to teacher picture large thumbnail
  3. The following data is provided for locations

    Variable Type Description
    id String ID of location
    Name String Name of location

 

The following data is provided for a class

Variable Type Description
LocationID String ID of location
Location String Name of location
Starttime String Start time of class
Endtime String End time of class
ClassTypeID String ID of classtype
ClassType String Name of classtype
TeacherID String ID of teacher
TeacherID2 String ID of second teacher
Teacher String Name of teacher (Firstname lastname)
Teacher2 String Name of second teacher (Firstname lastname)
LevelID String ID of class level
Level String Name of class level
Subteacher Boolean True if the current teacher or second teacher is a substitute teacher
False when not
Cancelled Boolean True if the class has been cancelled
False when not
CancelledDescription String Description of why the class is cancelled (If entered)
Holiday Boolean True when a holiday is found in OpenStudio for the location of this class
False when not
HolidayDescription String Description of holiday
MaxStudents String Max. spaces in this class
CountAttendance String Number of students attending (having booked) 
CountReservations String Number of reservations
CountReservationsCancelled String Number of cancelled reservations
BookingStatus String Booking status
LinkShop String URL to class in OpenStudio shop

3 Schedule_Get_Days

The schedule API is a one way API that allows you to get information from the schedule in OpenStudio. This chapter described the schedule_get_days endpoint which allows you get get schedule information in a selected range of dates.
 

3.1 Get Call

Calls can be made as JSON and as XML. Both return the same data, just formatted according to the call you
make.

JSON https://<hosting location>/api/schedule_get_days.json
XML https://<hosting location>/api/schedule_get_days.xml

3.1.1 Mandatory Variables

user API user
key Key for API user
date_start Start of day range as yyyy-mm-dd
date_end End of day rande as yyyy-mm-dd

3.1.2 Optional Variables

TeacherID If specified, only returns classes containing the specified teacher. This works for
regular and substitute teachers
ClassTypeID If specified, only returns classes of the specified type
LocationID If specified, only returns classes for the specified location
LevelID If specified, only return classes with the specified level
SortBy Accepted values: 'location' or 'time' 
location: Sort by location and then time
time: Sort by time and then location

3.1.3 Example Calls

https:///api/schedule_get_days.xml?user=test&key=test&date_start=2016-01-01&date_end=2016-01-06

https:///api/schedule_get_days.xml?user=test&key=test&date_start=2016-01-01&date_end=2016-01-06&TeacherID=1&ClassTypeID=1

3.2 Return

The global structure for the returned values is as follows. The actual values returned differ slightly
depending on whether called as XML or JSON.

data (top level) (list) date (yyyy-mm-dd)
  classes1 (list)

* 1. The following data is provided for a class

Variable Type Description
LocationID String ID of location
Location String Name of location
Starttime String Start time of class
Endtime String End time of class
ClassTypeID String ID of classtype
ClassType String Name of classtype
TeacherID String ID of teacher
TeacherID2 String ID of second teacher
Teacher String Name of teacher (Firstname lastname)
Teacher2 String Name of second teacher (Firstname lastname)
LevelID String ID of class level
Level String Name of class level
Subteacher Boolean True if the current teacher or second teacher is a substitute teacher
False when not
Cancelled Boolean True if the class has been cancelled
False when not
Holiday Boolean True when a holiday is found in OpenStudio for the location of this class
False when not

4 Workshops_Get

The workshops API is a one way API that allows you to get information from OpenStudio about upcoming workshops.

4.1 Get Call

Calls can be made as JSON and as XML. Both return the same data, just formatted according to the call you
make.

JSON https://<hosting location>/api/schedule_get.json
XML https://<hosting location>/api/schedule_get.xml

4.1.1 Mandatory Variables

user API user
key Key for API user

4.1.2 Example Calls

https://<hosting location>/api/workshops_get.json?user=test&key=test

4.2 Return

The global structure for the returned values is as follows. The actual values returned differ slightly
depending on whether called as XML or JSON.

data (top level) (list) workshops (list) 1

* 1. The following data is provided for a workshop

Variable Type Description
id BigInt ID of workshop
Name String Workshop Name
Startdate Date Workshop start date
Enddate Date Workshop end date
LocationID BigInt ID of location
Location String Name of location
Starttime String Start time of class
Endtime String End time of class
Teacher2 Dict Dict with teacher info
Teacher22 Dict Dict with teacher2 info
Description String Workshop description
Price Float Workshop price (for full workshop product)
LinkThumbLarge String URL to large thumbnail for workshop (400px * 400px)
LinkThumbSmall String URL to small thumbnail for workshop (50px * 50px)
LinkShop String URL to OpenStudio shop

* 2. Teacher fields

Variable Type Description
id BigInt ID of teacher
Name String Teacher Name
Role String Teacher Role
Bio String Teacher Biography
LinkToBio String URL to teacher biography
Website String URL to teacher website
LinkThumbLarge String URL to large thumbnail for workshop (400px * 400px)
LinkThumbSmall String URL to small thumbnail for workshop (50px * 50px)

5 Workshop_Get

The workshops API is a one way API that allows getting information from OpenStudio about a single workshop. Please note that the workshop has to be marked as visible in the shop in OpenStudio.

5.1 Get Call

Calls can be made as JSON and as XML. Both return the same data, just formatted according to the call you
make.

JSON https://<hosting location>/api/workshop_get.json
XML https://<hosting location>/api/workshop_get.xml

5.1.1 Mandatory Variables

user API user
key Key for API user
id Workshop ID

5.1.2 Example Calls

https://<hosting location>/api/workshop_get.json?user=test&key=test?id=1

5.2 Return

The global structure for the returned values is as follows. The actual values returned differ slightly
depending on whether called as XML or JSON.

data (top level) (list) workshop1

* 1. The following data is provided for a workshop

Variable Type Description
id BigInt ID of workshop
Name String Workshop Name
Startdate Date Workshop start date
Enddate Date Workshop end date
LocationID BigInt ID of location
Location String Name of location
Starttime String Start time of class
Endtime String End time of class
Teacher2 Dict Dict with teacher info
Teacher22 Dict Dict with teacher2 info
Description String Workshop description
Price Float Workshop price (for full workshop product)
LinkThumbLarge String URL to large thumbnail for workshop (400px * 400px)
LinkThumbSmall String URL to small thumbnail for workshop (50px * 50px)
LinkShop String URL to OpenStudio shop
Activities3 List List of activities for workshop, sorted by date and then time

* 2. Teacher fields

Variable Type Description
id BigInt ID of teacher
Name String Teacher Name
Role String Teacher Role
Bio String Teacher Biography
LinkToBio String URL to teacher biography
Website String URL to teacher website
LinkThumbLarge String URL to large thumbnail for workshop (400px * 400px)
LinkThumbSmall String URL to small thumbnail for workshop (50px * 50px)

* 3. Activity fields

Variable Type Description
id BigInt ID of activity
Name String Name of activity
Date Date Date of activity
LocationID BigInt ID of location
Location String Name of location
Starttime String Start time (HH:MM)
Endtime String End time (HH:MM)
Teacher String Name of teacher
TeacherID BigInt ID of teacher
Teacher2 String Name of teacher2
TeacherID2 BigInt ID of teacher2