Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3643

Guetting past reservations from guesty API

$
0
0

I'm retrieving reservations from gusty api, the problem is that it always retrieve future reservations and I need past reservations too.In the doc https://docs.guesty.com/#search-reservations it says that it uses a default filter like:

...filters: [  {"field": "status","operator": "$in","value": ["confirmed"]  }, {"field": "checkIn","operator":"$gt","context":"now","value":0  }]...

but when I try that filter without modifying it the api response is 400 'Filters are invalid'. The documentation is very vague and i dont know how to use filters.my idea was:

filters: [  {"field": "status","operator": "$in","value": ["confirmed"]  }, {"field": "checkIn","operator":"$gt","context":"now","value": "2010-01-01"  }]

This last idea is not working eitherDoes anyone know how to retreive past reservations in guesty api?Or how to format filters correctly

Thanks in advance


Viewing all articles
Browse latest Browse all 3643

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>