CiirusXMLAdditionalFunctions15025
Click here for a complete list of operations.
GetPropertiesNightlyRoomsToSell
Returns the number of rooms (Always 1), the number of bookings placed, and the rooms available per day per PropertyID.
Note: This function is limited to ranges of nights between 0 and 31 inclusive.Note: This function is limited an input of 20 properties per API call.
Use this function to get quanitity of rooms to sell or sold per night for a specified date range for specific properties.
Pass the following parameters:
- APIUsername (String)
- APIPassword (String)
- PropertyIDs (array of type integer)
- MinimumDateInRange (String, dd MMM yyyy)
- MaximumDateInRange (String, dd MMM yyyy)
Exception Responses:
- GetPropertiesNightlyRoomsToSell: Validation Error 1
- GetPropertiesNightlyRoomsToSell: Error - Maximum Date must be at least 1 night after the Minimum Date.
- GetPropertiesNightlyRoomsToSell: Error - Invalid days in range
- GetPropertiesNightlyRoomsToSell: Error - Requested Availability range too large. (Max Range: 31 nights)
- GetPropertiesNightlyRoomsToSell: Error - This function accepts 20 properties or fewer at a time.
Per Property Error Responses:
- GetPropertiesNightlyRoomsToSell: Validation Error 2 - Property has been deleted from the system.
- GetPropertiesNightlyRoomsToSell: Validation Error 3 - Property has been deleted from the system.
- GetPropertiesNightlyRoomsToSell: Validation Error 2
- GetPropertiesNightlyRoomsToSell: Error - Unkown Error 2
- GetPropertiesNightlyRoomsToSell: Error - AOA properties are not supported via this function.
- GetPropertiesNightlyRoomsToSell: Error - TimeShare properties are not supported via this function.
- GetPropertiesNightlyRoomsToSell: Error - Could not Calculate Availability Signature.
-Convert integer to binary and trim first char if 0 and last chars of binary string if length of string is greater than nights in range by one. This is if the property has avialability per day starting at the 0 index night object (the StartDate value) forward in time to the end of the range.
Note: Use StartDate to set the beginning date for your loop to the end of range. Use the DayOffset value of each night object to add that number of days to the StartDate to get the date for that night. (StartDate + DayOffset, interval in days)
Test
The test form is only available for methods with primitive types as parameters.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /XMLadditionalfunctions15.025.asmx HTTP/1.1
Host: api.ciirus.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://xml.ciirus.com/GetPropertiesNightlyRoomsToSell"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetPropertiesNightlyRoomsToSell xmlns="http://xml.ciirus.com/">
<APIUsername>string</APIUsername>
<APIPassword>string</APIPassword>
<PropertyIDs>
<int>int</int>
<int>int</int>
</PropertyIDs>
<MinimumDateInRange>string</MinimumDateInRange>
<MaximumDateInRange>string</MaximumDateInRange>
</GetPropertiesNightlyRoomsToSell>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetPropertiesNightlyRoomsToSellResponse xmlns="http://xml.ciirus.com/">
<GetPropertiesNightlyRoomsToSellResult>
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night xsi:nil="true" />
<night xsi:nil="true" />
</Nights>
</RoomsToSellResponse>
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night xsi:nil="true" />
<night xsi:nil="true" />
</Nights>
</RoomsToSellResponse>
</GetPropertiesNightlyRoomsToSellResult>
</GetPropertiesNightlyRoomsToSellResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /XMLadditionalfunctions15.025.asmx HTTP/1.1
Host: api.ciirus.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetPropertiesNightlyRoomsToSell xmlns="http://xml.ciirus.com/">
<APIUsername>string</APIUsername>
<APIPassword>string</APIPassword>
<PropertyIDs>
<int>int</int>
<int>int</int>
</PropertyIDs>
<MinimumDateInRange>string</MinimumDateInRange>
<MaximumDateInRange>string</MaximumDateInRange>
</GetPropertiesNightlyRoomsToSell>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetPropertiesNightlyRoomsToSellResponse xmlns="http://xml.ciirus.com/">
<GetPropertiesNightlyRoomsToSellResult>
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night xsi:nil="true" />
<night xsi:nil="true" />
</Nights>
</RoomsToSellResponse>
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night xsi:nil="true" />
<night xsi:nil="true" />
</Nights>
</RoomsToSellResponse>
</GetPropertiesNightlyRoomsToSellResult>
</GetPropertiesNightlyRoomsToSellResponse>
</soap12:Body>
</soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /XMLadditionalfunctions15.025.asmx/GetPropertiesNightlyRoomsToSell?APIUsername=string&APIPassword=string&PropertyIDs=string&PropertyIDs=string&MinimumDateInRange=string&MaximumDateInRange=string HTTP/1.1 Host: api.ciirus.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfRoomsToSellResponse xmlns="http://xml.ciirus.com/">
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
</Nights>
</RoomsToSellResponse>
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
</Nights>
</RoomsToSellResponse>
</ArrayOfRoomsToSellResponse>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /XMLadditionalfunctions15.025.asmx/GetPropertiesNightlyRoomsToSell HTTP/1.1 Host: api.ciirus.com Content-Type: application/x-www-form-urlencoded Content-Length: length APIUsername=string&APIPassword=string&PropertyIDs=string&PropertyIDs=string&MinimumDateInRange=string&MaximumDateInRange=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfRoomsToSellResponse xmlns="http://xml.ciirus.com/">
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
</Nights>
</RoomsToSellResponse>
<RoomsToSellResponse>
<MaxRoomsInCategory>int</MaxRoomsInCategory>
<ResponseDateTime>dateTime</ResponseDateTime>
<ErrorMsgs>string</ErrorMsgs>
<AvailabilitySignature>int</AvailabilitySignature>
<PropertyID>int</PropertyID>
<StartDate>dateTime</StartDate>
<Nights>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
<night>
<DayOffset>int</DayOffset>
<RoomsInCategory>int</RoomsInCategory>
<RoomsSold>int</RoomsSold>
<RoomsAvailable>int</RoomsAvailable>
</night>
</Nights>
</RoomsToSellResponse>
</ArrayOfRoomsToSellResponse>