Booking REST API Filtering

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1705414
    Cian de Staic
    Participant

    Hi,

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

    #1708219
    J. Davis
    Keymaster

    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
    Cian de Staic
    Participant

    Hi,

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

    #1715455
    J. Davis
    Keymaster

    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

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