User Tools

Site Tools


delta-service

This is an old revision of the document!


Teamamerica Delta API Documentation

Welcome to the Teamamerica Delta API Interface Guide. We hope you will have a smooth and successful integration to our system.

Overview

This API provides a list of changes that have been created, updated, or deleted within a specified time frame. The response is available in XML and JSON formats and serves two key purposes:

Cache Updates: The API returns date ranges that require cache updates on the client side, which should be refreshed using the XML5+ PriceSearch API.

Inventory Updates: The API provides availability statuses within specific date ranges, indicating which dates went on OnRequest or ClosedOut.

This Delta API significantly reduces the need for clients to perform millions of searches daily and enables efficient synchronization by ensuring the client maintains the up-to-date hotel inventory data.

Should you have any question or need any assistance, Please contact: it@teamamericany.com

Development Rest EndPoint: http://devxml40.volateam.com:8081/TaDeltaApi/TeamAmerica/

Note: Only whitelisted IP addresses will be granted access to this endpoint. Please ensure that the relevant IP addresses are whitelisted to avoid any disruption in service.

Requests

To retrieve updated data, send an XML request formatted as follows:

✔ GetDeltaRateChangesRQ [XML]

Header:

NameValue
Content-Type application/xml
Accept application/xml

XML Request Parameters:

LevelNameTypeOccursRequiredComments
0 GetDeltaRateChangesRQ String 1 Y
1 UserName String 1 Y Registered API username for authentication.
1 Password String 1 Y Registered API password for authentication.
1 CityCode String 1 N To obtain city codes, use the ListCities function. Using the CityCode in your search will yield faster results. City codes are 3 characters long (e.g. NYC).
1 HotelID Integer 1 N In this block you may enter specific vendor ID’s (Hotels), and narrow the search results to only your preferred hotels.
1 LastSynced String 1 Y Timestamp of the last synchronization in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). To retrieve data for any updates that have occurred since this timestamp.

XML Request

  <GetDeltaRateChangesRQ>
     <UserName>username</UserName>
     <Password>****</Password>
     <CityCode></CityCode>
     <HotelID></HotelID>
     <LastSynced>2025-02-20T12:00:00Z</LastSynced>
  </GetDeltaRateChangesRQ>

XML Response Elements:

LevelNameTypeOccursRequiredComments
0 GetDeltaRateChangesRS 1
1 TimeStamp String 1 1 The current timestamp of the response in ISO 8601 format.
1 LastSyncedTime String 1 1 The timestamp of the last cache data synchronized / updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).
1 Hotels 1 1 A container for all hotel rooms / services.
2 Hotel 1..N 1 A collection of room/service lists, each identified by an attribute named “id”=“String” which corresponds to a specific HotelID.
3 Product 1..N 1 A specific product within a list, identified by an attribute named “code”=“String” which represents a product code.
4 Created 1 1 Contains date ranges indicating new inventory has recently been added to the list
5 DateRange 1..N Contains a list of sequential date ranges.
6 From Date 1 Arrival date starts from; Format: YYYY-MM-DD
6 To Date 1 Arrival date ends to; Format: YYYY-MM-DD
4 Updated 1 1 Contains date ranges indicating inventory records have been recently updated.
5 DateRange 1..N Contains a list of sequential date ranges.
6 From Date 1 Arrival date starts from; Format: YYYY-MM-DD
6 To Date 1 Arrival date ends to; Format: YYYY-MM-DD
4 Deleted 1 1 Contains date ranges indicating inventory records that have been recently moved out, restricted, or deleted. Rates and availability for these periods are currently unavailable.
5 DateRange 1..N Contains a list of sequential date ranges.
6 From Date 1 Arrival date starts from; Format: YYYY-MM-DD
6 To Date 1 Arrival date starts from; Format: YYYY-MM-DD

XML Response

  <GetDeltaRateChangesRS>
     <TimeStamp>2025-03-10T10:27:18Z</TimeStamp>
     <LastSyncedTime>2025-03-10T04:54:26Z</LastSyncedTime>
     <Hotels>
       <Hotel id="69">
         <Product code="NYCHXXXXX">
           <Created>
             <DateRange>
               <From>2025-08-01</From>
               <To>2025-08-11</To>
 	     </DateRange>
 	   </Created>    	
           <Updated>
             <DateRange>
               <From>2025-07-01</From>
               <To>2025-07-05</To>
             </DateRange>
             <DateRange>
               <From>2025-07-16</From>
               <To>2025-07-17</To>
             </DateRange>
           </Updated>
           <Deleted>
	     <DateRange>
               <From>2025-06-01</From>
               <To>2025-06-30</To>
             </DateRange>
           </Deleted>                
        </Product>
      </Hotel>
    </Hotels>
  </GetDeltaRateChangesRS>

✔ GetDeltaRateChangesRQ [JSON]

Header:

NameValue
Content-Type application/json
Accept application/json

JSON Request

  {
    "UserName": "username",
    "Password": "****",
    "CityCode": "NYC",
    "HotelID": 131,
    "LastSynced": "2025-02-15T12:00:00Z"
  }

JSON Response

  {
    "TimeStamp": "2025-02-20T17:08:44Z",
    "LastSyncedTime": "2025-03-10T08:26:38Z",
    "Hotels": {
        "Hotel": [
            {
                "id": "131",
                "Product": [
                    {
                        "code": "NYCHXXXX",
                        "Created": {
                            "DateRange": [
                                {
                                    "From": "2025-02-27",
                                    "To": "2025-03-01"
                                }
                            ]
                        },
                        "Updated": {
                            "DateRange": [
                                {
                                    "From": "2025-06-03",
                                    "To": "2025-06-04"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
  }

✔ GetDeltaInventoryChangesRQ [XML]

Header:

NameValue
Content-Type application/xml
Accept application/xml

XML Request Parameters:

LevelNameTypeOccursRequiredComments
0 GetDeltaInventoryChangesRQ String 1 Y
1 UserName String 1 Y Registered API username for authentication.
1 Password String 1 Y Registered API password for authentication.
1 CityCode String 1 N To obtain city codes, use the ListCities function. Using the CityCode in your search will yield faster results. City codes are 3 characters long (e.g. NYC).
1 HotelID Integer 1 N In this block you may enter specific vendor ID’s (Hotels), and narrow the search results to only your preferred hotels.
1 ShowOnRequest Integer 1 Y Lists all “OnRequest” dates. The default value is 1. This value can be set to either 0 (disabled) or 1 (enabled).
1 ShowClosedOut Integer 1 Y Lists all “ClosedOut” dates. The default value is 1. This value can be set to either 0 (disabled) or 1 (enabled).
1 LastSynced String 1 Y Timestamp of the last synchronization in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). To retrieve data for any updates that have occurred since this timestamp.
 <GetDeltaInventoryChangesRQ>
     <UserName>username</UserName>
     <Password>******</Password>
     <CityCode>NYC</CityCode>
     <HotelID></HotelID>
     <ShowOnRequest>1</ShowOnRequest>
     <ShowClosedOut>1</ShowClosedOut>
     <LastSynced>2025-02-15T12:00:00Z</LastSynced>
 </GetDeltaInventoryChangesRQ>

XML Response

LevelNameTypeOccursRequiredComments
0 GetDeltaInventoryChangesRS 1
1 TimeStamp DATE_TIME 1 1
1 LastSyncedTime DATE_TIME 1 1 lastSyncTime of current user
1 Hotels 1 1
2 Hotel 1..N 1 attribute id = hotel code
3 Product 1..N 1 attribute code = product code
4 Inventory 1 1
5 Status 1..N attribute Type=ClosedOut/OnRequest
6 DateRange 1..N
7 From Date 1 start date
7 To Date 1 end date
 <GetDeltaInventoryChangesRS>
    <TimeStamp>2025-03-04 06:33:38 EST</TimeStamp>
    <LastSyncedTime>2025-03-03 16:33:38 EST</LastSyncedTime>
    <Hotels>
        <Hotel id="69">
            <Product code="NYCHXXX">
                
                    <Inventory>
                        <Status type="OnRequest">
                            <DateRange>
                                <From>2025-03-04</From>
                                <To>2025-03-19</To>
                            </DateRange>
                            <DateRange>
                                <From>2025-03-23</From>
                                <To>2025-03-25</To>
                            </DateRange>
                        </Status>
                        <Status type="ClosedOut">
                            <DateRange>
                                <From>2025-03-20</From>
                                <To>2025-03-22</To>
                            </DateRange>
                            <DateRange>
                                <From>2025-03-29</From>
                                <To>2025-03-29</To>
                            </DateRange>
                            <DateRange>
                                <From>2025-04-03</From>
                                <To>2025-04-04</To>
                            </DateRange>
                        </Status>
                    </Inventory>
                </Product>
        </Hotel>
    </Hotels>
 </GetDeltaInventoryChangesRS>

✔ InventoryChanges(JSON)

Header:

NameValue
Content-Type application/json
Accept application/json

Description: JSON Request

{
    "UserName": "username",
    "Password": "******",
    "CityCode": "NYC",
    "HotelID": "131",
    "ShowOnRequest" : 1,
    "ShowClosedOut" : 1,
    "LastSynced": "2025-02-15T12:00:00Z"    
  }

JSON Response

{
    "TimeStamp": "2025-03-10T10:27:18Z",
    "LastSyncedTime": "2025-03-10T15:01:23Z",
    "Hotels": {
        "Hotel": [
            {
                "id": "131",
                "Product": [
                    {
                        "code": "NYCHXXXX",
                        "Inventory": {
                            "Status": [
                                {
                                    "Type": "ClosedOut",
                                    "DateRange": [
                                        {
                                            "From": "2025-03-10",
                                            "To": "2025-03-31"
                                        },
                                        {
                                            "From": "2025-12-31",
                                            "To": "2025-12-31"
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                    
                ]
            }
        ]
    }
}

Error Handling

If an error occurs, the API will return an error message in below formats:

XML format:

<ErrorResponse>
  <Code>DCA101</Code>
  <Message>Unauthorized Access: Invalid login credentials</Message>
  <Timestamp>2025-02-19T12:34:56Z</Timestamp>
</ErrorResponse>

JSON format:

{
  "ErrorResponse": {
    "Code": "DCA101",
    "Message": "Unauthorized Access: Invalid login credentials",
    "Timestamp": "2025-02-19T12:34:56Z"
  }
}

Common Error Codes

Code Description
DCA101 Unauthorized Access: Invalid login credentials.
DCA111 Validation Error: One or more fields failed validation checks.
DCA105 Resource Not Found - The requested endpoint or data could not be found.
DCA106 Bad Request: The request is malformed or missing required parameters.
DCA104 Data Type Mismatch: Invalid data type detected in the request.

delta-service.1741707397.txt.gz · Last modified: 2025/03/11 11:36 by Administrator