RESOURCES > DAYS
Availability Days
Availability days allow you to query for the availability status on a given site or unit.
Get Days
Use GET /search/days
to fetch information on days, the site_id is required.
curl https://devapi.bedful.com/search/days \
-u BEDFUL_KEY:
Parameters available
- site_id : required - specified in the url
- unit_id : optional - limit the request to one unit on the site
- group_id : optional - limit the request to one group of units
- parent_id : optional - limit the request to sub-bookings of a given booking
- starts_at : optional - limit the request to the given date and two months afterwards
This will return JSON like this for the matched dates/site/unit.
{
"days": [
{
"date": "2021-11-01T00:00:00Z",
"availability": "0"
}, {
"date": "2021-11-02T00:00:00Z",
"availability": "0"
}, ... {
"date": "2021-12-26T00:00:00Z",
"availability": "3"
}, {
"date": "2021-12-27T00:00:00Z",
"availability": "4"
}, {
"date": "2021-12-28T00:00:00Z",
"availability": "3"
}, {
"date": "2021-12-29T00:00:00Z",
"availability": "3"
}, {
"date": "2021-12-30T00:00:00Z",
"availability": "1"
}, {
"date": "2021-12-31T00:00:00Z",
"availability": "0"
}, {
"date": "2022-01-01T00:00:00Z",
"availability": "0"
}
]
}
Availability Values
The possible settings of the availability result for each date are:
- 0 - Unavailable - unavailable
- 1 - UnavailableStart - available to end but not to start a booking
- 2 - UnavailableEnd - available to end but not to start a booking
- 3 - AvailableStay - available for stays to cross this day
- 4 - Available - available for start or end or crossing this day