Managing Rates

4.6. Managing Rates

POST /cm/rateplans

Description

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

Body parameter

List of RatePlans in OTA2017B format which need to be created

Name : body
Flags : required
Type : OTA_HotelRatePlanNotifRQ

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

  • RatePlans

Security

Type Name

apiKey

Example HTTP request

Request path
/cm/rateplans
Request for create property’s rates
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRQ 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_HotelRatePlanNotifRQ.xsd">
  <RatePlans HotelCode="9612080">
    <RatePlan RatePlanID="RatePlan12" RatePlanNotifType="New" RatePlanType="1">
      <Description Name="Standard Rate"/>
      <TPA_Extensions>
        <Channels>
          <Channel ChannelCode="1"/>
        </Channels>
      </TPA_Extensions>
    </RatePlan>
    <RatePlan RatePlanID="RatePlan13" RatePlanNotifType="New" RatePlanType="2">
      <Description Name="Exclusive Rate"/>
      <TPA_Extensions>
        <Channels>
          <Channel ChannelCode="1"/>
        </Channels>
      </TPA_Extensions>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>
Request for partial update property’s rates
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRQ 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_HotelRatePlanNotifRQ.xsd">
  <RatePlans HotelCode="9612080">
    <RatePlan RatePlanCode="3236124" RatePlanNotifType="Delta">
      <Description Name="Standard Rate updated"/>
      <TPA_Extensions>
        <Channels>
          <Channel ChannelCode="1" Status="Active"/>
          <Channel ChannelCode="6" Status="Inactive"/>
        </Channels>
      </TPA_Extensions>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>
Request for update property’s rates
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanNotifRQ 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_HotelRatePlanNotifRQ.xsd">
  <RatePlans HotelCode="9612080">
    <RatePlan RatePlanCode="3236124" RatePlanNotifType="Overlay">
      <Description Name="Standard Rate updated"/>
    </RatePlan>
  </RatePlans>
</OTA_HotelRatePlanNotifRQ>

Example HTTP response

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