Appearance
Bookings
Booking List
GET /api/v2/booking_list : List of bookings under a manager.
- Every call expects the following parameters:
resource_id,date_from,date_to,time_from,time_to,show_details resource_idfield should contain the unique ID of the Resource at Locaboo.date_fromanddate_toare the date-range of the bookings to retrieve. The expected format isY-m-d.time_fromandtime_toare the time-range of the bookings to retrieve. The expected format isH:i. This is optional.show_detailsis a flag to retrieve additional information of the bookings. Expected values aretrue|false. This is optional, and defaults tofalse.
Each booking carries created_on (creation timestamp, Y-m-d H:i:s, null for bookings predating timestamp tracking) and created_by (the user who created the booking as {id, name}, or null when unknown). Bookings created via the API or the public widget's guest checkout are attributed to the resource-owning manager.
Example request
GET /api/v2/booking_list?api_secret_key=<api_secret_key>&date_from=2023-10-11&date_to=2023-10-13&show_details=trueExample response
json
{
"data": [
{
"id": 312834,
"title": "",
"resources": [
{
"resource_id": 48,
"resource": "Sample Resource B",
"instances": {
"39518": {
"id": 39518,
"resource_id": 49,
"resource": "Sample Resource B > Kleine Halle",
"from": "2023-10-11 11:00",
"to": "2023-10-11 14:00",
"custom_fields": []
},
"39519": {
"id": 39519,
"resource_id": 49,
"resource": "Sample Resource B > Kleine Halle",
"from": "2023-10-12 11:00",
"to": "2023-10-12 14:00",
"custom_fields": []
}
}
}
],
"custom_fields": {
"48": {
"56": {
"label": "New MF field ",
"value": "Geschäftleitungsmeeting / Managementtagung",
"category": 0
}
}
},
"comments": "",
"customer_id": "21749",
"customer": "DemoStore GmbH",
"color": "#17df26"
},
{
"id": 312838,
"title": "",
"resources": [
{
"resource_id": 48,
"resource": "Sample Resource B",
"instances": {
"39526": {
"id": 39526,
"resource_id": 50,
"resource": "Sample Resource B > Große Halle",
"from": "2023-10-11 00:00",
"to": "2023-10-11 23:59",
"custom_fields": []
},
"39527": {
"id": 39527,
"resource_id": 50,
"resource": "Sample Resource B > Große Halle",
"from": "2023-10-12 00:00",
"to": "2023-10-12 23:59",
"custom_fields": []
},
"39528": {
"id": 39528,
"resource_id": 50,
"resource": "Sample Resource B > Große Halle",
"from": "2023-10-13 00:00",
"to": "2023-10-13 18:00",
"custom_fields": []
}
}
}
],
"custom_fields": {
"48": {
"56": {
"label": "New MF field ",
"value": "Geschäftleitungsmeeting / Managementtagung",
"category": 0
}
}
},
"comments": "",
"customer_id": "21749",
"customer": "DemoStore GmbH",
"color": "#17df26"
},
{
"id": 312886,
"title": "Test booking for api",
"resources": [
{
"resource_id": 5721,
"resource": "Conference Room C",
"instances": {
"39593": {
"id": 39593,
"resource_id": 8795,
"resource": "Conference Room C > The only child",
"from": "2023-10-11 11:00",
"to": "2023-10-11 16:00",
"custom_fields": []
},
"39594": {
"id": 39594,
"resource_id": 8795,
"resource": "Conference Room C > The only child",
"from": "2023-10-12 11:00",
"to": "2023-10-12 16:00",
"custom_fields": {
"5721": {
"49": {
"label": "Radi-O",
"value": "Yo!",
"category": null
},
"58": {
"label": "Your comment",
"value": "Sample comment for API from instance",
"category": 0
},
"56": {
"label": "New MF field ",
"value": "Tagung / Konferenz",
"category": 0
},
"55": {
"label": "Seat Type",
"value": "L shape",
"category": 0
},
"36": {
"label": "Just admin",
"value": "off",
"category": null
},
"33": {
"label": "Manager input field",
"value": "test input field",
"category": null
},
"32": {
"label": "Mumbo Jumbo",
"value": "off",
"category": null
},
"28": {
"label": "Just admin",
"value": "off",
"category": null
},
"22": {
"label": "Manager input field",
"value": "",
"category": null
},
"21": {
"label": "Yolo cb?",
"value": "off",
"category": null
},
"5": {
"label": "Select Field B",
"value": "A",
"category": null
},
"4": {
"label": "Input Field C",
"value": "API input C",
"category": null
},
"1": {
"label": "Test Seats A",
"value": "8",
"category": null
}
}
}
},
"39595": {
"id": 39595,
"resource_id": 8795,
"resource": "Conference Room C > The only child",
"from": "2023-10-13 11:00",
"to": "2023-10-13 16:00",
"custom_fields": []
}
}
}
],
"custom_fields": {
"5721": {
"49": {
"label": "Radi-O",
"value": "Hey",
"category": null
},
"58": {
"label": "Your comment",
"value": "Sample comment for api",
"category": 0
},
"56": {
"label": "New MF field ",
"value": "Tagung / Konferenz",
"category": 0
},
"55": {
"label": "Seat Type",
"value": "L shape",
"category": 0
},
"36": {
"label": "Just admin",
"value": "off",
"category": null
},
"33": {
"label": "Manager input field",
"value": "test input field",
"category": null
},
"32": {
"label": "Mumbo Jumbo",
"value": "on",
"category": null
},
"28": {
"label": "Just admin",
"value": "on",
"category": null
},
"21": {
"label": "Yolo cb?",
"value": "on",
"category": null
},
"5": {
"label": "Select Field B",
"value": "A",
"category": null
},
"4": {
"label": "Input Field C",
"value": "API input C",
"category": null
},
"1": {
"label": "Test Seats A",
"value": "11",
"category": null
}
}
},
"color": "#17df26",
"comments": "",
"customer_id": "21749",
"persons": [],
"customer": "DemoStore GmbH",
"created_on": "2023-10-09 14:32:11",
"created_by": {
"id": 46,
"name": "Max Mustermann"
}
}
],
"total": 3,
"success": true
}Booking
GET /api/v2/booking/<booking-id> : Details of booking based on ID.
The response carries created_on (creation timestamp, Y-m-d H:i:s, null for bookings predating timestamp tracking) and created_by (the user who created the booking as {id, name}, or null when unknown). Bookings created via the API or the public widget's guest checkout are attributed to the resource-owning manager.
entrance_hall is returned as the stored flag of the booking, "1" if it is marked for the Entrance hall widget and "0" if not. Bookings saved before this flag existed also return "0". This is the value stored on the booking, not the effective visibility in the widget: an account whose Entrance hall default is switched on can still show a booking whose stored flag is "0".
Example request
GET /api/v2/booking/312842?api_secret_key=<api_secret_key>Example response
json
{
"data": {
"id": 312842,
"title": "",
"resources": [
{
"resource_id": 5721,
"resource": "Conference Room C",
"instances": [
{
"id": 39535,
"resource_id": 8795,
"resource": "Conference Room C > The only child",
"from": "2023-10-10 05:00",
"to": "2023-10-10 09:00",
"custom_fields": []
},
{
"id": 39536,
"resource_id": 8795,
"resource": "Conference Room C > The only child",
"from": "2023-10-11 05:00",
"to": "2023-10-11 09:00",
"custom_fields": []
},
{
"id": 39537,
"resource_id": 8795,
"resource": "Conference Room C > The only child",
"from": "2023-10-12 05:00",
"to": "2023-10-12 09:00",
"custom_fields": []
}
],
"features": {
"451": {
"rule_interval": "per_quantity",
"rule_price": 10.149,
"rule_name": "Projectors",
"price_cost": 0,
"quantity": "0"
},
"699": {
"rule_interval": "per_hour",
"rule_price": 0,
"rule_name": "t1",
"price_cost": 0,
"quantity": "0"
}
},
"inventory": {
"13": {
"rule_interval": "per_hour",
"rule_price": 2.371,
"rule_name": "Inv_item1",
"price_cost": 0,
"quantity": "0"
}
},
"custom_fields": {
"5721": {
"58": {
"label": "Your comment",
"value": "",
"category": 0
},
"56": {
"label": "New MF field ",
"value": "Geschäftleitungsmeeting / Managementtagung",
"category": 0
},
"36": {
"label": "Just admin",
"value": "off",
"category": null
},
"28": {
"label": "Just admin",
"value": "off",
"category": null
},
"21": {
"label": "Yolo cb?",
"value": "off",
"category": null
},
"5": {
"label": "Select Field B",
"value": "A",
"category": null
},
"4": {
"label": "Input Field C",
"value": "",
"category": null
},
"1": {
"label": "Test Seats A",
"value": "11",
"category": null
}
}
}
}
],
"comments": "",
"customer_id": "21749",
"persons": [],
"color": "#17df26",
"entrance_hall": "1",
"created_on": "2023-10-09 14:32:11",
"created_by": {
"id": 46,
"name": "Max Mustermann"
}
},
"total": 1,
"success": true
}Availability
GET /api/v2/availability : List of available time-slots at resource.
- Every call expects the following parameters:
resource_id,date_from,date_to,time_from,time_to,duration,limit resource_idfield should contain either a single Resource ID or a comma-separated string containing Resource IDs. This is optional.date_fromanddate_toare the date-range of the results to retrieve. The expected format isY-m-d.time_fromandtime_toare the time-range of the results to retrieve. The expected format isH:i. This is optional.durationis the time-duration of the results to retrieve. The expected format isH:i. This is optional, and defaults to 01:00.free_text_field_ids_stris a comma-separated value of all Custom field IDs. The expected format isid1,id2... This is optional. The Custom field IDs can be obtained from theGET /api/v2/resource_listcall, inside thefree_text_fieldslist.free_text_field_conditions_stris a comma-separated value of all Custom field conditions. The expected values areless_than,less_than_et,et,great_than,great_than_et, or empty. This is required iffree_text_field_ids_stris passed. The order is important and should follow the order of the correspondingfree_text_field_ids_strvalue.free_text_field_values_stris a comma-separated value of all Custom field values. The expected format isvalue1,value2... Empty values can also be passed. This is required iffree_text_field_ids_stris passed. The order is important and should follow the order of the correspondingfree_text_field_ids_strvalue.limitis the number of the results to retrieve. This is optional.
Example request
GET /api/v2/availability?resource_id=48&date_from=2018-11-01&date_to=2019-01-01&duration=02:00&free_text_field_ids_str=1,2,3&free_text_field_conditions_str=great_than_et,,et&free_text_field_values_str=0,True,10&limit=4&api_secret_key=<api_secret_key>Example response
json
{
"data":[
{
"resource_id":49,
"dates":{
"2018-11-01":[
{
"time_from":"08:00",
"time_to":"10:00"
},
{
"time_from":"10:00",
"time_to":"12:00"
},
{
"time_from":"12:00",
"time_to":"14:00"
},
{
"time_from":"14:00",
"time_to":"16:00"
}
]
}
},
{
"resource_id":50,
"dates":[
]
}
],
"total":4,
"success":true
}Booking Save
GET /api/v2/booking_save : Create/Update the bookings.
- Every call expects the following parameters:
booking_id,resource_id,date_from,date_to,time_from,time_to,booking_status,customer_first_name,customer_last_name,customer_email,customer_company,customer_salutation,customer_street,customer_zip,customer_phone,customer_city booking_idfield should contain the unique ID of the Booking at Locaboo. This is optional. This field is required only for updating a booking.resource_idfield should contain the unique ID of the Resource at Locaboo.date_fromanddate_toare the date-range of the booking to create. The expected format isY-m-d.time_fromandtime_toare the time-range of the booking to create. The expected format isH:i. This is optional.booking_statusis the status of the booking. Expected values arelive|draft|complete|cancel. This is optional, and defaults tolive.customer_first_nameis the first name of the customer associated with the booking. This is optional.customer_last_nameis the last name of the customer associated with the booking. This is optional.customer_emailis the email of the customer associated with the booking. This is optional.customer_companyis the company name of the customer associated with the booking. This is optional.customer_salutationis the salutation of the customer associated with the booking. Expected values areMr|Ms/Mrs|Pr|Dr. This is optional.customer_streetis the street name of the customer associated with the booking. This is optional.customer_zipis the zip code of the customer associated with the booking. This is optional.customer_phoneis the phone number of the customer associated with the booking. This is optional.customer_cityis the city name of the customer associated with the booking. This is optional.
Example request
GET /api/v2/booking_save?api_secret_key=<api_secret_key>Example response
json
{
"data":[
{
"id":46330,
"message":"Successfully created the booking."
}
],
"total":0,
"success":true
}Booking Add
POST /api/v2/booking_add : Add new booking or booking request.
Every call expects the following parameters:
booking_mode,title,customer_id,persons,recurring,season_id,date_from,date_to,recurrence_type,daily_recurrence,weekly_type_select,weekly_recurrence,monthly_recurrence,yearly_recurrence,time_from,time_to,category_fields,multi_day,main_resource,resource_parts,custom_color,color,entrance_hall,booking_hidden_widget,internal_comments,comments,inventory,servicesbooking_modefield accepts the valuesdirect_booking|booking_request. This is required.titleis the title of the booking. This is optional.customer_idis the customer ID of the customer. This is optional.personsis an array of person IDs for the booking. This is optional.recurringfield accepts the values0if it is a single booking, and1if it is a recurring booking. This is required.season_idis the Season ID if it is a season booking. This is only required for season bookings.date_fromis the start date of the booking in formatYYYY-MM-DD. This is required.date_tois the end date of the booking in formatYYYY-MM-DD. This is required.recurrence_typeis the type of recurring booking. Accepted values areday,week,month,year. This is required ifrecurringis 1.daily_recurrenceis an array that defines the daily recurring timings. Accepted format isphp[ 'from' => '09:00', 'to' => '10:00', 'full_day' => 0 ]Where
full_dayis passed as1if full day booking. This is required ifrecurrence_typeisday.weekly_type_selectis the repeats of weekly recurring. Accepted values areweek,biweek,triweek,quadweek. This is optional, defaults toweek.weekly_recurrenceis an array that defines the weekly recurring timings. Accepted format isphp[ ['day' => 'mon', 'full_day' => 1], ['day' => 'tue', 'from' => '09:00', 'to' => '10:00'] ]Alternatively, it can be passed as a serialized string as well
php'a:2:{i:0;a:2:{s:3:"day";s:3:"mon";s:6:"full_day";i:1;}i:1;a:2:{s:3:"day";s:3:"tue";s:3:"from";s:5:"09:00";s:2:"to";s:5:"10:00";}}'Where
full_dayis passed as1if full day booking. This is required ifrecurrence_typeisweek.monthly_recurrenceis an array that defines the monthly recurring timings. Accepted format isphp[ 'mode' => 'day', 'days' => ['day' => '01', 'month' => '01'], 'from' => '09:00', 'to' => '10:00', 'full_day' => 0 ]Where
modeis passed asday. So it means it repeats every nthdayof every nthmonth.full_dayis passed as1if full day booking.-or-
php[ 'mode' => 'week', 'days' => ['week_number' => 1, 'week_day' => 'tue', 'month' => '01'], 'from' => '09:00', 'to' => '10:00', 'full_day' => 0 ]Where
modeis passed asweek. So it means it repeats every nthweek_numberof everyweek_dayday of every nthmonth.full_dayis passed as1if full day booking. This is required ifrecurrence_typeismonth.yearly_recurrenceis an array that defines the yearly recurring timings. Accepted format isphp[ 'day' => '01', 'month' => '06', 'from' => '09:00', 'to' => '10:00', 'full_day' => 0 ]This means it repeats every nth
dayof every nthmonthof every year.full_dayis passed as1if full day booking. This is required ifrecurrence_typeisyear.time_fromis the start time of the booking in formatHH:MM(24 hr format). This is required ifrecurringis 0. Ifrecurringis 1, then it is still required to be passed as 00:00 (for validation purposes).time_tois the end time of the booking in formatHH:MM(24 hr format). This is required ifrecurringis 0. Ifrecurringis 1, then it is still required to be passed as 00:00 (for validation purposes).category_fieldsis the custom fields for the booking. Allowed format isphp[ 'resource_id' => [ 'free_text_field_id1' => 'value1', 'free_text_field_id2' => 'value2', ], ]Eg:
php[ '48' => [ '52' => '21', '58' => 'B' ], '5721' => [ '5' => 'A' ] ]This is optional.
multi_dayfield accepts the values0if it is a booking with from and to time, and1if it is a full day booking. This is optional and defaults to0.main_resourceis the ID of the main resource of the booking. This is required.resource_partsis an array of main resources and their parts for the booking. Allowed format isphp[ 48 => [49], 5721 => [8795] ]Alternatively, it can be passed as a JSON encoded string as well
php'{"48":[49],"5721":[8795]}'This is required.
custom_colorfield accepts the values0if no custom color is defined, and1if a custom color is defined. This is optional and defaults to0.coloris the custom color value in Hex Code format. Eg#ff0000. This is required ifcustom_coloris1.entrance_hallfield accepts the values1if the booking needs to be shown in the Entrance hall widget, and0if not needed. This is optional and defaults to0.booking_hidden_widgetfield accepts the values1if the booking needs to be hidden in the widget, and0if not hidden. This is optional and defaults to0.internal_commentsis the internal comments for the booking. This is optional.commentsis the public comments for the booking. This is optional.inventoryis an array of inventory booked for this booking. Allowed format isphp[ 'resource_id' => [ 'inventory_id' => [ 'checked' => 'on', 'quantity' => 1 ] ] ]Eg:
php[ '48' => [ '1317' => [ 'checked' => 'on', 'quantity' => 1 ] ] ]This is optional.
servicesis an array of services booked for this booking. Allowed format isphp[ 'resource_id' => [ 'service_id' => [ 'checked' => 'on', 'quantity' => 1 ] ] ]Eg:
php[ '48' => [ '1317' => [ 'checked' => 'on', 'quantity' => 1 ] ] ]This is optional.
Example request
POST /api/v2/booking_addExample response
json
{
"data":[
{
"id":46330,
"message":"Successfully created the booking."
}
],
"total":1,
"success":true
}