API: if the booking item start_date are different, how to get booking items in same booking order

hello,

I am going to develop a function to display daily booking list. Generally, I can use /api/3.0/booking?start_date=YYYYMMDD to get the order list of specific date and then use /api/3.0/booking/[booking_id] to get the list of booking items. However, I got a problem with following scenario.

booking_id : 1234
item 1 : 2018-08-01 09:00-10:00
item 2 : 2018-08-10 09:00-10:00
item 3 : 2018-08-20 09:00-10:00
item 4 : 2018-08-31 09:00-10:00

Case 1 : 
/api/3.0/booking?start_date=20180801
the return list include booking_id 1234

Case 2 :
/api/3.0/booking?start_date=20180810
/api/3.0/booking?start_date=20180820
/api/3.0/booking?start_date=20180831
the return list does not include booking_id 1234

Case 3 : 
/api/3.0/booking?end_date=20180831
the return list include booking_id 1234

Case 4 :
/api/3.0/booking?end_date=20180801
/api/3.0/booking?end_date=20180810
/api/3.0/booking?end_date=20180820
the return list does not include booking_id 1234

In this scenario, I cannot get the booking_id with start_date for item 2,3,4 and I will miss item 1,2,3 if I use end_date in query. Is there any other API or advice so that I can get booking_id 1234 on 01, 10, 20, 31 Aug. 

Thanks

Comments

  • Hi @MurphyChoi,

    Thank you for reaching out on our forums!

    At this time, there isn't a method to achieve a query for a 'booking in progress' per say, however I can definitely see how a filter like this would be valuable, and have created a feature request for it. If you write in to support@checkfront.com, I can let you know if there is news on this request, though I don't have a specific timeline at the moment.

    Let me know if I can help you with anything else.

    Best Regards,
    Brett - Checkfront Support Team
  • hi Brett,

    Thank you for your reply.

    It is good to hear that this feature has been put on the feature request list and I'm really appreciate for your help.

    Is there any other alternative method or suggestion to get the bookind_id 1234 on 10, 20 Aug? Because I have no idea how to get bookind_id on that days in current situation. Thanks
  • Hi @MurphyChoi,

    Thank you for your patience!

    This request has now been implemented, which means that you can now filter the booking/index using the ?date=2018-09-05 parameter. This will allow you to filter by a date and it will return the bookings that have the given date between their start and end.

    I hope this helps, and thank you for your request! Let me know if you have any questions.

    Best Regards,
    Brett - Checkfront Support Team
Sign In or Register to comment.