개요
이 API를 사용하면 가능한 할인을 지정할 수 있습니다. 지정된 프로모션 중 Google은 가장 낮은 가격으로 연결되는 적합한 프로모션 또는 프로모션 세트를 적용합니다. 조건이 충족될 때 가격을 높이거나 낮출 수 있는 임의의 요율 조정을 지원하는 API를 찾고 있다면 Rate Modifications API를 사용하세요. 두 API가 모두 있는 경우 프로모션 전에 요금 수정이 적용됩니다.
요청
문법
Promotions
메시지는 다음 구문을 사용합니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner= "partner_key"
id="message_ID"
timestamp="timestamp">
<HotelPromotions hotel_id="HotelID" action="[overlay]">
<Promotion id="PromotionID" action="[delete]">
<BookingDates>
<DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
days_of_week="MTWHFSU_or_subset"/>
<DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
days_of_week="MTWHFSU_or_subset"/>
</BookingDates>
<BookingWindow min="integer_or_duration" max="integer_or_duration"/>
<Ceiling amount_per_night="float"/>
<Floor amount_per_night="float"/>
<CheckinDates>
<DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
</CheckinDates>
<CheckoutDates>
<DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
</CheckoutDates>
<!-- Specify only one of percentage, fixed_amount, fixed_amount_per_night,
fixed_price, or fixed_price_per_night; applied_nights is only used
with percentage, fixed_amount_per_night, and fixed_price_per_night. -->
<Discount percentage="float" fixed_amount="float" fixed_amount_per_night="float"
fixed_price="float" fixed_price_per_night="float"
applied_nights="integer_1_to_99" rank="integer_1_to_99">
<!-- FreeNights may not be used in conjunction with attributes on Discount -->
<FreeNights stay_nights="integer" discount_nights="integer"
discount_percentage="float" night_selection="[cheapest|last]"
repeats="boolean"/>
</Discount>
<!-- Exactly one of Discount or BestDailyDiscount must be specified.
Specify only one of percentage, fixed_amount, or fixed_price. -->
<BestDailyDiscount percentage="float" fixed_amount="float" fixed_price="float"/>
<Devices>
<Device type="[desktop|tablet|mobile]"/>
</Devices>
<InventoryCount min="integer" max="integer"/>
<LengthOfStay min="integer" max="integer"/>
<MembershipRateRule id="RateRuleID"/>
<MinimumAmount before_discount="integer"/>
<Occupancy min="integer" max="integer"/>
<RatePlans>
<RatePlan id="PackageID_1"/>
<RatePlan id="PackageID_2"/>
</RatePlans>
<RoomTypes>
<RoomType id="RoomID_1"/>
<RoomType id="RoomID_2"/>
</RoomTypes>
<Stacking type="[any|base|none|second]"/>
<StayDates application="[all|any|overlap]">
<DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
</StayDates>
<UserCountries type="[include|exclude]">
<Country code="country_code"/>
</UserCountries>
</Promotion>
</HotelPromotions>
</Promotions>
요소 및 속성
프로모션 메시지에는 다음과 같은 요소와 속성이 포함되어 있습니다.
요소 / @Attribute | 발생 횟수 | 유형 | 설명 |
---|---|---|---|
Promotions | 1 | Complex element | 프로모션 메시지의 루트 요소입니다. |
Promotions / @partner | 1 | string | 이 메시지의 파트너 계정입니다. 이 문자열 값은 Hotel Center의
계정 설정 페이지에 표시된 '파트너 키' 값입니다.
여러 계정에 피드를 제공하는 백엔드가 있는 경우 이 값은 동일한 계정에 대한 |
Promotions / @id | 1 | string | 이 요청 메시지의 고유 식별자입니다. 이 값은 응답 메시지에 반환됩니다. 허용되는 문자는 a~z, A~Z, 0~9, _(밑줄), - (대시)입니다. |
Promotions / @timestamp | 1 | DateTime | 이 메시지의 작성 날짜 및 시간입니다. |
Promotions / HotelPromotions | 0..n | HotelPromotions | 숙박 시설 프로모션 각 프로모션은 단일 숙박 시설에 적용됩니다.
|
Promotions / HotelPromotions / @hotel_id | 1 | string | 속성의 고유 식별자입니다. 이 값은 호텔 목록 피드에서
<listing> 의 <id> 요소를 사용하여 지정된 호텔 ID와 일치해야 합니다. 호텔 ID는 Hotel Center에도 나와 있습니다. |
Promotions / HotelPromotions / @action | 0..1 | enum | 지정된 경우 값은 지정하지 않으면 현재 메시지에 지정된 각 프로모션은 다음 중 하나입니다.
|
Promotions / HotelPromotions / Promotion | 0..99 | Promotion | 숙박 시설에 대한 단일 프로모션입니다. 99개를 초과하는 프로모션을 사용해야 하는 경우 기술계정 관리자 (TAM)에게 문의하세요. |
Promotions / HotelPromotions / Promotion / @id | 1 | string | 프로모션의 고유 식별자입니다. 허용되는 최대 문자 수는 40자(영문 기준)입니다. 허용되는 문자는 a~z, A~Z, 0~9, _ (밑줄), - (대시), 입니다 . (마침표)를 누릅니다. |
Promotions /HotelPromotions / Promotion / @action | 0..1 | enum | 지정된 경우 값은
|
Promotions / HotelPromotions / Promotion / BookingDates | 0..1 | BookingDates | 프로모션을 적용하려면 예약 시기를 정의하는 하나 이상의 범위에 대한 컨테이너가 있어야 합니다. |
Promotions / HotelPromotions / Promotion / BookingDates / DateRange | 1..99 | DateRange | 프로모션을 적용하려면 예약 시점을 지정해야 합니다. |
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @start | 0..1 | Date 또는 DateTime | 범위의 시작 날짜 또는 날짜/시간 (속성의 시간대를 기반으로 함)입니다.
|
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @end | 0..1 | Date 또는 DateTime | 범위의 종료 날짜 또는 날짜/시간 (속성 시간대 기준)입니다.
|
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @days_of_week | 0..1 | string | 기간에서 허용되는 요일입니다. 지정하지 않으면 날짜 범위의 모든 날짜가 허용됩니다. 문자열의 각 문자는 요일을 지정합니다. 예를 들어 'MTWHF'는 기간에 평일이 허용됨을 지정합니다. 유효한 문자는 다음과 같습니다.
모든 문자 조합이 유효합니다. |
Promotions / HotelPromotions / Promotion / BookingWindow | 0..1 | BookingWindow | 숙박 시설의 시간대를 기준으로 체크인 날짜를 기준으로 예약이 이루어져야 하는 기간을 지정합니다. 예를 들어 예약 기간은 체크인 전 7일, 180일 이하로 설정할 수 있습니다. |
Promotions / HotelPromotions / Promotion / BookingWindow / @min | 0..1 | integer or duration | 프로모션이 적용되려면 예약이 이루어져야 하는 체크인 전의 최소 기간입니다. 이 값을 지정하지 않거나 값이 0 이면 최솟값이 없습니다.
유효한 값 유형은 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / BookingWindow / @max | 0..1 | integer or duration | 프로모션이 적용되려면 예약이 이루어져야 하는 최대 체크인 전 일수입니다. 이 값을 지정하지 않거나 값이 0 이면 최댓값이 없습니다.
유효한 값 유형은 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / Ceiling | 0..1 | Ceiling |
프로모션이 적용된 후 요율을 설정할 수 있는 최댓값에 대한 제한사항을 정의합니다. 프로모션은 항상 스택이 구성된 경우 예:
계산 순서는 다음과 같습니다.
60이 더 엄격한 전체 상한이라는 사실은 자체 프로모션에만 유효하며 전체 프로모션 스택을 포괄하는 단일 상한이 없기 때문에 관련이 없습니다. |
Promotions / HotelPromotions / Promotion / Ceiling / @amount_per_night | 1 | float |
할인이 적용된 후 1박 요금을 설정할 수 있는 최대 금액입니다.
|
Promotions / HotelPromotions / Promotion / Floor | 0..1 | Floor |
프로모션이 적용된 후 요율을 설정할 수 있는 최솟값에 대한 제한사항을 정의합니다. 프로모션은 항상 무료 숙박에 스택이 구성된 경우 예:
계산 순서는 다음과 같습니다.
90이 더 엄격한 전체 하한선이라는 사실은 자체 프로모션에만 유효하고 전체 프로모션 스택을 포괄하는 단일 하한선이 존재할 수 없기 때문에 관련이 없습니다. |
Promotions / HotelPromotions / Promotion / Floor / @amount_per_night | 1 | float |
할인이 적용된 후 1박 요금을 설정할 수 있는 최소 금액입니다.
|
Promotions / HotelPromotions / Promotion / CheckinDates | 0..1 | CheckinDates | 프로모션을 적용하기 위해 체크인이 이루어져야 하는 하나 이상의 기간에 대한 컨테이너입니다. |
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange | 1..20 | DateRange | 프로모션을 적용하려면 체크인이 이루어져야 하는 기간을 지정합니다. 이 요소는 하나 이상의 프로모션을 삭제하는 경우 필요 없습니다. YearlessDate 형식도 지원됩니다.
|
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @start | 0..1 | Date or YearlessDate | 기간을 포함한 시작일입니다 (속성의 시간대를 기준으로 함). 이 날짜는 end 날짜 이전이거나 그 이전이어야 합니다. start 을 지정하지 않으면
기간이 시작일 측면에서 사실상 무제한입니다. |
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end | 0..1 | Date or YearlessDate | 기간의 종료일 (속성의 시간대를 기준으로 함)입니다. 이 날짜는 start 날짜와 같거나 그 이후여야 합니다. end 을 지정하지 않으면
기간이 종료일 측면에서 사실상 무제한입니다. |
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week | 0..1 | string | 기간에서 허용되는 요일입니다. 지정하지 않으면 날짜 범위의 모든 날짜가 허용됩니다. 문자열의 각 문자는 요일을 지정합니다. 예를 들어 'MTWHF'는 기간에 평일이 허용됨을 지정합니다. 유효한 문자는 다음과 같습니다.
모든 문자 조합이 유효합니다. |
Promotions / HotelPromotions / Promotion / CheckoutDates | 0..1 | CheckoutDates | 프로모션을 적용하려면 체크아웃 시기를 정의하는 하나 이상의 기간에 대한 컨테이너입니다. |
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange | 1..20 | DateRange | 프로모션을 적용하려면 체크아웃이 이루어져야 하는 기간을 지정합니다. 이 요소는 프로모션을 하나 이상 삭제하는 경우 필요 없습니다. YearlessDate 형식도 지원됩니다.
|
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @start | 0..1 | Date or YearlessDate | 기간을 포함한 시작일입니다 (속성의 시간대를 기준으로 함). 이 날짜는 end 날짜 이전이거나 그 이전이어야 합니다. start 을 지정하지 않으면
기간이 시작일 측면에서 사실상 무제한입니다. |
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end | 0..1 | Date or YearlessDate | 기간의 종료일 (속성의 시간대를 기준으로 함)입니다. 이 날짜는 start 날짜와 같거나 그 이후여야 합니다. end 을 지정하지 않으면
기간이 종료일 측면에서 사실상 무제한입니다. |
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week | 0..1 | string | 기간에서 허용되는 요일입니다. 지정하지 않으면 날짜 범위의 모든 날짜가 허용됩니다. 문자열의 각 문자는 요일을 지정합니다. 예를 들어 'MTWHF'는 기간에 평일이 허용됨을 지정합니다. 유효한 문자는 다음과 같습니다.
모든 문자 조합이 유효합니다. |
Promotions / HotelPromotions / Promotion / Devices | 0..1 | Devices | 프로모션 대상 사용자 기기를 나열하기 위한 컨테이너입니다. 이 플래그를 지정하면 나열된 기기에서 자격이 있는 사용자에게만 할인 요금이 제공됩니다. 지정하지 않으면 모든 기기의 자격이 있는 사용자에게 할인율이 제공됩니다. |
Promotions / HotelPromotions / Promotion / Devices / Device | 1..3 | Device | 프로모션에 참여할 수 있는 사용자 기기 유형을 정의합니다. |
Promotions / HotelPromotions / Promotion / Devices / Device / @type | 1 | enum | 기기 유형입니다. 값은 desktop , tablet 또는 mobile 여야 합니다. |
Promotions / HotelPromotions / Promotion / Discount | 1 | Discount |
이 프로모션에 적용되는 할인을 지정합니다. |
Promotions / HotelPromotions / Promotion / Discount / @percentage | 0..1 | float |
할인율을 지정하는 0~100의 십진수 값입니다.
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / Discount / @fixed_amount | 0..1 | float |
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / Discount / @fixed_amount_per_night | 0..1 | float |
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / Discount / @fixed_price | 0..1 | float |
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / Discount / @fixed_price_per_night | 0..1 | float |
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / Discount / @applied_nights | 0..1 | integer |
할인이 적용되는 숙박 일수입니다. 최저가부터 시작합니다. 1에서 99 사이의 정수여야 합니다. 지정하지 않으면 모든 숙박 일수에 할인이 적용됩니다. |
Promotions / HotelPromotions / Promotion / Discount / FreeNights | 0..1 | FreeNights | 최소 숙박 기간이 충족되면 특정 숙박 일수에 대한 할인을 지정합니다. 이 요소를 사용하는 경우 상위 Discount 요소의 속성은 허용되지 않습니다. |
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @stay_nights | 1 | integer | 할인이 적용되는 데 필요한 숙박 일수입니다. 각 할인은 별도의 숙박 일수 세그먼트에 적용됩니다. 예를 들어 |
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_nights | 1 | integer | 숙박 일수의 세그먼트별 할인 숙박 일수입니다. |
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_percentage | 1 | float | 할인 숙박 일수에 적용되는 할인입니다. 이 값이 50 이면 선택한 1박당 50% 할인 혜택이 제공됩니다. |
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @night_selection | 1 | string | cheapest 또는 last 이어야 합니다. last 인 경우 숙박 세그먼트 종료 시점의 숙박 일수가 할인됩니다. cheapest 인 경우 숙박 일수 세그먼트 내에서 가장 저렴한 숙박 일수가 할인됩니다. |
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @repeats | 1 | boolean | 여러 숙박 일수에 할인을 적용할 수 있는지 여부입니다. 예를 들어 |
Promotions / HotelPromotions / Promotion / Discount / @rank | 0..1 | integer | 이 프로모션에 순위를 할당하고 순위 선택에 적용합니다. 이때 순위가 가장 낮은 프로모션만 적용되도록 선택됩니다. 값은 1에서 99 사이여야 합니다. 여러 프로모션의 순위가 동일하면 그중 하나가 임의로 선택되어 적용됩니다. |
Promotions / HotelPromotions / Promotion / BestDailyDiscount | 1 | Discount |
숙박 1박에 적용될 수 있는 일일 할인을 지정합니다. 이는 전체 숙박에 할인을 적용하는 각 숙박 시설에는 '일일 최고'로 간주되는 프로모션의 단일 그룹이 있을 수 있습니다. 즉, 숙박 1박에 대해 자격 요건을 충족하며 해당 숙박 일수에 대해 가장 큰 할인을 제공하는 단일 '최고의 일일' 프로모션이 선택되고 적용될 수 있습니다.
|
Promotions / HotelPromotions / Promotion / BestDailyDiscount / @percentage | 0..1 | float |
할인율을 지정하는 0~100의 십진수 값입니다.
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_amount | 0..1 | float |
단일 예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_price | 0..1 | float |
예를 들면 다음과 같습니다.
|
Promotions / HotelPromotions / Promotion / InventoryCount | 0..1 | InventoryCount | 이 프로모션을 적용하기 위해 사용할 수 있어야 하는 객실 수에 대한 제한을 정의합니다. 제약조건을 충족하는 숙박 일수에만 할인이 적용됩니다. fixed_amount 할인으로는
허용되지 않습니다. 이용 가능한 객실 수는 OTA_HotelInvCountNotifRQ (InvCount ) 또는 OTA_HotelAvailNotifRQ(BookingLimit )로 지정됩니다. |
Promotions / HotelPromotions / Promotion / InventoryCount / @min | 0..1 | integer | 1박 요금에 프로모션을 적용하기 위해 사용할 수 있어야 하는 최소 객실 수입니다. 이 값을 지정하지 않으면 최솟값이 없습니다. |
Promotions / HotelPromotions / Promotion / InventoryCount / @max | 0..1 | integer | 1박 요금에 프로모션을 적용하기 위해 제공해야 하는 최대 객실 수입니다. 이 값을 지정하지 않으면 최댓값이 없습니다. |
Promotions / HotelPromotions / Promotion / LengthOfStay | 0..1 | LengthOfStay | 이 프로모션을 적용할 수 있는 숙박 기간을 정의합니다. 숙박 기간이 최소 및 최대 한도를 넘으면 프로모션이 적용되지 않습니다. |
Promotions / HotelPromotions / Promotion / LengthOfStay / @min | 0..1 | integer | 프로모션이 적용될 수 있는 숙박 기간 최소 일수입니다. 이 값을 지정하지 않으면 최솟값이 없습니다. |
Promotions / HotelPromotions / Promotion / LengthOfStay / @max | 0..1 | integer | 프로모션이 적용될 수 있는 숙박 기간 최대 숙박 일수입니다. 이 값을 지정하지 않으면 최댓값도 없습니다. |
Promotions / HotelPromotions / Promotion / MembershipRateRule | 0..1 | MembershipRateRule |
관련 할인에 대해 특정 UI 처리를 트리거하는 멤버십 요금 규칙의 컨테이너입니다.
|
Promotions / HotelPromotions / Promotion / MembershipRateRule / @id | 1 | string |
멤버십 프로그램과 연결된 요금 규칙의 ID입니다. |
Promotions / HotelPromotions / Promotion / MinimumAmount | 0..1 | MinimumAmount | 프로모션을 적용하려면 일일 객실 요금의 최소 합계 (AmountBeforeTax 또는
AmountAfterTax 중 더 큰 값 사용)를
지정합니다. |
Promotions / HotelPromotions / Promotion / MinimumAmount / @before_discount | 1 | integer | 프로모션이 적용되려면 초과해야 하는 값입니다. |
Promotions / HotelPromotions / Promotion / Occupancy | 0..1 | Occupancy | 이 프로모션이 적용되는 숙박 인원에 대한 제한을 정의합니다. 숙박 인원이 최소 및 최대 한도를 벗어나면 프로모션이 적용되지 않습니다. |
Promotions / HotelPromotions / Promotion / Occupancy / @min | 0..1 | integer | 할인을 적용하려면 사용자가 지정한 숙박 인원이 이 값 이상이어야 합니다. |
Promotions / HotelPromotions / Promotion / Occupancy / @max | 0..1 | integer | 할인을 적용하려면 사용자가 지정한 숙박 인원이 이 값 이하여야 합니다. |
Promotions / HotelPromotions / Promotion / RatePlans | 0..1 | RatePlans | 프로모션이 적용되는 요금제 목록의 컨테이너입니다.
<RatePlans> 를 지정하지 않으면 프로모션이 모든 요금제에 적용됩니다. |
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan | 1..n | RatePlan | 요금제를 지정합니다. 요금제는 트랜잭션(숙박 시설 데이터), OTA_HotelRateAmountNotifRQ, OTA_HotelAvailNotifRQ 메시지에 정의되고 PackageID로 식별되는 패키지, 요금, 예약 가능 여부의 조합으로 정의됩니다. |
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id | 1 | string | 요금제의 고유 식별자입니다. 이 값은 트랜잭션 (숙박 시설 데이터) 메시지의 <PackageData> 와 <OTA_HotelRateAmountNotifRQ> 및 <OTA_HotelAvailNotifRQ> 메시지 모두 <StatusApplicationControl> 의 RatePlanCode 속성에 매핑되는 PackageID 값에 매핑됩니다.
허용되는 최대 문자 수는 50자(영문 기준)입니다. |
Promotions / HotelPromotions / Promotion / RoomTypes | 0..1 | RoomTypes | 프로모션이 적용되는 객실 유형 목록의 컨테이너입니다.
지정된 각 <RoomType> 에 프로모션이 적용됩니다. <RoomTypes> 을 지정하지 않으면 모든 객실에 프로모션이 적용됩니다. |
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType | 1..n | RoomType | 방 유형을 지정합니다. 객실 유형은 트랜잭션 (숙박 시설 데이터) 메시지의 <RoomData> 요소에 정의되며 <RoomID> 값을 사용하여 참조됩니다. <RoomID> 값은 OTA_HotelRateAmountNotifRQ 메시지의 InvTypeCode 속성에서도 참조됩니다. |
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id | 1 | string | 인벤토리의 고유 식별자입니다 (객실 유형). 이 값은 트랜잭션 (숙박 시설 데이터) 메시지의 <RoomID> 에 매핑됩니다.
허용되는 최대 문자 수는 50자(영문 기준)입니다. |
Promotions / HotelPromotions / Promotion / Stacking | 0..1 | Stacking | 프로모션을 결합할 수 있는 방법을 지정합니다. 지정하지 않으면 'type'이 base 로 간주됩니다. |
Promotions / HotelPromotions / Promotion / Stacking / @type | 1 | enum | 다음 설정에 따라 여러 프로모션을 단일 요금에 적용할 수 있습니다.
허용된 조합 중에서 가장 큰 할인을 산출하는 프로모션 집합이 요금에 적용됩니다. |
Promotions / HotelPromotions / Promotion / StayDates | 0..1 | StayDates | 프로모션 적용 방법을 결정하는 하나 이상의 기간에 대한 컨테이너입니다(예: 시즌별 할인 적용). |
Promotions / HotelPromotions / Promotion / StayDates / @application | 1 | enum | 프로모션이 적용되어야 하는 방법을 설명합니다. 유효한 값은 다음과 같습니다.
이 속성은 항상 지정되어야 합니다.
|
Promotions / HotelPromotions / Promotion / StayDates / DateRange | 1..99 | DateRange | 프로모션이 적용될 날짜를 지정하는 기간입니다. YearlessDate 형식도 지원됩니다.
|
Promotions / HotelPromotions / Promotion / StayDates / DateRange / @start | 0..1 | Date or YearlessDate | 기간을 포함한 시작일입니다 (속성의 시간대를 기준으로 함). 이 날짜는 end 날짜 이전이거나 그 이전이어야 합니다. start 을 지정하지 않으면
기간이 시작일 측면에서 사실상 무제한입니다. |
Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end | 0..1 | Date or YearlessDate | 기간의 종료일 (속성의 시간대를 기준으로 함)입니다. 이 날짜는 start 날짜와 같거나 그 이후여야 합니다. end 을 지정하지 않으면
기간이 종료일 측면에서 사실상 무제한입니다. |
Promotions / HotelPromotions / Promotion / StayDates / DateRange / @days_of_week | 0..1 | string | 기간에서 허용되는 요일입니다. 지정하지 않으면 날짜 범위의 모든 날짜가 허용됩니다. 문자열의 각 문자는 요일을 지정합니다. 예를 들어 'MTWHF'는 기간에 평일이 허용됨을 지정합니다. 유효한 문자는 다음과 같습니다.
모든 문자 조합이 유효합니다. |
Promotions / HotelPromotions / Promotion / UserCountries | 0..1 | UserCountries | 프로모션을 받을 수 있는 사용자 위치 (국가)를 나열하기 위한 컨테이너입니다. 이 플래그를 지정하면 나열된 국가에서 자격이 있는 사용자에게만 할인 요금이 제공됩니다. 지정하지 않으면 모든 국가의 대상 사용자에게 할인 요금이 제공됩니다. |
Promotions / HotelPromotions / Promotion / UserCountries / @type | 0..1 | enum | User국가 사양 유형입니다.
유효한 값은 Usercountries Usercountries Usercountries |
Promotions / HotelPromotions / Promotion / UserCountries / Country | 1..300 | Country | 사용자가 프로모션을 이용할 수 있는 국가를 정의합니다. |
Promotions / HotelPromotions / Promotion / UserCountries / Country / @code | 1 | string | CLDR 국가 코드(예: DE 또는 FR ) 일부 국가의 경우 CLDR 국가 코드가 2자리 ISO 국가 코드와 다릅니다. 또한 CLDR 지역 코드는 지원되지 않습니다. |
예시
기본 메시지
다음 예는 기본 Promotions
메시지를 보여줍니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<BookingDates>
<DateRange start="2020-07-01" end="2020-07-31" days_of_week="MTWHF"/>
<DateRange start="2020-09-01" end="2020-09-30"/>
</BookingDates>
<BookingWindow min="7" max="330"/>
<CheckinDates>
<DateRange start="2020-10-01" end="2020-10-31" days_of_week="FSU"/>
</CheckinDates>
<CheckoutDates>
<DateRange start="2020-10-08" end="2020-11-07" days_of_week="FSU"/>
</CheckoutDates>
<Devices>
<Device type="mobile"/>
<Device type="tablet"/>
</Devices>
<Discount percentage="20" applied_nights="2"/>
<LengthOfStay min="2" max="14"/>
<RatePlans>
<RatePlan id="234"/>
<RatePlan id="567"/>
</RatePlans>
<RoomTypes>
<RoomType id="123"/>
<RoomType id="456"/>
</RoomTypes>
<Stacking type="base"/>
<UserCountries>
<Country code="US"/>
<Country code="GB"/>
</UserCountries>
</Promotion>
</HotelPromotions>
</Promotions>
인벤토리 상태
다음 예시는 도착일 직전에 초과 재고가 있는 경우 할인을 만드는 방법을 보여줍니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<BookingWindow max="7"/>
<Discount percentage="10"/>
<InventoryCount min="3"/>
</Promotion>
</HotelPromotions>
</Promotions>
프로모션 1개 삭제
다음 예는 숙박 시설의 프로모션 1개를 삭제하는 방법을 보여줍니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1" action="delete"/>
</HotelPromotions>
</Promotions>
모든 프로모션 삭제
다음 예는 숙박 시설의 모든 프로모션을 삭제하는 방법을 보여줍니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1" action="overlay"/>
</Promotions>
모든 프로모션 오버레이
다음 예는 속성의 <HotelPromotions>
를 하나 이상의 새 프로모션으로 오버레이하는 방법을 보여줍니다. action="overlay"
인 경우 현재 메시지에 지정된 프로모션을 저장하기 전에 저장된 모든 프로모션이 삭제됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1" action="overlay">
<Promotion id="1">
<BookingDates>
<DateRange start="2020-09-01" end="2020-09-30"/>
</BookingDates>
<Discount percentage="10"/>
<RoomTypes>
<RoomType id="123"/>
<RoomType id="456"/>
</RoomTypes>
<RatePlans>
<RatePlan id="234"/>
<RatePlan id="567"/>
</RatePlans>
<Stacking type="base"/>
</Promotion>
</HotelPromotions>
</Promotions>
3가지 다양한 스태킹 유형
다음 예는 서로 다른 3가지 프로모션 (base
, second
, any
)이 적용되는 경우를 보여줍니다. 다른 프로모션이 더 나은 할인을 제공하기 때문에 none
프로모션은 적용되지 않습니다. 원래 가격이 $100인 경우 할인된 가격은 $72.90이 됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<Discount percentage="10"/>
<Stacking type="base"/>
</Promotion>
<Promotion id="2">
<Discount percentage="10"/>
<Stacking type="second"/>
</Promotion>
<Promotion id="3">
<Discount percentage="10"/>
<Stacking type="any"/>
</Promotion>
<Promotion id="4">
<Discount percentage="25"/>
<Stacking type="none"/>
</Promotion>
</HotelPromotions>
</Promotions>
없음 스태킹 유형
다음 예는 다른 프로모션을 조합하면 할인이 더 적기 때문에 none
프로모션이 사용되는 사례를 보여줍니다. 정가가
100달러였다면 할인된 가격은 75달러가 됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<Discount percentage="10"/>
<Stacking type="base"/>
</Promotion>
<Promotion id="2">
<Discount percentage="10"/>
<Stacking type="any"/>
</Promotion>
<Promotion id="3">
<Discount percentage="25"/>
<Stacking type="none"/>
</Promotion>
</HotelPromotions>
</Promotions>
예약 기간 기간 한도
다음 예는 BookingWindow
요소가 시작 및 끝 경계가 ISO 8601 기간 유형으로 정의된 상태로 사용되는 경우를 보여줍니다. 이러한 예약 기간 제한에 따라 도착 전날 18:00 이전, 도착 2일 차 당일 12시 이후에 예약해야
합니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<BookingWindow min="P1DT6H" max="P2DT12H"/>
<Discount percentage="20"/>
</Promotion>
</HotelPromotions>
</Promotions>
예약 날짜 날짜/시간 한도
다음 예는 BookingDates
요소가 start
및 end
속성과 함께 DateTime 유형으로 사용되는 사례를 보여줍니다. 이 예약 날짜 제한을 적용하려면 2020년 7월 1일 6시 30분에서 2020년 7월 2일 18시 45분 사이에 예약해야 합니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<BookingDates>
<DateRange start="2020-07-01T06:30:00" end="2020-07-02T18:45:00"/>
</BookingDates>
<Discount percentage="20"/>
</Promotion>
</HotelPromotions>
</Promotions>
연도 없는 기간
다음 예는 CheckInDates
요소에 연도가 없는 start
및 end
필드가 있는 DateRanges
를 포함하는 사례를 보여줍니다. 이 예에서 프로모션은 연도와 관계없이 12월 29일부터 1월 2일 사이의 체크인 날짜에 적용됩니다. 새 연도 경계를 넘는 연중 기간은 유효하지 않으므로, DateRange는 두 개의 인접한 기간으로 표시됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<CheckInDates>
<DateRange start="12-29" end="12-31"/>
<DateRange start="01-01" end="01-02"/>
</CheckInDates>
<Discount percentage="20"/>
</Promotion>
</HotelPromotions>
</Promotions>
FreeNights 할인
다음 예시에서는 지정된 예약 날짜 기간에 숙박 4일마다 2박을 50% 할인합니다. 10박 일정의 경우 총 4박은 50% 할인됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<BookingDates>
<DateRange start="2022-01-01" end="2022-05-31"/>
</BookingDates>
<Discount>
<FreeNights stay_nights="4" discount_nights="2" discount_percentage="50" night_selection="cheapest" repeats="true"/>
</Discount>
</Promotion>
</HotelPromotions>
</Promotions>
다음 예시에서는 지정된 숙박 날짜 범위에서 3박당 숙박 1박에 대해 1박을 50% 할인합니다. 숙박 일수가 겹치는 숙박 일수만 할인 대상에 반영됩니다. 2022년 1월 1일에 체크인하고 2022년 1월 7일에 체크아웃하는 다음 일정의 경우 요건을 충족하는 숙박 일수와 할인이 다음과 같이 적용됩니다.
- 2022년 1월 1일 (숙박)
- 2022년 1월 2일 (숙박)
- 2022-01-03
- 2022-01-04 (할인됨)
- 2022년 1월 5일 (숙박)
- 2022년 1월 6일 (숙박)
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<StayDates application="overlap">
<DateRange start="2022-01-01" end="2022-01-02"/>
<DateRange start="2022-01-04" end="2022-01-06"/>
</StayDates>
<Discount>
<FreeNights stay_nights="3" discount_nights="1" discount_percentage="50" night_selection="last" repeats="true"/>
</Discount>
</Promotion>
</HotelPromotions>
</Promotions>
순위 결정 선택
다음 예시에서는 20% 할인과 15% 할인의 두 가지 할인을 제공합니다. 순위가 더 낮아 평가 중에는 15% 할인만 적용됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="Property_1">
<Promotion id="1">
<Discount percentage="15" rank="25"/>
</Promotion>
<Promotion id="2">
<Discount percentage="20" rank="50"/>
</Promotion>
</HotelPromotions>
</Promotions>
최고의 일일할인
다음 예시는 Discount
와 스택된 BestDailyDiscount
를 적용하여 2박을 할인합니다.
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
id="123_abc"
timestamp="2020-05-18T16:20:00-04:00">
<HotelPromotions hotel_id="HotelID" action="overlay">
<Promotion id="general">
<BestDailyDiscount fixed_amount="20"/>
</Promotion>
<Promotion id="may">
<BestDailyDiscount fixed_amount="50"/>
<StayDates application="overlap">
<DateRange start="2023-05-01" end="2023-05-31"/>
</StayDates>
</Promotion>
<Promotion id="fiesta">
<Discount fixed_amount_per_night="5"/>
<Stacking type="any"/>
</Promotion>
</HotelPromotions>
</Promotions>
2023년 4월 30일부터 2023년 5월 2일까지의 2박 숙박을 생각해 보세요. 계산을 위해 가장 큰 할인이 일어난 최상의 일일 할인의 조합이 먼저 발견됩니다.
첫날의 경우 '일반' 프로모션에만 20개의 고정 할인이 적용됩니다.
두 번째 밤에는 '할 수 있음' 프로모션이 '일반' 할인보다 더 큰 할인을 제공합니다. 따라서 '할 수 있음'을 선택하면 고정 할인 금액은 50입니다.
그런 다음 숙박 기간 동안 '피에스타' 프로모션에서 1박당 5개(총 10개)로 할인됩니다. 'fiesta'의 누적 유형이 any
로 설정되어 있으므로 최고의 일일 할인 혜택 조합과 함께 누적될 수 있습니다. base
로 설정된 경우 최고의 일일 할인 또는 '피에스타' 할인의 조합만 적용됩니다. 자세한 내용은 Stacking
의 설명을 참고하세요.
전체 숙박 가격에는 20 + 50 + 10 = 80의 고정 금액이 할인됩니다.
응답
문법
PromotionsResponse
메시지는 다음 구문을 사용합니다.
<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="timestamp"
id="message_ID"
partner="partner_key">
<!-- Either Success or Issues are populated. -->
<Success/>
<Issues>
<Issue code="issue_code"
status="issue_type">
issue_description
</Issue>
</Issues>
</PromotionsResponse>
요소 및 속성
PromotionsResponse
메시지에는 다음과 같은 요소와 속성이 포함되어 있습니다.
요소 / @Attribute | 발생 횟수 | 유형 | 설명 |
---|---|---|---|
PromotionsResponse | 1 | Complex element | 수신된 프로모션 요청 메시지의 성공 또는 문제를 나타내는 루트 요소입니다. |
PromotionsResponse / @timestamp | 1 | DateTime | 이 메시지의 작성 날짜 및 시간입니다. |
PromotionsResponse / @id | 1 | string | 연결된 프로모션 메시지의 고유 식별자입니다. |
PromotionsResponse / @partner | 1 | string | 이 메시지의 파트너 계정입니다. |
PromotionsResponse / Success | 0..1 | Success | 프로모션 메시지가 경고, 오류 또는 실패 없이 성공적으로 처리되었음을 나타냅니다.
각 메시지에 |
PromotionsResponse / Issues | 0..1 | Issues | 프로모션 메시지를 처리하는 동안 발생한 하나 이상의
문제의 컨테이너입니다.
각 메시지에 |
PromotionsResponse / Issues / Issue | 1..n | Issue | 프로모션 메시지를 처리하는 동안 발생한 경고, 오류 또는 실패에 대한 설명입니다. 이러한 문제에 관한 자세한 내용은 피드 상태 오류 메시지에서 확인할 수 있습니다. |
PromotionsResponse / Issues / Issue / @code | 1 | integer | 문제의 식별자입니다. |
PromotionsResponse / Issues / Issue / @status | 1 | enum | 발생한 문제의 유형입니다. 유효한 값은 |
예시
성공
다음은 성공적으로 처리된 프로모션 메시지에 대한 응답입니다.
<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Success/>
</PromotionsResponse>
문제
다음은 오류로 인해 처리되지 않은 프로모션 메시지에 대한 응답입니다.
<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Issues>
<Issue code="1001" status="error">Example</Issue>
</Issues>
</PromotionsResponse>