OTA_HotelInvCountRQ
Method for reading availability at room level (RoomType only) and optionally also at offer level (RoomType/RatePlan combination) from 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_HotelInvCountRQ - Request via POST
Endpoint for POST Request:
Verwendete Parameter
Parameters used
Authentication and hotel parameters:
@AgentDutyCode- Agent-ID: 1RequestorID@ID- Hotel-ID: 4
Availability parameters:
A Room-ID and a period (date from/to) in DateFormat are expected as HotelInvCountRequest
DateRange@Start- Date (DateFormat YYYY-MM-DD)DateRange@End- Date (DateFormat YYYY-MM-DD)RoomTypeCandidate@RoomTypeCode- Room-ID
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:
- Hotel ID valid and hotel is online/active
- 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.
Generally, lines with availabilities are considered individually, i.e. an error in the RoomTypeCode or in the date format, date range is only sent as a warning for this one line. All other lines are processed independently.
Example für Anfrage
Example OTA_HotelInvCountRQ Request
<OTA_HotelInvCountRQ TimeStamp="2024-03-22T10:52:54+01:00" Version="1.000">
<HotelInvCountRequests>
<HotelInvCountRequest>
<DateRange Start="2024-07-23" End="2024-07-25"/>
<RoomTypeCandidates>
<RoomTypeCandidate RoomTypeCode="2625"/>
<RoomTypeCandidate RoomTypeCode="16712"/>
<RoomTypeCandidate RoomTypeCode="15816"/>
<RoomTypeCandidate RoomTypeCode="DZ1"/>
</RoomTypeCandidates>
<HotelRef HotelCode="4"/>
</HotelInvCountRequest>
</HotelInvCountRequests>
</OTA_HotelInvCountRQ>
Alternatively as a SOAP request with auth in the header
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.opentravel.org/OTA/2003/05"
xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<SOAP-ENV:Header>
<ns2:Security SOAP-ENV:mustUnderstand="1">
<ns2:UsernameToken>
<ns2:Username>my-test-user</ns2:Username>
<ns2:Password>abcd1234</ns2:Password>
</ns2:UsernameToken>
</ns2:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:OTA_HotelInvCountRQ TimeStamp="2024-03-22T10:52:54+01:00" Version="1.000">
<ns1:HotelInvCountRequests>
<ns1:HotelInvCountRequest>
<ns1:DateRange Start="2024-07-23" End="2024-07-25"/>
<ns1:RoomTypeCandidates>
<ns1:RoomTypeCandidate RoomTypeCode="2625"/>
<ns1:RoomTypeCandidate RoomTypeCode="15815"/>
</ns1:RoomTypeCandidates>
<ns1:HotelRef HotelCode="4"/>
</ns1:HotelInvCountRequest>
</ns1:HotelInvCountRequests>
</ns1:OTA_HotelInvCountRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
OTA_HotelInvCountRS - Versions of Response
Normally a <Success/> is sent as a response or corresponding error messages (not warnings)
Example OTA_HotelInvCountRS Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountRS xmlns="http://www.opentravel.org/OTA/2003/05"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
EchoToken="aeefeef224d939e19a6a6d1252d639eb" TimeStamp="2024-07-10T12:49:18+02:00"
Version="2.064">
<Success/>
<Inventories HotelCode="2805">
<Inventory>
<StatusApplicationControl Start="2024-07-23" End="2024-07-25" InvTypeCode="2625" RatePlanCode="KU-TEST" RatePlanId="27173" IsRoom="true"/>
<InvCounts>
<InvCount CountType="2" Count="0"/>
</InvCounts>
</Inventory>
<Inventory>
<StatusApplicationControl Start="2024-07-23" End="2024-07-24" InvTypeCode="15815" RatePlanCode="KU-TEST" RatePlanId="27173" IsRoom="true"/>
<InvCounts>
<InvCount CountType="2" Count="4"/>
</InvCounts>
</Inventory>
<Inventory>
<StatusApplicationControl Start="2024-07-24" End="2024-07-25" InvTypeCode="15815" RatePlanCode="KU-TEST" RatePlanId="27173" IsRoom="true"/>
<InvCounts>
<InvCount CountType="2" Count="2"/>
</InvCounts>
</Inventory>
</Inventories>
</OTA_HotelInvCountRS>
Warnings
Es werden keine Warungen gesendet, alle Ausgaben bspw. der Validieurng werden als Fehler gesendet
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 |
| 232 | RoomMappingError - Invalid rate code (bei Room/Rate Kombinationen) |
| 240 | DateRangeError - Invalid date range |
| 448 | DateRangeError - Invalid start date |
| 448 | InternalError - unknown internal error |
Example OTA_HotelInvCountRS Response ith errors
Variant 1: in the context of the request OTA_HotelInvCountRS Response and <Errors>
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountRS xmlns="http://www.opentravel.org/OTA/2003/05"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
EchoToken="eef8223c1e2468da575e2ce7d85eef9e" TimeStamp="2024-07-10T10:45:49+02:00"
Version="2.064">
<Errors>
<Error Code="448" Type="12">Invalid start date (2024-05-23) is in past</Error>
</Errors>
</OTA_HotelInvCountRS>
Variant 2: Alternative as OTA_ErrorRS Response and attributees ErrorCode and ErrorMessage
<?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="eef8223c1e2468da575e2ce7d85eef9e" PrimaryLangID="de" TimeStamp="2022-03-08T15:57:43+01:00"
Target="Production" Version="2.064"
ErrorCode="448"
ErrorMessage="Invalid start date (2024-05-23) is in past"/>