{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","properties":{"data":{"properties":{"accommodation":{"anyOf":[{"description":"The accommodation to search for. You must use either this object or the `location` object in your request","properties":{"fetch_rates":{"description":"Indicates if the accommodation search should return rooms and rates for each search result","type":"boolean"},"ids":{"description":"The unique identifiers of the accommodation to search for. The maximum number of IDs is 10 when fetching room and rates, otherwise the maximum number of IDs is 200.","items":{"type":"string","maxLength":16000},"type":"array","maxItems":100}},"required":["ids"],"type":"object","maxProperties":100},{"type":"null"}]},"check_in_date":{"description":"The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the guest wants to check in. Check-in date can be no more than 330 days in the future.","format":"date","type":"string","maxLength":16000},"check_out_date":{"description":"The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the guest wants to check out. A stay can be up to 99 nights.","format":"date","type":"string","maxLength":16000},"free_cancellation_only":{"description":"Whether this search is only for rates with free cancellation available. This can affect the rates and accommodation which are returned. If this is false, or omitted, all rates will be searched for.","type":"boolean"},"guests":{"description":"The list of guests travelling.","items":{"additionalProperties":false,"properties":{"age":{"anyOf":[{"description":"The age of the guest at the time of booking. Required for guests of type `child`. Child age must be between 0 and 17. Do not supply an age for guests of type `adult`.","type":"number"},{"type":"null"}]},"type":{"description":"The type of guest. An age is required for guests with a type `child`.","enum":["child","adult"],"type":"string","maxLength":16000}},"type":"object","maxProperties":100},"type":"array","maxItems":100},"instant_payment":{"description":"When `true`, only accommodation and rates are returned where payment is collected at the time of booking by Duffel or the source. When `false`, only rates where payment is collected by the accommodation are returned. When omitted, all rates are returned.","type":"boolean"},"location":{"anyOf":[{"description":"Descriptor for an area to search for a stay. Accepts latitude-longitude paired with radius. You must use either this object or the `accommodation` object in your request","properties":{"geographic_coordinates":{"description":"The center of the search criteria's radius. Represented by an object containing latitude and longitude.","properties":{"latitude":{"description":"The latitude position of the search's center, represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°","type":"number"},"longitude":{"description":"The longitude position of the search's center, represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°","type":"number"}},"required":["latitude","longitude"],"type":"object","maxProperties":100},"radius":{"description":"The search area's extent from the provided coordinates in kilometers. Can only be between 1 and 100. Default of 5km is subject to change.","type":"integer"}},"required":["geographic_coordinates"],"type":"object","maxProperties":100},{"type":"null"}]},"mobile":{"description":"Whether this search has come from a mobile device. This can affect rates and content returned for this search.","type":"boolean"},"negotiated_rate_ids":{"description":"A list of [negotiated rate ids](https://duffel.com/docs/api/v2/negotiated-rates#negotiated-rates-schema-id) to perform the search with.\nWill return negotiated alongside public rates on a best effort basis for matching [accommodation ids](https://duffel.com/docs/api/v2/negotiated-rates#negotiated-rates-schema-accommodation-ids) on the negotiated rate.\n","items":{"type":"string","maxLength":16000},"type":"array","maxItems":100},"rooms":{"description":"The number of rooms required","type":"integer"}},"required":["check_in_date","check_out_date","guests","rooms"],"type":"object","maxProperties":100},"deviceIp":{"type":"string","maxLength":45},"deviceUserAgent":{"type":"string","maxLength":1000}},"required":["data"],"additionalProperties":false},"name":"Stays: Search for accommodation","id":"duffel.api.stays.search.create","example":{"data":{"rooms":1,"negotiated_rate_ids":["nre_0000ATOwpuYnZohiSmlmym"],"mobile":false,"location":{"radius":5,"geographic_coordinates":{"longitude":-0.1416,"latitude":51.5071}},"instant_payment":false,"guests":[{"type":"adult"},{"age":7,"type":"child"}],"free_cancellation_only":false,"check_out_date":"2023-06-07","check_in_date":"2023-06-04"}},"maxRequests":1,"summary":false}}