Updates a multi-night promotion. Specify only those fields that need to be modified. We recommend that you retrieve the latest data stored for the promotion on the Expedia platform (by issuing the property query and specifying the promotion ID) before issuing this mutation.
This request updates promotion 391035964 to use rate plan 204971917 and offer 12% off every third night of a reservation, plus an extra 5% off for members.
Request
Response
1mutation{
2 updateMultiNightDiscountPromotion(
3propertyId:"9309913",
4propertyIdSource:EXPEDIA,
5promotion:{
6id:"391035964",
7code:"Updated MultiNight",
8eligibleRatePlans:[
9{
10id:"204971917"
11}
12],
13discount:{
14unit:PERCENT,
15value:12,
16applicableNight:3,
17isRecurring:true,
18memberOnlyAdditionalValue:5
19}
20}
21){
22 __typename
23 category
24 id
25 name
26 status
27...onDiscountPromotion{
28 code
29 restrictions {
30 isMemberOnly
31 isMobileUserOnly
32 minLengthOfStay
33 maxLengthOfStay
34 minAdvanceBookingDays
35 maxAdvanceBookingDays
36 bookingLocalDateTimeFrom
37 bookingLocalDateTimeTo
38 travelDateFrom
39 travelDateTo
40 sameDayBookingStartTime
41}
42 eligibleRatePlans {
43 id
44}
45 blackoutDates {
46 travelDateFrom
47 travelDateTo
48}
49 discount {
50 __typename
51type
52unit
53...onMultiNightDiscount{
54 value
55 applicableNight
56 isRecurring
57 memberOnlyAdditionalValue
58}
59}
60}
61}
62}
Arguments
Name
Description
promotion
Required.
Additional arguments to specify details for updating the promotion.
Property ID. If using an external ID (from your system, source is SUPPLIER),
specify the ID in this format: system_ID/advertiser_ID/property_ID. If the
source is EXPEDIA, this is the Expedia ID (EID).
Day-of-week discounts enable partners to set discount percentages for specific
days of the week. The day fields specify the discount for that day of the week
for the travel dates (such as Mondays at 15%, Tuesdays at 10% discount).
Exception (blackout) dates for which the promotion should NOT apply. This
field is only returned when querying for a single promotion (by specifying the promotion ID).
Promotion code that travelers will use to apply the promotion. This field is
returned in our booking APIs if a reservation is created for a product that
has an active promotion. It is returned in PromotionCode for the Booking
Notification API and in promoName for Booking Retrieval API. Note that only
these characters are supported: a-z, A-Z, 0-9, ., ,, ', :, !, ?, $, %, (, ),
/, -, and space.
Whether the promotion is currently bookable based on the its reservation
date/time range. This field is supported in queries only. All dates and times
are relative to the property’s time zone. The promotion may still be
unavailable due to other restrictions. At the time of querying, if the
promotion's bookingLocalDateTimeFrom and bookingLocalDateTimeTo values are
in the past but the travelDateFrom and travelDateTo values are in the
future, the promotion is considered expired because the promotion can no
longer be made available.
ID of the rate plan stored in the Expedia platform. Specify the ID as an
integer-only value (irrespective of the rate plan’s business model). We will
map the ID to all business models that are applicable to the rate plan.
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
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.
IdSource
Enum
Source of a given ID.
Name
Description
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.
LocalDate
LocalDate
A type representing a date in ISO 8601 format: YYYY-MM-DD (such as 2007-12-03).
LocalDateTime
LocalDateTime
A type representing a date and time (such as 2007-12-03T10:15:30).
LocalTime
LocalTime
Scalar representing a time in this format: HH:mm:ss or HH:mm (such as 10:15:30 or 10:15).
MultiNightDiscount
Object
Multi-night discounts offer percentage-based discounts for applicable nights (such as 15% off a third night).
Field
Description
applicableNight
Not nullable.
Value of the applicable night to which the discount is applied. Permitted values are 2 to 28.
Whether the discount applied on the applicable night is recurring. For
example, if applicableNight is set to 3 and isRecurring is set to true,
the discount will be applied to the third, sixth, ninth nights (and so on).
Additional discount that is added to value for members only. For example, if
value is 10, unit is PERCENT, and memberOnlyAdditionalValue is 5,
members are offered 15 percent off.
Promotion code that travelers will use to apply the promotion. This field is
returned in PromotionCode for the Booking Notification API and in
promoName for Booking Retrieval API if a reservation is created for a
product that has an active promotion.
Up to 80 characters are supported by the Booking Retrieval API, and up to 32
characters are supported by the Booking Notification API. Only these
characters are supported: a-z, A-Z, 0-9, / (forward slash), . (period), ,
(comma), ' (single quote), : (colon), ! (exclamation point), ? (question
mark), $ (dollar sign), % (percent sign), ( (open parenthesis), ) (closed
parenthesis), \ (backslash), - (dash), and space.
ID of the promotion as stored in the Expedia platform. This ID is returned in
the id field after the promotion is created by the
createMultiNightDiscountPromotion mutation.
Whether the discount is applied to consecutive applicable nights. For example,
if applicableNight is set to 3 and isRecurring is set to true, the
discount will be applied to the third, sixth, ninth nights (and so on).
Additional discount that is added to value for members only. For example, if
value is 10, unit is PERCENT, and memberOnlyAdditionalValue is 5,
members are offered 15 percent off.
Whether the promotion is currently bookable based on the its reservation
date/time range. This field is supported in queries only. All dates and times
are relative to the property’s time zone. The promotion may still be
unavailable due to other restrictions. At the time of querying, if the
promotion's bookingLocalDateTimeFrom and bookingLocalDateTimeTo values are
in the past but the travelDateFrom and travelDateTo values are in the
future, the promotion is considered expired because the promotion can no
longer be made available.
Priced (discount) promotion. That is, the traveler benefit here is monetary savings via promotions.
PromotionName
Enum
Name
Description
BASIC_PROMOTION
Flexible offer with restrictions defined by the connectivity or lodging
partner. You can specify this value when creating or updating single and
day-of-week discounts.
EARLY_BOOKING_PROMOTION
Discount offered to travelers who want to book early. You can specify this
value when creating or updating single and day-of-week discounts only.
MULTI_NIGHT_PROMOTION
Multi-night discount that offers a percentage-based discount for applicable
nights. You can specify this value when creating or updating multi-night
discounts only.
SAME_DAY_PROMOTION
Discount offered to attract last-minute travelers by setting up a recurring
deal when the travel date is the same as the booking date. You can specify
this value when creating or updating single discounts only.
PromotionSellStatus
Enum
Values to indicate whether a promotion is currently bookable based on the its reservation date/time range.
Name
Description
EXPIRED
Promotion cannot be booked because today’s date is after the promotion's bookingLocalDateTimeTo.
CURRENT
Promotion can be booked because today’s date is between the promotion's
bookingLocalDateTimeFrom and .bookingLocalDateTimeTo.
FUTURE
Promotion cannot be booked yet because today's date is before the promotion's
bookingLocalDateTimeFrom. However, this promotion will become available to
book in the future.
PromotionStatus
Enum
Name
Description
ACTIVE
INACTIVE
Restrictions
Object
Field
Description
bookingLocalDateTimeFrom
Beginning of the date range (inclusive) when the reservation can be made in
order for this promotion to be applicable. Format is YYYY-MM-DDThh:mm:ss, in
the property’s local time zone.
End of the date range (inclusive) when the reservation can be made in order
for this promotion to be applicable. Format is YYYY-MM-DDThh:mm:ss, in the
property’s local time zone.
Whether this promotion is applicable only to travelers booking on the mobile
device. This field is returned when querying for a single promotion only (by
specifying the promotion ID).
Beginning of the date range (inclusive) when the reservation can be made in
order for this promotion to be applicable. Format is YYYY-MM-DDThh:mm:ss, in
the property’s local time zone.
If you are updating a same-day promotion, the date in this field must be the same as travelDateFrom.
End of the date range (inclusive) when the reservation can be made in order
for this promotion to be applicable. Format is YYYY-MM-DDThh:mm:ss, in the
property’s local time zone.
If the dates are the same in bookingLocalDateTimeFrom and
bookingLocalDateTimeTo, make sure the timestamp in this field is at least
one minute later than in bookingLocalDateTimeFrom.
If you are updating a same-day promotion, the date in this field must be the same as travelDateTo.
To update a promotion with no end date ("evergreen"), specify
2079-06-06T23:59:00 for this field's value and specify 2079-06-06 for
travelDateTo.
Maximum number of days in advance the reservation date for the promotion to be
applicable. The default value for this field is 500. If you are updating a
same-day promotion, set it to 0.
Maximum duration of stay for which the promotion can be applicable. The
maximum value is 28. For multi-night discounts, this value cannot be less than
applicableNight in MultiNightDiscount. The default value for this field is 28.
Minimum number of days in advance of the reservation date for the promotion to
be applicable. The default value for this field is 0. If you are updating a
same-day promotion, either omit this field or set it to 0.
Start time for the same day for which the promotion is applicable (in the
property’s local time zone). This field is mandatory for same-day promotions
(and only applies to same-day promotions).
Beginning of the stay dates (inclusive) for which this promotion is
applicable, in YYYY-MM-DD format. This date cannot be before
bookingLocalDateTimeFrom.
If you are updating a same-day promotion, this date and travelDateTo cannot
be more than 364 days apart, and this date must be the same as that of
bookingLocalDateTimeFrom.
End of the stay dates (inclusive) for which this promotion is applicable, in
YYYY-MM-DD format. This date cannot be before bookingLocalDateTimeTo. If you
are updating a same-day promotion, this date and travelDateFrom cannot be
more than 364 days apart.
If you are updating a same-day promotion, this date and travelDateFrom
cannot be more than 364 days apart, and this date must be the same as that of
bookingLocalDateTimeTo.
To update a promotion with no end date ("evergreen"), specify 2079-06-06 for
this field's value and specify 2079-06-06T23:59:00 for
bookingLocaleDateTimeTo.
Discount that offers a percentage off a rate (such as 15% off).
Field
Description
memberOnlyAdditionalValue
Value of member-only discount applied. For example, if the regular discount is
10% and memberOnlyAdditionalValue is set to 5, a member will receive a 15%
discount and a non-member will receive a 10% discount.
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.