ReferenceReservations

cancelReservation mutation

Cancels a reservation on or before a reservation’s check-in date, enabling the partner to reconcile a reservation if requested by the guest or if the method of payment is invalid (Hotel Collect only).

Here are the validation rules that determine if a reservation can be cancelled:

  • A reservation cannot be cancelled if the check-in date is in the past.
  • A reservation cannot be cancelled if it is already in a cancelled state.
  • Cancellations can be performed on Expedia Collect and Hotel Collect reservations. Reservations made through the Expedia Group Affiliate Program cannot be cancelled prior to check-in using the API.
  • Only Expedia IDs (for property and reservation IDs) are allowed as arguments.
  • Partners must provide a reason for the cancellation and agree to waive (or refund, if applicable) any cancellation fees and other amounts associated with the reservation.

If a reservation cannot be canceled or modified using this API, the guest must contact customer service of the originating booking service for assistance.

Syntax

1mutation {
2 cancelReservation(
5}

Example

This example cancels a reservation as requested by the guest. It returns the reservation ID.

1mutation {
2 cancelReservation(
3 input:
4 {
5 propertyId: "1559",
6 reason: GUEST_REQUESTED_CANCEL,
7 reservationId: "1401316073"
8 }
9 )
10 {
11 reservation {
12 reservationIds {
13 id
14 idSource
15 }
16 }
17 }
18}

Arguments

NameDescription

input

Required.

Reservation ID and other details needed to cancel a reservation.

Type: CancelReservationInput

Types


Name
Type
Boolean
Boolean

The Boolean scalar type represents true or false.

BusinessModel
Enum

Entity that collects payment.

NameDescription
EXPEDIA_COLLECT

Expedia collects payment.

HOTEL_COLLECT

Property collects payment.

CancelReservationInput
InputObject

Property and reservation IDs and the reason for the cancellation.

FieldDescription
propertyIdNot nullable.

Expedia ID of the property for which the cancellation is requested.

Type: ID
reasonNot nullable.

Reason for cancelling the reservation.

Type: ReservationPreStayCancellationReason
reservationIdNot nullable.

Expedia ID of the reservation to be cancelled.

Type: ID
CancelReservationPayload
Object

Response to the cancellation request.

FieldDescription
reservation

Reservation details.

Type: Reservation
EmailAddress
EmailAddress

A field whose value conforms to the standard internet email address format as specified in HTML Spec.

ExpediaSupplierAmount
Object
FieldDescription
currencyCodeNot nullable.

Currency in which the amount is shown.

Type: String
ratesNot nullable.

Nightly rates for the reservation.

Type: Array of non nullable SupplierRate
rateTypeNot nullable.

Rate type: NET for Expedia Collect or SELL for Hotel Collect.

Type: RateType
totalNot nullable.

Total rates for the reservation.

Type: SupplierTotal
Float
Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Guest
Object
FieldDescription
emailAddress

Guest's email address.

Type: EmailAddress
firstNameNot nullable.

Guest's first (given) name.

Type: String
lastNameNot nullable.

Guest's last name (surname).

Type: String
loyaltyTier

Guest loyalty tier. Values include MEMBER, VIP, PREMIUMVIP, and null. You must include this field to complete certification.

Type: String
phoneNumbers

The phone numbers of the guest.

Type: Array of non nullable GuestContactPhoneNumber
supplierLoyaltyPlanInfo

Details about the frequent traveler reward program.

Type: SupplierLoyaltyPlanInfo
travelPurpose

Purpose of the guest's reservation.

Type: TravelPurpose
GuestContactPhoneNumber
Object

Guest phone number.

FieldDescription
areaCodeNot nullable.

Area code (three digits).

Type: String
countryCodeNot nullable.

Country code (two digits).

Type: String
numberNot nullable.

Phone number (seven digits, no hyphen).

Type: String
ID
ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

IdNode
Object

Known IDs in the source system.

FieldDescription
id

ID in the source system.

Type: ID
idSourceNot nullable.

Source of the ID.

Type: IdSource
IdSource
Enum

Source of a given ID.

NameDescription
EXPEDIA

Expedia is the source of the ID.

SUPPLIER

Connectivity provider or lodging partner is the source of the ID. This value is not supported for use in promotions.

VRBO

Unsupported.

Int
Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

InvalidScenario
Object

Reason and description of the scenario that makes the reservation ineligible for reconciliation.

FieldDescription
reasonNot nullable.

Description of why the reservation is ineligible for reconciliation.

Type: String
scenarioNot nullable.

Reason why the reservation cannot be reconciled. Values include the following:

  • GUEST_REQUESTED_CANCEL - Traveler cancelled the reservation
  • NO_SHOW - Traveler was a no-show
  • MODIFY_DATES_AMOUNTS - There was a difference in the booking price when the lodging partner charged the traveler (for example, because an extra night was added at the time of stay)
Type: String
LocalDate
LocalDate

A type representing a date in ISO 8601 format: YYYY-MM-DD (such as 2007-12-03).

Payment
Object

Payment details.

FieldDescription
instructionsNot nullable.

Text that is displayed to travelers if a payment type is associated with the reservation.

Type: String
RateTimeUnit
Enum

Time frame to which the rate is applied.

NameDescription
PER_DAY

Rate is applied per day.

PER_WEEK

Unsupported at this time.

PER_STAY

Unsupported at this time.

RateType
Enum
NameDescription
NET

Net amount (excludes compensation and taxes).

SELL

Gross amount (includes compensation and taxes).

ReconEligibility
Object

Reason(s) why the reservation can or cannot be reconciled.

FieldDescription
invalidScenarios

Reasons and descriptions why the reservation cannot be reconciled.

Type: Array of non nullable InvalidScenario
validScenarios

Reason why the reservation can be reconciled. Values include the following:

  • GUEST_REQUESTED_CANCEL - Traveler cancelled the reservation
  • NO_SHOW - Traveler was a no-show
  • MODIFY_DATES_AMOUNTS - There was a difference in the booking price when the lodging partner charged the traveler (for example, because an extra night was added at the time of stay)
Type: Array of non nullable String
Reservation
Object

Reservation details.

FieldDescription
accessibilityText

Accessibility requests made by the guest for the reservation. We strongly recommend that you include this field in your implementation.

Type: Array of non nullable String
adultCountNot nullable.

Count for all adult guests associated with the reservation.

Type: Int
bedTypes

Bed type of the reservation.

Type: String
businessModelNot nullable.

Entity that collects payment for the reservation.

Type: BusinessModel
checkInDateNot nullable.

Check-in date (format: YYYY-MM-DD) of the reservation.

Type: LocalDate
checkOutDateNot nullable.

Checkout date (format: YYYY-MM-DD) of the reservation.

Type: LocalDate
childAges

Ages of children associated with the reservation.

Type: Array of Int
childCountNot nullable.

Count for all child guests associated with the reservation.

Type: Int
creationDateTimeNot nullable.

Timestamp of when the reservation was created (format: yyyy-mm-ddThh:mm:ssTZD, where TZD is a time zone designator in the form +/-hh:mm). Compare this value to that of lastUpdatedDateTime to determine if a reservation has been modified.

Type: String
id

Expedia's reservation ID.

Type: ID
isReconciled

Whether one or more reconciliation attempts have been made on the reservation.

Type: Boolean
lastUpdatedDateTimeNot nullable.

Date and time when the reservation was last updated. Compare this value to that of creationDateTime to determine if a reservation has been modified.

Type: String
messageThreadId

ID of message thread (conversation) associated with the reservation. This requires implementation and certification of the messaging capability. If no message threads exist for a reservation, null is returned.

Type: ID
multiRoomText

Text that is displayed to guests if there is a multi-room booking associated with the reservation.

Type: String
paymentNot nullable.

Text that is displayed to travelers if a payment type is associated with the reservation.

Type: Payment
paymentInstructionsNot nullable.

Instructions that describe how to retrieve payment for the reservation.

Type: String
primaryGuestNot nullable.

Guest who made the reservation.

Type: Guest
rateIdsNot nullable.

ID of the rate/rate plan and the source of the ID. In the response, when idSource is set to SUPPLIER, the id field returns the same value as returned by the existing booking APIs. However, for Hotel Collect properties, the A- prefix is no longer added to the source value and the A suffix is no longer appended to the rate ID as was done by the booking APIs.

Type: Array of non nullable IdNode
reconciliationEligibility

The reason(s) why the reservation can or cannot be reconciled.

Type: ReconEligibility
reconciliationType

Reconciliation type of the reservation, either MODIFY, CANCEL, NO_SHOW, or null.

Type: String
reservationIdsNot nullable.

IDs associated with the reservation and the source of the IDs.

Type: Array of non nullable IdNode
smokingTypeNot nullable.

Whether smoking is allowed for the reservation.

Type: String
sourceNot nullable.

Source of the reservation. Refer to Booking sources for the list of possible values (though \"A-\" is not included in Hotel Collect sources returned by this API).

Type: String
specialRequest

Text that is displayed to guests if there is a special request associated with the reservation.

Type: String
statusNot nullable.

Current status of the reservation.

Type: ReservationStatus
subStatus

Current substatus of the reservation. Applicable for Vrbo reservations only.

Type: String
supplierAmount

Connectivity or lodging partner's amount for the reservation.

Type: SupplierAmount
tidsCode

Travel Industry Designator Service (TIDS) code that allows a reservation to be recognized by industry suppliers.

Type: Int
totalGuestCountNot nullable.

Total number of guests associated with the reservation.

Type: Int
unitIdsNot nullable.

Known IDs for the unit/room in the source system(s). IDs that are returned depend on where the property was onboarded:

  • If the property was onboarded onto Vrbo, three IDs are returned: the partner’s (external ID), Vrbo’s (Vrbo internal ID), and Expedia's (EID).
  • If the property was onboarded onto Expedia, only the Expedia ID is included in the response.
Type: Array of non nullable IdNode
valueAddedPromotionsNot nullable.

Value add promotion(s) used to book the reservation. If a value add promotion (VAP) was not used, an empty array is returned. We strongly recommend that you include this field in your implementation.

Type: Array of non nullable ReservationValueAddedPromotion
ReservationPreStayCancellationReason
Enum

Reason the reservation was cancelled.

NameDescription
GUEST_REQUESTED_CANCEL
INVALID_PAYMENT_METHOD
ReservationStatus
Enum

Status of the reservation.

NameDescription
BOOKED
CANCELLED
COMPLETE

For Vrbo reservations only.

CREATED

For Vrbo reservations only.

DECLINED

For Vrbo reservations only.

IN_PROGRESS

For Vrbo reservations only.

INVALID

For Vrbo reservations only.

RESERVED

For Vrbo reservations only.

ReservationValueAddedPromotion
Object

Value add promotion(s) used to book the reservation. If no value add promotion (VAP) was used, an empty array is returned.

FieldDescription
descriptionNot nullable.

Description of the promotion.

Type: String
idNot nullable.

ID of the promotion.

Type: String
String
String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

SupplierAmount
Interface

Implemented by

FieldDescription
currencyCodeNot nullable.

Currency in which the amount is shown.

Type: String
rateTypeNot nullable.

Rate type.

Type: RateType
SupplierAmountCompensation
Object

Compensation information associated with the reservation for this date range.

FieldDescription
acceleratorPercent

Accelerator percentage, expressed as a fraction of 1 (for example, 0.25).

Type: Float
basePercent

Compensation base percentage, expressed as a fraction of 1 (for example, 0.25).

Type: Float
SupplierFeeType
Enum

Type of fee charged by the lodging partner.

NameDescription
BASE_RATE

Nightly rate with no additional taxes, fees, or surcharges.

EXTRA_GUEST_FEES

Fees that are included in the price that guests see when booking. They are paid in advance for Expedia Collect reservations or upon arrival for Hotel Collect reservations.

SERVICE_FEES

Fees that only apply to guests who make use of specific facilities or services, such as resort fees, parking fees, or fees for rollaway beds.

RECONCILED_AMOUNT

Updated rate, which must be the commissionable value for the stay date. Amounts for dates included in the original reservation cannot be modified to a value of three times more than the commissionable rate applicable to that date.

SupplierLoyaltyPlanInfo
Object

Details about the frequent traveler reward program.

FieldDescription
membershipNumber

Traveler's membership number.

Type: Int
planCode

Reward program code.

Type: String
SupplierRate
Object
FieldDescription
fromDateNot nullable.

Date when the rate becomes effective (format: YYYY-MM-DD).

Type: LocalDate
rateItemsNot nullable.

Itemized list of fees.

Type: Array of non nullable SupplierRateItem
rateTimeUnitNot nullable.

Time unit of the rate.

Type: RateTimeUnit
toDateNot nullable.

Date when the rate expires (format: YYYY-MM-DD).

Type: LocalDate
SupplierRateItem
Object
FieldDescription
amountNot nullable.

Amount of the fee.

Type: Float
feeTypeNot nullable.

Type of fee for this itemized rate.

Type: SupplierFeeType
SupplierTotal
Object
FieldDescription
amountAfterTaxNot nullable.

Total amount of the fee after tax is applied.

Type: Float
amountBeforeTaxNot nullable.

Total amount of the fee before tax is applied.

Type: Float
compensationNot nullable.

Compensation information associated with the reservation.

Type: SupplierAmountCompensation
TravelPurpose
Enum

Values for a guest's travel purpose, to identify business bookings.

NameDescription
NONE
KNOWN_BUSINESS_VISIT
SUSPECTED_BUSINESS_VISIT
KNOWN_PERSONAL_VISIT
SUSPECTED_PERSONAL_VISIT