{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","properties":{"query":{"type":"object","maxProperties":30,"properties":{"supplier_timeout":{"type":"integer"}},"required":[],"additionalProperties":false},"data":{"properties":{"airline_credit_ids":{"description":"The list of airline credit IDs that Duffel received as input.","items":{"type":"string","maxLength":16000},"type":"array","maxItems":100},"cabin_class":{"anyOf":[{"description":"The cabin that the passengers want to travel in","enum":["first","business","premium_economy","economy"],"type":"string","maxLength":16000},{"type":"null"}]},"include_split_ticket":{"description":"When set to `true` and the search has more than one slice, additional one-way searches will be fired per slice to find split-ticket candidates. These results are only included in the response when `view` is set to `itineraries`. Please get in touch with the Duffel support team at <help@duffel.com> to access this feature.","type":"boolean"},"max_connections":{"description":"The maximum number of connections within any slice of the offer. For example 0 means a direct flight which will have a single segment within each slice and 1 means a maximum of two segments within each slice of the offer.","maximum":2,"minimum":0,"type":"integer"},"passengers":{"description":"The passengers who want to travel. If you specify an `age` for a passenger, the `type` may differ for the same passenger in different offers due to airline's different rules. e.g. one airline may treat a 14 year old as an adult, and another as a young adult. You may only specify an `age` or a `type` – not both.","items":{"anyOf":[{"description":"A passenger specified by their type","properties":{"family_name":{"description":"The passenger's family name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `Ĳ`, `ĳ`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.\n\nThis is only required if you're also including loyalty programme accounts.\n","type":"string","maxLength":16000},"given_name":{"description":"The passenger's given name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `Ĳ`, `ĳ`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.\n\nThis is only required if you're also including loyalty programme accounts.\n","type":"string","maxLength":16000},"loyalty_programme_accounts":{"description":"The loyalty programme accounts for this passenger","items":{"properties":{"account_number":{"description":"The passenger's account number for this loyalty programme account","type":"string","maxLength":16000},"airline_iata_code":{"description":"The IATA code for the airline that this loyalty programme account belongs to","type":"string","maxLength":16000}},"type":"object","maxProperties":100},"type":"array","maxItems":100},"type":{"description":"The type of the passenger. If the passenger is aged 18 or over, you should specify a `type` of `adult`. If a passenger is aged under 18, you should specify their `age` instead of a `type`. A passenger can have only a type or an age, but not both.","enum":["adult","child","infant_without_seat"],"type":"string","maxLength":16000},"user_id":{"description":"The ID of the customer user that associates with this passenger.\n","type":"string","maxLength":16000}},"required":["type"],"type":"object","maxProperties":100},{"description":"A passenger specified by their age","properties":{"age":{"description":"The age of the passenger on the `departure_date` of the final slice. e.g. if you are searching for a round trip and the passenger is 15 years old at the time of the outbound flight, but they then have their birthday and are 16 years old for the inbound flight, you must set the age to 16. You should specify an `age` for passengers who are under 18 years old. A passenger can have only a type or an age, but not both. You can optionally pass age with fare_type though.","maximum":130,"minimum":0,"type":"integer"},"family_name":{"description":"The passenger's family name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `Ĳ`, `ĳ`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.\n\nThis is only required if you're also including loyalty programme accounts.\n","type":"string","maxLength":16000},"given_name":{"description":"The passenger's given name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `Ĳ`, `ĳ`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.\n\nThis is only required if you're also including loyalty programme accounts.\n","type":"string","maxLength":16000},"loyalty_programme_accounts":{"description":"The loyalty programme accounts for this passenger","items":{"properties":{"account_number":{"description":"The passenger's account number for this loyalty programme account","type":"string","maxLength":16000},"airline_iata_code":{"description":"The IATA code for the airline that this loyalty programme account belongs to","type":"string","maxLength":16000}},"type":"object","maxProperties":100},"type":"array","maxItems":100},"user_id":{"description":"The ID of the customer user that associates with this passenger.\n","type":"string","maxLength":16000}},"required":["age"],"type":"object","maxProperties":100},{"description":"A passenger specified by their fare type. This is used for leisure private fares.","properties":{"age":{"description":"The age of the passenger on the `departure_date` of the final slice. e.g. if you are searching for a round trip and the passenger is 15 years old at the time of the outbound flight, but they then have their birthday and are 16 years old for the inbound flight, you must set the age to 16. You should specify an `age` for passengers who are under 18 years old. A passenger can have only a type or an age, but not both. You can optionally pass age with fare_type though.","maximum":130,"minimum":0,"type":"integer"},"family_name":{"description":"The passenger's family name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `Ĳ`, `ĳ`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.\n\nThis is only required if you're also including loyalty programme accounts.\n","type":"string","maxLength":16000},"fare_type":{"description":"The fare type of the passenger. If the passenger is aged less than 18, you should pass in age as well.","enum":["accompanying_adult","contract_bulk","contract_bulk_child","contract_bulk_infant_with_seat","contract_bulk_infant_without_seat","frequent_flyer","group_inclusive_tour","group_inclusive_tour_child","humanitarian","individual_inclusive_tour_child","marine","seat_only","student","teacher","tour_operator_inclusive","tour_operator_inclusive_infant","unaccompanied_child","visiting_friends_and_family"],"type":"string","maxLength":16000},"given_name":{"description":"The passenger's given name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `Ĳ`, `ĳ`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.\n\nThis is only required if you're also including loyalty programme accounts.\n","type":"string","maxLength":16000},"loyalty_programme_accounts":{"description":"The loyalty programme accounts for this passenger","items":{"properties":{"account_number":{"description":"The passenger's account number for this loyalty programme account","type":"string","maxLength":16000},"airline_iata_code":{"description":"The IATA code for the airline that this loyalty programme account belongs to","type":"string","maxLength":16000}},"type":"object","maxProperties":100},"type":"array","maxItems":100},"user_id":{"description":"The ID of the customer user that associates with this passenger.\n","type":"string","maxLength":16000}},"required":["fare_type"],"type":"object","maxProperties":100}],"not":{"type":"object","required":["type","age"]}},"type":"array","maxItems":100},"private_fares":{"additionalProperties":true,"description":"The private fare codes for this offer request. You can pass in multiple airlines with their specific private fare codes. The key is the airline's IATA code that provided the private fare code. The `corporate_code` and `tour_code` are provided to you by the airline and the `tracking_reference` is to identify your business by the airlines.","type":"object","maxProperties":100},"slices":{"description":"The [slices](/docs/api/overview/key-concepts) that make up this offer request. One-way journeys can be expressed using one slice, whereas return trips will need two.","items":{"properties":{"arrival_time":{"anyOf":[{"description":"The inclusive time range for the arrival of the slice","properties":{"from":{"anyOf":[{"description":"The local time in the format `hh:mm` of the destination airport at or after which the slice should arrive. Defaults to `00:00` when only `to` is provided","type":"string","maxLength":16000},{"type":"null"}]},"to":{"anyOf":[{"description":"The local time in the format `hh:mm` of the destination airport at or before which the slice should arrive. Defaults to `23:59` when only `from` is provided","type":"string","maxLength":16000},{"type":"null"}]}},"type":"object","maxProperties":100},{"type":"null"}]},"departure_date":{"description":"The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart","format":"date","type":"string","maxLength":16000},"departure_time":{"anyOf":[{"description":"The inclusive time range for the departure of the slice","properties":{"from":{"anyOf":[{"description":"The local time in the format `hh:mm` of the origin airport at or after which the slice should depart. Defaults to current time at airport when only `to` is provided or `from` value is in the past","type":"string","maxLength":16000},{"type":"null"}]},"to":{"anyOf":[{"description":"The local time in the format `hh:mm` of the origin airport at or before which the slice should depart. Defaults to `23:59` when only `from` is provided","type":"string","maxLength":16000},{"type":"null"}]}},"type":"object","maxProperties":100},{"type":"null"}]},"destination":{"description":"The 3-letter IATA code for the city or airport where this slice ends","type":"string","maxLength":16000},"origin":{"description":"The 3-letter IATA code for the city or airport where this slice starts","type":"string","maxLength":16000}},"required":["departure_date","destination","origin"],"type":"object","maxProperties":100},"type":"array","maxItems":100}},"required":["slices","passengers"],"type":"object","maxProperties":100},"deviceIp":{"type":"string","maxLength":45},"deviceUserAgent":{"type":"string","maxLength":1000}},"required":["data"],"additionalProperties":false},"name":"Flights: Create a batch offer request","id":"duffel.api.air.batch-offer-requests.create","example":{"query":{"supplier_timeout":10000},"data":{"slices":[{"origin":"LHR","destination":"JFK","departure_time":{"to":"17:00","from":"09:45"},"departure_date":"2020-04-24","arrival_time":{"to":"17:00","from":"09:45"}}],"private_fares":{"QF":[{"corporate_code":"FLX53","tracking_reference":"ABN:2345678"}],"UA":[{"corporate_code":"1234","tour_code":"578DFL"}]},"passengers":[{"family_name":"Earhart","given_name":"Amelia","loyalty_programme_accounts":[{"account_number":"12901014","airline_iata_code":"BA"}],"type":"adult"},{"age":14},{"fare_type":"student"},{"age":5,"fare_type":"contract_bulk_child"}],"max_connections":0,"include_split_ticket":true,"cabin_class":"economy","airline_credit_ids":["acd_00009hthhsUZ8W4LxQgkjo","acd_0000thhsUZ8W4LxQgkjo00"]}},"maxRequests":1,"summary":false}}