servicebookings
List service bookings
List service bookings that belong to the logged on user. This call requires HTTP-authentication.
If a level 3 API key is used it is possible to list all service bookings for a specific resource (show all bookings for a specific conference room, instructor etc.).
Call
HTTP GET to /servicebookings
Filter
Name | Example value | Description | Datatype | Default |
---|---|---|---|---|
startdate | startdate=2012-02-02 | Return only bookings that start after specificed date. | Date | today |
enddate | enddate=2012-02-02 | Return only bookings that start before specified date. | Date | in 14 days |
businessunitids | businessunitids=6,34 | Business unit/facility | ID-list |
|
resourceid | resourceid=4 | Resource | ID | |
showallocated | showallocated=true | For users that are staff in BRP this will show all their current bookings where they are the resource providing these bookings, not the actual customer. | Boolean | |
orderid | orderid=117 | Order ID | ID |
Example for displaying all service bookings for a specific person/customer:
GET:APIURL/servicebookings.xml?apikey=338934897438
Example for displaying specific user's work shifts:
GET:APIURL/servicebookings.xml?apikey=338934897438&showallocated=true
Response
Tag | Format | Example | Description |
---|---|---|---|
servicebookings |
| <servicebookings> | servicebookings tag encloses bookings. |
id | ID | <id>12</id> | Unique ID |
order |
| <order><id>487</id><number>300</number><preliminary>true</preliminary></order> | The order that contains the booking. |
businessunit |
| <businessunit><id>11</id><name>Center</name></businessunit> | The bookings business unit/facility |
start | Time | <start><timepoint><timestamp>1102082400</timestamp><datetime>2004-12-03 15:00</datetime><date>2004-12-03</date><time>15:00</time></timepoint></start> | The start time of the service booking |
end | Time | <end><timepoint><timestamp>1102086000</timestamp><datetime>2004-12-03 16:00</datetime><date>2004-12-03</date><time>16:00</time></timepoint></end> | The end time of the service booking |
product |
| <product>#see products#</product> | The actual product used for the service booking. For more details please visit products |
resources |
| <resources> | A list containing booked resources |
resource |
| <resource><id>7</id><name>Auditorium</name><type>Lokal</type> <isemployee>false</isemployee> <employee/> </resource> | Resource |
externalmessage | String | <externalmessage>Extra paper and pencils will be placed by the chalkboard</externalmessage> | External messages for specfic service booking |
internalmessage | String | <internalmessage> Internal message </internalmessage> | Internal message for specific service booking |
<servicebookings> <servicebooking> <id>12</id> <order> <id>487</id> <number>300</number> <preliminary>true</preliminary> </order> <businessunit> <id>11</id> <name>Center</name> </businessunit> <start> <timepoint> <timestamp>1102082400</timestamp> <datetime>2004-12-03 15:00</datetime> <date>2004-12-03</date> <time>15:00</time> </timepoint> </start> <end> <timepoint> <timestamp>1102086000</timestamp> <datetime>2004-12-03 16:00</datetime> <date>2004-12-03</date> <time>16:00</time> </timepoint> </end> <product>#se produkter#</product> <resources> <resource> <id>7</id> <name>Auditorium</name> <type>Lokal</type> <isemployee>false</isemployee> <employee/> </resource> </resources> <externalmessage>Extra paper and pencils will be placed by the chalkboard</externalmessage> <internalmessage>Internal message</internalmessage> <participants> <participant> <id>22</id> <personid>23</personid> <firstname>John</firstname> <lastname>Doe</lastname> </participant> </participants> </servicebooking> ... </servicebookings>
Modify servicebooking
Modifies an existing servicebooking for a logged in user.
Note: If apikey of level 3 is used person should be identified with param personid=x
Request
PUT:APIURL/servicebookings.json?apikey=338934897438 { "id":1, "participantfirstname":"John", "participantlastname":"Doe" }
Parameters
Name | Example | Description | Datatype | Required |
---|---|---|---|---|
id | id=1 | Servicebooking id | ID | X |
participantfirstname | participantfirstname=John | Open text field that can be used to specify first name of a participant other than the customer that has made the booking | String | |
participantlastname | participantlastname=Doe | Open text field that can be used to specify last name of a participant other than the customer that has made the booking | String | |
participantid | participantid=7 | The ID of the person being booked as a participant. If specified participantfirstname and participantlastname will be ignored | ID | |
anonymous | anonymous=true | Required if the servicebooking belongs to an anonymous order | Boolean | X* |
internalmessage | internalmessage=internal message | Internal message on service booking | String | |
externalmessage | externalmessage=External message | External message on service booking | String |
Response
The same as the listing of the servicebooking