Managing Product

4.8. Managing Product

POST /cm/hotelproducts

Description

Build new or modify product mappings for properties which are authorized under your API credentials

Body parameter

HotelProductContent in OTA2017B format which need to be created

Name : body
Flags : required
Type : OTA_HotelProductNotifRQ

Responses

HTTP Code Description Schema

200

The request has been accepted for processing

400

The request content was malformed

401

The supplier was unauthorized

Consumes

  • application/xml

Produces

  • application/xml

Tags

  • HotelProducts

Security

Type Name

apiKey

Example HTTP request

Request path
/cm/hotelproducts
Request body
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelProductNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/2017B/OTA_HotelProductNotifRQ.xsd">
    <HotelProducts HotelCode="9612080">
        <HotelProduct>
            <RoomTypes>
                <RoomType RoomTypeCode="123"/>
            </RoomTypes>
            <RatePlans>
                <RatePlan RatePlanCode="111">
                    <SellDateRange End="2019-12-31" Start="2019-01-10"/>
                    <StayDateRange End="2019-12-31" Start="2019-01-10"/>
                </RatePlan>
            </RatePlans>
            <ValueAddInclusions>
                <Benefit BenefitCode="1"/>
                <RoomUseExtension CheckInTime="12:00:00" CheckOutTime="17:00:00"/>
            </ValueAddInclusions>
            <PolicyInfo>
                <CancelPolicy>
                    <CancelPenalty PolicyCode="13"/>
                </CancelPolicy>
                <BookingRules>
                    <BookingRule MaxAdvancedBookingOffset="P0Y0M10D" MaxLengthOfStay="P0Y0M2D" MinAdvancedBookingOffset="P0Y0M12D" MinLengthOfStay="P0Y0M3D"/>
                </BookingRules>
            </PolicyInfo>
        </HotelProduct>
    </HotelProducts>
</OTA_HotelProductNotifRQ>

Example HTTP response

Response 200
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelProductNotifRS CorrelationID="8b417d6a-f3df-4d65-870c-240378b8ad3e">
  <Success/>
  <UniqueID ID="123" Type="10"/>
</OTA_HotelProductNotifRS>
Response 400
<OTA_HotelProductNotifRS CorrelationID="325d8000-48cf-11ea-9337-8950898f7d75">
  <Errors>
    <Error Code="321" ShortText="Required field missing" Status="NotProcessed"/>
  </Errors>
</OTA_HotelProductNotifRS>
Response 401
<OTA_HotelProductNotifRS CorrelationID="325d8000-48cf-11ea-9337-8950898f7d75">
  <Errors>
    <Error Code="497" ShortText="Authorization error" Status="NotProcessed"/>
  </Errors>
</OTA_HotelProductNotifRS>