MIDAS API

get_bookings

Returns all bookings between two dates/times
Required ParametersPossible ValuesDescription
startValid date and time
(Format: YYYYMMDDHHMM)
Sets the start of the window for which bookings should be returned
endValid date and time
(Format: YYYYMMDDHHMM)
Sets the end of the window for which bookings should be returned
Optional ParametersPossible ValuesDescription
clientClient IDLimits returned bookings to a specific client, based on a Client ID (which may first be obtained via a "get_client" call)
filter_fieldCustom Booking FieldThe internal name of a custom booking field against which to filter bookings based upon its corresponding "filter_string" value (see below). For eexample, if you have a custom booking field named "My Field", pass the value "my_field"
filter_stringStringUsed in conjunction with "filter_field" above to return bookings which match a specified value of a custom booking field.
filter_typecontains | not_contains | begins_with | ends_with | greater_than | less_than | not_equalsUsed in conjuction with "filter_string" above to control how matching bookings are determined. For example, if "filter_field" was set to "my_field", "field_string" was set to "room", and "filter_type" was set to "begins_with", bookings will be returned where the value of the custom "My Field" booking field stars with the phrase "room" - i.e. "room 1", "room 2", etc would be matched, whereas "meeting room" wouldn't be matched as it doesn't start with the phrase "room". "greater_than" and "less_than" values relate to numeric booking fields. If the "filter_type" parameter is omitted, an exact match with the "filter_string" will be enforced.
filter_casesensitive0 | 1Controls the case sensiivity of the "filter_string" parameter above. If set to "1" booking will only be returned which exact match the "filter_string". For example, if "filter_string" contained "room" and "filter_casesensitivity" was set to "1", only bookings matching "room" (and not "Room") would be returned. If the "filter_casesensitive" parameter is omitted, or explicitly set to "0", the case of the "filter_string" value will be ignored.
modifed_beforeValid date and time
(Format: YYYYMMDDHHMM)
Limits returned bookings to those which were last modified before a specified date/time
modifed_sinceValid date and time
(Format: YYYYMMDDHHMM)
Limits returned bookings to those which were last modified after a specified date/time
typeBooking TypeLimits returned bookings to a specific booking type
venueVenue name | Venue IDLimits returned bookings to a specific venue name, venue ID, or comma separated list of venue IDs
statusall | request | deletedControls which bookings are returned. "request" will only return booking requests. "deleted" will only return deleted bookings. "all" will return all bookings (including deleted bookings and booking requests). If this parameter is omitted only confirmed bookings will be returned
Example Response
↓ Show
[
	{
	"id":"222",
	"start":"5/4/2013 @ 13:00",
	"end":"5/4/2013 @ 14:00",
	"venue_id":"3",
	"venue":"Room 3",
	"client":"Some User (Some Org)",
	"type":"Community",
	"attendees":"30",
	"notes":"",
	"resources":[
		{
		"resource":"Laptop",
		"qty":"2"
		},
		{
		"resource":"Projector",
		"qty":"1"
		}
		],
	"invoice":"MIDAS00001",
	"history":[
		{
		"action":"Added",
		"date":"2/4/2013 @ 08:23",
		"user":"Joe Bloggs"
		},
		{
		"action":"Modified",
		"date":"2/4/2013 @ 16:52",
		"user":"Joe Bloggs"
		}
		]
	},
	{
	"id":"223",
	"start":"5/4/2013 @ 14:15",
	"end":"5/4/2013 @ 16:30",
	"venue_id":"4",
	"venue":"Room 4",
	"client":"Some User (Some Org)",
	"type":"Community",
	"attendees":"40",
	"notes":"",
	"resources":[],
	"invoice":"MIDAS00001",
	"history":[
		{
		"action":"Added",
		"date":"2/4/2013 @ 08:25",
		"user":"Joe Bloggs"
		}
		]
	},
	"status":"confirmed"
]
Variables ReturnedDescription
idInternal Booking ID
startStart date/time of booking
endEnd date/time of booking
venue_idInternal ID of the venue
venueName of the venue
clientClient the booking is for
typeBooking Type
attendeesEstimated number of people attending booking
notesBooking Notes
resourcesResources assigned to booking
resourceThe name of the resource
qtyThe quantity of the resource
invoiceInvoice in which the booking appears
historyBooking history
actionThe action performed. This will be one of the following:
"Booking Request Received", "Added", "Modified", "Deleted", "Restored", or "Invoice Created"
dateThe date/time the action occurred
userThe user who performed the action
custom fieldsAny custom booking fields setup in your MIDAS will also be returned
statusDenotes whether the booking is a "request", a "confirmed" booking, or whether it has been "deleted"