The following are examples of sample API invocations to carry out common tasks.
Note that the secretKey and apiKey parameters in the examples are fictional.
GET https://api.bookeo.com/v2/settings/products?secretKey=iWQlbsuksGUqStFPk46WVjpGO7vVQoeO&type=fixed&apiKey=A4ETXWYN6WR6EYTU7JYAC285CKPMM3141BEAB14D7 HTTP/1.1
Host: api.bookeo.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
HTTP/1.1 200 OK
Date: Mon, 30 Mar 2015 05:57:16 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: private, max-age=0, no-cache, no-store
Pragma: no-cache
Content-Language: en-US
Content-Type: application/json
Vary: Accept-Encoding, User-Agent
Content-Length: 6376
{
"data": [
{
"name": "Advanced",
"description": "\u003cp\u003egeneral field with \u003cstrong\u003ebold\u003c/strong\u003e\u003c/p\u003e",
"images": [
{
"url": "https://www-85a.bookeo.net/bookeo/cfile/285CKPMM3141BEAB14D7/1425947577790_EP3EMYTJ34U7CHT9AFFEEXAT3RJCTL9Y_1000_812.png"
}
],
"productId": "285NTAMEN141BEACA61A",
"productCode": "ADV1",
"bookingLimits": [
{
"min": 1,
"max": 2
},
{
"peopleCategoryId": "Cadults",
"min": 0,
"max": 1
},
{
"peopleCategoryId": "NMCKEA",
"min": 0,
"max": 1
},
{
"peopleCategoryId": "Cchildren",
"min": 0,
"max": 1
}
],
"defaultRates": [
{
"peopleCategoryId": "Cadults",
"price": {
"amount": "73",
"currency": "AUD"
}
},
{
"peopleCategoryId": "NMCKEA",
"price": {
"amount": "73",
"currency": "AUD"
}
},
{
"peopleCategoryId": "Cchildren",
"price": {
"amount": "73",
"currency": "AUD"
}
}
],
"duration": {
"days": 0,
"hours": 1,
"minutes": 0
},
"type": "fixed",
"membersOnly": false,
"prepaidOnly": false,
"acceptDeny": false,
"apiBookingsAllowed": true
},
{
"name": "Beginners",
"description": "",
"productId": "285RNJ9RT141BEAC4082",
"productCode": "BEG1",
"bookingLimits": [
{
"min": 1,
"max": 3
},
{
"peopleCategoryId": "Cadults",
"min": 0,
"max": 1
},
{
"peopleCategoryId": "NMCKEA",
"min": 0,
"max": 1
},
{
"peopleCategoryId": "Cchildren",
"min": 0,
"max": 1
},
{
"peopleCategoryId": "Cinfants",
"min": 0,
"max": 1
}
],
"defaultRates": [
{
"peopleCategoryId": "Cadults",
"price": {
"amount": "5",
"currency": "AUD"
}
},
{
"peopleCategoryId": "NMCKEA",
"price": {
"amount": "5",
"currency": "AUD"
}
},
{
"peopleCategoryId": "Cchildren",
"price": {
"amount": "5",
"currency": "AUD"
}
},
{
"peopleCategoryId": "Cinfants",
"price": {
"amount": "5",
"currency": "AUD"
}
}
],
"duration": {
"days": 0,
"hours": 1,
"minutes": 0
},
"type": "fixed",
"membersOnly": false,
"prepaidOnly": false,
"acceptDeny": false,
"apiBookingsAllowed": true
},
... other products ...
],
"info": {
"totalItems": 8,
"totalPages": 1,
"currentPage": 1
}
}
NB please note there is also an endpoint /availability/matchingslots. Use the one that best suits your application.
GET https://api.bookeo.com/v2/availability/slots?startTime=2015%2d03%2d30T16%3a57%3a00%2b11%3a00&secretKey=iWQlbsuksGUqStFPk46WVjpGO7vVQoeO&productId=285RNJ9RT141BEAC4082&endTime=2015%2d04%2d13T16%3a57%3a00%2b10%3a00&apiKey=A4ETXWYN6WR6EYTU7JYAC285CKPMM3141BEAB14D7 HTTP/1.1
Host: api.bookeo.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
HTTP/1.1 200 OK
Date: Mon, 30 Mar 2015 05:57:19 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: private, max-age=0, no-cache, no-store
Pragma: no-cache
Content-Language: en-US
Content-Type: application/json
Vary: Accept-Encoding, User-Agent
Content-Length: 8141
{
"slots": [
{
"eventId": "285KX7H3M146B326D284_2015-03-31",
"startTime": "2015-03-31T09:00:00+11:00",
"endTime": "2015-03-31T10:00:00+11:00",
"numSeatsAvailable": 6,
"resources": [
{
"name": "Jim",
"id": "2857WTTLT141BEAC4070"
}
]
},
{
"eventId": "285YN6P3P146B326D284_2015-03-31",
"startTime": "2015-03-31T12:00:00+11:00",
"endTime": "2015-03-31T13:00:00+11:00",
"numSeatsAvailable": 10,
"resources": [
{
"name": "Sally",
"id": "285NLLCY6141BEAC4076"
}
]
},
… other slots …
],
"info": {
"totalItems": 26,
"totalPages": 1,
"currentPage": 1
}
}
POST https://api.bookeo.com/v2/holds?secretKey=iWQlbsuksGUqStFPk46WVjpGO7vVQoeO&apiKey=A4ETXWYN6WR6EYTU7JYAC285CKPMM3141BEAB14D7 HTTP/1.1
Content-Type: application/json
Content-Length: 662
Host: api.bookeo.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
{
"eventId": "285KX7H3M146B326D284_2015-03-31",
"customer": {
"firstName": "Joe",
"lastName": "Smith",
"emailAddress": "eng@bookeo.com",
"phoneNumbers": [
{
"number": "123456",
"type": "mobile"
}
]
},
"participants": {
"numbers": [
{
"peopleCategoryId": "Cadults",
"number": 1
},
{
"peopleCategoryId": "Cchildren",
"number": 1
}
]
},
"productId": "285RNJ9RT141BEAC4082"
}
HTTP/1.1 201 Created
Date: Mon, 30 Mar 2015 05:57:21 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: private, max-age=0, no-cache, no-store
Pragma: no-cache
Content-Language: en-US
Location: https://api.bookeo.com/v2/holds/xp8U88IRa0FBQQrA
Content-Type: application/json
Content-Length: 0
This method simply gets the details from the URL in the “Location” header of the previous response.
GET https://api.bookeo.com/v2/holds/xp8U88IRa0FBQQrA?secretKey=iWQlbsuksGUqStFPk46WVjpGO7vVQoeO&apiKey=A4ETXWYN6WR6EYTU7JYAC285CKPMM3141BEAB14D7 HTTP/1.1
Host: api.bookeo.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
HTTP/1.1 200 OK
Date: Mon, 30 Mar 2015 05:57:22 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: private, max-age=0, no-cache, no-store
Pragma: no-cache
Content-Language: en-US
Content-Type: application/json
Vary: Accept-Encoding, User-Agent
Content-Length: 382
{
"id": "xp8U88IRa0FBQQrA",
"price": {
"totalGross": {
"amount": "27",
"currency": "AUD"
},
"totalNet": {
"amount": "20",
"currency": "AUD"
},
"totalTaxes": {
"amount": "7",
"currency": "AUD"
},
"totalPaid": {
"amount": "0",
"currency": "AUD"
}
},
"expiration": "2015-03-30T17:02:00+11:00"
}
Note this call also removes the hold previously created, and asks Bookeo to send relevant notifications to users and customer.
Also note how the HTTP response contains a “Location” header that contains the absolute URI of the resource (booking) just created, which also includes the booking number.
POST https://api.bookeo.com/v2/bookings?previousHoldId=xp8U88IRa0FBQQrA&secretKey=iWQlbsuksGUqStFPk46WVjpGO7vVQoeO¬ifyUsers=true&apiKey=A4ETXWYN6WR6EYTU7JYAC285CKPMM3141BEAB14D7¬ifyCustomer=true HTTP/1.1
Content-Type: application/json
Content-Length: 885
Host: api.bookeo.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
{
"eventId": "285KX7H3M146B326D284_2015-03-31",
"customer": {
"firstName": "Joe",
"lastName": "Smith",
"emailAddress": "eng@bookeo.com",
"phoneNumbers": [
{
"number": "123456",
"type": "mobile"
}
]
},
"participants": {
"numbers": [
{
"peopleCategoryId": "Cadults",
"number": 1
},
{
"peopleCategoryId": "Cchildren",
"number": 1
}
]
},
"productId": "285RNJ9RT141BEAC4082",
"initialPayments": [
{
"reason": "Initial deposit",
"comment": "This is a custom comment",
"amount": {
"amount": "5",
"currency": "AUD"
},
"paymentMethod": "creditCard"
}
]
}
HTTP/1.1 201 Created
Date: Mon, 30 Mar 2015 05:57:24 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: private, max-age=0, no-cache, no-store
Pragma: no-cache
Content-Language: en-US
Location: https://api.bookeo.com/v2/bookings/85503303717987
Content-Type: application/json
Content-Length: 0