To perform a search, we must create an Enquiry.
An Enquiry on the Staylists platform is a dataset that encapsulates the criteria of your customer’s search.
The API gives you more control of your user interfaces than our JS-to-iFrame solutions, but the trade-off here is the complexity of integrating an API.
The iFrame solution is not intended to be one that you can infinitely customise. Nor should it be considered a final, fixed design. Its goal is two-fold:
If you have weighed up the trade-offs and would still like to go down the API route, then please read on.
Post your Enquiry data to
Sometime you might only care about the results for a specific set of properties based on what you’re displaying to your user. In cases like this, the Enquiry object accepts an array of Staylists property IDs.
We recommend using this option because calculating real-time results is expensive in terms of time. The fewer results we need to provide, the faster the response time.
This request requires authentication
If you do all the above, you should receive a 200 response code (success!) and some results for your Enquiry. We discuss the anatomy of a successful response in more detail in the following pages.
However, if you don’t receive a 200, here’s some guidance on what might be happening:
Please get in touch if you’re really struggling and can’t fathom what’s going on.
The response should look something like this …
Each search result is an object with seven name/value pairs. We do not recommend you couple your implementation to this number, as we may add an eight or ninth at some point in the future.
|Name||Type||Description of value|
||This is a Staylists reference. It is unique. We recommend you use this as a mapping reference.|
||This is the common name of the property. It is not necessarily unique.|
||This is unique string that properties use to login to Staylists platform. It’s also nicer to use in URLS than the ID. When mapping properties, we recommend you store this too.|
||Whether or not the property is available for the given Enquiry.|
||A simple, readable representation of the Search Result.|
||The ISO currency code of the price.|
||The minimum total price you’ll pay at that property for your given Enquiry. This is a total price, NOT a per night average. So for a week-long stay at a £100 per night hotel, you should expect to see a value of 700.00.|