openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 8.71 kB
JSON
{"openapi":"3.0.0","info":{"description":"\nBefore using this API, we recommend you read our **[Authorization Guide](https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262)** for more information on how to generate an access token.","title":"Flight Delay Prediction","version":"1.0.6","x-logo":{"url":"https://amadeus.com/images/en/technology/mobile-tablet/mobile-woman-office-city.jpg.transform/medium/img.jpg"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/amadeus4dev/amadeus-open-api-specification/main/spec/json/FlightDelayPrediction_v1_swagger_specification.json","version":"2.0"}],"x-providerName":"amadeus.com","x-release-note":{"1.0.0":["Initial Version"],"1.0.1":["Add enum values on result"],"1.0.2":["update examples"],"1.0.3":["update examples"]},"x-serviceName":"amadeus-flight-delay-prediction","x-status":"validated","x-tags":["#ama-for-dev"]},"paths":{"/travel/predictions/flight-delay":{"get":{"description":"","operationId":"getFlightDelayPrediction","parameters":[{"description":"city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) from which the traveler is departing, e.g. PAR for Paris","in":"query","name":"originLocationCode","required":true,"example":"NCE","schema":{"type":"string","pattern":"[A-Z]{3}"}},{"description":"city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) to which the traveler is going, e.g. PAR for Paris","in":"query","name":"destinationLocationCode","required":true,"example":"IST","schema":{"type":"string","pattern":"[A-Z]{3}"}},{"description":"the date on which the traveler will depart from the origin to go to the destination. Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2019-12-25","in":"query","name":"departureDate","required":true,"example":"2025-04-15T13:49:53.013Z","schema":{"type":"string","format":"date"}},{"description":"local time relative to originLocationCode on which the traveler will depart from the origin. Time respects ISO 8601 standard. e.g. 13:22:00","in":"query","name":"departureTime","required":true,"example":66000,"schema":{"type":"string","format":"time"}},{"description":"the date on which the traveler will arrive to the destination from the origin. Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2019-12-25","in":"query","name":"arrivalDate","required":true,"example":"2025-04-15T13:49:53.013Z","schema":{"type":"string","format":"date"}},{"description":"local time relative to destinationLocationCode on which the traveler will arrive to destination. Time respects ISO 8601 standard. e.g. 13:22:00","in":"query","name":"arrivalTime","required":true,"example":80100,"schema":{"type":"string","format":"time"}},{"description":"IATA aircraft code (http://www.flugzeuginfo.net/table_accodes_iata_en.php)","in":"query","name":"aircraftCode","required":true,"example":321,"schema":{"type":"string","pattern":"[a-zA-Z0-9]{3}"}},{"description":"airline / carrier code","in":"query","name":"carrierCode","required":true,"example":"TK","schema":{"type":"string","minLength":1,"maxLength":2}},{"description":"flight number as assigned by the carrier","in":"query","name":"flightNumber","required":true,"example":1816,"schema":{"type":"string","minLength":1,"maxLength":4}},{"description":"flight duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M","in":"query","name":"duration","required":true,"example":"PT31H10M","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/200"},"400":{"$ref":"#/components/responses/400"},"default":{"$ref":"#/components/responses/500"}},"summary":"Return the delay segment where the flight is likely to lay.","tags":["flight-delay-prediction"]}}},"x-generatedAt":"2025-04-15T13:49:53.013Z","servers":[{"url":"https://test.api.amadeus.com/v1"}],"components":{"responses":{"200":{"description":"Success","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Prediction"}},"application/json":{"schema":{"$ref":"#/components/schemas/Prediction"}}}},"400":{"description":"code | title \n------- | ------------------------------------- \n477 | INVALID FORMAT\n572 | INVALID OPTION\n4926 | INVALID DATA RECEIVED \n32171 | MANDATORY DATA MISSING \t \n","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_400"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error_400"}}}},"500":{"description":"Unexpected Error","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_500"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error_500"}}}}},"schemas":{"Collection_Meta_Link":{"properties":{"count":{"example":1,"type":"integer"},"links":{"example":{"self":"https://test.api.amadeus.com/v1/area/resources?param=value"},"properties":{"first":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"last":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"next":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"previous":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"self":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"up":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"}},"title":"CollectionLinks"}},"title":"Collection_Meta"},"Delay_Prediction":{"properties":{"id":{"description":"item identifier","readOnly":true,"type":"string"},"probability":{"description":"probability of the forecast (between 0 and 1)","type":"string"},"result":{"$ref":"#/components/schemas/PredictionResultType"},"subType":{"example":"trip-purpose","type":"string"},"type":{"description":"the resource name (`prediction`)","type":"string"}}},"Error_400":{"example":{"errors":[{"code":477,"detail":"invalid query parameter format","source":{"example":"CDG","parameter":"airport"},"status":400,"title":"INVALID FORMAT"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"Error_500":{"example":{"errors":[{"code":141,"status":500,"title":"SYSTEM ERROR HAS OCCURRED"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"Issue":{"properties":{"code":{"description":"an application-specific error code","format":"int64","type":"integer"},"detail":{"description":"explanation of the error","type":"string"},"source":{"description":"an object containing references to the source of the error","maxProperties":1,"properties":{"example":{"description":"a string indicating an example of the right value","type":"string"},"parameter":{"description":"a string indicating which URI query parameter caused the issue","type":"string"},"pointer":{"description":"a JSON Pointer [RFC6901] to the associated entity in the request document","type":"string"}},"title":"Issue_Source","type":"object"},"status":{"description":"the HTTP status code applicable to this error","type":"integer"},"title":{"description":"a short summary of the error","type":"string"}}},"Prediction":{"example":{"data":[{"id":"TK1816NCEIST20200801","probability":"0.13336977","result":"LESS_THAN_30_MINUTES","subType":"flight-delay","type":"prediction"},{"id":"TK1816NCEIST20200801","probability":"0.42023364","result":"BETWEEN_30_AND_60_MINUTES","subType":"flight-delay","type":"prediction"},{"id":"TK1816NCEIST20200801","probability":"0.34671372","result":"BETWEEN_60_AND_120_MINUTES","subType":"flight-delay","type":"prediction"},{"id":"TK1816NCEIST20200801","probability":"0.09968289","result":"OVER_120_MINUTES_OR_CANCELLED","subType":"flight-delay","type":"prediction"}],"meta":{"count":4,"links":{"self":"https://test.api.amadeus.com/v1/travel/predictions/flight-delay?originLocationCode=NCE&destinationLocationCode=IST&departureDate=2020-08-01&departureTime=18:20:00&arrivalDate=2020-08-01&arrivalTime=22:15:00&aircraftCode=321&carrierCode=TK&flightNumber=1816&duration=PT31H10M"}}},"properties":{"data":{"items":{"$ref":"#/components/schemas/Delay_Prediction"},"type":"array"},"meta":{"$ref":"#/components/schemas/Collection_Meta_Link"}},"type":"object"},"PredictionResultType":{"description":"forecast description","enum":["LESS_THAN_30_MINUTES","BETWEEN_30_AND_60_MINUTES","BETWEEN_60_AND_120_MINUTES","OVER_120_MINUTES_OR_CANCELLED"],"example":"LESS_THAN_30_MINUTES","type":"string"}}}}