Retrieve Promotions

Retrieve Promotions

POST /cm/promotion/retrieve

Description

This section outlines the feature to retrieve promotions. Note that only promotion types supported by this API will be returned. Promotion types not supported by this API but supported on the YCS Extranet will not be returned.

Body Parameter

HotelPromotionGet_RQ must be supplied.

Name : body
Flags : required
Type : HotelPromotionGet_RQ

Responses

HTTP Code Description Schema

200

The promotions have been retrieved successfully

No Content

400

The request content was malformed

No Content

401

The supplier was unauthorized

No Content

Consumes

application/xml

Produces

application/xml

Tags

PromotionRetrieve

Security

Type Name

apiKey

Example HTTP request

Request path

/cm/promotion/retrieve

Request body

<?xml version="1.0" encoding="UTF-8"?>
<HotelPromotionGet_RQ HotelId="680674" IsActive="true" PromotionId="750566" Timestamp="1605243776"/>

Example HTTP response

Response 200

<HotelPromotionGet_RS Tuid="f2512b30-2a53-11eb-9a46-e72138f17e12">
    <HotelPromotion IsActive="true">
        <Promotion PromotionType="Customized" PromotionName="Customized Promotion example"
        PromotionId="75023474" HotelId="203103755"/>
        <SaleDateRange Start="2021-01-01+07:00" End="2021-03-05+07:00"/>
        <StayDateRange Start="2021-02-01+07:00" End="2021-06-05+07:00"/>
        <MinNoOfRooms>2</MinNoOfRooms>
        <BlackoutDateRange>
            <DateRange Start="2021-03-15+07:00" End="2021-03-30+07:00"/>
            <DateRange Start="2021-06-01+07:00" End="2021-06-03+07:00"/>
        </BlackoutDateRange>
        <LengthOfStay Min="1" Max="7"/>
        <BookOn>
            <Day>Tuesday</Day>
            <Day>Thursday</Day>
            <Day>Saturday</Day>
        </BookOn>
        <StayOn>
            <Day>Monday</Day>
            <Day>Wednesday</Day>
            <Day>Friday</Day>
        </StayOn>
        <CheckinOn>
            <Day>Wednesday</Day>
            <Day>Thursday</Day>
            <Day>Friday</Day>
            <Day>Saturday</Day>
        </CheckinOn>
        <BookingTime To="22:00:00" From="12:00:00"/>
        <IsStackable>false</IsStackable>
        <Discount>
            <PercentPerNight NightType="SpecificDOW">
                <Value>25.0</Value>
                <Value>15.0</Value>
                <Value>0.0</Value>
                <Value>0.0</Value>
                <Value>0.0</Value>
                <Value>0.0</Value>
                <Value>0.0</Value>
            </PercentPerNight>
        </Discount>
        <CancellationPolicy Id="963"/>
        <Channels>
            <Channel Id="1"/>
            <Channel Id="7"/>
        </Channels>
        <CustomerSegments>
            <CustomerSegment Id="0"/>
        </CustomerSegments>
        <RatePlans>
            <RatePlan Id="3371504"/>
        </RatePlans>
        <Rooms>
            <Room Id="1201489087"/>
        </Rooms>
        <PromotionPerformance Revenue="5000.0" NightsAvgPerBooking="3" Bookings="332"/>
    </HotelPromotion>
</HotelPromotionGet_RS>

Response 400

<?xml version="1.0" encoding="UTF-8"?>
<HotelPromotionGet_RS>
<Errors>
  <Error Code="321" ShortText="Required field missing" Status="NotProcessed"/>
</Errors>
</HotelPromotionGet_RS>

Response 401

<?xml version="1.0" encoding="UTF-8"?>
<HotelPromotionGet_RS>
<Errors>
  <Error Code="497" ShortText="Authorization error" Status="NotProcessed"/>
</Errors>
</HotelPromotionGet_RS>