{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/amadeus/refs/heads/main/json-schema/flight-offers-search-date-time-range-schema.json", "title": "DateTimeRange", "description": "DateTimeRange schema from Flight Offers Search", "required": [ "date" ], "allOf": [ { "type": "object", "properties": { "date": { "description": "Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-12-25", "type": "string", "format": "date", "example": "2018-09-22" }, "time": { "description": "Local time. hh:mm:ss format, e.g 10:30:00", "type": "string", "example": "10:30:00" } }, "required": [ "date" ] }, { "type": "object", "properties": { "dateWindow": { "description": "Either 1, 2 or 3 extra days around the local date (IxD for +/- x days - Ex: I3D), Either 1 to 3 days after the local date (PxD for +x days - Ex: P3D), or 1 to 3 days before the local date (MxD for -x days - Ex: M3D)\n\nCan not be combined with \"originRadius\" or \"destinationRadius\".\n", "type": "string", "example": "I3D", "pattern": "^[MPI][1-3]D" }, "timeWindow": { "description": "1 to 12 hours around (both +and -) the local time. Possibly limited by the number of extra days when specified, i.e. in some situations, it may not be used to exceed the maximum date range. [1-12]H format, e.g. 6H\n\nCan not be combined with \"originRadius\" or \"destinationRadius\".\n", "type": "string", "example": "2H", "pattern": "^([1-9]|10|11|12)H" } } } ] }