Package Resume Booking API

Guidance and examples for accessing the Package Resume Booking API

The Package Resume Booking API allows you to resume a lodging booking that is currently in a pending booking status while awaiting payment.

Endpoint

MethodEndpointPrerequisites
PUThttps://apim.expedia.com/packages/bookings/[TripNumber]/resumeAn active TripNumber from the Package Booking API.

Required Headers

Key:Expedia API key
Authorization:Expedia API Authorization String
Accept:application/vnd.exp-package.v3+json
Content-Type:application/json
User-Id:username@domain.com

The email address associated with the booking and to which the Booking Confirmation Email will be sent.
Partner-Transaction-Id:Partner TransactionID String

Next Steps

  • Get baggage details of each flight selected via XAP Baggage Fee API.
  • Retrieve a package booking via XAP Package Itinerary Retrieve API.


Package Resume Booking Request and Response Examples

Booking URL and Headers

https://apim.expedia.com/packages/bookings/[tripNumber]/resume?releaseHoldIfPossible=false

Confirmation Response When Called On Pending Trip After Making Payment

{
	"TransactionId": "4f662bbc-081f-4383-b612-79cfbd7976f0",
	"ItineraryNumber": 750326247215,
	"BookingDateTime": "2021-02-25T05:13:29-07:00",
	"PartnerAgentId": "123456",
	"PartnerConfirmationNumber": "hello123",
	"Links": {
		"WebItinRetrieve": {
			"Href": "https://wwwexpediacouk.integration.sb.karmalab.net/trips/750326247215?userToken=ZifisrBOwoEQPHLr3OZ4QDUN6jP5zdsAPQhxXAATCqZPx4K59_TJGvdC2Zz7dvDanTKwPfm9V5p1eAlC6tY646Ln1EIERK8RV_xO109LqAg"
		},
		"ApiItinRetrieve": {
			"Accept": "application/vnd.exp-package.v3+json",
			"Method": "GET",
			"Href": "https://ews-booking-service.us-west-2.test.expedia.com/packages/bookings/750326247215"
		}
	},
	"AirlineConfirmations": [{
		"MarketingAirlineCode": "DL",
		"ConfirmationNumber": "Unassigned"
	}],
	"GDSLocators": ["WY2OVF"],
	"HotelConfirmation": "8082574100139",
	"NumberOfRooms": 1,
	"Price": {
		"PackageBasePrice": {
			"Value": "991.60",
			"Currency": "GBP"
		},
		"PackageTotalPrice": {
			"Value": "1138.22",
			"Currency": "GBP"
		},
		"PackageTaxesAndFees": {
			"Value": "146.62",
			"Currency": "GBP"
		},
		"Fees": [{
			"Value": "1.40",
			"Currency": "GBP",
			"Name": "Service"
		}],
		"TotalHotelMandatoryFees": {
			"Value": "80.00",
			"Currency": "GBP",
			"LocalCurrencyPrice": {
				"Value": "98.30",
				"Currency": "USD"
			}
		},
		"AverageCostPerPerson": {
			"Value": "1138.22",
			"Currency": "GBP"
		},
		"HotelMandatoryFeesDetail": [{
			"Type": "ResortFee_Amt",
			"Amount": {
				"Value": "65.10",
				"Currency": "GBP",
				"LocalCurrencyPrice": {
					"Value": "80.00",
					"Currency": "USD"
				}
			}
		}]
	},
	"Hotel": {
		"Id": "1284",
		"LocalCurrencyCode": "USD",
		"Rooms": [{
			"Traveler": {
				"Name": {
					"FirstName": "San",
					"MiddleName": "Edward",
					"LastName": "Doe"
				},
				"Phone": {
					"CountryCode": "1",
					"AreaCode": "206",
					"Number": "9876543"
				},
				"Email": "San.doe@gmail.com"
			},
			"Status": "BOOKED",
			"RoomPreferences": [{
					"Type": "SmokingPreference",
					"Value": "NonSmoking"
				},
				{
					"Type": "Bed",
					"Value": "15"
				}
			],
			"SpecialRequests": "check-in 2 hours late,Crib Required",
			"Occupants": [{
				"Adults": 1
			}],
			"StayDates": [{
				"CheckInDate": "2021-02-24",
				"CheckOutDate": "2021-02-28"
			}],
			"RatePlans": [{
				"RoomTypeId": "200712311",
				"RatePlanId": "203539278",
				"RateRuleId": "300429723",
				"StayDates": {
					"CheckInDate": "2021-02-24",
					"CheckOutDate": "2021-02-28"
				},
				"PaymentMethod": "Online",
				"Status": "BOOKED",
				"ConfirmationNumber": "2b0bbdda-2062-435a-bfc6-8ea7573d5528"
			}],
			"SmokingOption": "NonSmoking"
		}]
	},
	"Flight": {
		"Travelers": [{
			"Name": {
				"FirstName": "ZHANG",
				"LastName": "SAN"
			},
			"Phone": {
				"CountryCode": "1",
				"AreaCode": "206",
				"Number": "9876543"
			},
			"Email": "ewsbooking@gmail.com",
			"Primary": true,
			"Gender": "Male",
			"PassengerType": "ADULT",
			"DateOfBirth": "1978-10-23",
			"Passport": {
				"CountryCode": "US",
				"Number": "123GHY",
				"ExpirationDate": "2021-11-11"
			},
            "Tickets": [
              {
                "TicketingAirlineCode": "UA",
                "Refundable": false,
                "RefundPenalty": {
                  "PreTripChange": {
                    "Allow": "YES",
                    "Penalty": {
                      "Value": "0.00",
                      "Currency": "USD"
                    }
                  },
                  "PreTripCancel": {
                    "Allow": "NO"
                  },
                  "EnrouteChange": {
                    "Allow": "YES",
                    "Penalty": {
                      "Value": "0.00",
                      "Currency": "USD"
                    }
                  },
                  "EnrouteCancel": {
                    "Allow": "NO"
                  },
                  "Transferable": "NO",
                  "NameChangeAllowed": "NO"
                }
              }
            ]
		}],
		"Segments": [{
				"SegmentId": "MTE=",
				"FlightDuration": "PT6H10M",
				"TotalStops": 0,
				"DepartureArrivalDayDifference": 0,
				"AirportChange": false,
				"FareType": "PUBLISHED",
				"Links": {
					"ApiBaggageFees": {
						"Accept": "application/vnd.exp-flight.v1+json",
						"Method": "GET",
						"Href": "http://ews-air-service.us-west-2.int.expedia.com/flights/baggagefees/CkYKAkRMEgJETBoKMjAxOS0wOS0yNCIDU0VBKgoyMDE5LTA5LTI0MgNPR0c6AUVCCFZBVlNMT0JDSgdFQ09OT01ZUgQxMzk3EgNHQlAaAmtn"
					}
				},
				"Legs": [{
				    "StatusCode": "HK",
					"DepartureAirport": {
						"Code": "SEA",
						"Name": "Seattle - Tacoma Intl.",
						"City": "Seattle",
						"Province": "WA",
						"Country": "USA",
						"Latitude": "47.44363",
						"Longitude": "-122.30175"
					},
					"ArrivalAirport": {
						"Code": "OGG",
						"City": "Kahului",
						"Province": "HI",
						"Country": "USA",
						"Latitude": "20.894489",
						"Longitude": "-156.437169"
					},
					"DepartureDateTime": "2021-02-24T12:10:00-07:00",
					"ArrivalDateTime": "2021-02-24T15:20:00-10:00",
					"FlightNumber": "1397",
					"MarketingAirlineCode": "DL",
					"MarketingAirlineName": "Delta",
					"OperatingAirlineCode": "DL",
					"OperatingAirlineName": "Delta",
					"EquipmentCode": "757",
					"EquipmentName": "Boeing 757",
					"FlightDuration": "PT6H10M",
					"BookingCode": "E",
					"CabinClass": "ECONOMY",
					"EquipmentChange": false,
					"FareBasisCode": "T21DVN5",
                    "FlightDistance": {
                      "Value": "2676",
                      "Unit": "miles"
                    },
					"AirlineConfirmation": {
						"MarketingAirlineCode": "DL",
						"ConfirmationNumber": "Unassigned"
					},
					"GDSLocator": "WY2OVF"
				}]
			},
			{
				"SegmentId": "MTI=",
				"FlightDuration": "PT5H38M",
				"TotalStops": 0,
				"DepartureArrivalDayDifference": 1,
				"AirportChange": false,
				"FareType": "PUBLISHED",
				"Links": {
					"ApiBaggageFees": {
						"Accept": "application/vnd.exp-flight.v1+json",
						"Method": "GET",
						"Href": "http://ews-air-service.us-west-2.int.expedia.com/flights/baggagefees/CkYKAkRMEgJETBoKMjAxOS0wOS0yOCIDT0dHKgoyMDE5LTA5LTI5MgNTRUE6AUVCCFhBVlNMUEJDSgdFQ09OT01ZUgQyMjU4EgNHQlAaAmtn"
					}
				},
				"Legs": [{
				    "StatusCode": "HK",
					"DepartureAirport": {
						"Code": "OGG",
						"City": "Kahului",
						"Province": "HI",
						"Country": "USA",
						"Latitude": "20.894489",
						"Longitude": "-156.437169"
					},
					"ArrivalAirport": {
						"Code": "SEA",
						"Name": "Seattle - Tacoma Intl.",
						"City": "Seattle",
						"Province": "WA",
						"Country": "USA",
						"Latitude": "47.44363",
						"Longitude": "-122.30175"
					},
					"DepartureDateTime": "2021-02-28T20:22:00-10:00",
					"ArrivalDateTime": "2021-02-29T05:00:00-07:00",
					"FlightNumber": "2258",
					"MarketingAirlineCode": "DL",
					"MarketingAirlineName": "Delta",
					"OperatingAirlineCode": "DL",
					"OperatingAirlineName": "Delta",
					"EquipmentCode": "757",
					"EquipmentName": "Boeing 757",
					"FlightDuration": "PT5H38M",
					"BookingCode": "E",
					"CabinClass": "ECONOMY",
					"EquipmentChange": false,
					"FareBasisCode": "T21DVN5",
                    "FlightDistance": {
                      "Value": "2676",
                      "Unit": "miles"
                    },
					"AirlineConfirmation": {
						"MarketingAirlineCode": "DL",
						"ConfirmationNumber": "Unassigned"
					},
					"GDSLocator": "WY2OVF"
				}]
			}
		],
		"Links": {
			"ApiFareRules": {
				"Accept": "application/vnd.exp-flight.v1+json",
				"Method": "GET",
				"Href": "http://ews-air-service.us-west-2.int.expedia.com/flights/farerules/CgVjb2FjaBoJUHVibGlzaGVkIgd1bmtub3duKgdwYWNrYWdlMgJETEJNCAESGTIwMTktMDktMjRUMTI6MTA6MDAtMDg6MDAaA09HRyIDU0VBKgJETDIIVkFWU0xPQkNCBlNFQU9HR0oHQW1hZGV1c2oFQURVTFRCTQgBEhkyMDE5LTA5LTI4VDIwOjIyOjAwLTEwOjAwGgNTRUEiA09HRyoCREwyCFhBVlNMUEJDQgZPR0dTRUFKB0FtYWRldXNqBUFEVUxU"
			}
		}
	}
}

Resume Response When Called on Pending Trip to Release Hold on Order

{
	"TransactionId": "99aec4ff-ed3e-4ad1-6cda-30effa42bf3d",
	"ReleaseHold": "SUCCESS",
	"Description": "Order was released as a result of client's request."
}

Resume Call on Expired or Reversed Trip Number

{
	"Errors": [{
		"Code": "TWO_STEP_PAYMENT_EXPIRED_TRIP",
		"Description": "Two Step Payment was not completed on time or trip has been reversed. Trip no longer exists."
	}],
	"TransactionId": "43d67008-10c7-447c-a446-77afba92d2f5"
}

Resume Call on Processed or Booked Trip Number

{
    "Errors": [
        {
            "Code": "RESUME_CALL_INVALID",
            "Description": "Trip has already been processed. Call Retrieve booking for additional details."
        }
    ],
    "TransactionId": "1e5c105d-8358-49d3-9d5e-36849se1d700"
}


Warning codes

Common Warning Codes

CodeMessageDescription
FAILED_TO_RESERVE_SEATBooking succeeded, but failed to reserve the requested seats due to invalid flight information.This warning is returned in case a customer sends a seat request with the invalid flight info, i.e. the flight number, departure date, arrival date, departure airport, and/or arrival airport do not match any AirLeg of the corresponding ANK product in the booking request. In this case, we will ignore that particular seat request and return a warning.
FREQUENT_FLYER_PROGRAM_NOT_REQUESTEDBooking succeeded, but the requested Frequent Flyer Programs are either inapplicable or duplicate -{AS,AS,6451734} {DL,DL,645171}.A frequent flyer request will be requested only if the MarketingCarrierCode matches at least one of the operating airlines. Other entries will be ignored. In case the traveler enters more than one frequent flyer program entries for the same MarketingCarrierCode, only one will be requested and the rest will be ignored. The warning message will contain the list of programs ignored in the format {MarketingCarrierCode,ProgramCarrierCode,Number}.
MULTIPLE_SPECIAL_ASSISTANCE_NOT_SUPPORTEDBooking succeeded, but only one special assistance is currently supported, so only the first one has been requested.This warning is returned if the customer request multiple special assistance in the booking request. Currently only one special assistance is supported per booking request.
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.The difference in price is within the price increase limit custom configured for this partner. If it was not the booking would fail due to the price increase.
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.The difference in price is within the price decrease limit custom configured for this partner. If it was not the booking would fail due to the price decrease.

HTTP Status Codes

HTTP Status CodeDescription
200Everything good (in request and response). The server returns the appropriate JSON response.
400Client side error while providing the request i.e bad / invalid input parameters. The server responds back with this Http response code and with the appropriate JSON error response.
500Server side error i.e connection timeout while talking to downstream services, downstream returned error. The server responds back with this Http response code and with the appropriate JSON error response.

Fault Error Codes

HTTP Status CodeReasonError CodeError Message
400On calling Resume API on a booked trip number.RESUME_CALL_INVALIDTrip has already been processed. Call Retrieve booking for additional details.
400When payment is not made on a pending trip and it expires.PAYPAL_EXPIRED_TRIPPayPal payment was not completed on time or trip has been reversed. Trip no longer exists.
400When payment is not made on a pending trip and it expires.TWO_STEP_PAYMENT_EXPIRED_TRIPTwo Step Payment was not completed on time or trip has been reversed. Trip no longer exists.
400When Resume API is called before making payment within the timeout window.PAYMENT_PENDINGResume booking called before making redirection payment.
400The itinerary does not belong to the partner.ITINERARY_NOT_FOUND_FOR_PARTNERItinerary %s was not found for client key %s.
400The itinerary %s is not associated with client key %s.ITIN_NOT_ASSOCIATED_WITH_CLIENT_KEYThe itinerary %s is not associated with client key %s.
500Other errorsRESUME_APPLICATION_ERRORResume booking failed. Application Error.

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!