Booking REST API Filtering

  • This topic has 9 replies, 2 voices, and was last updated 2 weeks ago by J. Davis.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1705414

    Hi,

    Does the API support filtering/parameterisation for checkin date? Would be very helpful

    #1708219

    Hi Cian,
    You can use the example below:

    {
      "filter":{
    
          "meta_query":{
    
             "relation":"AND",
            "date":{
    
               "key":"mphb_check_in_date",
               "value":[
                  "2024-10-26",
                  "2024-10-27"
               ],
               "compare":"BETWEEN",
               "type":"DATE"
            }
         }
      }
    }

    You need to add it as JSON to the request’s body.

    #1714520

    Hi,

    Unfortunately thats not filtering as expected for me – is that correct formatting?

    #1715455

    Hi Cian,
    I’ve tested it using Postman API and it worked correctly https://prnt.sc/n8TFSYtUogMb I got 1 reservation with the proper ID. Here is a screenshot from the backed calendar https://prnt.sc/cwhj-1UYB9ON

    #1716170

    Not sure where I’m going wrong?

    #1716652

    I need more details to be able to help you figure this out. For example – screenshots of the actual booking that you want to filter, screenshots of your API request from the software that you use, etc. If there is personal information on the screenshots you may submit a private request to our support team. Thanks

    #1744173
    This reply has been marked as private.
    #1746570

    Hi Cian,
    Could you submit a request to our support team so we can test it too? Thanks

    #1746576
    This reply has been marked as private.
    #1747861

    Hi Cian,
    Thanks, I’ve contacted you to take a closer look at it. Thanks.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.