Skip to content

Property Search Lite Version 2 Display valid and available dates per property

Andrew Jones edited this page Jan 20, 2023 · 10 revisions

Variable Date Searches

There are many situations where a specific date search doesn't provide enough options for the guest searching, to add additional functionality to the 'Property Search Lite' endpoint, you can now user Version=2. This API response will provide price results per property for every valid holiday between the dates provided based on either the parameter 'Nights' or 'FlexibleNights'. Please note that the dates / prices listed will only be valid dates based on the booking rules per property.

API Endpoint: /apis/propertysearchlite

Example parameter url: ?version=2&checkIn=2023-07-01&checkout=2023-07-31&Adults=2&Children=2&Attributes&SortDirection&SortName&IsBrokenRule=false&NightlyPriceRange&nights=7

API Walkthrough

Version This must be set to 2, to get access to price per break available

size Set how many search results to display per page, the default is 15

checkin Set the start date of the booking, this can be the earliest date they can travel

checkout Set the end date of the booking, this can be the latest date they can travel to

nights If you use the night filter, you can display properties that have x nights available between two dates i.e. 7 nights between the 1st and 31st August

flexiblenights You can set here the variance between the start date you entered and the checkout date you entered. i.e 7 nights between the 1st and 8th August with 3 night flexibility will search from 29th July for 7 nights up to 4th August for 7 nights.

Location As with Attributes, you will need to call apis/locations to get all location IDs. You can then submit the ID to filter to the location.

PriceFilterType can be "Nightly" or "Weekly".

If it is Nightly, then NightlyPriceRange should be set. You would enter 0,150 this will provide a nightly range of 0 - 150 per night

If it is Weekly, then WeeklyPriceRange should be set. You would enter 0,550 this will provide a nightly range of 0 - 550 per week

Attributes First call this api: apis/amenities to get all the attributes and cache them in your system. For example, you see the json data in that page: https://github.com/ipro-software/api-csharp-client/wiki/Attributes, if you want to get the result with attributes: 4 double beds, 4th Floor, then you can pass the attributes parameter in the api.

The request url will be like /apis/propertysearch?size=15&index=1&checkIn=2015-09-21&checkout=2015-10-21&Adults=1&Children=&attributes=7052,1350

Sort Possible values: Sleeps, Bedrooms, Bathrooms, Price

SortDirection Possible values: asc, desc. The default value is desc.

IsBrokenRule Possible values: false, true, any.

False: return only those properties where the booking rules haven't been broken

True: Return only the properties where the booking rules have been broken

any: return all matching properties regardless of if the booking rules have been broken. The default value is false

Response:


{
    "TotalHits": 16,
    "Items": [
        {
            "Id": 10368,
            "DisplayPrice": 7450.00,
            "Dates": [
                {
                    "Checkin": "2023-07-01",
                    "Checkout": "2023-07-08",
                    "Nights": 7,
                    "DisplayPrice": "7450.00"
                }
            ]
        },
        {
            "Id": 15994,
            "DisplayPrice": 5900.00,
            "Dates": [
                {
                    "Checkin": "2023-07-07",
                    "Checkout": "2023-07-14",
                    "Nights": 7,
                    "DisplayPrice": "5900.00"
                },
                {
                    "Checkin": "2023-07-14",
                    "Checkout": "2023-07-21",
                    "Nights": 7,
                    "DisplayPrice": "5900.00"
                }
            ]
        },
        {
            "Id": 15950,
            "DisplayPrice": 14450.00,
            "Dates": [
                {
                    "Checkin": "2023-07-07",
                    "Checkout": "2023-07-14",
                    "Nights": 7,
                    "DisplayPrice": "14450.00"
                },
                {
                    "Checkin": "2023-07-14",
                    "Checkout": "2023-07-21",
                    "Nights": 7,
                    "DisplayPrice": "14450.00"
                },
                {
                    "Checkin": "2023-07-21",
                    "Checkout": "2023-07-28",
                    "Nights": 7,
                    "DisplayPrice": "14450.00"
                }
            ]
        },
        {
            "Id": 16214,
            "DisplayPrice": 5550.00,
            "Dates": [
                {
                    "Checkin": "2023-07-13",
                    "Checkout": "2023-07-20",
                    "Nights": 7,
                    "DisplayPrice": "5550.00"
                },
                {
                    "Checkin": "2023-07-20",
                    "Checkout": "2023-07-27",
                    "Nights": 7,
                    "DisplayPrice": "5550.00"
                }
            ]
        },
        {
            "Id": 15980,
            "DisplayPrice": 6250.00,
            "Dates": [
                {
                    "Checkin": "2023-07-14",
                    "Checkout": "2023-07-21",
                    "Nights": 7,
                    "DisplayPrice": "6250.00"
                }
            ]
        },
        {
            "Id": 10262,
            "DisplayPrice": 4250.00,
            "Dates": [
                {
                    "Checkin": "2023-07-06",
                    "Checkout": "2023-07-13",
                    "Nights": 7,
                    "DisplayPrice": "4250.00"
                }
            ]
        },
        {
            "Id": 10392,
            "DisplayPrice": 7700.00,
            "Dates": [
                {
                    "Checkin": "2023-07-21",
                    "Checkout": "2023-07-28",
                    "Nights": 7,
                    "DisplayPrice": "7700.00"
                }
            ]
        },
        {
            "Id": 15964,
            "DisplayPrice": 6950.00,
            "Dates": [
                {
                    "Checkin": "2023-07-06",
                    "Checkout": "2023-07-13",
                    "Nights": 7,
                    "DisplayPrice": "6950.00"
                }
            ]
        },
        {
            "Id": 11366,
            "DisplayPrice": 10000.00,
            "Dates": [
                {
                    "Checkin": "2023-07-21",
                    "Checkout": "2023-07-28",
                    "Nights": 7,
                    "DisplayPrice": "10000.00"
                }
            ]
        },
        {
            "Id": 15749,
            "DisplayPrice": 7450.00,
            "Dates": [
                {
                    "Checkin": "2023-07-21",
                    "Checkout": "2023-07-28",
                    "Nights": 7,
                    "DisplayPrice": "7450.00"
                }
            ]
        },
        {
            "Id": 15927,
            "DisplayPrice": 7550.00,
            "Dates": [
                {
                    "Checkin": "2023-07-07",
                    "Checkout": "2023-07-14",
                    "Nights": 7,
                    "DisplayPrice": "7550.00"
                }
            ]
        },
        {
            "Id": 14152,
            "DisplayPrice": 6850.00,
            "Dates": [
                {
                    "Checkin": "2023-07-21",
                    "Checkout": "2023-07-28",
                    "Nights": 7,
                    "DisplayPrice": "6850.00"
                }
            ]
        },
        {
            "Id": 14371,
            "DisplayPrice": 9250.00,
            "Dates": [
                {
                    "Checkin": "2023-07-07",
                    "Checkout": "2023-07-14",
                    "Nights": 7,
                    "DisplayPrice": "9250.00"
                }
            ]
        },
        {
            "Id": 14386,
            "DisplayPrice": 5400.00,
            "Dates": [
                {
                    "Checkin": "2023-07-14",
                    "Checkout": "2023-07-21",
                    "Nights": 7,
                    "DisplayPrice": "5400.00"
                }
            ]
        },
        {
            "Id": 16827,
            "DisplayPrice": 0.0,
            "Dates": []
        }
    ]
}

````
Clone this wiki locally