swagger: '2.0' info: title: Amadeus Hotel Booking version: 1.1.3 description: >2 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. Please also be aware that our test environment is based on a subset of the production for this API it may change dynamically. For your tests, use big cities like LON (London) or NYC (New-York). **Warning: Do not perform test booking in production**. All requests are sent and processed by hotel providers. An excessive amount of fake/canceled reservation will make you blacklisted by hotel providers. x-tags: - '#mobile-services' x-status: validated host: test.api.amadeus.com basePath: /v1 schemes: - https consumes: - application/vnd.amadeus+json produces: - application/vnd.amadeus+json paths: /booking/hotel-bookings: parameters: - $ref: '#/parameters/Ama-Client-Ref' - $ref: '#/parameters/Accept-Encoding' post: tags: - Booking description: '' summary: Amadeus Create Orders Associated to the Hotel Offers operationId: createBooking parameters: - $ref: '#/parameters/bookingBody' responses: '201': $ref: '#/responses/BookingSell' '400': $ref: '#/responses/Error400ResponseCreateBooking' '500': $ref: '#/responses/Error500ResponseCreateBooking' tags: - name: Booking parameters: bookingBody: name: requestBody in: body description: > `offerId`, `guests`, `payments` and optional `rooms` for the repartition (when used the `rooms` array items must match the shopping offer `roomQuantity`) required: true schema: type: object title: BookingSchema required: - data properties: data: type: object title: HotelBookingQuery required: - offerId - guests properties: offerId: type: string description: offerId to book pattern: ^[A-Z0-9]*$ minLength: 2 maxLength: 100 example: 63A93695B58821ABB0EC2B33FE9FAB24D72BF34B1BD7D707293763D8D9378FC3 guests: type: array description: minimum one guest is mandatory minItems: 1 maxItems: 99 uniqueItems: true items: $ref: '#/definitions/Stakeholder' payments: type: array description: payments (often mandatory) minItems: 1 maxItems: 9 uniqueItems: true items: $ref: '#/definitions/Payment' rooms: type: array description: >- rooms repartition (when used the `rooms` array items must match the shopping offer `roomQuantity`) minItems: 1 maxItems: 9 items: type: object title: Room description: room properties: guestIds: type: array description: room main guest (and accompagnants) (optional) uniqueItems: true items: type: integer example: 1 paymentId: type: integer description: if missing, the first payment is used (optional) example: 1 specialRequest: type: string description: special request to send to the reception (optional) minLength: 2 maxLength: 120 example: I will arrive at midnight example: data: offerId: NRPQNQBOJM guests: - name: title: MR firstName: BOB lastName: SMITH contact: phone: '+33679278416' email: bob.smith@email.com payments: - method: creditCard card: vendorCode: VI cardNumber: '0000000000000000' expiryDate: 2026-01 Ama-Client-Ref: name: Ama-Client-Ref in: header required: false type: string pattern: ^[A-Z0-9_]*$ description: Client Reference to track Request/Response Accept-Encoding: name: Accept-Encoding in: header required: false type: string enum: - gzip - identity description: Compress the Response definitions: ErrorResponse: title: ErrorResponse type: object required: - errors properties: errors: type: array items: $ref: '#/definitions/Error' Error: type: object description: Error required: - code - title - status properties: code: type: integer description: >- [Integer] A machine-readable error code from the Amadeus Canned Messages table, that will enable the API Consumers code to handle this type of error example: 1 title: type: string description: >- [String] An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized example: Resource not found detail: type: string description: >- [String] 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 value can be localized. example: The targeted resource doesn't exist status: type: integer description: >- [Integer] 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. example: 400 Warning: type: object description: Warning required: - code - title properties: code: type: integer description: >- [Integer] A machine-readable warning code from the Amadeus Canned Messages table, that will enable the API Consumers code to handle this type of warning example: 1 title: type: string description: >- [String] A warning title from the Canned Messages table with a 1:1 correspondence to the warning code. This may be localized example: Resource not found detail: type: string description: >- [String] 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 value can be localized. example: The targeted resource doesn't exist HotelBookingLight: type: object description: Booking Details required: - type - id - providerConfirmationId properties: type: type: string description: Response Type example: hotel-booking id: type: string pattern: ^[A-Z0-9_]*$ minLength: 5 maxLength: 19 description: Booking Id example: XD_8138319951754 providerConfirmationId: type: string pattern: ^[A-Z0-9_]*$ minLength: 2 maxLength: 16 description: >- GDS Confirmation Number. If you call the Provider, this Reference may be asked example: '8138319951754' associatedRecords: type: array minItems: 1 maxItems: 1 items: $ref: '#/definitions/AssociatedRecord' self: type: string format: uri description: Retrieve Booking Details example: >- https://test.api.amadeus.com/v1/booking/hotel-bookings/XD_8138319951754 AssociatedRecord: type: object description: Associated Record (Flight Booking Record) required: - reference - originSystemCode properties: reference: type: string pattern: ^[A-Z0-9]{6}$ description: Amadeus GDS Record minLength: 6 maxLength: 6 example: QVH2BX originSystemCode: type: string example: GDS enum: - GDS description: '* GDS: Associated Amadeus GDS Flight Booking PNR Record' Stakeholder: type: object description: Guest Details required: - name - contact properties: id: type: integer description: item identifier example: 1 name: $ref: '#/definitions/Name' contact: $ref: '#/definitions/Contact' hotelRewardsMember: type: string pattern: ^[A-Z0-9-]{1,21}$ minLength: 1 maxLength: 21 example: '3081031320523260' description: > Hotel Chain Rewards Member Number. To receive your Rewards Points, access online check in, fast check out. An error is returned by the Chain if the number is invalid. Example Rewards Programs: * Marriott Bonvoy * Hilton Honors * Hyatt Rewards * IHG Rewards * Wyndham Rewards * Accor Live Limitless ALL * Best Western Rewards * Choice Privileges * Radisson Rewards example: id: 1 name: title: MR firstName: BOB lastName: SMITH contact: phone: '+33679278416' email: bob.smith@email.com Name: type: object description: Guest Name required: - firstName - lastName properties: title: type: string description: title/gender of room guest pattern: ^[A-Za-z -]*$ minLength: 1 maxLength: 54 enum: - MR - MRS - MS example: MR firstName: type: string description: first name (and middle name) of room guest pattern: ^[A-Za-z \p{Han}\p{Katakana}\p{Hiragana}\p{Hangul}-]*$ minLength: 1 maxLength: 56 example: BOB lastName: type: string description: last name of room guest pattern: ^[A-Za-z \p{Han}\p{Katakana}\p{Hiragana}\p{Hangul}-]*$ minLength: 1 maxLength: 57 example: SMITH Contact: type: object description: Contact Details required: - phone - email properties: phone: type: string description: Phone Number in standard E.123(https://en.wikipedia.org/wiki/E.123) pattern: ^[+][1-9][0-9]{4,18}$ minLength: 6 maxLength: 20 example: '+33679278416' email: type: string format: email description: Email Address pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$ minLength: 3 maxLength: 90 example: bob.smith@email.com Payment: type: object title: Payment description: form of payment (mandatory in case of `acceptedPayments`/`methods`) required: - method properties: id: type: integer example: 1 method: type: string example: creditCard enum: - creditCard description: |- The Payment Methods: * creditCard (CC) - Payment Cards in `creditCards` are accepted card: type: object title: Card description: payment card details (mandatory in case of `method` creditCard) required: - vendorCode - cardNumber - expiryDate properties: vendorCode: type: string pattern: ^[A-Z]{2}$ minLength: 2 maxLength: 2 example: VI description: | card type (CA, VI, AX, DC...) Examples: * CA - MasterCard (warning: use it instead of MC/IK/EC/MD/XS) * VI - Visa * AX - American Express * DC - Diners Club * AU - Carte Aurore * CG - Cofinoga * DS - Discover * GK - Lufthansa GK Card * JC - Japanese Credit Bureau * TC - Torch Club * TP - Universal Air Travel Card * BC - Bank Card * DL - Delta * MA - Maestro * UP - China UnionPay * VE - Visa Electron cardNumber: type: string description: card number pattern: ^[0-9]*$ minLength: 2 maxLength: 22 expiryDate: type: string description: Expiration Date YYYY-MM pattern: ^[0-9]{4}-[0-9]{2}$ minLength: 7 maxLength: 7 example: 2019-01 responses: BookingSell: description: Booked schema: type: object title: HotelBookedResponse properties: warnings: type: array description: All Warnings items: $ref: '#/definitions/Warning' data: type: array description: All room bookings data items: $ref: '#/definitions/HotelBookingLight' example: data: - type: hotel-booking id: XD_8138319951754 providerConfirmationId: '8138319951754' associatedRecords: - reference: QVH2BX originSystemCode: GDS Error400ResponseCreateBooking: description: > Bad Request code | title | owner | pointer - | -- | -- | - 477 | INVALID FORMAT | Amadeus | 4725 | INVALID PASSENGER ASSOCIATION | Amadeus | data/rooms/guestIds 33555 | NUMBER OF ROOMS MISMATCH BETWEEN SHOPPING AND BOOKING | Amadeus | data/rooms 33554 | PRICE HAS CHANGED. PLEASE GET A NEW OFFERID AND TRY AGAIN | Amadeus | data/offerId 36803 | OFFERID HAS EXPIRED. PLEASE GET A NEW OFFERID AND TRY AGAIN | Amadeus | data/offerId 1205 | INVALID CREDIT CARD TYPE | Amadeus | data/payments/card/vendorCode 8517 | INVALID CREDIT CARD NUMBER | Provider | data/payments/card/cardNumber 1427 | GUARANTEE REQUIRED | Provider | data/payments/card 1146 | DEPOSIT REQUIRED | Provider | data/payments/card 3659 | CREDIT CARD DEPOSIT REQUIRED | Provider | data/payments/card 3682 | CREDIT CARD NOT ACCEPTED AT HOTEL PROPERTY | Provider | data/payments/card/vendorCode 3871 | CREDIT CARD EXPIRATION DATE INVALID FOR CHECK IN DATE | Provider | data/payments/card/expiryDate schema: $ref: '#/definitions/ErrorResponse' Error500ResponseCreateBooking: description: > Internal Server Error code | title | owner - | -- | - 00011 | UNABLE TO PROCESS | Provider 04070 | UNABLE TO PROCESS - CONTACT HELP DESK | Amadeus schema: $ref: '#/definitions/ErrorResponse' x-generatedAt: '2020-02-12T17:01:55.203Z'