Bookings Page


Overview

Returns the data available on the bookings page.


GET /en/bookings/calendar

Gets the data representing the bookings calendar page. It does not return any bookings To obtain booking data, check the FullCalendarBookings endpoint.

GET /en/bookings/calendar
Parameters: 

date: the date to show the calendar.
group: the name of a resource group (optional)
showAll: false to return only the bookings of the logged in member. true (default) otherwise.
onlyEvents: true to show only events
resourceId: the id of the resource to show
resourceUniqueId: the uniqueId of the resource to show (even if not visible)
resourceTypeId: the id of the resource type
{
  "ResourceTypes": [
    {
      "Name": "Rooms",
      "Id": 19448429,
      "IdString": "19448429",
      "UpdatedOn": "2016-05-29T10:17:45",
      "CreatedOn": "2016-05-29T10:17:45",
      "UniqueId": "fa807f50-2428-40b4-ab8a-06bb7801f9fd",
      "IsNull": false
    },
    {
      "Name": "Event Space",
      "Id": 20324304,
      "IdString": "20324304",
      "UpdatedOn": "2016-08-03T00:45:00",
      "CreatedOn": "2016-08-03T00:45:00",
      "UniqueId": "b9b86daf-10a1-47bb-9570-6e9e0510c6d3",
      "IsNull": false
    }
  ],
  "SelectedResourceType": null,
  "OnlyEvents": false,
  "ShowAll": true,
  "AllShifts": [
    {
      "ResourceId": 19449430,
      "Start": "09:00",
      "End": "13:00",
      "Name": "MORNING (9AM TO 1PM)"
    },
    {
      "ResourceId": 19449430,
      "Start": "14:00",
      "End": "18:00",
      "Name": " EVENING (2PM - 6PM)"
    },
    {
      "ResourceId": 19449430,
      "Start": "09:00",
      "End": "18:00",
      "Name": "ALL DAY (9AM - 6PM)"
    }
  ],
  "CurrentMonthName": "January 2017",
  "PreviousMonth": "2016-12-19T00:00:00",
  "NextMonth": "2017-02-19T00:00:00",
  "CurrentDate": "2017-01-19T00:00:00",
  "Resources": [
    {
      "Name": "Room 2",
      "GroupName": "Large Rooms",
      "Description": null,
      "ResourceTypeName": "Rooms",
      "ResourceType": {},
      "HasImage": true,
      "Projector": false,
      "Internet": false,
      "ConferencePhone": false,
      "StandardPhone": false,
      "WhiteBoard": false,
      "LargeDisplay": false,
      "Catering": false,
      "TeaAndCoffee": false,
      "Drinks": false,
      "SecurityLock": false,
      "CCTV": false,
      "VoiceRecorder": false,
      "AirConditioning": false,
      "Heating": false,
      "NaturalLight": false,
      "AllowMultipleBookings": false,
      "Allocation": null,
      "Shifts": [
        {},
        {},
        {}
      ],
      "IsAvailable": false,
      "Message": null,
      "Price": 0,
      "DisplayOrder": 0,
      "PriceFormatted": null,
      "Id": 19449430,
      "IdString": "19449430",
      "UpdatedOn": "2016-08-13T20:22:37",
      "CreatedOn": "2016-05-29T10:17:58",
      "UniqueId": "75f4b87a-696d-4e57-b9e3-af38a80d56a9",
      "IsNull": false
    },
    {
      "Name": "Large Conference Room A",
      "GroupName": "Small Rooms",
      "Description": null,
      "ResourceTypeName": "Rooms",
      "ResourceType": {},
      "HasImage": true,
      "Projector": false,
      "Internet": false,
      "ConferencePhone": false,
      "StandardPhone": false,
      "WhiteBoard": false,
      "LargeDisplay": false,
      "Catering": false,
      "TeaAndCoffee": false,
      "Drinks": false,
      "SecurityLock": false,
      "CCTV": false,
      "VoiceRecorder": false,
      "AirConditioning": false,
      "Heating": false,
      "NaturalLight": false,
      "AllowMultipleBookings": true,
      "Allocation": 3,
      "Shifts": [],
      "IsAvailable": false,
      "Message": null,
      "Price": 0,
      "DisplayOrder": 0,
      "PriceFormatted": null,
      "Id": 20319299,
      "IdString": "20319299",
      "UpdatedOn": "2016-12-12T21:58:46",
      "CreatedOn": "2016-08-03T00:04:00",
      "UniqueId": "2ccfc9bc-ad4d-4e47-8b51-87f2ce5a8b8f",
      "IsNull": false
    },
    {
      "Name": "Event Space",
      "GroupName": "Event Spaces",
      "Description": null,
      "ResourceTypeName": "Event Space",
      "ResourceType": {},
      "HasImage": false,
      "Projector": false,
      "Internet": false,
      "ConferencePhone": false,
      "StandardPhone": false,
      "WhiteBoard": false,
      "LargeDisplay": false,
      "Catering": false,
      "TeaAndCoffee": false,
      "Drinks": false,
      "SecurityLock": false,
      "CCTV": false,
      "VoiceRecorder": false,
      "AirConditioning": false,
      "Heating": false,
      "NaturalLight": false,
      "AllowMultipleBookings": false,
      "Allocation": null,
      "Shifts": [],
      "IsAvailable": false,
      "Message": null,
      "Price": 0,
      "DisplayOrder": 99,
      "PriceFormatted": null,
      "Id": 20319300,
      "IdString": "20319300",
      "UpdatedOn": "2016-12-12T21:58:39",
      "CreatedOn": "2016-08-03T00:44:34",
      "UniqueId": "9f703e76-0d9c-449f-9632-012c78199a82",
      "IsNull": false
    }
  ],
  "UnpaidBookings": [],
  "ShowAllBookings": true,
  "IncludeBookingCreditInPrice": false,
  "Resource": null,
  "Group": null
}

POST /en/bookings/fullCalendarBookings

Returns and array of bookings taking place between two dates

POST /en/bookings/fullCalendarBookings?start=yyyy-mm-dd&end=yyyy-mm-dd
Parameters: 

start: the date to show bookings from (required)
end: the date to show bookings to (required)
group: the name of a resource group
showAll: false to return only the bookings of the logged in member. true (default) otherwise.
onlyEvents: true to show only events
resourceId: the id of the resource to show
resourceTypeId: the id of the resource type
[
  {
    "id": 22264242,
    "resourceId": 20319299,
    "resourceName": "Large Conference Room A",
    "title": "Large Conference Room A",
    "start": "2017-01-09T00:00Z",
    "end": "2017-01-09T01:00Z",
    "allDay": false,
    "notes": null,
    "editable": false,
    "teamBooking": false,
    "coworkerId": "20420401",
    "coworkerEmail": null,
    "coworkerFullName": null,
    "coworkerCompanyName": null,
    "private": true,
    "event": false,
    "ignoreTimezone": true
  }
]

POST /en/bookings/fullCalendarEvents

Returns and array of events taking place between two dates

POST /en/bookings/fullCalendarEvents?start=yyyy-mm-dd&end=yyyy-mm-dd
Parameters: 

start: the date to show bookings from (required)
end: the date to show bookings to (required)
[
  {
    "id": 22236228,
    "resourceId": 0,
    "resourceName": "",
    "title": "Repeating Event",
    "businessName": "Space One",
    "location": null,
    "venueAddress": null,
    "ticketsPage": null,
    "webAddress": null,
    "start": "2017-01-07T16:00Z",
    "end": "2017-01-08T02:00Z",
    "allDay": false,
    "editable": false,
    "ignoreTimezone": true,
    "event": true,
    "url": "/en/Events/View/22236228/repeating-event"
  },
  {
    "id": 22236214,
    "resourceId": 0,
    "resourceName": "",
    "title": "Repeating Event",
    "businessName": "Space One",
    "location": null,
    "venueAddress": null,
    "ticketsPage": null,
    "webAddress": null,
    "start": "2017-01-08T16:00Z",
    "end": "2017-01-09T02:00Z",
    "allDay": false,
    "editable": false,
    "ignoreTimezone": true,
    "event": true,
    "url": "/en/Events/View/22236214/repeating-event"
  }
]

GET /en/bookings/search

Searchs and returns the available status of each resource for a given start and end dates

GET /en/bookings/Search?start=yyyy-mm-dd&end=yyyy-mm-dd
Parameters: 

start: the date to show bookings from (required)
end: the date to show bookings to (required)
type: the Id of the resource type to serach resources in
group: the name of the resource type to serach resources in
{
  "AllShifts": [
    {
      "ResourceId": 19449430,
      "Start": "09:00",
      "End": "13:00",
      "Name": "MORNING (9AM TO 1PM)"
    },
    {
      "ResourceId": 19449430,
      "Start": "14:00",
      "End": "18:00",
      "Name": " EVENING (2PM - 6PM)"
    },
    {
      "ResourceId": 19449430,
      "Start": "09:00",
      "End": "18:00",
      "Name": "ALL DAY (9AM - 6PM)"
    }
  ],
  "StartDate": "2017-01-07T00:00:00",
  "EndDate": "2017-01-08T00:00:00",
  "Resources": [
    {
      "Name": "Event Space",
      "GroupName": "Event Spaces",
      "Description": null,
      "ResourceTypeName": "Event Space",
      "ResourceType": {},
      "HasImage": false,
      "Projector": false,
      "Internet": false,
      "ConferencePhone": false,
      "StandardPhone": false,
      "WhiteBoard": false,
      "LargeDisplay": false,
      "Catering": false,
      "TeaAndCoffee": false,
      "Drinks": false,
      "SecurityLock": false,
      "CCTV": false,
      "VoiceRecorder": false,
      "AirConditioning": false,
      "Heating": false,
      "NaturalLight": false,
      "AllowMultipleBookings": false,
      "Allocation": null,
      "Shifts": [],
      "IsAvailable": true,
      "Message": null,
      "Price": 0,
      "DisplayOrder": 99,
      "PriceFormatted": "£0.00",
      "Id": 20319300,
      "IdString": "20319300",
      "UpdatedOn": "2016-12-12T21:58:39",
      "CreatedOn": "2016-08-03T00:44:34",
      "UniqueId": "9f703e76-0d9c-449f-9632-012c78199a82",
      "IsNull": false
    },
    {
      "Name": "Large Conference Room A",
      "GroupName": "Small Rooms",
      "Description": null,
      "ResourceTypeName": "Rooms",
      "ResourceType": {},
      "HasImage": true,
      "Projector": false,
      "Internet": false,
      "ConferencePhone": false,
      "StandardPhone": false,
      "WhiteBoard": false,
      "LargeDisplay": false,
      "Catering": false,
      "TeaAndCoffee": false,
      "Drinks": false,
      "SecurityLock": false,
      "CCTV": false,
      "VoiceRecorder": false,
      "AirConditioning": false,
      "Heating": false,
      "NaturalLight": false,
      "AllowMultipleBookings": true,
      "Allocation": 3,
      "Shifts": [],
      "IsAvailable": true,
      "Message": null,
      "Price": 24,
      "DisplayOrder": 0,
      "PriceFormatted": "£24.00",
      "Id": 20319299,
      "IdString": "20319299",
      "UpdatedOn": "2016-12-12T21:58:46",
      "CreatedOn": "2016-08-03T00:04:00",
      "UniqueId": "2ccfc9bc-ad4d-4e47-8b51-87f2ce5a8b8f",
      "IsNull": false
    },
    {
      "Name": "Room 2",
      "GroupName": "Large Rooms",
      "Description": null,
      "ResourceTypeName": "Rooms",
      "ResourceType": {},
      "HasImage": true,
      "Projector": false,
      "Internet": false,
      "ConferencePhone": false,
      "StandardPhone": false,
      "WhiteBoard": false,
      "LargeDisplay": false,
      "Catering": false,
      "TeaAndCoffee": false,
      "Drinks": false,
      "SecurityLock": false,
      "CCTV": false,
      "VoiceRecorder": false,
      "AirConditioning": false,
      "Heating": false,
      "NaturalLight": false,
      "AllowMultipleBookings": false,
      "Allocation": null,
      "Shifts": [
        {},
        {},
        {}
      ],
      "IsAvailable": false,
      "Message": "This resource can only be booked in the following shifts: MORNING (9AM TO 1PM),  EVENING (2PM - 6PM), ALL DAY (9AM - 6PM).",
      "Price": 24,
      "DisplayOrder": 0,
      "PriceFormatted": "£24.00",
      "Id": 19449430,
      "IdString": "19449430",
      "UpdatedOn": "2016-08-13T20:22:37",
      "CreatedOn": "2016-05-29T10:17:58",
      "UniqueId": "75f4b87a-696d-4e57-b9e3-af38a80d56a9",
      "IsNull": false
    }
  ],
  "SelectedTypes": null,
  "ResourceTypes": [
    {
      "Name": "Rooms",
      "Id": 19448429,
      "IdString": "19448429",
      "UpdatedOn": "2016-05-29T10:17:45",
      "CreatedOn": "2016-05-29T10:17:45",
      "UniqueId": "fa807f50-2428-40b4-ab8a-06bb7801f9fd",
      "IsNull": false
    },
    {
      "Name": "Event Space",
      "Id": 20324304,
      "IdString": "20324304",
      "UpdatedOn": "2016-08-03T00:45:00",
      "CreatedOn": "2016-08-03T00:45:00",
      "UniqueId": "b9b86daf-10a1-47bb-9570-6e9e0510c6d3",
      "IsNull": false
    }
  ]
}

This endpoint calculates the estimated price to book each visible resource based on the logged in user and any monetary credit they may have available. Depending on the complexity of your pricing, if using multiple resource rates, booking credit or access rule, the API may not return a price for some resources in order to return data as soon as possible. In this case, you can use "GetBookingPrice" to get the price to book a single resource. That endpoint will always return a value.

GET /en/bookings/booking/{id}

Returns the details of a single booking

GET /en/bookings/booking/{id}
Parameters: 

id: the ID of the booking to get the details for
{
  "Value": {
    "ResourceId": 20319299,
    "ResourceName": "Large Conference Room A",
    "CoworkerId": 21284263,
    "CoworkerFullName": "Robert Weeds",
    "ExtraServiceId": 0,
    "ExtraServiceName": null,
    "FromTime": "2017-01-25T08:00:00Z",
    "ToTime": "2017-01-25T09:00:00Z",
    "Notes": null,
    "InternalNotes": null,
    "ChargeNow": true,
    "InvoiceNow": false,
    "DoNotUseBookingCredit": false,
    "PurchaseOrder": null,
    "DiscountCode": null,
    "Tentative": false,
    "Online": true,
    "TeamsAtTheTimeOfBooking": null,
    "TariffAtTheTimeOfBooking": "Another Membership",
    "RepeatSeriesUniqueId": null,
    "RepeatBooking": false,
    "Repeats": 0,
    "WhichBookingsToUpdate": 0,
    "RepeatEvery": null,
    "RepeatUntil": null,
    "RepeatOnMondays": false,
    "RepeatOnTuesdays": false,
    "RepeatOnWednesdays": false,
    "RepeatOnThursdays": false,
    "RepeatOnFridays": false,
    "RepeatOnSaturdays": false,
    "RepeatOnSundays": false,
    "Invoiced": true,
    "InvoiceDate": "2017-01-19T19:32:16Z",
    "CoworkerBillingName": "Adrian Palacios",
    "MinutesToStart": 7947,
    "OverrideResourceLimits": false,
    "DisableConfirmation": false,
    "SkipGoogleCalendarUpdate": false,
    "OverridePrice": null,
    "EstimatedCost": null,
    "IsEvent": false,
    "Id": 22403381,
    "UpdatedOn": "2017-01-19T19:32:20Z",
    "CreatedOn": "2017-01-19T19:32:16Z",
    "UniqueId": "4d321cb9-c707-4f6d-9f48-25ecc8d39bf9",
    "UpdatedBy": "adrian@nexudus.com",
    "IsNew": false,
    "ToStringText": "Large Conference Room A",
    "LocalizationDetails": null
  },
  "Resource": {
    "Name": "Large Conference Room A",
    "GroupName": "Small Rooms",
    "Description": null,
    "ResourceTypeName": "Rooms",
    "ResourceType": {
      "Name": "Rooms",
      "Id": 19448429,
      "IdString": "19448429",
      "UpdatedOn": "2016-05-29T10:17:45Z",
      "CreatedOn": "2016-05-29T10:17:45Z",
      "UniqueId": "fa807f50-2428-40b4-ab8a-06bb7801f9fd",
      "IsNull": false,
      "Context": null
    },
    "HasImage": true,
    "Projector": false,
    "Internet": false,
    "ConferencePhone": false,
    "StandardPhone": false,
    "WhiteBoard": false,
    "LargeDisplay": false,
    "Catering": false,
    "TeaAndCoffee": false,
    "Drinks": false,
    "SecurityLock": false,
    "CCTV": false,
    "VoiceRecorder": false,
    "AirConditioning": false,
    "Heating": false,
    "NaturalLight": false,
    "AllowMultipleBookings": true,
    "Allocation": 3,
    "Shifts": [],
    "IsAvailable": false,
    "Message": null,
    "Price": 0,
    "DisplayOrder": 0,
    "PriceFormatted": null,
    "Id": 20319299,
    "IdString": "20319299",
    "UpdatedOn": "2016-12-12T21:58:46Z",
    "CreatedOn": "2016-08-03T00:04:00Z",
    "UniqueId": "2ccfc9bc-ad4d-4e47-8b51-87f2ce5a8b8f",
    "IsNull": false,
    "Context": null
  }
}

GET /en/bookings/deleteJson

Deletes a single booking based on its ID

GET /en/bookings/deleteJson
Parameters: 
id: the ID of the booking to delete

You can only delete a booking via the public API if it has not been invoiced.


POST /en/bookings/newbookingJson

Creates a new booking

POST /en/bookings/newbookingJson
Parameters: 
{  
   "Booking":{  
      "Resource":{  
         "Id":287977694
      },
      "Id":0,
      "FromTime":"2016-03-07T12:30Z",
      "ToTime":"2016-03-07T13:30Z",
      "BookingVisitors":[  

      ]
   },
   //If you are passing valid authentication data to this endpoint, you don't need to pass coworker details. 
   //If you don't, submit coworker details to create a new coworker at the same time you request the bookin
   "Coworker":{  
      "FullName":"Jon Doe",
      "Email":"bookingsdoe@nexudus.com",
      "MobilePhone":"555-555-555",
      "Address":"London Road",
      "PostCode":"SW22DB",
      "CityName":"London",
      "State":"London",
      "TaxIDNumber":"REG-000111555",
      "BillingEmail":"accountants@example.com"
   },
   "Products":[  
      {  
         "ProductId":294480188,
         "Quantity":"1",
         "Selected":false
      },
      {  
         "ProductId":310061756,
         "Quantity":"0",
         "Selected":false
      }
   ]
}

POST /en/bookings/bookingJson

Updates an existing booking

GET /en/bookings/bookingJson
Parameters: 
{  
   "Booking":{  
      "Resource":{  
         "Id":19449430
      },
      "Id":19442230,
      "FromTime":"2017-01-27T09:00:00+00:00",
      "ToTime":"2017-01-27T13:00:00+00:00",
      "BookingVisitors":[  

      ]
   },
   "Products":[  
      {  
         "ProductId":20105086,
         "Quantity":0,
         "Selected":false
      },
      {  
         "ProductId":19483464,
         "Quantity":1,
         "Selected":true
      }
   ]
}

Bookings placed by members with card details and when you are using a payment gateway are automatically paid if the option to "cancel unpaid bookings" is enabled


GET /en/bookings/pay

Generates an invoice for any bookings pending to pay

GET /en/bookings/pay
Parameters: none

GET /en/bookings/getBookingVisitors

Gets the visitors for a booking based on its ID

GET /en/bookings/getBookingVisitors?bookingId={id}
Parameters
bookingId: the id of the booking to get the visitors for
[  
   {  
      "FullName":"Robert Dalton",
      "Email":"dalton@nexudus.com",
      "Id":22413391
   }
]

GET /en/bookings/GetResourceProducts

Gets the products for for a resource and/or booking

GET /en/bookings/GetResourceProducts/?resourceId={resourceId}&bookingId={bookingid}
Parameters
resourceId: the id of the resource to get the products for
bookingId: the id of the booking to get the products for. If not provided, all products available for the resource are returned.
[  
   {  
      "ProductId":20105086,
      "ProductName":"Cold Drink",
      "ProductDescription":"One of our refreshing bubbly drinks",
      "RequestQuantity":true,
      "Quantity":1,
      "InvoiceInMinutes":false,
      "Price":1.40000,
      "Selected":false,
      "FormattedPrice":"$1.40"
   },
   {  
      "ProductId":19483464,
      "ProductName":"IT Services",
      "ProductDescription":"Professional IT Services by iFixIT",
      "RequestQuantity":false,
      "Quantity":1,
      "InvoiceInMinutes":false,
      "Price":99.00000,
      "Selected":true,
      "FormattedPrice":"$99.00"
   }
]

POST /en/bookings/GetBookingPrice

Gets the cost of booking a specific resource

GET /en/bookings/GetBookingPrice
Parameters
{
	"Booking": {
		"Resource": 287977694,
		"FromTime": "2018-01-01T10:00:00",
		"ToTime": "2018-01-01T10:00:00"
	}
}
{
  "Resource": {
    "Name": "Amalthea Meeting Room",
    "GroupName": "Small",
    "Description": "<p>This meeting room includes:</p>\r\n<ul>\r\n<li>Projector</li>\r\n<li>Conference phone</li>\r\n<li>Catering</li>\r\n<li>Coffee and Tea</li>\r\n<li>Audio System</li>\r\n<li>WiFi</li>\r\n<li>Whiteboard</li>\r\n</ul>\r\n<p>Capacity <strong>8 people.</strong></p>",
    "ResourceTypeName": "Large Meeting Rooms (hourly)",
    "ResourceType": {
      "Name": "Large Meeting Rooms (hourly)",
      "Id": 287951665,
      "IdString": "287951665",
      "UpdatedOn": "2017-01-27T10:30:17Z",
      "CreatedOn": "2017-01-27T10:30:17Z",
      "UniqueId": "0e841048-d59f-421d-bf3f-5fd5e5422eef",
      "IsNull": false,
      "Context": null
    },
    "HasImage": true,
    "Projector": true,
    "Internet": true,
    "ConferencePhone": true,
    "StandardPhone": false,
    "WhiteBoard": true,
    "LargeDisplay": false,
    "Catering": true,
    "TeaAndCoffee": true,
    "Drinks": false,
    "SecurityLock": false,
    "CCTV": false,
    "VoiceRecorder": false,
    "AirConditioning": true,
    "Heating": false,
    "NaturalLight": false,
    "AllowMultipleBookings": false,
    "Allocation": null,
    "Shifts": [],
    "IsAvailable": false,
    "Message": null,
    "Price": 0,
    "DisplayOrder": 3,
    "PriceFormatted": null,
    "Id": 287977694,
    "IdString": "287977694",
    "UpdatedOn": "2017-02-01T17:28:23Z",
    "CreatedOn": "2017-01-27T15:44:28Z",
    "UniqueId": "84bf8746-0a96-451e-a820-b1db0a2c0392",
    "IsNull": false,
    "Context": null
  },
  "IsAvailable": true,
  "Message": null,
  "Price": "$0.00",
  "discountCode": {
    "discountMessage": null,
    "code": null,
    "description": null
  }
}

This endpoint takes into consideration the "Consider booking credit" option when returning a price for a booking. When that option is enabled, the price returned by this endpoint is such after applying any credit the member may currently have available.


GET /en/bookings/my

Gets the bookings in the next 3 months for the logged in user

GET /en/bookings/my
Parameters
None
{
  "Bookings": [
    {
      "Resource": {},
      "ResourceName": "Amalthea Meeting Room",
      "ResourceId": 287977694,
      "ResourceTypeId": 287951665,
      "ResourceTypeName": "Large Meeting Rooms (hourly)",
      "Coworker": {},
      "CoworkerId": 303913610,
      "Notes": null,
      "FromTime": "2017-03-28T12:00:00",
      "ToTime": "2017-03-28T14:00:00",
      "UtcFromTime": "2017-03-28T17:00:00",
      "UtcToTime": "2017-03-28T19:00:00",
      "Id": 358614792,
      "IdString": "358614792",
      "UpdatedOn": "2017-03-23T17:43:19",
      "CreatedOn": "2017-03-23T17:43:19",
      "UniqueId": "1d6561de-6334-4fa0-87e6-e4c865b742fe",
      "IsNull": false
    }
  ]
}


Source: XML ! RSS