ReferencePromotions

createDayOfWeekDiscountPromotion mutation

Creates a day-of-the-week discount for specific days of the week within the travel window (such as Mondays at 10%, Tuesdays at 12%, and so on). Its response, if successful, includes the promotion ID that can be used to update the promotion, if necessary.

Syntax

1 createDayOfWeekDiscountPromotion(
2 propertyId: String!,
3 propertyIdSource: IdSource!,
4 promotion: DayOfWeekDiscountPromotionCreateInput!
5 ): Promotion

Examples

1mutation {
2 createDayOfWeekDiscountPromotion(
3 propertyId: "9309913",
4 propertyIdSource: EXPEDIA,
5 promotion: {
6 name: BASIC_PROMOTION,
7 status: ACTIVE,
8 category: DISCOUNT_PROMOTION,
9 code: "DOW BASIC",
10 restrictions: {
11 isMemberOnly: false,
12 isMobileUserOnly: true,
13 minLengthOfStay: 1,
14 maxLengthOfStay: 28,
15 minAdvanceBookingDays: 1,
16 maxAdvanceBookingDays: 500,
17 bookingLocalDateTimeFrom: "2020-11-26T00:00:00",
18 bookingLocalDateTimeTo: "2021-06-09T23:59:00",
19 travelDateFrom: "2020-11-27",
20 travelDateTo: "2021-12-25"
21 },
22 eligibleRatePlans: [
23 {
24 id: "204971917"
25 }
26 ],
27 blackoutDates: [
28 {
29 travelDateFrom: "2021-09-29",
30 travelDateTo: "2021-10-02"
31 }
32 ],
33 discount: {
34 unit: PERCENT,
35 monday: 12.0,
36 tuesday: 1.0,
37 wednesday: 0.0,
38 thursday: 10.0,
39 friday: 0.0,
40 saturday: 0.0,
41 sunday: 0.0
42 }
43 }
44 ) {
45 __typename
46 id
47 name
48 status
49 category
50 ... on DiscountPromotion {
51 code
52 restrictions {
53 isMemberOnly
54 isMobileUserOnly
55 minLengthOfStay
56 maxLengthOfStay
57 minAdvanceBookingDays
58 maxAdvanceBookingDays
59 bookingLocalDateTimeFrom
60 bookingLocalDateTimeTo
61 travelDateFrom
62 travelDateTo
63 sameDayBookingStartTime
64 }
65 eligibleRatePlans {
66 id
67 }
68 blackoutDates {
69 travelDateFrom
70 travelDateTo
71 }
72 discount {
73 __typename
74 type
75 unit
76 ... on DayOfWeekDiscount {
77 monday
78 tuesday
79 wednesday
80 thursday
81 friday
82 saturday
83 sunday
84 }
85 }
86 }
87 }
88 }

Schema

Arguments

NameDescription

promotion

Required.

Additional arguments to specify details for creating the promotion.

Type: DayOfWeekDiscountPromotionCreateInput

propertyId

Required.

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).

Type: String

propertyIdSource

Required.

Source of the ID.

Type: IdSource

Types


Name
Type
BlackoutDateRangeObject
FieldDescription
travelDateFromNot nullable.

Travel start date for the exception (blackout) window in the YYYY-MM-DD format.

Type: Date
travelDateToNot nullable.

Travel end date for the exception (blackout) window in the YYYY-MM-DD format.

Type: Date
BlackoutDateRangeInputInputObject

Information about the blackout date range.

FieldDescription
travelDateFromNot nullable.

Travel start date for the exception (blackout) window in the YYYY-MM-DD format.

Type: Date
travelDateToNot nullable.

Travel end date for the exception (blackout) window in the YYYY-MM-DD format.

Type: Date
BooleanBoolean

The Boolean scalar type represents true or false.

DateDate

A type representing a Date in ISO 8601 format (such as 2007-12-03).

DateTimeDateTime

A type representing a date time (such as 2007-12-03T10:15:30).

DayOfWeekDiscountObject

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).

FieldDescription
fridayNot nullable.
Type: Float
mondayNot nullable.
Type: Float
saturdayNot nullable.
Type: Float
sundayNot nullable.
Type: Float
thursdayNot nullable.
Type: Float
tuesdayNot nullable.
Type: Float
typeNot nullable.

Type of discount.

Type: DiscountType
unitNot nullable.

Unit of the discount. Currently only PERCENTAGE is supported.

Type: DiscountUnit
wednesdayNot nullable.
Type: Float
DayOfWeekDiscountCreateInputInputObject

Parameters used to create the day-of-week discount.

FieldDescription
fridayNot nullable.
Type: Float
mondayNot nullable.
Type: Float
saturdayNot nullable.
Type: Float
sundayNot nullable.
Type: Float
thursdayNot nullable.
Type: Float
tuesdayNot nullable.
Type: Float
unitNot nullable.

Unit of the discount. Currently, only PERCENTAGE is supported.

Type: DiscountUnit
wednesdayNot nullable.
Type: Float
DayOfWeekDiscountPromotionCreateInputInputObject

Parameters used to create the day-of-week promotion.

FieldDescription
blackoutDatesNot nullable.

The exception dates for which the promotion should NOT apply. If you do not want to specify blackout dates, specify an empty array here.

Type: Array of non nullable BlackoutDateRangeInput
categoryNot nullable.

Category of the promotion.

Type: PromotionCategory
codeNot nullable.

Name of the promotion. Only these characters are supported: ​​a-z, A-Z, 0-9, , /.,':!?$%() \\- 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.

Type: String
discountNot nullable.

Details of the actual discount being applied on the promotion.

Type: DayOfWeekDiscountCreateInput
eligibleRatePlansNot nullable.

Rate plans for which this promotion is applicable.

Type: Array of non nullable EligibleRatePlanInput
nameNot nullable.

Name of the promotion. For day-of-week discounts, only BASIC and EARLY_BOOKING_PROMOTION are supported.

Type: PromotionName
restrictionsNot nullable.

List of restrictions that can be applied to this promotion.

Type: RestrictionsCreateInput
statusNot nullable.

Status of the promotion.

Type: PromotionStatus
DiscountInterface

Implemented by

FieldDescription
typeNot nullable.

Type of the discount.

Type: DiscountType
unitNot nullable.

Unit of the discount.

Type: DiscountUnit
DiscountPromotionObject
FieldDescription
blackoutDates

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).

Type: Array of non nullable BlackoutDateRange
categoryNot nullable.

Category of the promotion. Currently, only DISCOUNT_PROMOTION is supported (such as Priced Promotions).

Type: PromotionCategory
codeNot nullable.

Name of 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.

Type: String
discount

Detail of the discount being applied on the promotion.

Type: Discount
eligibleRatePlansNot nullable.

Rate plans for which this promotion is applicable.

Type: Array of non nullable EligibleRatePlan
idNot nullable.

ID of the Promotion stored in the Expedia platform.

Type: ID
nameNot nullable.

Name of the promotion.

Type: PromotionName
restrictions

List of restrictions that can be applied to these promotions.

Type: Restrictions
statusNot nullable.

Status of the promotion.

Type: PromotionStatus
DiscountTypeEnum

Discount type values.

NameDescription
DAY_OF_WEEK_DISCOUNT

Discount that is applicable for specific days of the week within the travel window.

MULTI_NIGHT_DISCOUNT

Discount that is applied to multi-night stays.

SINGLE_DISCOUNT

A single discount.

DiscountUnitEnum
NameDescription
PERCENT

Percentage discount for the promotion.

EligibleRatePlanObject
FieldDescription
idNot nullable.

ID of the rate plan stored in the Expedia platform.

Type: ID
EligibleRatePlanInputInputObject
FieldDescription
idNot nullable.

ID of the merchant rate plan stored in the Expedia platform. Specify the ID as an integer-only value, and do not specify an agency ID.

Type: ID
FloatFloat

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

IDID

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.

IdSourceEnum

Source of a given ID.

NameDescription
EXPEDIA

Expedia is the source of the ID.

SUPPLIER

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

VRBO

Vrbo (HomeAway) is the source of the ID. This value cannot be used as an argument value, and it is not supported for use in promotions.

IntInt

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

LocalTimeLocalTime

A type representing a time (such as 10:15:30).

MultiNightDiscountObject

Multi-night discounts offer percentage-based discounts for applicable nights (such as 15% off a third night).

FieldDescription
applicableNightNot nullable.

Value of the applicable night to which the discount is applied. Permitted values are 2 to 28.

Type: Int
isRecurring

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).

Type: Boolean
memberOnlyAdditionalValue

Value applied for a member-only discount.

Type: Float
typeNot nullable.

Type of discount.

Type: DiscountType
unitNot nullable.

Unit of the discount.

Type: DiscountUnit
valueNot nullable.

Value of the discount applied.

Type: Float
PromotionInterface

Implemented by

FieldDescription
categoryNot nullable.

Category of the promotion. Currently, only DISCOUNT_PROMOTION is supported (such as Priced Promotions).

Type: PromotionCategory
idNot nullable.

ID of the Promotion stored in the Expedia platform.

Type: ID
nameNot nullable.

Name of the promotion.

Type: PromotionName
statusNot nullable.

Status of the promotion.

Type: PromotionStatus
PromotionCategoryEnum
NameDescription
DISCOUNT_PROMOTION

Priced (discount) promotion. That is, the traveler benefit here is monetary savings via promotions.

PromotionNameEnum
NameDescription
BASIC_PROMOTION

Flexible offer with restrictions defined by the supplier. 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.

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.

PromotionStatusEnum
NameDescription
ACTIVE
INACTIVE
RestrictionsObject
FieldDescription
bookingLocalDateTimeFrom

Beginning of the reservation date range for which this promotion is applicable. Format is YYYY-MM-DDThh:mm:ss, in the property’s local time zone.

Type: DateTime
bookingLocalDateTimeTo

End of the reservation date range for which this promotion is applicable. Format is YYYY-MM-DDThh:mm:ss, in the property’s local time zone.

Type: DateTime
isMemberOnly

Whether a promotion is applicable for only members shopping on Expedia.

Type: Boolean
isMobileUserOnly

Whether this promotion is applicable only for travelers booking on the mobile device. This field is returned when querying for a single promotion only (by specifying the promotion ID).

Type: Boolean
maxAdvanceBookingDays

Maximum number of days in advance of the reservation date for the promotion to be applicable.

Type: Int
maxLengthOfStay

Maximum duration of stay for which the promotion can be applicable. Maximum value is 28.

Type: Int
minAdvanceBookingDays

Minimum number of days in advance of the reservation date for the promotion to be applicable.

Type: Int
minLengthOfStay

Minimum duration of stay for which the promotion can be applicable.

Type: Int
sameDayBookingStartTime

Start time for the same day for which the promotion is applicable (in the property’s local time zone). Applicable only for SAME_DAY_PROMOTION.

Type: LocalTime
travelDateFrom

Beginning travel date for which this promotion is applicable in YYYY-MM-DD format.

Type: Date
travelDateTo

End travel date for which this promotion is applicable in YYYY-MM-DD format.

Type: Date
RestrictionsCreateInputInputObject
FieldDescription
bookingLocalDateTimeFromNot nullable.

Beginning of the reservation date range for which this promotion is applicable. Format is YYYY-MM-DDThh:mm:ss, in the property’s local time zone.

Type: DateTime
bookingLocalDateTimeToNot nullable.

End of the reservation date range for which this promotion is 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.

Type: DateTime
isMemberOnly

Whether a promotion is applicable for only members shopping on Expedia.

Type: Boolean
isMobileUserOnly

Additional discounts that are available only for members shopping on Expedia. 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.

Type: Boolean
maxAdvanceBookingDays

Maximum number of days in advance the reservation date for the promotion to be applicable.

Type: Int
maxLengthOfStay

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.

Type: Int
minAdvanceBookingDays

Minimum number of days in advance of the reservation date for the promotion to be applicable.

Type: Int
minLengthOfStay

Minimum duration of stay (1-28) for which the promotion can be applicable.

Type: Int
sameDayBookingStartTime

Start time for the same day for which the promotion is applicable (in the property’s local time zone). Applicable only for SAME_DAY_PROMOTION.

Type: LocalTime
travelDateFromNot nullable.

Travel date from which this promotion is applicable in YYYY-MM-DD format.

Type: Date
travelDateToNot nullable.

Travel date until which this promotion is applicable in YYYY-MM-DD format.

Type: Date
SingleDiscountObject

Discount that offers a percentage off a rate (such as 15% off).

FieldDescription
memberOnlyAdditionalValue

Value of member-only discount applied.

Type: Float
typeNot nullable.

Type of discount.

Type: DiscountType
unitNot nullable.

Unit of the discount. Currently only PERCENTAGE is supported.

Type: DiscountUnit
valueNot nullable.

Value of the discount applied.

Type: Float
StringString

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.