API – Maximum per_page

  • This topic has 1 reply, 2 voices, and was last updated 12 months ago by Alex M.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1420717
    Nathanael Arndt
    Participant

    Hi guys,

    first, the chat support is not working? any info about it?

    So, with API, I want to get the list of bookings that will check in today.

    At the moment, I tried this:
    https://hbdemo.getmotopress.com/your-demo-id/wp-json/mphb/v1/bookings?context=view&per_page=100

    Why do I use per_page? because it only shows the 10 oldest bookings (the last booking would be nice).

    BUT….By syncing with booking.com via iCal, the API outputs more than 100 entries, about 135. The problem is, I can only put 100, otherwise error 400.

    Is there any solution for this problem?
    The date limit is not working.
    I need only the booking that booked via the website, not from iCal (imported)

    Thank you
    Chris

    #1421249
    Alex M
    Participant

    100 posts per page is a limit of WordPress. You need to use pagination like described in the link above.

    You may check these examples for the date range and how to filter imported bookings:

    1. date range
    2. filter imported bookings
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.