Search for holidays
search_holidaysFull Description
Use this when a customer wants to search for or book a package holiday. On the Beach offers ATOL and ABTA-protected beach, sun, and city break holidays with return flights from UK airports and hotel accommodation - dynamically packaged so customers choose their own flights, hotels, and optional transfers, with flexible payment plans to spread the cost. Do not use for flight-only or hotel-only bookings. Holidays cannot be booked directly through this tool.
Parameters (18 required, 1 optional)
board_basisarrayAn array board basis to include. For Bed and Breakfast, provide BB. For All Inclusive, provide AI. For Full Board, provide FB. For Half Board, provide HB. For Room Only provide RO. For Self Catered, provide SC. Provide an empty array if not provided.
child_agesarrayAn array of ages for each of the children going on the holiday. The array length should be the same as the number of children going on holiday. Must be the child ages upon return to provide accurate prices. This can be assumed or guessed but make it clear that you are making an assumption and ask for clarification if the user does not provide ages or if the ages provided do not match the number of children requested.
departure_airportarrayAirport IATA code. Use empty array if user is open to any departure airport.
departure_date_end_rangestringThe departure date end range in YYYY-MM-DD format. Use departure_date_start_range plus three days if not provided. If user wants a full month, use the last day of the month. Must not be in the past. Must not be more than 31 days since departure_date_start_range.
departure_date_start_rangestringThe departure date start range in YYYY-MM-DD format. Use today plus 7 days if not provided. Must not be in the past. When 'next' is used (for example, next April), use the current year plus 1
destinationsarrayAn array of destinations. Use an empty array to search all holidays. If the user has provided some indication of where they'd like to travel to, be proactive in helping the customer find suitable destinations by asking questions before searching.
inbound_departure_time_end_rangestringThe inbound departure time end range in format HH:MM. Used for providing a preference on inbound departure flight time. Should not be provided without inbound_departure_time_start_range.
inbound_departure_time_start_rangestringThe inbound departure time start range in format HH:MM. Used for providing a preference on inbound departure flight time. Should not be provided without inbound_departure_time_end_range.
number_of_adultsnumberThe number of adults going on the holiday. Use 2 if not provided.
number_of_bagsnumberThe number of checked bags requested. Use 0 if not explicitly provided.
number_of_childrennumberThe number of children going on the holiday. A child is between 2 and 15 years old on return date. Use 0 if not provided.
number_of_infantsnumberThe number of infants going on the holiday. An infant is between 0 and 23 months old on return date. Use 0 if not provided.
number_of_nightsnumberThe number of nights the user wants to go on holiday for. Use 7 if not provided.
number_of_roomsnumberThe number of rooms requested. Make an assumption based on number of adults, children and infants requested.
outbound_departure_time_end_rangestringThe outbound departure time end range in format HH:MM. Used for providing a preference on outbound departure flight time. Should not be provided without outbound_departure_time_start_range.
outbound_departure_time_start_rangestringThe outbound departure time start range in format HH:MM. Used for providing a preference on outbound departure flight time. Should not be provided without outbound_departure_time_end_range.
sort_methodstringThe sort method used to return results. Must be one of POPULARITY, PRICE_HIGH_LOW, PRICE_LOW_HIGH, or STAR_RATING. Use POPULARITY by default. Choose intentionally based on what the customer is searching for, for example, if they are looking for the best hotels, use STAR_RATING. When a customer has not specified a star rating or board basis and provides a budget, use PRICE_HIGH_LOW to surface better quality options closer to their budget rather than the cheapest available.
POPULARITYPRICE_HIGH_LOWPRICE_LOW_HIGHSTAR_RATINGstar_ratingarrayAn array of star ratings to include. For example, 1, 2, 3, 4 or 5. Provide an empty array if not requested.
maximum_total_pricenumberThe upper limit for the whole holiday for all passengers. A number in cents Where £1 is 1000.