Lodging Booking API

Guidance and examples for accessing the Lodging Booking API

Important: All partners leveraging XAP Booking APIs from any line of business must be aware of the PSD2 and 3DSv2 initiatives that launched in September, 2019. Please read the article on XAP Support of PSD2 and 3DSv2 Bookings for more information.

The Lodging Booking API allows you to enable up to 8 rooms in a single property to be booked on behalf of a customer.

Endpoint

MethodEndpointPrerequisite
POSThttps://apim.expedia.com/hotels/bookings/[offerToken]The offerToken from the Lodging Details API

Required Headers

Key:Expedia API key
Authorization:Expedia API Authorization String
User-Id:username@domain.com

The email address associated with the booking and to which the Booking Confirmation Email will be sent.

Content-Type:application/json
Accept:application/vnd.exp-hotel.v3+json
Partner-Transaction-Id:[Partner TransactionID String]

Next Steps

  • View itinerary via Lodging Retrieve API.
  • View cancellation details via Lodging PreCancel API.
  • Cancel a booking via Lodging Cancel API.
  • Go to weblink for retrieve.

Hotel Booking Request Examples

Booking Request URL

https://apim.expedia.com/hotels/bookings/[offerToken]?price=[price]&currency=[currency]

Single Room Book Request

{
  "Title": "My Hotel Booking",
  "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
  "RoomDetails": [
    {
      "Traveler": {
        "Primary": true,
        "Name": {
          "FirstName": "San",
          "LastName": "Zhang",
          "MiddleName": "Edward"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        },
        "Email": "San.Zhang@gmail.com"
      },
      "SpecialRequests": "check-in 2 hours late,Crib Required"
    }
  ],
  "BillingDetails": {
    "CreditCard": {
      "CardNumber": "4XXXXXXXXXXXXXX8",
      "CardType": "Visa",
      "CardSecurityCode": "123",
      "ExpirationMonth": "12",
      "ExpirationYear": "2025"
    },
    "Name": {
      "FirstName": "San",
      "MiddleName": "Edward",
      "LastName": "Zhang"
    },
    "Address": {
      "Address1": "3333 108th Ave",
      "Address2": "Expedia HQ",
      "City": "Bellevue",
      "Province": "WA",
      "Country": "USA",
      "PostalCode": "98004"
    },
    "Phone": {
      "CountryCode": "1",
      "AreaCode": "425",
      "Number": "1234567"
    }
  },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123"
  },
  "PartnerMetaData" : {
    "SampleKey1" : "Sample Value 1",
    "SampleKey2" : "Sample Value 2"
  }
}

Single Room Book Response

{
  "TransactionId": "a18c6a56-5203-415a-befe-67a63f7509be",
  "OrderNumber": "9030261720045",
  "OrderId": -9223371999697382799,
  "OrderVersion": 1,
  "TripId": "a5f94da6-174f-5bda-a772-d0ab69ddd320",
  "ItineraryNumber": 79018026356,
  "BookingDateTime": "2021-10-05T13:06:00-07:00",
  "PartnerAgentId": "123456",
  "PartnerConfirmationNumber": "hello123",
  "Links": {
    "ApiCancel": {
      "Accept": "application/vnd.exp-hotel.v3+json",
      "Method": "PUT",
      "Href": "https://apim.expedia.com/hotels/bookings/79018026356"
    },
    "ApiPreCancel": {
      "Accept": "application/vnd.exp-hotel.v3+json",
      "Method": "GET",
      "Href": "https://apim.expedia.com/hotels/bookings/79018026356/canceldetails"
    },
    "WebItinRetrieve": {
      "Href": "https://wwwexpediacom.int-milan.sb.karmalab.net/trips/79018026356?userToken="
    },
    "ApiItinRetrieve": {
      "Accept": "application/vnd.exp-hotel.v3+json",
      "Method": "GET",
      "Href": "https://apim.expedia.com/hotels/bookings/79018026356"
    }
  },
  "HotelConfirmation": "8100769832243",
  "NumberOfRooms": 1,
  "LengthOfStay": 3,
  "HotelDetails": {
    "Id": "50947",
    "Rooms": [
      {
        "Traveler": {
          "Name": {
            "FirstName": "San",
            "MiddleName": "Edward",
            "LastName": "Zhang"
          },
          "Phone": {
            "CountryCode": "1",
            "AreaCode": "206",
            "Number": "9876543"
          },
          "Email": "San.Zhang@gmail.com"
        },
        "RoomPreferences": [
          {
            "Type": "SmokingPreference",
            "Value": "NonSmoking"
          },
          {
            "Type": "Bed",
            "Value": "15"
          }
        ],
        "SpecialRequests": "check-in 2 hours late,Crib Required",
        "Occupants": [
          {
            "Adults": 2
          }
        ],
        "StayDates": [
          {
            "CheckInDate": "2021-10-17",
            "CheckOutDate": "2021-10-20"
          }
        ],
        "Description": "Single Room, 1 Queen Bed",
        "RatePlanType": "standalone",
        "RatePlans": [
          {
            "RoomTypeId": "201892847",
            "RatePlanId": "209571066",
            "RateRuleId": "226351705",
            "InventorySourceId": "24",
            "ReserveWithDeposit": true,
            "StayDates": {
              "CheckInDate": "2021-10-17",
              "CheckOutDate": "2021-10-20"
            },
            "Price": {
              "BaseRate": {
                "Value": "927.00",
                "Currency": "USD"
              },
              "TaxesAndFees": {
                "Value": "150.60",
                "Currency": "USD"
              },
              "TotalPrice": {
                "Value": "1077.60",
                "Currency": "USD"
              },
              "AvgNightlyRate": {
                "Value": "309.00",
                "Currency": "USD"
              },
              "HotelMandatoryFees": {
                "Value": "42.57",
                "Currency": "USD"
              },
              "RoomRates": [
                {
                  "RoomIndex": 1,
                  "NightlyRates": [
                    {
                      "StayDate": "2021-10-17",
                      "BaseRate": {
                        "Value": "309.00",
                        "Currency": "USD"
                      },
                      "TaxesAndFees": {
                        "Value": "50.20",
                        "Currency": "USD"
                      },
                      "TotalPrice": {
                        "Value": "359.20",
                        "Currency": "USD"
                      }
                    },
                    {
                      "StayDate": "2021-10-18",
                      "BaseRate": {
                        "Value": "309.00",
                        "Currency": "USD"
                      },
                      "TaxesAndFees": {
                        "Value": "50.20",
                        "Currency": "USD"
                      },
                      "TotalPrice": {
                        "Value": "359.20",
                        "Currency": "USD"
                      }
                    },
                    {
                      "StayDate": "2021-10-19",
                      "BaseRate": {
                        "Value": "309.00",
                        "Currency": "USD"
                      },
                      "TaxesAndFees": {
                        "Value": "50.20",
                        "Currency": "USD"
                      },
                      "TotalPrice": {
                        "Value": "359.20",
                        "Currency": "USD"
                      }
                    }
                  ]
                }
              ]
            },
            "PaymentMethod": "Hotel",
            "CancellationPolicy": {
              "Refundable": true,
              "FreeCancellation": true,
              "FreeCancellationEndDateTime": "2021-10-15T19:00:00-07:00",
              "CancellationPenaltyRules": [
                {
                  "PenaltyNightCount": 1,
                  "PenaltyStartDateTime": "2021-10-15T19:00:00-07:00",
                  "PenaltyEndDateTime": "2021-10-17T19:00:00-07:00"
                },
                {
                  "PenaltyPercentOfStay": "100",
                  "PenaltyStartDateTime": "2021-10-17T19:00:00-07:00",
                  "PenaltyEndDateTime": "2021-10-20T19:00:00-07:00"
                }
              ]
            },
            "ConfirmationNumber": "075d5c53-f9c5-436f-a98f-592e32f12fd8",
            "Links": {
              "ApiCancel": {
                "Accept": "application/vnd.exp-hotel.v3+json",
                "Method": "PUT",
                "Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
              }
            }
          }
        ],
        "Price": {
          "BaseRate": {
            "Value": "927.00",
            "Currency": "USD"
          },
          "TaxesAndFees": {
            "Value": "150.60",
            "Currency": "USD"
          },
          "TotalPrice": {
            "Value": "1077.60",
            "Currency": "USD"
          },
          "AvgNightlyRate": {
            "Value": "309.00",
            "Currency": "USD"
          },
          "HotelMandatoryFees": {
            "Value": "42.57",
            "Currency": "USD"
          }
        },
        "Links": {
          "ApiCancel": {
            "Accept": "application/vnd.exp-hotel.v3+json",
            "Method": "PUT",
            "Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
          }
        },
        "SmokingOption": "NonSmoking"
      }
    ]
  },
  "TotalPrice": {
    "Value": "1077.60",
    "Currency": "USD"
  }
}

Single Room Book Response - More Details

{
    "TransactionId": "a18c6a56-5203-415a-befe-67a63f7509be",
    "OrderNumber": "9030261720045",
    "OrderId": -9223371999697382799,
    "OrderVersion": 1,
    "TripId": "a5f94da6-174f-5bda-a772-d0ab69ddd320",
    "ItineraryNumber": 79018026356,
    "BookingDateTime": "2021-10-05T13:06:00-07:00",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123",
    "Links": {
        "ApiCancel": {
            "Accept": "application/vnd.exp-hotel.v3+json",
            "Method": "PUT",
            "Href": "https://apim.expedia.com/hotels/bookings/79018026356"
        },
        "ApiPreCancel": {
            "Accept": "application/vnd.exp-hotel.v3+json",
            "Method": "GET",
            "Href": "https://apim.expedia.com/hotels/bookings/79018026356/canceldetails"
        },
        "WebItinRetrieve": {
            "Href": "https://wwwexpediacom.int-milan.sb.karmalab.net/trips/79018026356?userToken="
        },
        "ApiItinRetrieve": {
            "Accept": "application/vnd.exp-hotel.v3+json",
            "Method": "GET",
            "Href": "https://apim.expedia.com/hotels/bookings/79018026356"
        }
    },
    "HotelConfirmation": "8100769832243",
    "NumberOfRooms": 1,
    "LengthOfStay": 3,
    "HotelDetails": {
        "Id": "50947",
        "Name": "Motif Seattle",
        "LocalCurrencyCode": "USD",
        "PhoneInfos": [{
            "CountryCode": "1",
            "AreaCode": "425",
            "Number": "1234567"
        }],
        "Location": {
            "Address": {
                "Address1": "1415 5th Ave",
                "City": "Seattle",
                "Province": "WA",
                "Country": "USA",
                "PostalCode": "98101"
            },
            "GeoLocation": {
                "Latitude": "47.60985",
                "Longitude": "-122.33475"
            }
        },
        "Description": {
            "LocationTeaser": "Located in Seattle Central Business District, this hotel is within a 5-minute walk of 5th Avenue Theater and Nordstrom. Pike Place Market and Washington State Convention Center are also within 10 minutes. ",
            "HotelTeaser": "Along with 2 restaurants, this smoke-free hotel has 2 bars/lounges and a fitness center. WiFi in public areas is free. Other amenities include a rooftop terrace, a 24-hour business center, and self parking. ",
            "RoomTeaser": "All 319 rooms offer comforts like pillowtop beds and premium bedding, plus iPod docks and flat-screen TVs with satellite channels. Guests will also find WiFi, room service, and coffee makers. "
        },
        "ThumbnailUrl": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_t.jpg",
        "Media": [{
                "Type": "1",
                "Title": "Featured Image",
                "Size": "b",
                "Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_b.jpg"
            },
            {
                "Type": "1",
                "Title": "Featured Image",
                "Size": "s",
                "Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_s.jpg"
            },
            {
                "Type": "1",
                "Title": "Featured Image",
                "Size": "t",
                "Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_t.jpg"
            },
            {
                "Type": "1",
                "Title": "Featured Image",
                "Size": "y",
                "Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_y.jpg"
            },
            {
                "Type": "1",
                "Title": "Featured Image",
                "Size": "z",
                "Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_z.jpg"
            }
        ],
        "StarRating": "4.0",
        "Policies": {
            "CheckInStartTime": "4 PM",
            "CheckInEndTime": "2 AM",
            "CheckOutTime": "noon",
            "PetPolicies": [
                "Pets allowed for an extra charge of USD 20 per accommodation, per stay",
                "2 per room"
            ],
            "ChildrenAndExtraBedsPolicies": [
                "Children are welcome.",
                "Rollaway/extra beds are available for USD 20 per night.",
                "Free cribs (infant beds)!"
            ]
        },
      "CleanlinessAndSafety": {
          "CLEANLINESS": [
               "Follows regional sanitization guidelines of O2 Safe (UNPLV) (France)",
               "Follows standard sanitization guidelines of We Care Clean (Best Western)",
               "Follows industry sanitization guidelines of European Holiday Home Association (EHHA - Europe)"
             ],
          "SOCIAL_DISTANCING": [
              "Protective shields in place at main contact areas",
              "Guest rooms kept vacant for 72 hours between stays",
              "Social distancing measures in place"
           ],
           "SAFETY": [
              "Personal protective equipment worn by staff",
              "Temperature checks available for guests",
              "Masks available",
              "Hand sanitizer provided",
              "Individually-wrapped food options available for lunch, dinner, and through room service"
            ],
           "DISCLAIMER": [
              "This information is provided by our partners."
          ]
       },
        "HotelAmenities": [{
                "Id": "2178",
                "Name": "Use of nearby fitness center (discount)"
            },
            {
                "Id": "324",
                "Name": "Coffee/tea in common areas"
            },
            {
                "Id": "8",
                "Name": "Elevator/lift"
            },
            {
                "Id": "3912",
                "Name": "Rooftop terrace"
            },
            {
                "Id": "9",
                "Name": "Fitness facilities"
            },
            {
                "Id": "3913",
                "Name": "Number of bars/lounges - 2"
            },
            {
                "Id": "2063",
                "Name": "24-hour front desk"
            },
            {
                "Id": "81",
                "Name": "Conference space"
            },
            {
                "Id": "2066",
                "Name": "Porter/bellhop"
            },
            {
                "Id": "2131",
                "Name": "Meeting rooms12"
            },
            {
                "Id": "2070",
                "Name": "Dry cleaning/laundry service"
            },
            {
                "Id": "2390",
                "Name": "Free WiFi"
            },
            {
                "Id": "3862",
                "Name": "Self parking (surcharge)"
            },
            {
                "Id": "2072",
                "Name": "Limo or Town Car service available"
            },
            {
                "Id": "2137",
                "Name": "Smoke-free property"
            },
            {
                "Id": "2016",
                "Name": "Safe-deposit box at front desk"
            },
            {
                "Id": "2592",
                "Name": "Conference space size (meters) - 1394"
            },
            {
                "Id": "2593",
                "Name": "Number of meeting rooms - 14"
            },
            {
                "Id": "4003",
                "Name": "Luggage storage"
            },
            {
                "Id": "2537",
                "Name": "Number of restaurants - 2"
            },
            {
                "Id": "361",
                "Name": "Breakfast available (surcharge)"
            },
            {
                "Id": "2538",
                "Name": "24-hour business center"
            },
            {
                "Id": "43",
                "Name": "Concierge services"
            },
            {
                "Id": "2539",
                "Name": "Conference space size (feet) - 15000"
            },
            {
                "Id": "52",
                "Name": "Total number of rooms - 319"
            },
            {
                "Id": "54",
                "Name": "Number of floors - 20"
            },
            {
                "Id": "2043",
                "Name": "Multilingual staff"
            },
            {
                "Id": "317",
                "Name": "Fireplace in lobby"
            },
            {
                "Id": "2047",
                "Name": "Free newspapers in lobby"
            }
        ],
        "Accessibility": [
            "Accessible bathroom",
            "Roll-in shower",
            "Accessible parking",
            "In-room accessibility"
        ],
        "Rooms": [{
            "Traveler": {
                "Name": {
                    "FirstName": "San",
                    "MiddleName": "Edward",
                    "LastName": "Zhang"
                },
                "Phone": {
                    "CountryCode": "1",
                    "AreaCode": "206",
                    "Number": "9876543"
                },
                "Email": "San.Zhang@gmail.com"
            },
            "RoomPreferences": [{
                    "Type": "SmokingPreference",
                    "Value": "NonSmoking"
                },
                {
                    "Type": "Bed",
                    "Value": "15"
                }
            ],
            "SpecialRequests": "check-in 2 hours late,Crib Required",
            "Occupants": [{
                "Adults": 2
            }],
            "StayDates": [{
                "CheckInDate": "2021-10-17",
                "CheckOutDate": "2021-10-20"
            }],
            "Description": "Single Room, 1 Queen Bed",
            "RatePlanType": "standalone",
            "RatePlans": [{
                "RoomTypeId": "201892847",
                "RatePlanId": "209571066",
                "RateRuleId": "226351705",
                "InventorySourceId": "24",
                "InventorySourceCode": "expe",
                "ReserveWithDeposit": true,
                "StayDates": {
                    "CheckInDate": "2021-10-17",
                    "CheckOutDate": "2021-10-20"
                },
                "Price": {
                    "BaseRate": {
                        "Value": "927.00",
                        "Currency": "USD"
                    },
                    "TaxesAndFees": {
                        "Value": "150.60",
                        "Currency": "USD"
                    },
                    "TotalPrice": {
                        "Value": "1077.60",
                        "Currency": "USD"
                    },
                    "AvgNightlyRate": {
                        "Value": "309.00",
                        "Currency": "USD"
                    },
                    "HotelMandatoryFees": {
                        "Value": "42.57",
                        "Currency": "USD"
                    },
                    "RoomRates": [{
                        "RoomIndex": 1,
                        "NightlyRates": [{
                                "StayDate": "2021-10-17",
                                "BaseRate": {
                                    "Value": "309.00",
                                    "Currency": "USD"
                                },
                                "TaxesAndFees": {
                                    "Value": "50.20",
                                    "Currency": "USD"
                                },
                                "TotalPrice": {
                                    "Value": "359.20",
                                    "Currency": "USD"
                                }
                            },
                            {
                                "StayDate": "2021-10-18",
                                "BaseRate": {
                                    "Value": "309.00",
                                    "Currency": "USD"
                                },
                                "TaxesAndFees": {
                                    "Value": "50.20",
                                    "Currency": "USD"
                                },
                                "TotalPrice": {
                                    "Value": "359.20",
                                    "Currency": "USD"
                                }
                            },
                            {
                                "StayDate": "2021-10-19",
                                "BaseRate": {
                                    "Value": "309.00",
                                    "Currency": "USD"
                                },
                                "TaxesAndFees": {
                                    "Value": "50.20",
                                    "Currency": "USD"
                                },
                                "TotalPrice": {
                                    "Value": "359.20",
                                    "Currency": "USD"
                                }
                            }
                        ]
                    }]
                },
                "PaymentMethod": "Hotel",
                "FreeBreakfast": true,
                "FreeBreakfastDetails": [
                    "Breakfast Buffet"
                  ],
                "CancellationPolicy": {
                    "Refundable": true,
                    "FreeCancellation": true,
                    "FreeCancellationEndDateTime": "2021-10-15T19:00:00-07:00",
                    "CancellationPenaltyRules": [{
                            "PenaltyNightCount": 1,
                            "PenaltyStartDateTime": "2021-10-15T19:00:00-07:00",
                            "PenaltyEndDateTime": "2021-10-17T19:00:00-07:00"
                        },
                        {
                            "PenaltyPercentOfStay": "100",
                            "PenaltyStartDateTime": "2021-10-17T19:00:00-07:00",
                            "PenaltyEndDateTime": "2021-10-20T19:00:00-07:00"
                        }
                    ]
                },
                "ConfirmationNumber": "075d5c53-f9c5-436f-a98f-592e32f12fd8",
                "Links": {
                    "ApiCancel": {
                        "Accept": "application/vnd.exp-hotel.v3+json",
                        "Method": "PUT",
                        "Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
                    }
                }
            }],
            "Price": {
                "BaseRate": {
                    "Value": "927.00",
                    "Currency": "USD"
                },
                "TaxesAndFees": {
                    "Value": "150.60",
                    "Currency": "USD"
                },
                "TotalPrice": {
                    "Value": "1077.60",
                    "Currency": "USD"
                },
                "AvgNightlyRate": {
                    "Value": "309.00",
                    "Currency": "USD"
                },
                "HotelMandatoryFees": {
                    "Value": "42.57",
                    "Currency": "USD"
                }
            },
            "Links": {
                "ApiCancel": {
                    "Accept": "application/vnd.exp-hotel.v3+json",
                    "Method": "PUT",
                    "Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
                }
            },
            "SmokingOption": "NonSmoking"
        }]
    },
    "TotalPrice": {
        "Value": "1077.60",
        "Currency": "USD"
    }
}

Single Room Book Request - With Coupon

{
  "Coupon": "EwsTestUKS13",
  "Title": "Hotel Booking Automation",
  "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
  "RoomDetails": [
    {
      "Traveler": {
        "Name": {
          "FirstName": "San",
          "MiddleName": "Edward",
          "LastName": "Zhang"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        },
        "Email": "San.Zhang@gmail.com",
        "Primary": true
      },
      "RoomPreferences": [
        {
          "Type": "SmokingPreference",
          "Value": "SmokingOrNonSmoking"
        },
        {
          "Type": "Bed",
          "Value": "1"
        }
      ],
      "SpecialRequests": "check-in 2 hours late,Crib Required"
    }
  ],
  "BillingDetails": {
    "CreditCard": {
      "CardNumber": "4XXXXXXXXXXXXXX8",
      "CardType": "Visa",
      "CardSecurityCode": "123",
      "ExpirationMonth": "12",
      "ExpirationYear": "2025"
    },
    "Name": {
      "FirstName": "San",
      "MiddleName": "Edward",
      "LastName": "Zhang"
    },
    "Address": {
      "Address1": "3333 108th Ave",
      "Address2": "Expedia HQ",
      "City": "Bellevue",
      "Province": "WA",
      "Country": "USA",
      "PostalCode": "98004"
    },
    "Phone": {
      "CountryCode": "1",
      "AreaCode": "425",
      "Number": "1234567"
    }
  },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123"
  },
  "PartnerMetaData" : {
    "SampleKey1" : "Sample Value 1",
    "SampleKey2" : "Sample Value 2"
  }
}

Single Room Book Request - With HotelProgram

{
  "Title": "My Hotel Booking",
  "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
  "HotelProgram":"FHR",
  "RoomDetails": [
    {
      "Traveler": {
        "Primary": true,
        "Name": {
          "FirstName": "San",
          "LastName": "Zhang",
          "MiddleName": "Edward"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        },
        "Email": "San.Zhang@gmail.com"
      },
      "SpecialRequests": "check-in 2 hours late,Crib Required"
    }
  ],
  "BillingDetails": {
    "CreditCard": {
      "CardNumber": "4XXXXXXXXXXXXXX8",
      "CardType": "Visa",
      "CardSecurityCode": "123",
      "ExpirationMonth": "12",
      "ExpirationYear": "2025"
    },
    "Name": {
      "FirstName": "San",
      "MiddleName": "Edward",
      "LastName": "Zhang"
    },
    "Address": {
      "Address1": "3333 108th Ave",
      "Address2": "Expedia HQ",
      "City": "Bellevue",
      "Province": "WA",
      "Country": "USA",
      "PostalCode": "98004"
    },
    "Phone": {
      "CountryCode": "1",
      "AreaCode": "425",
      "Number": "1234567"
    }
  },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123"
  },
  "PartnerMetaData" : {
    "SampleKey1" : "Sample Value 1",
    "SampleKey2" : "Sample Value 2"
  }
}

Multiple Room Book Request

{
  "Title": "My Hotel Booking",
  "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
  "RoomDetails": [
    {
      "Traveler": {
        "Primary": false,
        "Name": {
          "FirstName": "San",
          "LastName": "Zhang",
          "MiddleName": "Edward"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        },
        "Email": "San.Zhang@gmail.com"
      },
      "RoomPreferences": [
        {
          "Type": "SmokingPreference",
          "Value": "NonSmoking"
        },
        {
          "Type": "Bed",
          "Value": "21"
        }
      ],
      "SpecialRequests": "check-in 2 hours late,Crib Required"
    },
    {
      "Traveler": {
        "Primary": true,
        "Name": {
          "FirstName": "San",
          "LastName": "Little",
          "MiddleName": "Edward"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        },
        "Email": "San.Zhang@gmail.com"
      },
      "RoomPreferences": [
        {
          "Type": "SmokingPreference",
          "Value": "NonSmoking"
        },
        {
          "Type": "Bed",
          "Value": "21"
        }
      ],
      "SpecialRequests": "check-in 2 hours late,Crib Required"
    },
    {
      "Traveler": {
        "Primary": false,
        "Name": {
          "FirstName": "San",
          "LastName": "Sr",
          "MiddleName": "Edward"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        },
        "Email": "San.Zhang@gmail.com"
      },
      "RoomPreferences": [
        {
          "Type": "SmokingPreference",
          "Value": "NonSmoking"
        },
        {
          "Type": "Bed",
          "Value": "21"
        }
      ],
      "SpecialRequests": "check-in 2 hours late,Crib Required"
    }
  ],
  "BillingDetails": {
    "CreditCard": {
      "CardNumber": "4XXXXXXXXXXXXXX8",
      "CardType": "Visa",
      "CardSecurityCode": "555",
      "ExpirationMonth": "08",
      "ExpirationYear": "2025"
    },
    "Name": {
      "FirstName": "San",
      "MiddleName": "Edward",
      "LastName": "Zhang"
    },
    "Address": {
      "Address1": "3333 108th Ave",
      "Address2": "Expedia HQ",
      "City": "Bellevue",
      "Province": "WA",
      "Country": "USA",
      "PostalCode": "98004"
    },
    "Phone": {
      "CountryCode": "1",
      "AreaCode": "425",
      "Number": "1234567"
    }
  },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123",
    "HotelLoyalty": {
      "Type": "AB",
      "Number": "556677"
    }
  }
}

PayPal and 3DS Examples

PayPal Book Request

{
	"Title": "My Hotel Booking",
	"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
	"RoomDetails": [{
		"Traveler": {
			"Primary": true,
			"Name": {
				"FirstName": "San",
				"LastName": "Zhang"
			},
			"Phone": {
				"CountryCode": "1",
				"AreaCode": "206",
				"Number": "9876543"
			},
			"Email": "San.Zhang@gmail.com"
		}
	}],
	"BillingDetails": {
		"TwoStepPaymentDetails": {
			"PaymentType": "PAYPAL",
			"ReturnUrl": "http://www.google.com"
		},
		"Name": {
			"FirstName": "San",
			"MiddleName": "Edward",
			"LastName": "Zhang"
		},
		"Address": {
			"Address1": "3333 108th Ave",
			"Address2": "Expedia HQ",
			"City": "Bellevue",
			"Province": "WA",
			"Country": "USA",
			"PostalCode": "98004"
		},
		"Phone": {
			"CountryCode": "1",
			"AreaCode": "425",
			"Number": "1234567"
		}
	},
	"AdditionalBookingDetails": {
		"MarketingCode": "111abc",
		"PartnerAgentId": "123456",
		"PartnerConfirmationNumber": "hello123",
		"HotelLoyalty": {
			"Type": "AB",
			"Number": "556677"
		}
	}
}

3DS Book Request

EWS supports 2 ways for 3ds:

  1. External authentication and EG authorization. in this way, partner use their own service provider to authenticate payment with bank and pass authentication data to EWS for authorization. If partner uses External authentication, MpiData is required.
  2. EG authentication and EG authorization. in this way, partner integrate EG JS lib to authenticate and authorize payment. If partner uses EG authentication, BrowserData is required.

3DS Book Request - With External authentication

{
	"Title": "My Hotel Booking",
	"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
	"RoomDetails": [{
		"Traveler": {
			"Primary": true,
			"Name": {
				"FirstName": "San",
				"LastName": "Zhang"
			},
			"Phone": {
				"CountryCode": "1",
				"AreaCode": "206",
				"Number": "9876543"
			},
			"Email": "San.Zhang@gmail.com"
		}
	}],
	"BillingDetails": {
		"CreditCard": {
			"CardNumber": "520000XXXXX00007",
			"CardType": "MasterCard",
			"CardSecurityCode": "111",
			"ExpirationMonth": "12",
			"ExpirationYear": "2025"
		},
		"Name": {
			"FirstName": "San",
			"MiddleName": "Edward",
			"LastName": "Zhang"
		},
		"Address": {
			"Address1": "3333 108th Ave",
			"Address2": "Expedia HQ",
			"City": "Bellevue",
			"Province": "WA",
			"Country": "USA",
			"PostalCode": "98004"
		},
		"Phone": {
			"CountryCode": "1",
			"AreaCode": "425",
			"Number": "1234567"
		},
		"TwoStepPaymentDetails": {
			"PaymentType": "3DS",
			"ReturnUrl": "http://www.google.com",
			"PaymentSessionId": "ern:pay:pa:r1::d6d6aa02-833a-09cc-2136-d5abdd2b7344",
            "MpiData": {
              "Cavv": "Y2FyZGluYWxjb21tZXJjZWF1dGg=",
              "Xid": "ODUzNTYzOTcwODU5NzY3Qw==",
              "Eci": "05",
              "CavvAlgorithm": "2",
              "DsTransactionId": "1c59a512-ab4f-4370-af97-4cfe69b7276e",
              "ThreeDSVersion": "2.0.1",
              "MerchantName": "Expedia.com",
              "PAResStatus": "Y",
              "VEResStatus": "Y"
            }
		} 
	},
    "AdditionalBookingDetails": {
        "MarketingCode": "111abc",
        "PartnerAgentId": "123456",
        "PartnerConfirmationNumber": "hello123",
        "HotelLoyalty": {
            "Type": "AB",
            "Number": "556677"
        }
    }
}

3DS Book Request - With EG authentication

{
    "Title": "My Hotel Booking",
    "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
    "BrowserData": {
      "IpAddressV4": "216.251.118.195",
      "BrowserAcceptHeader": "text/html",
      "EncodedBrowserMetadata": "eyJicm93c2VySmF2YUVuYWJsZWQiOmZhbHNlLCJicm93c2VyTGFuZ3VhZ2UiOiJ6aC1DTiIsImJyb3dzZXJDb2xvckRlcHRoIjoyNCwiYnJvd3NlclNjcmVlbkhlaWdodCI6MTA4MCwiYnJvd3NlclNjcmVlbldpZHRoIjoxOTIwLCJicm93c2VyVFoiOi00ODAsImJyb3dzZXJVc2VyQWdlbnQiOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCA2LjE7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS83NS4wLjM3NzAuMTAwIFNhZmFyaS81MzcuMzYifQ==",
      "MerchantUrl": "https://www.expedia.com/hotel"
    },
    "RoomDetails": [
      {
        "Traveler": {
          "Primary": true,
          "Name": {
            "FirstName": "San",
            "LastName": "Zhang"
          },
          "Phone": {
            "CountryCode": "1",
            "AreaCode": "206",
            "Number": "9876543"
          },
          "Email": "San.Zhang@gmail.com"
        }
      }
    ],
    "BillingDetails": {
      "CreditCard": {
        "CardNumber": "520000XXXXX00007",
        "CardType": "MasterCard",
        "CardSecurityCode": "111",
        "ExpirationMonth": "12",
        "ExpirationYear": "2025"
      },
      "Name": {
        "FirstName": "San",
        "MiddleName": "Edward",
        "LastName": "Zhang"
      },
      "Address": {
        "Address1": "3333 108th Ave",
        "Address2": "Expedia HQ",
        "City": "Bellevue",
        "Province": "WA",
        "Country": "USA",
        "PostalCode": "98004"
      },
      "Phone": {
        "CountryCode": "1",
        "AreaCode": "425",
        "Number": "1234567"
      },
      "TwoStepPaymentDetails": {
        "PaymentType": "3DS",
        "ReturnUrl": "http://www.google.com",
        "PaymentSessionId": "ern:pay:pa:r1::d6d6aa02-833a-09cc-2136-d5abdd2b7344"
      }
    },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123",
    "HotelLoyalty": {
      "Type": "AB",
      "Number": "556677"
    }
  }
}

Error Codes

Common Error Codes

HTTP Status CodeError CodeError Response
500BOOKING_APPLICATION_ERRORBooking failed. Application Error.
500BOOKING_NOT_CONFIRMEDProblem confirming your booking. Please call customer support. The itinerary number is xxxxxxxxx.
400UNKNOWN_PATHUnknown request path
400INVALID_ACCEPT_HEADERAPI version is either missing or invalid. Please provide a correct API version in the Accept header.
400PARTNER_TRANSACTION_ID_MISSINGPartner Transaction Id in http headers is missing.
400INVALID_CLIENT_KEYInvalid client key:XXX.
400INVALID_USER_IDUser-Id in http headers is missing or invalid. It must be a valid email.
400UNKNOWN_FIELDUnrecognized field "XXX".
400REQUEST_BODY_MISSINGRequest is either missing or is in an invalid format.
400INVALID_REQUESTRequest is either missing or is in an invalid format.
409INVALID_OFFER_IDOfferId provided is either invalid or expired.
400INVALID_TRIP_TITLETrip title is too long.
400INVALID_PRICETotal price is either missing or invalid.
400INVALID_CURRENCYCurrency is either missing or invalid.
400INVALID_BILLING_DETAILSBilling information is either missing or invalid.
400INVALID_BILLING_ADDRESSBilling address in the request is either missing or invalid. Please provide the following required fields: Address1, City, Country.

Billing address address1 (address2/province/city/postal code) field should not be longer than %s characters.
400BILLING_ADDRESS_POSTAL_CODE_MISSINGBilling address postal code is required for specified country.
400INVALID_BILLING_PHONEBilling phone information is either missing or invalid.
400INVALID_BILLING_NAMEBilling name is either missing or invalid.
400INVALID_CREDIT_CARDCredit card information is either missing or invalid.
400INVALID_DIRECT_DEBITDirect debit information is either missing or invalid.
400INVALID_ROOM_DETAILSRoom details info is either missing or invalid.

Booking Failed. Exactly one primary traveler should be present in request body.
400INVALID_ROOM_PREFERENCES_TYPERoomPreferences type is invalid. Allowed values: SmokingPreference or Bed.
400INVALID_SMOKING_PREFERENCE_VALUESmoking preference is invalid. Allowed values: SmokingOrNonSmoking, Smoking or NonSmoking.
400INVALID_BED_PREFERENCE_VALUEBed preference is invalid.Bed value should be a number.
400SMOKING_PREFERENCE_NOT_SUPPORTEDBooking Failed. The requested smoking option is not supported by this hotel product.
400INVALID_TRAVELER_INFOTraveler information is either missing or invalid.
400INVALID_TRAVELER_COUNTBooking Failed. Traveler count information in the request is either missing or invalid.
400INVALID_TRAVELER_NAMETraveler name is either missing or invalid.
400INVALID_TRAVELER_PHONETraveler phone information is either missing or invalid.
400INVALID_EMAILEmail address is either missing or invalid.
400HOTEL_ROOM_RATE_PLAN_NO_LONGER_AVAILABLEBooking Failed. The hotel room rate plan requested for is no longer available.
400INVALID_HOTEL_CHILD_AGEBooking Failed. The child age is invalid.
400HOTEL_ROOM_RATE_PLAN_NOT_AVAILABLEBooking Failed. The hotel room rate plan requested for is no longer available.
500HOTEL_ROOM_TYPE_NOT_FOUNDBooking Failed. Hotel room type is not found for this hotel. Please select a different room, dates or a hotel.
500HOTEL_RULES_CHANGEDBooking Failed. The hotel rules have been changed.
500HOTEL_ROOM_RULES_CHANGEDBooking Failed. The requested stay is not permitted by the current hotel rules.
409HOTEL_NO_AVAILABLE_ROOMSBooking failed. No rooms are available in this hotel.
500CURRENCY_NOT_SUPPORTEDBooking Failed. Currency not accepted at this hotel.
500INVALID_STAY_DATESBooking Failed. Room not available for the selected dates.
500INVALID_NUMBER_OF_ROOMSBooking Failed. Room count exceeds available rooms.
409HOTEL_NOT_AVAILABLEBooking Failed. The hotel requested is not available.
500HOTEL_RESERVATION_CAN_NOT_BE_CONFIRMEDBooking Failed. Hotel reservation cannot be confirmed. Please try again later.
409PRICE_INCREASEThe price for your trip has changed from %s %s to %s %s.
409PRICE_DECREASEThe price for your trip has changed from %s %s to %s %s.
400CREDIT_CARD_NOT_SUPPORTEDThe credit card is not accepted by this hotel, please use another one.
400DIRECT_DEBIT_NOT_SUPPORTEDDirect debit is not supported for the channel.
400CREDIT_CARD_LIMIT_EXCEEDEDCredit card limit exceeded.
400PAYMENT_BILLING_ADDRESS_NOT_MATCHBooking Failed. The billing address and ZIP/Postal code do not match.
400CREDIT_CARD_EXPIREDBooking Failed. The credit card has expired.
400DEPOSIT_NOT_ACCEPTEDBooking Failed. Credit card deposit is not accepted by this hotel.
400INVALID_EXPIRATION_DATEBooking Failed. The expiration date on the credit card is either invalid or expires prior to check out.
400PAYMENT_TRANSACTION_FAILEDBooking failed. Transaction failed via credit card clearing house.
400INVALID_FRAUD_CHECK_IDFraudCheckId in request body is missing or invalid.
400INVALID_COUPON_CODEThe CouponCode is invalid.
400COUPON_NOT_AVAILABLEThe CouponCode is not available for this hotel product.
400INVALID-PAYPAL-INFO (DEPRECATED)Return url for PayPal booking is missing or invalid.
400PAYPAL_NOT_SUPPORTEDPayment using PayPal is not supported at this hotel.
400INVALID_3DS_INFOOnly 3DS allowed here if you have filled credit card info.

Please fill the credit card info if request 3DS payment.
400INVALID_TWO_STEP_PAYMENT_INFOReturn url for TwoStepPayment booking is missing or invalid.
400UNSUPPORTED_TWO_STEP_PAYMENT_TYPEPaymentType provided for two step payment is not supported. Allowed values: [PAYPAL/3DS].
400TRY_WITH_3DS_PAYMENT_BOOKINGThis booking maybe failed with 3D secure authentication required, please try with filling 3DS info in BillingDetails.
400CREDIT_CARD_TYPE_NOT_SUPPORTEDCredit card type is not supported for the channel.
400ORDER_DECLINEDBooking failed. Order creation has been declined.
400INVALID_USER_CREDENTIALSUser credentials are either missing or invalid. (Guest account)

Please reset your password for security reasons. (Full account)
400DUPLICATE_BOOKINGThis booking matches a previously successful booking.
400INVALID_ITINNERARY_REFERENCE_IDItineraryReferenceId field should not be longer than 16 characters.
400MIN_LENGTH_OF_STAY_REQUIREDBooking Failed. Length of stay is less than minimum.
400MAX_LENGTH_OF_STAY_REQUIREDBooking Failed. Length of stay is greater than maximum.
400INVALID_DATESBooking Failed. Dates in the request are missing or in invalid format. Valid format is " YYYY-MM-DD."
400INVALID_INSURANCE_OFFER_TOKENInsurance offerToken is either missing or invalid.
400INVALID_INSURANCE_PRICETotal rate in the insurance details is either missing or invalid.
400INVALID_PAYMENT_TOKENPayment token information is invalid.
400INVALID_CHECK_IN_DATEBooking Failed. Check In Date cannot be in the past.
400INVALID_HOTEL_LOYALTY_INFOBooking Failed. Hotel loyalty type and Hotel loyalty number are both required.
500INSURANCE_NOT_CONFIRMEDBooking Failed due to insurance could not be confirmed.
400HOTEL_STATIC_RULES_NOT_FOUNDBooking Failed. Hotel static rules are not found.
400EXCEED_MAX_LENGTH_OF_STAYBooking Failed. Because there is a maximum length of stay restriction for this hotel.
400HOTEL_LODGING_NOT_AVAILABLEBooking Failed. The lodging is not available for your selected dates.
400CHANGE_FAILED_TO_CANCEL_SCHEDULEBooking failed. Failed to cancel originally scheduled payments during a hotel change.
500EXCEED_MAX_APWBooking Failed. Advanced purchase window exceeds maximum.
400PAYMENT_CREDITCARD_REFUND_NOT_ALLOWEDBooking Failed. Credit card refund is not allowed.
400PAYMENT_CREDIT_CARD_COULD_NOT_BE_VALIDATEDBooking failed. Could not validate credit card. Try again later or use another card.
400INVALID_PAYPAL_INFOReturn url for PayPal booking is missing or invalid.
400TWO_STEP_PAYMENT_EXPIRED_TRIPTwo Step Payment was not completed on time or trip has been reversed. Trip no longer exists.
400INVALID_BROWSER_DATAInvalid Input. Please enter the full BrowserData. You must integrate 3dsv2 to do this booking, please contact your account manager for details.
400SOFT_DECLINE_ERRORBooking failed. Order creation has been declined.

Warning Codes

Common Warning Codes

CodeMessageDescription
BOOKED_WITH_PRICE_INCREASEBooking succeeded, but with a slightly higher price.Booking was successful, but the booked price was incrementally higher than the quoted price.
BOOKED_WITH_PRICE_DECREASEBooking succeeded, but with a slightly lower price.Booking was successful, but the booked price was incrementally lower than the quoted price.

API details

Here, you can explore the endpoint definitions for this API, then go to the API Explorer to try out all the XAP endpoints, download OpenAPI specs, or download our Postman collections. Testing with one or all of these options will give you an understanding of how the examples and schema definitions compare to the actual output.


Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve!