MWS: Overview of Bookings API calls

Overview of Bookings API calls

Bookings.asmx

CancelBooking(int memberId, int bookingId, bool returnUsage)

This will cancel a booking for a member, if business rules allow a booking to be cancelled. If there is more than one member associated with the booking, then only the specified member is removed from the booking, and the booking remains for the other members. If the booking was paid for with a usage subscription, the parameter “returnUsage” determines whether or not the usage should be added back on to the member’s subscription.

This method is due to be deprecated in favour of CancelBookingWithDetails().

CancelBookingWithDetails (int memberId, int bookingId, Boolean returnUsage)

This will cancel a booking for a member, if business rules allow a booking to be cancelled. If there is more than one member associated with the booking, then only the specified member is removed from the booking, and the booking remains for the other members. If the booking was paid for with a usage subscription, the parameter “returnUsage” determines whether or not the usage should be added back on to the member’s subscription. This method provides additional reason reporting than that of CancelBooking.

GetActivitiesAtSite (obj request)

Call this method to get the details of activities, classes and courses at one or more sites.

GetActivityDetails(string activityId)

Call this method to get the details of a given activity, including the activity group it belongs to and resource products it is linked to.

GetActivityGroupDetails(obj request)

Call this method to get the details of one or more activity groups.

GetActivityGroups(string siteId, bool webBookableOnly)

Call this method to get the list of activity group information for the particular site. This info can be filtered based on the web bookable activity group only.

GetAvailableBookableSlots(obj request)

This will return an array of bookable slot with price for a given activity between two times, for a given member. If memberId is 0, then the array will return the slots available to a non-member. Does not currently support classes or courses.

GetAvailableSlots(string activityId, DateTime startDateTime, DateTime endDateTime, int memberId)

This will return an array of bookable slots for a given activity or class between two times, for a given member. If memberId is 0, then the array will return the slots available to a non-member.

GetAvailableSlotsForProduct(string activityId, DateTime startDateTime, DateTime endDateTime, int memberId, string[] productIds)

This will return an array of bookable slots for a given activity between two times, for a given member and resource product(s). If the activity requires resource products to be chosen from one or more resource product groups, specify the chosen product ids in the productIds array. This might include a member of staff or a part of the leisure centre eg Court 1. To book badminton on court 1, enter the activityId representing badminton and the resource product id representing Court 1 in the productIds array. If memberId is 0, then the array will return the slots available to a non-member.

GetBookingSheet(BookingSheet BookingSheetRequest)

Call this method to return information on activities and reservations that are booked in the plus2 Booking sheet. There are four detail levels, SummaryMergedSlots, Summary, PublicDetail and

PrivateDetail,  which  provide  a  different  detail  of  information.    This  call  can  return  a  lot ofinformation and so it is advised to work with the operator of Plus2 to understand to correct time ranges to use with this method.

GetResourceProducts(string resourceGroupId)

Call this method to retrieve list of resource product Ids for a particular resource group.

This method is due to be deprecated in favour of GetProductsByProductGroups().

GetZeroPricedAvailableSlots(string activityId, DateTime startDateTime, DateTime endDateTime, int memberId)

Returns the same results as GetAvailableSlots, but includes only the slots the member can book for free.

GetZeroPricedAvailableSlotsForProduct(string activityId, DateTime startDateTime, DateTime endDateTime, int memberId, string[] productIds)

Returns the same results as GetAvailableSlotsForProduct, but includes only the slots the member can book for free.

ListBookableActivitiesClassesCourses(int memberId,string siteId, bool webBookableOnly)

This will return an array of bookable activities, classes and courses based on the information supplied. If memberId is 0, then the array will return the activities etc available to a non-member. If siteid is an empty string then slots are returned for all sites. More than one site can be supplied by separating their ids with a comma.

ListBookableActivitiesClassesCoursesByDate(int memberId,string siteId, bool webBookableOnly, DateTime[] dates)

Call this method to return all bookable activities, classes and courses. The dates parameter will be used to filter activities which start on any date in that array. The activities with slots which are available will be returned.

ListBookableActivitiesClassesCoursesByDateAndGroup(int memberId,string siteId, string activityGroupId, bool webBookableOnly, DateTime[] dates)

Call this method to return all bookable activities, classes and courses. The dates parameter will be used to filter activities which start on any date in that array.

Only activities belonging to the specified activity group will be returned. The activities with slots which are available will be returned.

ListZeroPricedActivitiesByDateAndGroup(int memberId,string siteId, string activityGroupId, bool webBookableOnly, DateTime[] dates)

Returns the same results as ListBookableActivitiesClassesCoursesByDateAndGroup, but includes only the slots the member can book for free.

ListZeroPricedBookableActivitiesClassesCoursesByDate(int memberId,string siteId, bool webBookableOnly, DateTime[] dates)

Returns the same results as ListBookableActivitiesClassesCoursesByDate, but includes only the slots the member can book for free.

MakeBooking(string activityId, DateTime startDateTime, int memberId)

This will make a booking for a member for the given activity at the given time. The method returns the booking id for a successful booking, or 0 if the booking could not be made.

MakeBookingForProduct (string activityId, DateTime startDateTime, int memberId, string[] productIds)

This will make a booking for a member for the given activity at the given time. The method returns the booking id for a successful booking, or 0 if the booking could not be made. Use this method (rather than MakeBooking) where a product must be specified from a resource group to correctly

identify the booking. If the activity requires resource products to be chosen from one or more resource product groups, specify the chosen product ids in the productIds array. This might include a member of staff or a part of the leisure centre eg Court 1. To book badminton on court 1, enter the activityId representing badminton and the resource product id representing Court 1 in the productIds array.

MakeZeroPricedBooking(string activityId, DateTime startDateTime, int memberId)

Returns the same results as MakeBooking, but only succeeds if the member can book the activity for free at that time.

MakeZeroPricedBookingForProduct(string activityId, DateTime startDateTime, int memberId, string[] productIds)

Returns the same results as MakeBookingForProduct, but only succeeds if the member can book the activity for free at that time.

RetrieveBookingPrice(string activityId, DateTime startDateTime, int memberId)

This will return the price which would be charged to a member booking an activity at a particular time.

RetrieveBookingPriceForProduct(string activityId, DateTime startDateTime, int memberId, string[] productIds)

This will return the price which would be charged to a member booking an activity at a particular time. Use this method (rather than RetrieveBookingPrice) where a product must be specified from a resource group to correctly identify the booking. If the activity requires resource products to be chosen from one or more resource product groups, specify the chosen product ids in the productIds array. This might include a member of staff or a part of the leisure centre eg Court 1. To book badminton on court 1, enter the activityId representing badminton and the resource product id representing Court 1 in the productIds array.