Page tree
Skip to end of metadata
Go to start of metadata

List classes

Retrieves a list of classes/activities

The list is sorted by start time.

A user has a subscription that gives him rights to book a class. These rights are not reflected in the API.

Request

HTTP GET to /activities

Parameters

Name

Required

Value

Description

Data type

includebooking

No

includebooking=true

Parameter used to decide if a logged on user is required or not and if the bookingID and waiting list position should be included in the response. The variable waitinglistsize is always included if a waiting list is used.

Boolean

businessunitids

Ja

businessunitids=4,334

Business units/facilities

ID-list

Filter

Name

Value

Description

Date type

Default

startdate

startdate=2015-02-02

Will return only classes that start after the specified date

Date

today

enddate

enddate=2015-02-02

Will return only classes that start after the specified date

Date

In a fortnight

productids

productids=12,23

Will return only classes of the specified products

ID-list

 

productlabelids

productlabelids=56,3

Will return only classes belonging to the specified product lables.

ID-list

 

productgroupid

productgroupid=23,17

Will reutrn only classes categorized in the specified product groups

ID-list

 

bookablefrominternet

bookablefrominternet=true

Will return only classes that are activated for internet bookings

Boolean

true

resourceidsresourceids=6,11Will return only classes using the specified resourcesID-list 

Example:

APIURL/activities.xml?apikey=338934897438&businessunitids=4,334&product=12,23

Response

Tag

Format

Example

Description

activities

 

<activities>

Activity-tag encloses activities

startdate

Date

<startdate>2015-12-24</startdate>

Specifies the date that the class first starts

enddate

Date

<enddate>2015-12-24</enddate>

Specifies the date the class last starts after

activity

 

 

A specific scheduled class

id

ID

<id>12</id>

Unique ID

businessunit

 

<businessunit><id>11</id><name>Main Street Gym</name></businessunit>

The business unit/facility the booking belongs to

start

Time

<start><timepoint><timestamp>1337164200</timestamp><datetime>2015-05-16 12:30</datetime><date>2015-05-16</date><time>12:30</time></timepoint></start>

The start time for the booking

end

Time

<end><timepoint><timestamp>1337167800</timestamp><datetime>2015-05-16 13:30</datetime><date>2015-05-16</date><time>13:30</time></timepoint></end>

The end time for the booking

product

 

<product>see products</product>

The product behind the booking. For more details please see products.

resources

 

 

List of resources

resource

String

<resource><id>31</id><name>Marge Simpson</name><type>Staff</type></resource>

Staff, instructor or room used for the class

bookableearliest

Time

<bookableearliest><timepoint><timestamp>1337342800</timestamp><datetime>2015-05-26 23:30</datetime><date>2015-05-26</date><time>23:30</time></timepoint></bookableearliest>

The earliest a customer can book themselves into the class

bookablelatest

Time

<bookablelatest><timepoint><timestamp>1337235000</timestamp><datetime>2015-05-30 12:00</datetime><date>2015-05-30</date><time>12:00</time></timepoint></bookablelatest>

The latest a customer can book themselves into the class

debookablelatestTime<debookablelatest><timepoint><timestamp>1337235000</timestamp><datetime>2015-05-29 12:00</datetime><date>2015-05-30</date><time>12:00</time></timepoint></debookablelatest>The latest a customer can debook themselve from a class. If debookablelatest is equal to start-time (see start), there are no debookingrules.
externalmessageString

<externalmessage></externalmessage>

External message

freeslots

Integer

<freeslots>10</freeslots>

Available places. The class may have dropin slots that are reserved and can only be booked on location. If bookableslots=0 then freeslots can be > 0.

bookableslots

Integer

<bookableslots>10</bookableslots>

Number of bookable places remaining

totalslots

Integer

<totalslots>42</totalslots>

Total number of places

slotsreservedfordropinInteger<slotsreservedfordropin>14</slotsreservedfordropin>Number of places reserved for dropin customers

cancelled

Boolean

<cancelled>false</cancelled>

The class is cancelled

waitinglistsize

Integer

<waitinglistsize>3</waitinglistsize>

The number of people on the waiting list. There is no maximum limit.

waitinglistpositionInteger

<waitinglistposition>2</waitinglistposition>

A specific customer's place in the waiting list.

bookingid

ID

<bookingid>3456</bookingid>

ID of the booking or waiting list space

bookingtype

String

<bookingtype>ordinary</bookingtype>

Type of place

participants <participants><participant><id>22</id><personid>23</personid><firstname>John</firstname><lastname>Doe</lastname></participant></participants>Participants of the class
<activities>
  <startdate>2012-12-24</startdate>
  <enddate>2012-12-24</enddate>
  <activity>
    <id>12</id>
    <businessunit>
      <id>11</id>
      <name>Main Street Gym</name>
    </businessunit>
    <start>
      <timepoint>
        <timestamp>1337164200</timestamp>
        <datetime>2015-05-16 12:30</datetime>
        <date>2015-05-16</date>
        <time>12:30</time>
      </timepoint>
    </start>
    <end>
      <timepoint>
        <timestamp>1337167800</timestamp>
        <datetime>2015-05-16 13:30</datetime>
        <date>2015-05-16</date>
        <time>13:30</time>
      </timepoint>
    </end>
    <product>#see products#</product>
    <resources>
      <resource>
        <id>31</id>
        <name>Marge Simpson</name>
        <type>Staff</type>
	      <employee>
		    <id>2</id>
            <name>Homer Simpson</name>
          </employee>
        <issubstitute>true</issubstitute>
      </resource>
    </resources>
    <bookableearliest>
      <timepoint>
        <timestamp>1337342800</timestamp>
        <datetime>2015-05-26 23:30</datetime>
        <date>2015-05-26</date>
        <time>23:30</time>
      </timepoint>
    </bookableearliest>
	<bookablelatest>
      <timepoint>
        <timestamp>1337342800</timestamp>
        <datetime>2015-05-26 23:30</datetime>
        <date>2015-05-26</date>
        <time>23:30</time>
      </timepoint>
    </bookablelatest>
	<debookablelatest>
      <timepoint>
        <timestamp>1337342800</timestamp>
        <datetime>2015-05-25 23:30</datetime>
        <date>2015-05-26</date>
        <time>23:30</time>
      </timepoint>
    </debookablelatest>
	<externalmessage></externalmessage>
    <freeslots>10</freeslots>
    <bookableslots>10</bookableslots>
    <totalslots>42</totalslots>
	<slotsreservedfordropin>14</slotsreservedfordropin>
    <canceled>false</canceled>
    <waitinglistsize>3</waitinglistsize>
    <waitinglistposition>2</waitinglistposition>
    <bookingid>3456</bookingid>
    <bookingtype>ordinary</bookingtype>
	<participants>
   		<participant>
            <id>22</id>
            <personid>23</personid>
            <firstname>John</firstname>
            <lastname>Doe</lastname>
        </participant>
    </participants>
  </activity> 
  <activity>
  ...
  </activity> 
</activities>

Tag

Description

freeslots

The total number of places available. (including dropin)

slotsreservedfordropinA fixed number of places reserved for dropin. These are not bookable.

waitinglistsize

The length of the waitinglist. If you were to book a place right now your que number would be waitinglistsize + 1
waitinglistpositionYour place in the waitinglist.

bookableslots

The number of places that are bookable - reserved and drop-in are already subtracted from this number. If a waiting list is used you can book a place in the waiting list when bookableslots=0

totalslots

The totalt number of places

 

<participants>
        <participant>
            <id>22</id>
            <personid>23</personid>
            <firstname>John</firstname>
            <lastname>Doe</lastname>
        </participant>
    </participants>
  • No labels