# Batch processing

RateGain allows the XML update messages to be sent as single transactions, or the messages can be collected and sent as a batch. Customers who wish to utilize a batch method of accessing the HCD XML Update Interface will FTP files to RateGain for processing. RateGain will process the batch file by separating the messages into individual transactions, validating its structure and content, and applying the update.

Each property record in a batch file is autonomous, meaning that if one record in the batch is invalid, processing will still be attempted on the remaining records in the batch.

Each batch can contain a variety of data combinations. The batch can be as structured as:

Only “Add” messages for a brand, or

Only “Deletes” for a chain, or

“Adds and Updates” for all brands, or

A complete refresh of properties for the chain

This is left up to the supplier to determine the data combinations.

**Batch file format**

An inbound batch file consists of one or more OTA XML messages, wrapped with a SOAP envelope and then the entire file is wrapped with a batch header and trailer tag. The SOAP header contains the action for the entire grouping of XML messages. Each OTA XML message contains a specific language code that identifies the language of the data within the message. Therefore, each action per language must be sent in a separate SOAP / XML message. The following example shows the separation of action, language, multiple properties per SOAP, and the use of the Header and Trailer within a single batch.

**Inbound Batch File Example**

\<Batch>

\<env:Envelope

xmlns:enc="<http://schemas.xmlsoap.org/soap/encoding/>" xmlns:env="<http://schemas.xmlsoap.org/soap/envelope/>" xmlns:ns0="<http://schemas.xmlsoap.org/ws/2002/12/secext>" xmlns:ns1="<http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2\\_0.xsd>"

xmlns:ns2="<http://www.opentravel.org/OTA/2003/05>" xmlns:xsd="<http://www.w3.org/2001/XMLSchema>" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance">](http://www.w3.org/2001/XMLSchema-instance">)

\<env:Header>\<ns2:MessageHeader ns1:mustUnderstand="false" ns2:version="2.0"

xmlns:ns1="<http://schemas.xmlsoap.org/soap/envelope/>" xmlns:ns2="[http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2\\\_0.xsd">](http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2\\_0.xsd">)

\<ns2:From>

\<ns2:PartyId>Customer\</ns2:PartyId>

\</ns2:From>

\<ns2:To>\<ns2:PartyId>RateGain\</ns2:PartyId>

\</ns2:To>

\<ns2:CPAId>ODDUpdateInterface\</ns2:CPAId>

\<ns2:ConversationId>SIHtoODD1\</ns2:ConversationId>

\<ns2:Service ns2:type="4.0">ODDUpdateInterface\</ns2:Service>

\<ns2:Action>UPSERT\</ns2:Action>

\<ns2:MessageData>

\<ns2:MessageId>IDTPAPA\</ns2:MessageId>

\<ns2:Timestamp>2024-10-15T13:01:31\</ns2:Timestamp>\</ns2:MessageData>

\</ns2:MessageHeader>

\<Security xmlns="[http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">](http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">)

\<UsernameToken>

\<Username> RateGain assigned interface email address\</Username>

\<Password> RateGain assigned password \</Password>

\</UsernameToken>

\</Security>

\</env:Header>

\<env:Body>

\<HotelDescriptiveContents>

.

.

.

\</HotelDescriptiveContents>

\</OTA\_HotelDescriptiveContentNotifRQ>

\</env:Body>

\</env:Envelope>

\</Batch>

&#x20;

&#x20;

<br>

&#x20;

<p align="center">Outbound Batch File Examples</p>

&#x20;

\<SOAP-ENV:Envelope xmlns:SOAP- [ENV="http://schemas.xmlsoap.org/soap/envelope/">](http://schemas.xmlsoap.org/soap/envelope/)

<p align="center">&#x3C;SOAP-ENV:Header/></p>

<p align="center">&#x3C;SOAP-ENV:Body></p>

\<OTA\_HotelDescriptiveContentNotifRS [xmlns="http://www.opentravel.org/OTA/2003/05"](http://www.opentravel.org/OTA/2003/05) PrimaryLangID="en" Version="4.000">

<p align="center">&#x3C;Errors></p>

\<Error Code="497" ShortText="Authorization error

" Type="4">Unable to authenticate and authorize user: <username@supplier.com.> Error: Authentication failed for user: <username@supplier.com>\</Error>

&#x20;  \</Errors>

\<UniqueID ID="ID12345-XX-12345-1" Type="1"/>

\</OTA\_HotelDescriptiveContentNotifRS>

<p align="center">&#x3C;/SOAP-ENV:Body></p>

<p align="center">&#x3C;/SOAP-ENV:Envelope></p>

<p align="center"> </p>

<p align="center"> </p>

\<SOAP-ENV:Envelope xmlns:SOAP-ENV="[http://schemas.xmlsoap.org/soap/envelope/">](http://schemas.xmlsoap.org/soap/envelope/">)

\<SOAP-ENV:Header/>

\<SOAP-ENV:Body>

\<OTA\_HotelDescriptiveContentNotifRS xmlns="<http://www.opentravel.org/OTA/2003/05>" PrimaryLangID="en" Version="4.000">\<Success/>

\<Warnings>

\<Warning Code="DATA0227" ShortText="Content Integrity" Type="3">The proximity value for HAC.143 was changed to '2' to ensure content integrity.\</Warning>

\</Warnings>

\<UniqueID ID="IDXXXXX-BB-PPPPP-1" Type="1"/>

\</OTA\_HotelDescriptiveContentNotifRS>

\</SOAP-ENV:Body>

\</SOAP-ENV:Envelope>

&#x20;

&#x20;

\<SOAP-ENV:Envelope xmlns:SOAP-ENV="[http://schemas.xmlsoap.org/soap/envelope/">\\](http://schemas.xmlsoap.org/soap/envelope/">\\)<SOAP-ENV:Header/>\<SOAP-ENV:Body>\<OTA\_HotelDescriptiveContentNotifRS xmlns="<http://www.opentravel.org/OTA/2003/05>" PrimaryLangID="en" Version="4.000">\<Success/>

\<Warnings>

\<Warning Code="DATA2234" ShortText="CityCodeNotRelevant" Type="3">City code {STT} will be ignored because it can only be provided for Attractions with a category of City\</Warning>

\</Warnings>

\<UniqueID ID="IDXXXXX-BB-PPPPP-2" Type="1"/>

\</OTA\_HotelDescriptiveContentNotifRS>

\</SOAP-ENV:Body>

\</SOAP-ENV:Envelope>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.rategain.com/content/content-update-1/batch-processing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
