events
List events
Retrieves a list of events.
Request
HTTP GET to /events
Parameters
Name | Required | Example | Description | Data type | Default |
---|---|---|---|---|---|
includebooking | No | includebooking=true | Defines if a user must be logged on and if current booking terms & conditions should be enforced. | Boolean | false |
includeparticipants | No | includeparticipants=true | List the participants | Boolean | false |
Filter
Name | Example | Description | Date type | Default |
---|---|---|---|---|
businessunitids | businessunitid=4,11 | Only events for the specified business units | ID-list | All |
productlabelid | productlabelid=56 | Only events with the specified product label | ID | All |
bookablefrominternet | bookablefrominternet=true | Only events that are available on the internet | Boolean | True |
resourceid | resourceid=12 | Only events where the specified resource is booked | ID | All |
ongoingdate | ongoingdate=2016-05-23 | Only events that are ongoing the given date | Date | Null |
startdate | startdate=2017-03-10 | Only events that starts this date or later | Date | Null |
enddate | enddate=2017-04-20 | Only events that ends this date or earlier | Date | Null |
publishstartdate | publishstartdate=2017-01-01 | Only events that starts publishing this date or later | Date | Null |
publishenddate | publishenddate=2017-01-31 | Only events that ends publishing this date or earlier | Date | Null |
When none of the date filters are specified, only events that have not yet ended will be returned.
Example:
APIURL/events.xml?apikey=338934897438&businessunitid=334&startdate=2017-03-10
Response
Tag | Format | Exempel | Förklaring |
---|---|---|---|
events |
| <events> | Events-tag |
event |
| <event> | Represents an event |
id | ID | <id>12</id> | Event ID |
name | String | <name>Swimming for toddlers</name> | Event name |
code | String | <code>2015STOD</code> | Event code |
productid | ID | <productid>575</productid> | ID of event product |
description | String | <description>This swimming course is for children 2-4 years of age with some water experience.</description> | Description of event |
lastupdate | Time | <lastupdate>2015-01-01 23:00</lastupdate> | When the event was last modified |
productdescription | String | <productdescription>Swimming</productdescription> | Description of the event product |
numberofoccasions | Integer | <numberofoccasions>12</numberofoccasions> | Number of classes |
time | Time | <time>13:45</time> | When the event starts, empty if no time is set |
startdate | Date | <startdate>2015-02-01</startdate> | Start date |
enddate | Date | <enddate>2015-04-30</enddate> | End date |
publishstart | Time | <publishstart>2015-01-01 23:00</publishstart> | Start date for when the event is published (The event will still be accessible from the API) |
publishend | Time | <publishend>2015-02-01 23:10</publishend> | End date for when the event is no longer published |
bookableslots | Integer | <bookableslots>12</bookableslots> | Bookable spots |
filledslots | Integer | <filledslots>12</filledslots> | Booked spots |
registered | Boolean | <registered>false</registered> | If the logged on user is already booked on this event |
bookableearliest | Time | <bookableearliest><timepoint>timestamp>1337335200</timestamp><datetime>2015-01-18 12:00</datetime><date>2015-01-18</date><time>12:00</time></timepoint></bookableearliest> | When a booking first can be made in accordance witht he booking terms & conditions. See Terms & conditions for bookings and cancellations |
bookablelatest | Time | <bookablelatest><timepoint><timestamp>1337680800</timestamp><datetime>2015-03-01 12:00</datetime><date>2015-03-01</date><time>12:00</time></timepoint></bookablelatest> | The latest a booking can be made in accordance with any booking terms or conditions. |
businessunit |
| <businessunit><id>11</id><name>Main Street Gym</name></businessunit> | The event's business unit. |
orderid | ID | <orderid>105</orderid> | The event's order ID |
participants | <participants><participant><personid>123</personid><firstname>Homer</firstname><lastname>Simpson</lastname><eventbookingid>333</eventbookingid></participant></participants> | The participants |
<events> <event> <id>12</id> <name>Swimming for toddlers</name> <code>2015STOD</code> <productid>575</productid> <description>This swimming course is for children 2-4 years of age with some water experience.</description> <lastupdate>2015-01-01 23:00</lastupdate> <productdescription>Swimming</productdescription> <numberofoccasions>60</numberofoccasions> <time>13:45</time> <startdate>2015-09-01</startdate> <enddate>2015-12-31</enddate> <publishstart>2015-01-01 23:00</publishstart> <publishend>2015-01-01 23:10</publishend> <bookableslots>12</bookableslots> <filledslots>12</filledslots> <registered>false</registered> <bookableearliest> <timepoint> <timestamp>1337335200</timestamp> <datetime>2015-05-18 12:00</datetime> <date>2015-05-18</date> <time>12:00</time> </timepoint> </bookableearliest> <bookablelatest> <timepoint> <timestamp>1337680800</timestamp> <datetime>2015-05-22 12:00</datetime> <date>2015-05-22</date> <time>12:00</time> </timepoint> </bookablelatest> <businessunit> <id>11</id> <name>Main Street Gym</name> </businessunit> <orderid>105</orderid> </event> ... </events>