Lodging Cancel Booking API
Guidance and examples for accessing the Lodging Cancel Booking API
The Lodging Cancel Booking API allows you to cancel an existing booking. Requires data that is only available at time of booking, so you will only be able to cancel trips that you have booked.
Endpoint
Method | Endpoint | Prerequisites |
---|---|---|
PUT | https://apim.expedia.com/hotels/bookings/[TripNumber] | An active TripNumber from the Lodging Booking API. |
Required Headers
Key: | Expedia API key |
Authorization: | Expedia API Authorization String |
User-Id: | username@domain.com The email address associated with the booking. |
Accept: | application/vnd.exp-hotel.v3+json |
Partner-Transaction-Id: | [Partner TransactionID String] |
Example Cancel Request
Cancel Query
https://apim.expedia.com/hotels/bookings/12345
Cancel Body
Only include if partner wants to store meta data about cancellation for later retrieval.
{
"PartnerMetaData": {
"SampleKey1": "SampleValue1",
"SampleKey2": "SampleValue2"
}
}
Partial Cancel Response
Request URL
https://apim.expedia.com/hotels/bookings/79017964335?roomConfirmations=5b92c8ff-2c01-49a7-b464-86a91595b0b2
Response Message
{
"TransactionId": "ea22e5c7-c4ad-4342-b4aa-344dd7f2779c",
"ItineraryNumber": 79017964335,
"PartnerConfirmationNumber": "hello123",
"PartnerAgentId": "123456",
"TotalRefund": {
"Value": "1077.60",
"Currency": "USD"
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
},
"TotalPenalty": {
"Value": "0.00",
"Currency": "USD"
},
"CancellationDetails": [{
"RoomConfirmation": "5b92c8ff-2c01-49a7-b464-86a91595b0b2",
"CancelConfirmationNumber": "781234764",
"CancellationDate": "2022-09-05T18:54:00+00:00",
"Refund": {
"Value": "1077.60",
"Currency": "USD",
"Type": "Full"
}
}],
"Links": {
"WebItinRetrieve": {
"Href": "https://www.expedia.com/trips/79017964335?userToken=DuwE6TEhQabmubt9ikFvxlnim3jXAgf7liEfLxxUE6Yi7iqaw74a6QzLeFsFXmU0mUaiEvydBfOOo2qvIUe_KdnKqIWsWdQeybg"
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79017964335"
}
}
}
Hotel Cancel Response for One Room
Request URL
https://apim.expedia.com/hotels/bookings/79018078565
Response Message
{
"TransactionId": "38b82042-ebcd-4935-996f-3481db8a0795",
"ItineraryNumber": 79018078565,
"PartnerConfirmationNumber": "hello123",
"PartnerAgentId": "123456",
"TotalRefund": {
"Value": "1077.60",
"Currency": "USD"
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
},
"TotalPenalty": {
"Value": "0.00",
"Currency": "USD"
},
"CancellationDetails": [{
"RoomConfirmation": "6c5ec779-4e9d-4bbc-9662-3a0627bb85bd",
"CancelConfirmationNumber": "781235166",
"CancellationDate": "2022-09-05T20:59:00+00:00",
"Refund": {
"Value": "1077.60",
"Currency": "USD",
"Type": "Full"
}
}],
"Links": {
"WebItinRetrieve": {
"Href": "https://www.expedia.com/trips/79018078565?userToken=c87KNicNu6aaJQUy4R6CmFHwhXT2W6vHsRtVYpcXkritnABGKVA54n4PFs2RyHJJc09Wffl6zPWvUqwWBBxYGI-ZvK2e0DQ2erI"
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79018078565"
}
}
}
Hotel Cancel Response for Three Rooms
Request URL
https://apim.expedia.com/hotels/bookings/79018103010
Response Message
{
"TransactionId": "802ad19d-0010-47d1-91d1-7d53b873b721",
"ItineraryNumber": 79018103010,
"PartnerConfirmationNumber": "hello123",
"PartnerAgentId": "123456",
"TotalRefund": {
"Value": "3232.80",
"Currency": "USD"
},
"TotalPrice": {
"Value": "3232.80",
"Currency": "USD"
},
"TotalPenalty": {
"Value": "0.00",
"Currency": "USD"
},
"CancellationDetails": [{
"RoomConfirmation": "1b36922c-8f37-47fe-8858-2f7da8d58ee9",
"CancelConfirmationNumber": "781235263",
"CancellationDate": "2022-09-05T21:05:00+00:00",
"Refund": {
"Value": "1077.60",
"Currency": "USD",
"Type": "Full"
}
},
{
"RoomConfirmation": "9c6e567b-d786-4d9d-818b-974c515cc342",
"CancelConfirmationNumber": "781235264",
"CancellationDate": "2022-09-05T21:05:00+00:00",
"Refund": {
"Value": "1077.60",
"Currency": "USD",
"Type": "Full"
}
},
{
"RoomConfirmation": "cffa63d6-fb21-4c5e-a15c-ca66230ccb4d",
"CancelConfirmationNumber": "781235265",
"CancellationDate": "2022-09-05T21:05:00+00:00",
"Refund": {
"Value": "1077.60",
"Currency": "USD",
"Type": "Full"
}
}
],
"Links": {
"WebItinRetrieve": {
"Href": "https://www.expedia.com/trips/79018103010?userToken=plNsBAdxk3K3fwSSzMBdGO1Zi0JpcQp87fua9qlhnwEdlyyz3kMl9Y4pgu-qXCF6iFd-UyGdXogUrWrexGr1_SiLxufSCDdxF9k"
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79018103010"
}
}
}
Hotel Cancel Response for One Room - With Coupon
Request URL
https://apim.expedia.com/hotels/bookings/79018078565
Response Message
{
"TransactionId": "339805e2-3610-4e80-a47c-a7c7131ad8f2",
"ItineraryNumber": 790008033721,
"PartnerConfirmationNumber": "hello123",
"PartnerAgentId": "123456",
"TotalRefund": {
"Value": "398.99",
"Currency": "GBP"
},
"TotalPrice": {
"Value": "398.99",
"Currency": "GBP"
},
"TotalPenalty": {
"Value": "0.00",
"Currency": "GBP"
},
"CancellationDetails": [{
"RoomConfirmation": "f8521351-ad2b-4f41-a426-a04a40310d69",
"CancelConfirmationNumber": "781908413",
"CancellationDate": "2022-09-22T07:17:00+00:00",
"Refund": {
"Value": "398.99",
"Currency": "GBP",
"Type": "Full"
}
}],
"Links": {
"WebItinRetrieve": {
"Href": "https://www.expedia.co.uk/trips/790008033721?userToken=9eCq-rS-TEXgb1PNhLdiNGXkcac0qUjZ-8yZStL8RQM9vMUY8NU3201HKCAFhoSvF1jBUTr9ClU1bh5Bt_GQqsX-tPWwbYxS798V"
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/790008033721"
}
},
"AppliedCoupon": {
"Code": "EwsTestUKS13",
"Discount": {
"Value": "13.00",
"Currency": "GBP"
}
}
}
Hotel Cancel Response for One Room with Prices Returned in Local Currency
Request URL
https://apim.expedia.com/hotels/bookings/790520968636
Response Message
{
"TransactionId": "7f5d42d3-c3f9-48a9-8777-007ed85103d2",
"ItineraryNumber": 790520968636,
"PartnerConfirmationNumber": "hello123",
"PartnerAgentId": "123456",
"TotalRefund": {
"Value": "32739.40",
"Currency": "JPY"
},
"TotalRefundInHotelLocalCurrency": {
"Value": "6872250.00",
"Currency": "VND"
},
"TotalPrice": {
"Value": "49109.10",
"Currency": "JPY"
},
"TotalPriceInHotelLocalCurrency": {
"Value": "10308375.00",
"Currency": "VND"
},
"TotalPenalty": {
"Value": "16369.70",
"Currency": "JPY"
},
"TotalPenaltyInHotelLocalCurrency": {
"Value": "3436125.00",
"Currency": "VND"
},
"CancellationDetails": [{
"RoomConfirmation": "885c38e7-76e7-47ea-9fcd-7eb7472ca756",
"CancelConfirmationNumber": "783438039",
"CancellationDate": "2022-10-31T02:11:00+00:00",
"Refund": {
"Value": "32739.40",
"Currency": "JPY",
"Type": "Partial"
},
"RefundInHotelLocalCurrency": {
"Value": "6872250.00",
"Currency": "VND",
"Type": "Partial"
}
}],
"Links": {
"WebItinRetrieve": {
"Href": "https://www.expedia.co.jp/trips/790520968636?userToken=EGqG9L_q5CUFEqhPMMOpV2hbqmVIwlanJ6vl3rqk4vWhlD9YxiIZ0Yx0iNc55FpsXL6EwdMcqmeq_HG_V1t91xODVC09sTtkLW6y"
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/790520968636"
}
}
}
Error Codes
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.