how can I filter the booking index by create_date?

edited June 2018 in Developers
i need filter the booking index by create_date to join an internal system

booking/index?start_date=today -> this gets only what is booked today, not created today

please help me

Comments

  • Hello cristian_1689,

    Thank you for using our forums.

    You can find the documentation for the 'booking/index' endpoint here:
    http://api.checkfront.com/ref/booking/index.html

    As shown, the 'created_date' is not a parameter that can be passed to this endpoint. However, it is part of the response. So, to get all bookings that were created today, you could first check all bookings that start after today:
    booking/index?start_date=>today

    You can then parse the response and compare the returned 'created_date' to today's date. Please note that the 'created_date' is returned as a Unix timestamp.

    I am not sure what your exact use-case is, but if you are trying to perform an action on each booking after it is created, then you may be better off using a webhook instead of repeatedly querying the API:
    http://api.checkfront.com/ref/notifications.html

    It may also be simpler to export this information from the Booking Index in the Checkfront dashboard if you are trying to gather a list of bookings that are created during specific dates.

    I hope this helps, and please let me know if you have any more questions.

    All the best,
    Chase - Checkfront Support Team
Sign In or Register to comment.