UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 9.17 kB
{"openapi":"3.0.0","info":{"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. \n\nPlease also be aware that our test environment is based on a subset of the production, this API in test only offers 24 hotels; 10 in London and 14 in New-York. You can find the list in our **[data collection](https://github.com/amadeus4dev/data-collection)**.\n","title":"Hotel Ratings","version":"1.0.2","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/HotelRatings_v2_swagger_specification.json","version":"2.0"}],"x-providerName":"amadeus.com","x-serviceName":"amadeus-hotel-ratings"},"tags":[{"description":"Sentiments about Hotels.","name":"Hotel Ratings"}],"paths":{"/e-reputation/hotel-sentiments":{"get":{"description":"","operationId":"getSentimentsByHotelIds","parameters":[{"description":"Comma-separated list of Amadeus Hotel Ids (max. 3) . Amadeus Hotel Ids are found in the Hotel Search response (parameter name is 'hotelId').","in":"query","name":"hotelIds","required":true,"example":["TELONMFS"],"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}}],"responses":{"200":{"$ref":"#/components/responses/sentiments"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"default":{"$ref":"#/components/responses/500"}},"summary":"Get sentiments by Amadeus Hotel Ids","tags":["Hotel Ratings"]}}},"servers":[{"url":"https://test.api.amadeus.com/v2"}],"components":{"responses":{"400":{"description":"Not Found","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"401":{"description":"Unauthorized","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error401"}}}},"500":{"description":"Unexpected Error","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error500"}}}},"sentiments":{"description":"Successful operation","content":{"application/vnd.amadeus+json":{"schema":{"example":{"data":[{"hotelId":"ADNYCCTB","numberOfRatings":278,"numberOfReviews":218,"overallRating":93,"sentiments":{"catering":89,"facilities":90,"location":98,"pointsOfInterest":91,"roomComforts":92,"service":98,"sleepQuality":87,"staff":100,"valueForMoney":87},"type":"hotelSentiment"},{"hotelId":"TELONMFS","numberOfRatings":2666,"numberOfReviews":2667,"overallRating":81,"sentiments":{"catering":81,"facilities":75,"internet":72,"location":89,"pointsOfInterest":81,"roomComforts":87,"service":80,"sleepQuality":78,"staff":89,"valueForMoney":75},"type":"hotelSentiment"}],"meta":{"count":1,"links":{"self":"https://test.api.amadeus.com/v2/e-reputation/hotel-sentiments?hotelIds=ADNYCCTB,TELONMFS,XXXYYY01"}},"warnings":[{"code":913,"detail":"Some of the requested properties were not found in our database.","source":{"parameter":"hotelIds","pointer":"XXXYYY01"},"title":"PROPERTIES NOT FOUND"}]},"properties":{"data":{"items":{"$ref":"#/components/schemas/HotelSentiment"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"},"warnings":{"items":{"$ref":"#/components/schemas/WarningNotFound"},"type":"array"}},"required":["data"],"title":"SuccessSentiments"}}}}},"schemas":{"CollectionLinks":{"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"},"CollectionMeta":{"properties":{"count":{"example":1,"type":"integer"},"links":{"$ref":"#/components/schemas/CollectionLinks"}},"title":"CollectionMeta"},"Error":{"properties":{"code":{"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","type":"integer"},"detail":{"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.","type":"string"},"documentation":{"description":"A link to a web page or file with further documentation to help the API consumer resolve this error","format":"url","type":"string"},"source":{"$ref":"#/components/schemas/ErrorSource"},"status":{"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.","type":"integer"},"title":{"description":"An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized","type":"string"}},"required":["status","code","title"]},"Error400":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/Error"},"type":"array"}},"required":["errors"]},"Error401":{"example":{"errors":[{"code":20,"detail":"Query unauthorized","status":401,"title":"RESTRICTED"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Error"},"type":"array"}},"required":["errors"]},"Error500":{"example":{"errors":[{"code":141,"status":500,"title":"SYSTEM ERROR HAS OCCURRED"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Error"},"type":"array"}},"required":["errors"]},"ErrorSource":{"properties":{"example":{"description":"A sample input to guide the user when resolving this issue","type":"string"},"parameter":{"description":"The key of the URI path or query parameter that caused the error","type":"string"},"pointer":{"description":"A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error","type":"string"}}},"HotelSentiment":{"properties":{"hotelId":{"description":"Amadeus Hotel Ids are found in the Hotel Search response (parameter name is 'hotelId')","example":"BBLONBTL","type":"string"},"numberOfRatings":{"example":350,"type":"integer"},"numberOfReviews":{"example":200,"type":"integer"},"overallRating":{"$ref":"#/components/schemas/Score"},"sentiments":{"description":"Dictionary containing scores for all the available categories. If a property does not have any category this object will not be present in the response.","properties":{"catering":{"$ref":"#/components/schemas/Score"},"facilities":{"$ref":"#/components/schemas/Score"},"internet":{"$ref":"#/components/schemas/Score"},"location":{"$ref":"#/components/schemas/Score"},"pointsOfInterest":{"$ref":"#/components/schemas/Score"},"roomComforts":{"$ref":"#/components/schemas/Score"},"service":{"$ref":"#/components/schemas/Score"},"sleepQuality":{"$ref":"#/components/schemas/Score"},"staff":{"$ref":"#/components/schemas/Score"},"swimmingPool":{"$ref":"#/components/schemas/Score"},"valueForMoney":{"$ref":"#/components/schemas/Score"}},"type":"object"},"type":{"example":"hotelSentiment","type":"string"}},"required":["hotelId","overallRating","avgHotelAvailabilityResponseTime","numberOfRatings","numberOfReviews"],"type":"object"},"Score":{"description":"Integer between 0 and 100. It represents the score for a specific category or the overall rating for a given Hotel.","example":82,"type":"integer"},"Warning":{"properties":{"code":{"description":"A machine-readable error code from the Canned Messages table, that will enable the API Consumers code to handle this type of error","type":"integer"},"detail":{"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.","type":"string"},"documentation":{"description":"A link to a web page or file with further documentation to help the API consumer resolve this error","format":"url","type":"string"},"source":{"$ref":"#/components/schemas/ErrorSource"},"title":{"description":"An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized","type":"string"}},"required":["code","title"]},"WarningNotFound":{"allOf":[{"$ref":"#/components/schemas/Warning"}],"example":{"code":913,"detail":"Some of the requested properties were not found in our database.","source":{"parameter":"hotelIds","pointer":"ABCDEFGH,LPCDEFGQ"},"title":"PROPERTIES NOT FOUND"}}}}}