Table of Contents
- API Usage Guide
- API Command Reference
- add_booking
- add_client
- add_invoice
- add_resource
- approve_request
- authenticate_user
- del_booking
- del_bookings
- del_client
- del_invoice
- del_resource
- email_client
- gen_invoice
- get_activity
- get_availability
- get_booking
- get_booking_type
- get_booking_types
- get_bookings
- get_client
- get_consumable_levels
- get_invoice
- get_invoices
- get_messages
- get_reminders
- get_resource
- get_resource_availability
- get_setting
- get_template
- get_user
- get_users_logged_in
- get_venue
- get_venue_groups
- get_venues
- get_venues_in_group
- get_venues_in_use
- get_watches
- mod_booking
- mod_client
- mod_invoice
- mod_resource
- mod_venue
- notify_user
- reject_request
- restore_booking
- set_setting
- set_template
- util_api_usage
- util_from_epoch
- util_to_epoch
- Appendix A - Activity Codes
- Appendix B - Setting Names
- Appendix C - Error Handling
- Code Samples
- Troubleshooting
- Release Notes
← Hide Table of Contents
MIDAS API: add_booking
Available in API 2.0+
Adds a new bookingRequired Parameters | Possible Values | Description |
start | Valid date and time (Format: YYYYMMDDHHMM) | Booking start time |
end | Valid date and time (Format: YYYYMMDDHHMM) | Booking end time |
venue | Venue ID | Venue Name | The unique numeric ID or the name of the venue the booking is for |
Optional Parameters | Possible Values | Description |
pre | Number | The number of minutes setup time before the booking start time |
post | Number | The number of minutes breakdown time after the booking end time |
client | Client ID | The numeric ID of the existing client that the booking to be added is for |
type | Type ID | Type Name | The numeric ID of the Booking Type, or the name of the Booking Type the booking should be assigned |
attendees | Number | The number of booking attendees |
notes | String | Notes about the booking |
resources | Quantity & Resource ID | Resource Name | Resources to be added to the booking. Values should be passed as "qty|resource (ID or name)". For example, to add 2 Tables to a booking, pass "2|Tables". This parameter can be added multiple times to add further resources |
accept_limited_resources | 0 | 1 | For bookings with Resources, this parameter determines whether those bookings should still be added if the quantity of resources requested isn't available. For example, if you add 10 Tables to a booking, yet only 5 Tables are available, an error will be returned and the booking won't be added. However, passing the accept_limited_resources parameter with a value of "1 " will add the booking, but with reduced resource quantities (in the previous example, this would mean that only 5 Tables would be added to the booking, instead of the desired 10) |
no_watches | 0 | 1 | Setting the "no_watches " parameter to "1 " will suppress generation of Watch notifications for users who are monitoring new bookings, otherwise omitting this parameter (or setting it to "0 ") will allow Watch notifications to be generated accordingly |
status | request | confirmed | If omitted or set to "confirmed ", bookings will be added.If set to " request ", the booking will be added as a provisional booking "request" only |
custom fields | Custom value | If you've defined custom booking fields in your MIDAS, you can optionally specify values for these fields for the booking you're adding. For example, if you have a custom field named "My Custom Field", you would pass the parameter " my_custom_field " together with the value you wish to set |
Example Response |
{ "booking_added":"123" } |
Variables Returned (on success) | Description |
booking_added | A unique booking ID corresponding the newly added booking |
Variables Returned (on error) | Description |
error | The reason why the booking couldn't be added. Examples include:
Unavailable (clashes with an existing booking)
Unavailable - Blocked By Meeting Room 1
45 Attendees will exceed the maximum capacity of Meeting Room 1 (15)
Outside Operating Hours
Venue unavailable from 1/1/2015
Venue unavailable between 1/1/2015-1/2/2015
Venue not available until 1/1/2015
Only x5 Tables Available
|