Filtering by availability

Sometimes it is very nice to be able to get some availability information directly in the list of products or even filter the list by availability.
In a general way this is very "heavy" on the performance and not possible in a satisfying way. But we combined the search functionality with our availability functionality in the marketplace. So the rules about what is available are the same and this is dependent on your project configurations. So for getting the response you want you need to talk to us.

Warning

You can use the productAvailability option together with all other filter functionalities, but if you use onlyWithAvailabilities: true you will not get facets anymore. This is because we can not guarantee their accuracy in this case.

The availability request is defined by the ProductAvailabilityRequest object within the POST search request. Some additional remarks:

  • To ForType parameter is used to determine for which search result item the availability check should be performed
  • on demand checks all availabilities with the supplier and therefore is accurate but can be very slow.
    Does support NumberOfTravelers and time but no DateUntil.
  • cached Is using the cached availabilities and therfor is fast but may not a 100% true.
    Does support DateUntil but no time nor NumberOfTravelers.
{
    "currentPage": 1,
    "resultsPerPage": 2,
    "select": "identifier,name,type",
    "combinedType": "Product",
    "project": "{{ partnerProject }}",
    "searchText": "Tischreservation",
    "searchFields": "name",
    "productAvailability": [
        {
            "ForType": "Product",
            "onDemand": false,
            "dateFrom": "2024-10-27",
            "dateUntil": "2024-10-30"
        }
    ],
    "OnlyWithAvailabilities": false
}
{
    "currentPage": 1,
    "resultsPerPage": 5,
    "select": "identifier,name,type",
    "combinedType": "FoodEstablishment",
    "project": "{{ partnerProject }}",
    "_searchText": "Lindt",
    "searchFields": "name",
    "productAvailability": [
        {
            "forType": "FoodEstablishment",
            "onDemand": true,
            "dateFrom": "2024-10-27",
            "numberOfTravelers": 2
        }
    ],
    "OnlyWithAvailabilities": true
}
{
    "count": 26,
    "values": [
        {
            "identifier": "foo_px9-s28_iidfb",
            "type": "FoodEstablishment",
            "name": "My REstaurant",
            "productAvailability": [
                {
                    "identifier": "fat_res_77fe98290dfa15ea39d48a8205941a5a",
                    "date": "2024-10-27T00:00:00+00:00",
                    "nextTimeslot": "11:00:00",
                    "lastModified": "2024-10-11T07:53:35.1798343+00:00",
                    "count": 2,
                    "service": "zh-table",
                    "additionalProperty": [
                        {
                            "name": "times",
                            "value": "[\"11:00:00\",\"11:15:00\",\"11:30:00\",\"11:45:00\",\"12:00:00\",\"12:15:00\",\"12:30:00\",\"12:45:00\",\"13:00:00\",\"13:15:00\",\"13:30:00\",\"13:45:00\",\"14:00:00\",\"14:15:00\",\"14:30:00\",\"14:45:00\",\"15:00:00\",\"15:15:00\",\"15:30:00\",\"15:45:00\",\"16:00:00\",\"16:15:00\",\"16:30:00\",\"16:45:00\",\"17:00:00\",\"17:15:00\",\"17:30:00\",\"17:45:00\",\"18:00:00\",\"18:15:00\",\"18:30:00\",\"18:45:00\",\"19:00:00\",\"19:15:00\",\"19:30:00\",\"19:45:00\",\"20:00:00\",\"20:15:00\",\"20:30:00\",\"20:45:00\",\"21:00:00\",\"21:15:00\",\"21:30:00\",\"21:45:00\"]",
                            "valueType": "string[]",
                            "propertyId": "times"
                        },
                        {
                            "name": "no room",
                            "value": "[\"11:00:00\",\"11:15:00\",\"11:30:00\",\"11:45:00\",\"12:00:00\",\"12:15:00\",\"12:30:00\",\"12:45:00\",\"13:00:00\",\"13:15:00\",\"13:30:00\",\"13:45:00\",\"14:00:00\",\"14:15:00\",\"14:30:00\",\"14:45:00\",\"15:00:00\",\"15:15:00\",\"15:30:00\",\"15:45:00\",\"16:00:00\",\"16:15:00\",\"16:30:00\",\"16:45:00\",\"17:00:00\",\"17:15:00\",\"17:30:00\",\"17:45:00\",\"18:00:00\",\"18:15:00\",\"18:30:00\",\"18:45:00\",\"19:00:00\",\"19:15:00\",\"19:30:00\",\"19:45:00\",\"20:00:00\",\"20:15:00\",\"20:30:00\",\"20:45:00\",\"21:00:00\",\"21:15:00\",\"21:30:00\",\"21:45:00\"]",
                            "valueType": "string[]",
                            "propertyId": "0-times"
                        }
                    ]
                }
            ]
        },
        {
            "identifier": "foo_px9-s28_cadbj",
            "type": "FoodEstablishment",
            "name": "Bierhalle",
            "productAvailability": [
                {
                    "identifier": "fat_res_22bc1a019fce794e73650690b5f50836",
                    "date": "2024-10-27T00:00:00+00:00",
                    "nextTimeslot": "11:00:00",
                    "lastModified": "2024-10-11T07:53:35.1772921+00:00",
                    "count": 2,
                    "service": "zh-table",
                    "additionalProperty": [
                        {
                            "name": "times",
                            "value": "[\"11:00:00\",\"11:15:00\",\"11:30:00\",\"11:45:00\",\"12:00:00\",\"12:15:00\",\"12:30:00\",\"12:45:00\",\"13:00:00\",\"13:15:00\",\"13:30:00\",\"13:45:00\",\"14:00:00\",\"14:15:00\",\"14:30:00\",\"14:45:00\",\"15:00:00\",\"15:15:00\",\"15:30:00\",\"15:45:00\",\"16:00:00\",\"16:15:00\",\"16:30:00\",\"16:45:00\",\"17:00:00\",\"17:15:00\",\"17:30:00\",\"17:45:00\",\"18:00:00\",\"18:15:00\",\"18:30:00\",\"18:45:00\",\"19:00:00\",\"19:15:00\",\"19:30:00\",\"19:45:00\",\"20:00:00\",\"20:15:00\",\"20:30:00\",\"20:45:00\",\"21:00:00\"]",
                            "valueType": "string[]",
                            "propertyId": "times"
                        },
                        {
                            "name": "no room",
                            "value": "[\"11:00:00\",\"11:15:00\",\"11:30:00\",\"11:45:00\",\"12:00:00\",\"12:15:00\",\"12:30:00\",\"12:45:00\",\"13:00:00\",\"13:15:00\",\"13:30:00\",\"13:45:00\",\"14:00:00\",\"14:15:00\",\"14:30:00\",\"14:45:00\",\"15:00:00\",\"15:15:00\",\"15:30:00\",\"15:45:00\",\"16:00:00\",\"16:15:00\",\"16:30:00\",\"16:45:00\",\"17:00:00\",\"17:15:00\",\"17:30:00\",\"17:45:00\",\"18:00:00\",\"18:15:00\",\"18:30:00\",\"18:45:00\",\"19:00:00\",\"19:15:00\",\"19:30:00\",\"19:45:00\",\"20:00:00\",\"20:15:00\",\"20:30:00\",\"20:45:00\",\"21:00:00\"]",
                            "valueType": "string[]",
                            "propertyId": "0-times"
                        }
                    ]
                }
            ]
        }
    ]
}