{ "openapi": "3.0.0", "info": { "title": "Flight Price Analysis API", "version": "1.0.1", "description": "Before 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." }, "servers": [ { "url": "https://test.api.amadeus.com/v1" } ], "paths": { "/analytics/itinerary-price-metrics": { "get": { "summary": "GET itinerary price metric", "responses": { "200": { "description": "Successful reply", "content": { "application/vnd.amadeus+json": { "schema": { "type": "object", "properties": { "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/Warning" } }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/itinerary-price-metric" } }, "meta": { "title": "Links", "type": "object", "description": "Links related to the returned objects(s)", "properties": { "href": { "type": "string", "format": "url", "description": "URL value" }, "methods": { "type": "array", "description": "HTTP methods supported by the sibling URI", "items": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS" ] } } } } } }, "examples": { "Successful reply": { "value": { "meta": { "count": 1, "links": { "self": "https://test.api.amadeus.com/v1/analytics/itinerary-price-metrics?originIataCode=MAD&destinationIataCode=CDG&departureDate=2021-03-21¤cyCode=EUR&oneWay=false" } }, "data": [ { "type": "itinerary-price-metric", "origin": { "iataCode": "MAD" }, "destination": { "iataCode": "CDG" }, "departureDate": "2021-03-21", "transportType": "FLIGHT", "currencyCode": "EUR", "oneWay": false, "priceMetrics": [ { "amount": "43.27", "quartileRanking": "MINIMUM" }, { "amount": "228.65", "quartileRanking": "FIRST" }, { "amount": "231.03", "quartileRanking": "MEDIUM" }, { "amount": "234.48", "quartileRanking": "THIRD" }, { "amount": "442.62", "quartileRanking": "MAXIMUM" } ] } ] } } } } } }, "400": { "description": "code | title \n------- | ------------------------------------- \n477 | INVALID FORMAT\n572 | INVALID OPTION \n32171 | MANDATORY DATA MISSING ", "content": { "application/vnd.amadeus+json": { "schema": { "$ref": "#/components/schemas/Error_400" }, "examples": { "example-400": { "value": { "errors": [ { "status": 400, "code": 32171, "title": "MANDATORY DATA MISSING", "detail": "Missing mandatory query parameter" } ] } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/vnd.amadeus+json": { "schema": { "$ref": "#/components/schemas/Error_500" }, "examples": { "example-500": { "value": { "errors": [ { "status": 500, "code": 141, "title": "SYSTEM ERROR HAS OCCURRED" } ] } } } } } } }, "operationId": "get-itinerary-price-metrics", "parameters": [ { "schema": { "type": "string", "maxLength": 3, "minLength": 3, "pattern": "[a-zA-Z]{3}" }, "in": "query", "name": "originIataCode", "description": "airport code, following [IATA standard](http://www.iata.org/publications/Pages/code-search.aspx), from which the traveler will depart\n", "required": true, "example": "MAD" }, { "schema": { "type": "string", "maxLength": 3, "minLength": 3, "pattern": "[a-zA-Z]{3}" }, "in": "query", "name": "destinationIataCode", "description": "airport code, following [IATA standard](http://www.iata.org/publications/Pages/code-search.aspx), to which the traveler is going.", "required": true, "example": "CDG" }, { "schema": { "type": "string" }, "in": "query", "name": "departureDate", "description": "The date on which the traveler will depart from the origin to go to the destination. \n\nDates are specified in the[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format.", "required": true, "example": "2021-03-21" }, { "schema": { "type": "string", "maxLength": 3, "minLength": 3, "pattern": "[a-zA-Z]{3}", "default": "EUR" }, "in": "query", "name": "currencyCode", "description": "the preferred currency for display. Currency is specified in the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format, e.g. EUR for Euro" }, { "schema": { "type": "boolean", "default": "false" }, "in": "query", "name": "oneWay", "description": "true to get price metrics for a one way trip,\nfalse to get price metrics for a round trip" } ], "description": "", "tags": [ "price-metrics" ] }, "parameters": [] } }, "components": { "schemas": { "itinerary-price-metric": { "description": "price metric", "title": "ItineraryPriceMetric", "type": "object", "properties": { "type": { "type": "string", "description": "ressource type - always price-metrics" }, "origin": { "type": "object", "description": "Description of a particular point or place in physical space", "title": "Location", "properties": { "iataCode": { "type": "string", "description": "IATA location code", "example": "PAR" } } }, "destination": { "type": "object", "description": "Description of a particular point or place in physical space", "title": "Location", "properties": { "iataCode": { "type": "string", "description": "IATA location code", "example": "PAR" } } }, "departureDate": { "type": "string", "description": "The date on which the traveler will depart from the origin to go to the destination. \n\nDates are specified in the[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format." }, "transportType": { "type": "string", "enum": [ "FLIGHT" ], "description": "transportation type" }, "currencyCode": { "type": "string", "description": "currency of the prices.\n\nCurrency is specified in the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format, e.g. EUR for Euro" }, "oneWay": { "type": "boolean", "description": "true for a one way trip,\nfalse for a round trip" }, "priceMetrics": { "type": "array", "items": { "type": "object", "properties": { "amount": { "type": "string", "description": "Defines the monetary value with decimal position. It can be in cash or miles." }, "quartileRanking": { "type": "string", "enum": [ "MINIMUM", "FIRST", "MEDIUM", "THIRD", "MAXIMUM" ] } } } } } }, "Error_400": { "type": "object", "description": "A set of errors", "title": "Error 400", "properties": { "errors": { "type": "array", "items": { "type": "object", "description": "The Error Definition", "title": "Error", "properties": { "status": { "type": "integer", "description": "The [HTTP status code](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) of this response. This is present only in terminal errors which cause an unsuccessful response. In the case of multiple errors, they must all have the same status." }, "code": { "type": "integer", "description": "A machine-readable error code from the Amadeus Canned Messages table, that will enable the API Consumers code to handle this type of error" }, "title": { "type": "string", "description": "An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized" }, "detail": { "type": "string", "description": "An easy-to-read explanation specific to this occurrence of the problem. It should give the API consumer an idea of what went wrong and how to recover from it. Like the title, this field’s value can be localized." }, "source": { "type": "object", "title": "Error_Source", "properties": { "parameter": { "type": "string", "description": "The key of the URI path or query parameter that caused the error" }, "pointer": { "type": "string", "description": "A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error" }, "example": { "type": "string", "description": "A sample input to guide the user when resolving this issue" } } } } } } } }, "Error_500": { "type": "object", "description": "A set of errors", "title": "Error 500", "properties": { "errors": { "type": "array", "items": { "type": "object", "description": "The Error Definition", "title": "Error", "properties": { "status": { "type": "integer", "description": "The [HTTP status code](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) of this response. This is present only in terminal errors which cause an unsuccessful response. In the case of multiple errors, they must all have the same status." }, "code": { "type": "integer", "description": "A machine-readable error code from the Amadeus Canned Messages table, that will enable the API Consumers code to handle this type of error" }, "title": { "type": "string", "description": "An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized" }, "detail": { "type": "string", "description": "An easy-to-read explanation specific to this occurrence of the problem. It should give the API consumer an idea of what went wrong and how to recover from it. Like the title, this field’s value can be localized." }, "source": { "type": "object", "title": "Error_Source", "properties": { "parameter": { "type": "string", "description": "The key of the URI path or query parameter that caused the error" }, "pointer": { "type": "string", "description": "A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error" }, "example": { "type": "string", "description": "A sample input to guide the user when resolving this issue" } } } } } } } }, "Warning": { "type": "object", "description": "The Warning Definition", "title": "Warning", "properties": { "code": { "type": "integer", "description": "A machine-readable error code from the Canned Messages table, that will enable the API Consumers code to handle this type of error" }, "title": { "type": "string", "description": "An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized" }, "detail": { "type": "string", "description": "An easy-to-read explanation specific to this occurrence of the problem. It should give the API consumer an idea of what went wrong and how to recover from it. Like the title, this field’s value can be localized." }, "source": { "type": "object", "description": "The Warning Source Definition", "title": "Warning_Source", "properties": { "parameter": { "type": "string", "description": "The key of the URI path or query parameter that caused the error" }, "pointer": { "type": "string", "description": "A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error" }, "example": { "type": "string", "description": "A sample input to guide the user when resolving this issu" } } } }, "required": [ "code", "title" ] } } } }