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
1 Password String 1 Y
1 CityCode String 1 N Use ListCities to get City Codes from all available Cities, It is recommend to use CityCode for faster result
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 ISO YYYY-MM-DDTH:MM:ssZ(ZonalTime) - data will be retrieved that have changed since the last sync time

XML Request

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

XML Response

LevelNameTypeOccursRequiredComments
0 GetDeltaRateChangesRS 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 Created 1 1
5 DateRange 1..N
6 From Date 1 start date
6 To Date 1 end date
4 Updated 1 1
5 DateRange 1..N
6 From Date 1 start date
6 To Date 1 end date
4 Deleted 1 1
5 DateRange 1..N
6 From Date 1 start date
6 To Date 1 end date
<GetDeltaRateChangesRS>
     <TimeStamp>2025-03-10T10:27:18Z</TimeStamp>
    <LastSyncedTime>2025-03-10T14: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-11</To>
                     </DateRange>
                </Updated>
                
                <Deleted>
	            <DateRange>
                       <From>2025-07-01</From>
                       <To>2025-07-11</To>
                    </DateRange>
                </Deleted>                
            </Product>
       
        </Hotel>
    </Hotels>
</GetDeltaRateChangesRS>

✔ RateChanges(JSON)

Header:

NameValue
Content-Type application/json
Accept application/json

Description: JSON Request

{
    "UserName": "username",
    "Password": "*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"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}

✔ InventoryChanges(XML)

Header:

NameValue
Content-Type application/xml
Accept application/xml

Description: XML Request

LevelNameTypeOccursRequiredComments
0 GetDeltaInventoryChangesRQ string 1 Y
1 UserName string 1 Y
1 Password string 1 Y
1 CityCode string 1 N Use ListCities to get City Codes from all available Cities, It is recommend to use cityCode for faster result
1 HotelID string 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 int 1 Y can be 0 or 1
1 ShowClosedOut int 1 Y can be 0 or 1
1 LastSynced string 1 Y ISO YYYY-MM-DDTH:MM:ssZ(ZonalTime)
 <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.1741695681.txt.gz · Last modified: 2025/03/11 08:21 by Administrator