Hotel Policy Rooms and More Update / Create
Rooms and More locations can be added to an agency through either a create or an update entry. The formats are the same with the exception of the requestCategory. An example of a create request / response is included at the end of this section; however, since the format is the same as an update it is not being documented separately.
Supply the universal profile ID of the agency for which you wish to configure Rooms and More locations along with the Rooms and More location data.
Sample Hotel Policy Rooms and More Update / Create request data
xmlns:v1="http://www.travelport.com/schema/policy/admin/roomsandmore/v1"
<v1:performCRUDRQ>
<v1:BasePolicyRequestHeader source="Web" requestorId="DaveS" accountId="451698" requestCategory="Update"/>
<v1:RoomAndMoreRequestProfile>
<v1:TRMLocation name="AyersRock" locCode="AUULU@" action="Add">
<v1:Location state="NT" country="AU"/>
</v1:TRMLocation>
<v1:TRMLocation id="39" name="LocationUpdate" locCode="UPDTE@" action="Update">
<v1:Location country="FR"/>
</v1:TRMLocation>
<v1:TRMLocation id="36" action="Delete" locCode="AUPER@" name="CustomerSiteA">
<v1:Location country="AU" state="WA"/>
</v1:TRMLocation>
</v1:RoomAndMoreRequestProfile>
</v1:performCRUDRQ>
The following elements are supplied in an Update / Create request:
performCRUDRQ / BasePolicyRequestHeader (requestCategory = Update/Create)
RoomAndMoreRequestProfile – wrapper element for Rooms and More data
TRMLocation - Rooms and More location
attribute: locCode - Rooms and More database code
attribute: name – name Agency wants to use to refer to this location
attribute: action – will always be “Add” on a create, can be “Add” / “Update” / “Delete” on an update request
Location – wrapper element for location data
attribute: country – country code that this location exists in
attribute: state – state code that this location exists in (states are supported for AU/CA/US country codes only)
Sample Hotel Policy Rooms and More Update / Create response data
xmlns:ns4="http://www.travelport.com/schema/policy/admin/roomsandmore/v1"
xmlns:ns5="http://www.travelport.com/schema/policy/admin/common/v1"
<ns4:performCRUDRS>
<ns4:BasePolicyResponseHeader accountId="451698" requestorId="DaveS"/>
<ns5:AdditionalMessage iD="0" status="Processed">
<ns5:Element iD="0" name="Rooms And More" status="Processed">
<ns5:SubElement iD="40" name="Rooms And More" status="Processed">ADDED :-Id:40-Name:AyersRock-Code:AUULU</ns5:SubElement>
<ns5:SubElement iD="39" name="Rooms And More" status="Processed">UPDATED :-Id:39-Name:LocationUpdate-Code:UPDTE</ns5:SubElement>
<ns5:SubElement iD="36" name="Rooms And More" status="Processed">DELETED :-Id:36-Name:CustomerSiteA-Code:AUPER</ns5:SubElement>
</ns5:Element>
</ns5:AdditionalMessage>
</ns4:performCRUDRS>
The following elements are found in an Update / Create response:
performCRUDRS / BasePolicyResponseHeader
AdditionalMessage – overall status of the response
attribute: iD – “0” / not used on a Rooms and More Update / Create
attribute: status – will be either “Processed” or “Failure”.
Element – wrapper for a grouping of response items
attribute: iD – “0” / not used on a Rooms and More Update / Create
attribute: name – name of the wrapper tag to which this response element applies (Rooms And More)
attribute: status – overall status of this particular grouping - will be either “Processed” or “Failure”
SubElement – individual response for an item within the grouping
attribute: iD – usage depends on the type of SubElement being returned. Rooms And More = the ID within the Policy DB for this specific Rooms and More location.
attribute: name – name of the wrapper tag to which this response element applies (Rooms And More).
attribute: status – overall status of this particular element - will be either “Processed” or “Failure”
Considerations for a Hotel Policy Rooms and More Update or Create
A valid response will return status information in the AdditionalMessage section.
Rooms and More configurations are stored at the Agency level and are available to all accounts under the agency.
For a create request substitute Create in the requestCategory attribute above. The only valid action attribute in the TRMLocation element for a create request is Add.
The state attribute under the Location element is optional.
When deleting or updating a TRMLocation you must specify a valid id and include valid data in the name / locCode attributes and include a valid Location element.
In the Update Response the value returned in the SubElement fields depends on the type of Element being returned.
Rooms And More returns the action performed (51/52/53 = Add/Delete/Update), the id of the specific rooms and more location in the policy DB and reflects back the name and code configured for that location.
Examples:
Action:51-Id:40-Name:AyersRock-Code:AUULU
Action:53-Id:39-Name:LocationUpdate-Code:UPDTE
Action:52-Id:36-Name:CustomerSiteA-Code:AUPER
Sample Update Request
See the Downloads page to download a zip file containing the following XML files.
Sample Update Request:
HotelPolicyTRMUpdateRQ.xml
Sample Update Response:
HotelPolicyTRMUpdateRS.xml
Sample Create Request:
HotelPolicyTRMCreateRQ.xml
Sample Create Response:
HotelPolicyTRMCreateRS.xml