Skip to content

OTA_HotelInvCountNotifRQ

Method for sending room-level availability (RoomType only) to Kurzurlaub.de.

See also Developer Guide - Inventory Push API

We describe the OTA_HotelInvCountNotifRQ Request (RQ) and Response (RS) using the example of the test hotel. The data is always sent with a POST request.

OTA_HotelInvCountNotifRQ - Request via POST

Endpoint for POST Request:

POST /ota/api/HotelInvCountNotif

Parameters used

Authentication and hotel parameters:

  • @AgentDutyCode - Agent-ID: 1
  • RequestorID@ID - Hotel-ID: 4

Availability parameters:

A Room-ID and a period (date from/to) in DateFormat are expected as StatusApplicationControl

  • @Start - Date (DateFormat YYYY-MM-DD)
  • @End - Date (DateFormat YYYY-MM-DD)
  • @InvTypeCode - Room-ID

  • InvCount@Count - Number of free rooms (value >= 0)

Validation of incoming data

Validation of incoming parameters for date range (date from/to):

  • a valid date period (@Start - @End)
  • a valid date format (YYYY-MM-DD)
  • not in the past
  • no more than 2 years in future
  • no more than 3 months as a continuous period

Validation of other parameters:

  • no more than 4000 lines per request
  • BookingLimit - number of free rooms as integer >= 0
  • Room ID valid and room is online/active

Notice:

The data sent by the OTA partner will only be accepted for rooms that are *active and online*, alternatively warnings will be sent in response.

In general, lines with availability are considered individually, i.e. an error in the InvTypeCode or in the date format, date range is only sent as a warning for this one line. All other lines are processed independently.

For example, each message contains one or more StatusApplicationControl elements for one or more rooms of a hotel (RequestorID@ID).

Example Request

Example OTA_HotelInvCountNotifRQ Request

<OTA_HotelInvCountNotifRQ>
    <POS>
        <Source AgentDutyCode="1">
            <RequestorID ID="4" Type="4"/>
        </Source>
    </POS>
    <Inventories>
        <Inventory>
            <StatusApplicationControl Start="2022-03-17" End="2022-03-21" InvTypeCode="2625"/>
            <InvCounts>
                <InvCount CountType="1" Count="5"/>
            </InvCounts>
        </Inventory>
        <Inventory>
            <StatusApplicationControl Start="2022-03-25" End="2022-03-26" InvTypeCode="2625"/>
            <InvCounts>
                <InvCount CountType="1" Count="0"/>
            </InvCounts>
        </Inventory>
        <Inventory>
            <StatusApplicationControl Start="2022-03-28" End="2022-03-31" InvTypeCode="2625"/>
            <InvCounts>
                <InvCount CountType="1" Count="10"/>
            </InvCounts>
        </Inventory>
    </Inventories>
</OTA_HotelInvCountNotifRQ>

OTA_HotelInvCountNotifRS - Versions of Response

Usually a <Success/> is sent in response or appropriate error messages and/or warnings

Example OTA_HotelInvCountNotifRS Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          EchoToken="f92a277f4fc936924932a684e176f5e8" PrimaryLangID="de"
                          TimeStamp="2022-03-08T15:21:45+01:00" Target="Production" Version="2.01">
    <Success/>
</OTA_HotelInvCountNotifRS>

Warnings

Each line sent with availabilities is viewed and processed individually, therefore errors in the validation of parameters are only sent as a warning for this one line. (See also list of common error messages)

All other lines are processed independently.

The attributes used for checking are also output for each warning.

If there are warnings, the number of successfully processed rows is sent at the end as a separate notice. e.g.

1 of 3 incoming InvCountMessages processed. See warnings before

Example OTA_HotelInvCountNotifRS Response with warnings

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          EchoToken="fa9c12edfe5baba3b98deac1138ed5b2" PrimaryLangID="de"
                          TimeStamp="2022-03-08T15:48:27+01:00" Target="Production" Version="2.01">
    <Warnings>
        <Warning Code="240" Type="1">Invalid start date (2022-01-01) is in past</Warning>
        <Warning Code="120" Type="1">InvCountMessage validation failed - used attributes (BookingLimit: 5, Start:
            2022-01-01, End: 2022-02-01, InvTypeCode: 2625, RatePlanCode: n/a, RatePlanID: 0)
        </Warning>
        <Warning Code="240" Type="1">Invalid date period (2022-04-01 - 2023-05-01) range is to large (max +12 months)
        </Warning>
        <Warning Code="120" Type="1">InvCountMessage validation failed - used attributes (BookingLimit: 5, Start:
            2022-04-01, End: 2023-05-01, InvTypeCode: 2625, RatePlanCode: n/a, RatePlanID: 0)
        </Warning>
        <Warning Code="500" Type="1">1 of 3 incoming InvCountMessages processed. See warnings before</Warning>
    </Warnings>
</OTA_HotelInvCountNotifRS>

Error messages

If serious errors occur, e.g. in the authentication or validation of the data, they are sent in an OTA_ErrorRS Response with @ErrorCode and @ErrorMessage

Here is a list of common error messages when sending availabilities

ErrorCode ErrorMessage
210 HotelNotLinked - Hotel linked to another channel manager
211 HotelNotActivated - Hotel not found
104 InternalError - Empty HotelCode (HotelId) in accepted params (agentdutycode, hotelcode, ...)
220 RoomMappingError - Hotel does not have rooms created or configured
221 RoomMappingError - Hotel does not have rates created or configured
230 RoomMappingError - Invalid room code
231 RoomMappingError - Invalid room quantity
232 RoomMappingError - Invalid rate code (only Room/Rate combinations)
240 DateRangeError - Invalid date range

Example OTA_HotelInvCountNotifRS Response with errors

<?xml version="1.0" encoding="UTF-8"?>
<OTA_ErrorRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             EchoToken="968209e6b51ffeba7b2953801c4c8fce" PrimaryLangID="de" TimeStamp="2022-03-08T15:57:43+01:00"
             Target="Production" Version="1.000" 
             ErrorCode="211"
             ErrorMessage="HotelNotActivated - Hotel not found (HotelCode 1234 / AgentDutyCode 1)"/>