Ctrip Integration API Specification v2.8.20191227 PDF
Ctrip Integration API Specification v2.8.20191227 PDF
Ctrip.com
1 Ctrip Integration API Specification
Copyright
Ctrip Computer Technology (Shanghai) Co. Ltd. All the right reserved.
This document is confidential. Everyone using this document must agree the below policies:
1 All the content contained in this document is asset of Ctrip Computer Technology
(Shanghai) Co.Ltd
2 No part of this document may be reproduced or transmitted in any form by any means
without the prior written permission of the Ctrip Computer Technology (Shanghai) Co.Ltd.
2 Ctrip Integration API Specification
Revision History
Overview ...................................................................................................................................5
Interface Integration Platform ..........................................................................................5
Access Web Services.......................................................................................................7
1. Authentication ....................................................................................................................7
1.1 Authentication & Soap Structure ............................................................................7
1.2 Authentication Element Definition.................................................................................8
1 Push Availability and Inventory ........................................................................................9
1.1 Request XML sample ..............................................................................................9
1.2 Request node definition ........................................................................................11
1.3 Response XML sample .........................................................................................14
1.4 Response node definition .....................................................................................14
2 Push Rate .........................................................................................................................14
2.1 Request XML sample ............................................................................................15
2.2 Request node definition ........................................................................................19
2.3 Response XML sample .........................................................................................21
2.4 Response node definition .....................................................................................22
3 Check Availability.............................................................................................................22
3.1 Request XML sample ............................................................................................22
3.2 Request node definition ........................................................................................24
3.3 Response XML sample .........................................................................................25
3.4 Response node definition .....................................................................................30
4 Create Reservation..........................................................................................................34
4.1 Request XML sample ............................................................................................34
4.2 Request node definition ........................................................................................37
4.3 Response XML sample .........................................................................................44
4.4 Response node definition .....................................................................................46
5 Cancel Reservation .........................................................................................................47
5.1 Request XML sample ............................................................................................47
5.2 Request node definition ........................................................................................47
5.3 Response XML sample .........................................................................................48
5.4 Response node definition .....................................................................................49
6 Update Reservation Confirmation Number ...................................................................50
6.1 Request XML sample ............................................................................................50
6.2 Request node definition ........................................................................................50
6.3 Response XML sample .........................................................................................51
6.4 Response node definition .....................................................................................51
7 Read Reservation ............................................................................................................52
7.1 Request XML sample ............................................................................................52
4 Ctrip Integration API Specification
Overview
Through vendor
push or Ctrip pull to
build cache in Ctrip
Call Hotel
Use Cache Data in Duplication Transaction
Vendor Mode Availability Check
Ctrip Database Mode Mode
from Vendor
Call Product
Enter into Booking
Availability Check
Input page
from Vendor
Call Product
Users input all needed info
Availability Check
and click [Next]
from Vendor
Deposit or
Enter into Payment Users complete payment
guarantee Yes
page and submit order
needed
Additional
Operation on Call Product
Reservation
Reservation: Collect Availability Check
generated
Payment, Risk from Vendor
Control etc..
Call Reservation
Request
1. Authentication
When partners come to access to the Ctrip Push API service, they should provide their
authorized account info in the POS node of any request.
When Ctrip accesses partner service, Ctrip will use authorized account info in POS
node provided by partners.
Soap Information
8 Ctrip Integration API Specification
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<! -- A request of a specific type will be put here. -->
</soap:Body>
</soap:Envelope>
The OTA_HotelAvailNotifRQ message is used to push the availability info and inventory
to Ctrip System. As current Ctrip’s solution, the success response will be returned
immediately once Ctrip system receives this request, but the actual availability and
inventory update is in an asynchronous process.
User Case 4: Push Availability with Cancellation policies. There are three types of
penalties supported: fixed amount, percentage and number of night, but only one of
them can be chosen in one cancellation policy section. Cascading cancellation policies
are also listed below.
<OTA_HotelAvailNotifRQ Version="2.5" PrimaryLangID="en-us" TimeStamp="2001-12-17T09:30:47Z"
xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="HG" MessagePassword="SamplePW" Type="1">
<CompanyName Code="C" CodeContext="600"/>
</RequestorID>
</Source>
</POS>
<AvailStatusMessages HotelCode="29087">
<AvailStatusMessage BookingLimit="10" BookingLimitMessageType="SetLimit">
<StatusApplicationControl End="2012-08-13" Start="2012-08-13" RatePlanCode="FGCode"
InvTypeCode="AlQQ" RatePlanCategory="16"/>
<RestrictionStatus Status="Open"/>
<Tpa_Extensions>
<CancelPenalties>
<CancelPenalty>
<!--The three attribute of NmbrOfNights & Percent & Amount
under AmountPercent must have one.-->
<AmountPercent NmbrOfNights="1"/>
<!--One Mode should be selected, [Offset] or absolute mode. If
you choose the [Offset] mode, the Deadline must contain the OffsetTimeUnit & OffsetUnitMultiplier & OffsetDropTime at
the same time. Otherwise, Deadline only need contain AbsoluteDeadline. -->
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="48"
OffsetDropTime="BeforeArrival"/>
</CancelPenalty>
</CancelPenalties>
11 Ctrip Integration API Specification
</Tpa_Extensions>
</AvailStatusMessage>
<AvailStatusMessage BookingLimit="10" BookingLimitMessageType="SetLimit">
<StatusApplicationControl End="2012-08-13" Start="2012-08-13" RatePlanCode="PPCode"
InvTypeCode="AlQQ" RatePlanCategory="501"/>
<RestrictionStatus Status="Open"/>
<Tpa_Extensions>
<CancelPenalties>
<CancelPenalty>
<AmountPercent Percent="100"/>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="96"
OffsetDropTime="BeforeArrival"/>
</CancelPenalty>
<CancelPenalty>
<AmountPercent Percent="80"/>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="48"
OffsetDropTime="BeforeArrival"/>
</CancelPenalty>
<CancelPenalty>
<AmountPercent Percent="50"/>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="24"
OffsetDropTime="BeforeArrival"/>
</CancelPenalty>
</CancelPenalties>
</Tpa_Extensions>
</AvailStatusMessage>
</AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
AvailStatusMessage/LengthsOfStays/LengthOfStay N
Type of LOS
SetMinLOS: Min of LOS for check in
date
SetMaxLOS: Max of LOS for check in
date
FullPatternLOS: Fixed Pattern of LOS
LengthOfStay/LOS_Pattern N
1: Status Open
0: Status Close
Ex:
Start="2015-12-03" End="2015-12-06"
10001111
Use Case 1: Success push, it means Ctrip receives this request well
<OTA_HotelAvailNotifRS Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-17T09:30:47Z"
xmlns="http://www.opentravel.org/OTA/2003/05">
<Success/>
<UniqueID ID="12345" Type="505"/>
</OTA_HotelAvailNotifRS>
Use Case 2: Failure push in case of format issue or business rule violated
<OTA_HotelAvailNotifRS Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-17T09:30:47Z"
xmlns="http://www.opentravel.org/OTA/2003/05">
<Errors>
<Error Type="3" ShortText="No Match Found" Code="425">The rateplancode and the hotel doesn't
match.</Error>
</Errors>
<UniqueID ID="12345" Type="505"/>
</OTA_HotelAvailNotifRS>
OTA_HotelAvailNotifRS
A unique ID to identify the request Y
/UniqueID/@ID
The request type is as follows:
OTA_HotelAvailNotifRS
505: availability request Y
/UniqueID/@Type
506: rate request
2 Push Rate
Ctrip system receives this request, but the actual rate updates are in an asynchronous
process.
</BaseByGuestAmts>
<MealsIncluded Breakfast="false" />
</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>
<Rates>
<Rate Start="2015-02-08" End="2015-02-08" LOS="2">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="1200" AmountAfterTax="1440"
CurrencyCode="SGD" AgeQualifyingCode="10" NumberOfGuests="1">
<!-- If the rate structure is LOS, amount in [BaseByGuestAmt] is total value.-->
<Tpa_Extensions>
<DailyRate Day="1" AmountBeforeTax="100.00" AmountAfterTax="120.00" />
<DailyRate Day="2" AmountBeforeTax="100.00" AmountAfterTax="120.00" />
</Tpa_Extensions>
</BaseByGuestAmt>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="1200" AmountAfterTax="1440"
CurrencyCode="SGD" AgeQualifyingCode="10" NumberOfGuests="2">
<!-- If the rate structure is LOS, amount in [BaseByGuestAmt] is total value.-->
<Tpa_Extensions>
<DailyRate Day="1" AmountBeforeTax="100.00" AmountAfterTax="120.00" />
<DailyRate Day="2" AmountBeforeTax="100.00" AmountAfterTax="120.00" />
</Tpa_Extensions>
</BaseByGuestAmt>
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" NumberOfMeal="2" />
</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>
/RateAmountMessage
The start date of the rate Y
/StatusApplicationControl/Rates/Rate/@Start
/RateAmountMessage
The end date of the rate Y
/StatusApplicationControl/Rates/Rate/@End
The length of stay
LOS=9
Here sample means the total
before tax amount of staying 9
nights from check in date 2015-
/RateAmountMessage
02-03 is 1200. N
/StatusApplicationControl/Rates/Rate/@LOS
Every day from 2015-02-03 to
2015-02-06 has the same
amount.
Every daily rate in 9 nigths stay
must be provided.
/BaseByGuestAmt/Taxes N
Inclusive or Exclusive
If the type is inclusive, the rate
/BaseByGuestAmt/Taxes/Tax/@Type N
before tax should be equal to
rate after tax.
Tax code. See Fee Tax
/BaseByGuestAmt/Taxes/Tax/@Code N
Type(FTT) in the appendix
Tax charge mode. See Charge
/BaseByGuestAmt/Taxes/Tax/@ChargeUnit N
Type(CHG) in the appendix
Percentage used to calculate
/BaseByGuestAmt/Taxes/Tax/@Percent N
the amount.
/BaseByGuestAmt/Taxes/Tax/@Amount Fixed tax amount N
/BaseByGuestAmt/@CurrencyCode Currency Y
The qualifying age groups.
Refer to Age Qualifying Code
(AQC)in the appendix
/BaseByGuestAmt/@AgeQualifyingCode N
Currently the code of child has
not been supported in Ctrip
system.
21 Ctrip Integration API Specification
Daily Rate
/BaseByGuestAmt/Tpa_Extensions/DailyRate When there is LOS setting, the N
tag is mandatory
RateAmountMessage
The meal information of the rate Y
/StatusApplicationControl/Rates/Rate/MealsIncluded
RateAmountMessage
True: breakfast inclusive
/StatusApplicationControl/Rates/Rate Y
False: breakfast exclusive
/MealsIncluded/@Breakfast
RateAmountMessage
True: lunch inclusive
/StatusApplicationControl/Rates/Rate Y
False: lunch exclusive
/MealsIncluded/@Lunch
RateAmountMessage
True: dinner inclusive
/StatusApplicationControl/Rates/Rate Y
False: dinner exclusive
/MealsIncluded/@Dinner
The number of meal which is
offered by hotel. It is mandatory
if one of
/RateAmountMessage
@Breakfast/Lunch/Dinner is
/StatusApplicationControl/Rates/Rate/MealsIncluded/ Y
true.
@NumberOfMeal
This value is 0 when
@Breakfast/Lunch/Dinner is all
false.
Use Case 1: Success push, it means Ctrip receives this request well
<OTA_HotelRateAmountNotifRS Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-
17T09:30:47Z" xmlns="http://www.opentravel.org/OTA/2003/05">
<Success/>
<UniqueID ID="12345" Type="506"/>
22 Ctrip Integration API Specification
</OTA_HotelRateAmountNotifRS>
Use Case 2: Failure push in case of format issue or business rule violated
<OTA_HotelRateAmountNotifRS Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-
17T09:30:47Z" xmlns="http://www.opentravel.org/OTA/2003/05">
<Errors>
<Error Type="3" ShortText="No Match Found" Code="425">The rateplancode and the hotel doesn't
match.</Error>
</Errors>
<UniqueID ID="12345" Type="506"/>
</OTA_HotelRateAmountNotifRS>
3 Check Availability
The Hotel Availability Request message provides the ability to search single or multiple
properties for detailed availability, inventory and pricing information of room products.
<POS>
<Source>
<RequestorID ID="IDforCtrip" MessagePassword="PWforCtrip" Type="5">
<CompanyName Code="C" CodeContext="600"></CompanyName>
</RequestorID>
</Source>
</POS>
<AvailRequestSegments>
<AvailRequestSegment>
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="509"/>
<StayDateRange End="2014-08-14" Start="2014-08-13"/>
<RoomStayCandidates>
<RoomStayCandidate Quantity="1">
<GuestCounts>
<GuestCount AgeQualifyingCode="10"/>
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
Use Case 2: Get the specified ARI using hotel code, room code and rate plan code
<OTA_HotelAvailRQ EchoToken="String" TimeStamp="2001-12-17T09:30:47.0Z" PrimaryLangID="en-
us" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="IDforCtrip" MessagePassword="PWforCtrip" Type="5">
<CompanyName Code="C" CodeContext="600"></CompanyName>
</RequestorID>
</Source>
</POS>
<AvailRequestSegments>
<AvailRequestSegment>
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="509"/>
<StayDateRange End="2014-08-14" Start="2014-08-13"/>
<RatePlanCandidates>
<RatePlanCandidate RatePlanCode="BarRate"/>
</RatePlanCandidates>
<RoomStayCandidates>
<RoomStayCandidate RoomTypeCode="Deluxe" Quantity="1">
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="1"/>
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
24 Ctrip Integration API Specification
Use Case 3: Get the specified ARI using hotel code, room code. If not specify rate code,
return ARI of all rate code under the room type. The guest count means the occupancy
of single room since Ctrip does not support different room type in singe shopping
request.
<OTA_HotelAvailRQ EchoToken="String" TimeStamp="2001-12-17T09:30:47.0Z" PrimaryLangID="en-
us" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="IDforCtrip" MessagePassword="PWforCtrip" Type="5">
<CompanyName Code="C" CodeContext="600"></CompanyName>
</RequestorID>
</Source>
</POS>
<AvailRequestSegments>
<AvailRequestSegment>
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="509"/>
<StayDateRange End="2014-08-14" Start="2014-08-13"/>
<RoomStayCandidates>
<RoomStayCandidate RoomTypeCode="Deluxe" Quantity="1">
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="1"/>
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
OTA_HotelAvailRQ Y
@TimeStamp The date and time when the request is created. Y
@EchoToken Additional information to identify a message. Y
@Version The version of the interface Y
@PrimaryLangID The language code Y
POS Refer to Authentication Element Definition Y
AvailRequestSegments Y
AvailRequestSegment Collection of criteria that requests a bookable entity Y
HotelSearchCriteria A collection of single search criterion items. Y
Criterion Individual Criterion items. Y
25 Ctrip Integration API Specification
Use Case 1: The count is left out in the RQ, return all the rates with different
occupancies in the RS.
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="C201408221129"
PrimaryLangID="zh-cn" TimeStamp="2014-08-22T03:29:41+00:00">
<Success />
<Warnings>
<Warning Type="3">The Special request may not be satisfied</Warning>
</Warnings>
26 Ctrip Integration API Specification
<RoomStays>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="C01K" NumberOfUnits="5" >
<RoomDescription>
<Text />
</RoomDescription>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="testctrip" PrepaidIndicator="true">
<RatePlanDescription>
<Text>Rate is deducted of commission plus service and tax</Text>
</RatePlanDescription>
<CancelPenalties>
<CancelPenalty PolicyCode="C48">
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="48" OffsetDropTime="BeforeArrival" />
<AmountPercent NmbrOfNights="1" TaxInclusive="true" />
<PenaltyDescription>
<Text>Cancellations received less than 48 hours prior to arrival date are subject to 1 night room
charge and taxes. </Text>
</PenaltyDescription>
</CancelPenalty>
</CancelPenalties>
<MealsIncluded Breakfast="true" Lunch="true" Dinner="true" NumberOfMeal="2" />
</RatePlan>
</RatePlans>
<RoomRates>
<RoomRate RoomTypeCode="C01K" RatePlanCode="testctrip" RatePlanCategory="501">
<Rates>
<Rate EffectiveDate ="2014-08-13" ExpireDate ="2014-08-14">
<Base AmountBeforeTax="500.00" AmountAfterTax="550.00" CurrencyCode="SGD">
<!—The attribute of Taxes is only mandatory when the value is different between
AmountBeforeTax and AmountAfterTax-- >
<Taxes CurrencyCode="SGD">
<Tax Type="Exclusive" CurrencyCode="SGD" Percent="10" ChargeUnit="1" Code="3">
<TaxDescription>
<Text>City Tax(10% daily)</Text>
</TaxDescription>
</Tax>
</Taxes>
</Base>
<Fees>
<Fee Type="Exclusive" Amount="49.50" CurrencyCode="SGD" ChargeUnit="12" Code="12">
<Description>
<Text>Resort fee</Text>
</Description>
</Fee>
</Fees>
</Rate>
</Rates>
<Total AmountBeforeTax="549.5" AmountAfterTax="599.50" CurrencyCode="SGD"/>
</RoomRate>
</RoomRates>
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="1"/>
</GuestCounts>
<TPA_Extensions>
27 Ctrip Integration API Specification
<IsReserved>true</IsReserved>
</TPA_Extensions>
</RoomStay>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="C01K" NumberOfUnits="5" >
<RoomDescription>
<Text />
</RoomDescription>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="NRF" PrepaidIndicator="true">
<RatePlanDescription>
<Text>Rate is non-refundable</Text>
</RatePlanDescription>
<CancelPenalties>
<CancelPenalty>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="0" OffsetDropTime="AfterBooking"/>
<AmountPercent NmbrOfNights="1" TaxInclusive="true" />
<PenaltyDescription>
<Text>The rate is non-refundable</Text>
</PenaltyDescription>
</CancelPenalty>
</CancelPenalties>
<MealsIncluded Breakfast="true" Lunch="true" Dinner="true" NumberOfMeal="2" />
</RatePlan>
</RatePlans>
<RoomRates>
<RoomRate RoomTypeCode="C01K" RatePlanCode="NRF" RatePlanCategory="501">
<Rates>
<Rate EffectiveDate ="2014-08-13" ExpireDate ="2014-08-14">
<Base AmountBeforeTax="800.00" AmountAfterTax="850.00" CurrencyCode="SGD">
<Taxes CurrencyCode="SGD">
<Tax Type="Exclusive" CurrencyCode="SGD" Percent="10" ChargeUnit="1" Code="3">
<TaxDescription>
<Text>City Tax(10% daily)</Text>
</TaxDescription>
</Tax>
</Taxes>
</Base>
<Fees>
<Fee Type="Exclusive" Amount="49.50" CurrencyCode="SGD" ChargeUnit="12" Code="12">
<Description>
<Text>Resort fee</Text>
</Description>
</Fee>
</Fees>
</Rate>
</Rates>
<Total AmountBeforeTax="849.5" AmountAfterTax="899.50" CurrencyCode="SGD"/>
</RoomRate>
</RoomRates>
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="2"/>
</GuestCounts>
<TPA_Extensions>
<IsReserved>true</IsReserved>
28 Ctrip Integration API Specification
</TPA_Extensions>
</RoomStay>
</RoomStays>
<HotelStays>
<HotelStay>
<BasicPropertyInfo HotelCode="509" HotelName="Ctrip Hotel" />
</HotelStay>
</HotelStays>
</OTA_HotelAvailRS>
Use Case 2: The count is 2 in the RQ, return all the rates with this corresponding
occupancies in the RS.
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="C201408221129"
PrimaryLangID="zh-cn" TimeStamp="2014-08-22T03:29:41+00:00">
<Success />
<RoomStays>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="C01K" NumberOfUnits="5" >
<RoomDescription>
<Text />
</RoomDescription>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="testctrip" PrepaidIndicator="true">
<RatePlanDescription>
<Text>Rate is deducted of commission plus service and tax</Text>
</RatePlanDescription>
<CancelPenalties>
<CancelPenalty PolicyCode="C48">
<Deadline AbsoluteDeadline="2015-11-18T16:00:00"/>
<AmountPercent NmbrOfNights="1" TaxInclusive="true" />
<PenaltyDescription>
<Text>Set a specific deadline for cancellation</Text>
</PenaltyDescription>
</CancelPenalty>
</CancelPenalties>
<MealsIncluded Breakfast="true" Lunch="true" Dinner="true" NumberOfMeal="2" />
</RatePlan>
</RatePlans>
<RoomRates>
<RoomRate RoomTypeCode="C01K" RatePlanCode="testctrip" RatePlanCategory="501">
<Rates>
<Rate EffectiveDate ="2014-08-13" ExpireDate ="2014-08-14">
<Base AmountBeforeTax="700.00" AmountAfterTax="750.00" CurrencyCode="SGD">
<!—The attribute of Taxes is only mandatory when the value is different between
AmountBeforeTax and AmountAfterTax-- >
<Taxes CurrencyCode="SGD">
<Tax Type="Exclusive" CurrencyCode="SGD" Percent="10" ChargeUnit="1" Code="3">
<TaxDescription>
<Text>City Tax(10% daily)</Text>
</TaxDescription>
</Tax>
</Taxes>
29 Ctrip Integration API Specification
</Base>
<Fees>
<Fee Type="Exclusive" Amount="49.50" CurrencyCode="SGD" ChargeUnit="12" Code="12">
<Description>
<Text>Resort fee</Text>
</Description>
</Fee>
</Fees>
</Rate>
</Rates>
<Total AmountBeforeTax="749.5" AmountAfterTax="799.50" CurrencyCode="SGD"/>
</RoomRate>
</RoomRates>
<GuestCounts>
<!—In this use case, you must return the rate of the occupancy count specified in RQ-- >
<GuestCount AgeQualifyingCode="10" Count="2"/>
</GuestCounts>
<TPA_Extensions>
<IsReserved>true</IsReserved>
</TPA_Extensions>
</RoomStay>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="C01K" NumberOfUnits="5" >
<RoomDescription>
<Text />
</RoomDescription>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="NRF" PrepaidIndicator="true">
<RatePlanDescription>
<Text>Rate is non-refundable</Text>
</RatePlanDescription>
<CancelPenalties>
<CancelPenalty>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="0" OffsetDropTime="AfterBooking"/>
<AmountPercent NmbrOfNights="1" TaxInclusive="true" />
<PenaltyDescription>
<Text>The rate is non-refundable</Text>
</PenaltyDescription>
</CancelPenalty>
</CancelPenalties>
<MealsIncluded Breakfast="true" Lunch="true" Dinner="true" NumberOfMeal="2" />
</RatePlan>
</RatePlans>
<RoomRates>
<RoomRate RoomTypeCode="C01K" RatePlanCode="NRF" RatePlanCategory="501">
<Rates>
<Rate EffectiveDate ="2014-08-13" ExpireDate ="2014-08-14">
<Base AmountBeforeTax="800.00" AmountAfterTax="850.00" CurrencyCode="SGD">
<Taxes CurrencyCode="SGD">
<Tax Type="Exclusive" CurrencyCode="SGD" Percent="10" ChargeUnit="1" Code="3">
<TaxDescription>
<Text>City Tax(10% daily)</Text>
</TaxDescription>
</Tax>
</Taxes>
30 Ctrip Integration API Specification
</Base>
<Fees>
<Fee Type="Exclusive" Amount="49.50" CurrencyCode="SGD" ChargeUnit="12" Code="12">
<Description>
<Text>Resort fee</Text>
</Description>
</Fee>
</Fees>
</Rate>
</Rates>
<Total AmountBeforeTax="849.5" AmountAfterTax="899.50" CurrencyCode="SGD"/>
</RoomRate>
</RoomRates>
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="2"/>
</GuestCounts>
<TPA_Extensions>
<IsReserved>true</IsReserved>
</TPA_Extensions>
</RoomStay>
</RoomStays>
<HotelStays>
<HotelStay>
<BasicPropertyInfo HotelCode="509" HotelName="Ctrip Hotel" />
</HotelStay>
</HotelStays>
</OTA_HotelAvailRS>
Use Case 3: if all rooms in the hotel are full, just return success in the RS.
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="C201408221129"
PrimaryLangID="zh-cn" TimeStamp="2014-08-22T03:29:41+00:00">
<Success />
</OTA_HotelAvailRS>
Taxes Y
Tax Taxes applied over the base rate Y
@Type Inclusive or Exclusive Y
@Code Tax code. See Fee Tax Type(FTT) in the appendix Y
Tax charge mode. See Charge Type(CHG) in the
@ChargeUnit N
appendix
@Percent Percentage used to calculate the amount. N
@Amount Fixed tax amount N
TaxDescription N
Text Tax Description N
Fees N
Fee Fees applied over the base rate N
@Type Inclusive or Exclusive N
@Code Fee code. See Fee Tax Type(FTT) in the appendix N
Fee charge mode. See Charge Type(CHG) in the
@ChargeUnit N
appendix
@Percent Percentage used to calculate the amount. N
@Amount Fixed fee amount N
Description N
Text Fee Description N
The total amount charged for the accommodation and
Total Y
service of the specific roomtype and rateplan
The total amount charged for base room rate.
@AmountBeforeTax Y
Exclusive tax and fee
@AmountAfterTax Inclusive tax and fee Y
@CurrencyCode The code specifying a monetary unit. Use ISO 4217. Y
GuestCounts Y
A collection of guest counts associated with a room
GuestCount Y
stay.
The qualifying age groups. Refer to Age Qualifying
@AgeQualifyingCode Y
Code (AQC)in the appendix
@Count Number of guests grouped by age qualifying code. Y
TPA_Extensions N
Default value is false. Then the “True” means it is an
@IsReserved N
allotment booking
HotelStays Y
HotelStay Y
HotelStay/BasicPropertyInfo Property information Y
@HotelCode Hotel Code defined in partner Y
@HotelName Hotel Name defined in partner Y
34 Ctrip Integration API Specification
4 Create Reservation
Use Case 1: To send the booking with guest credit card info.
<OTA_HotelResRQ Version="2.1" PrimaryLangID="en-us" EchoToken="201403211401"
RetransmissionIndicator="true" xmlns="http://www.opentravel.org/OTA/2003/05"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<POS>
<Source>
<RequestorID ID="IDforCtrip" MessagePassword="PWforCtrip" Type="5">
<CompanyName Code="C" CodeContext="600"></CompanyName>
</RequestorID>
</Source>
</POS>
<UniqueID ID="859623" Type="501"/>
<HotelReservations>
<HotelReservation>
<RoomStays>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="DLXB"/>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="12354" PrepaidIndicator="false">
<RatePlanDescription>
<Text Language="en-us" TextFormat="PlainText">Chrismas Promotion</Text>
</RatePlanDescription>
</RatePlan>
</RatePlans>
<RoomRates>
<RoomRate RatePlanCode="12354" RatePlanCategory="16" NumberOfUnits="1">
<Rates>
<Rate EffectiveDate="2012-03-13" ExpireDate="2012-03-15">
<Base AmountBeforeTax="561.50" AmountAfterTax="610.00" CurrencyCode="USD">
</Base>
</Rate>
</Rates>
</RoomRate>
</RoomRates>
<BasicPropertyInfo HotelCode="656" HotelName="Sunrise Garden Hotel"/>
</RoomStay>
</RoomStays>
<ResGuests>
<ResGuest ArrivalTime="14:30">
<Profiles>
<ProfileInfo>
<Profile>
<Customer>
<PersonName AgeQualifyingCode="10" Gender="M" Age="30">
<GivenName>Clark</GivenName>
<MiddleName>Soe</MiddleName>
<Surname>Jim </Surname>
</PersonName>
<PersonName AgeQualifyingCode="8" Gender="M" Age="4">
<GivenName>Jerry</GivenName>
35 Ctrip Integration API Specification
<Surname>Jim </Surname>
</PersonName>
<ContactPerson ContactType="non">
<PersonName>
<GivenName>Ctrip</GivenName>
<Surname>International</Surname>
</PersonName>
<Telephone PhoneNumber="8602165342213"/>
<Email>[email protected]</Email>
</ContactPerson>
</Customer>
</Profile>
</ProfileInfo>
</Profiles>
</ResGuest>
</ResGuests>
<ResGlobalInfo>
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="2"/>
<GuestCount AgeQualifyingCode="8" Count="2"/>
</GuestCounts>
<TimeSpan End="2012-03-13 0:00:00" Start="2012-03-15 0:00:00"/>
<SpecialRequests>
<SpecialRequest>
<Text Language ="en-us" TextFormat ="PlainText">Please provide extra robe. </Text>
<ListItem Listitem ="1" >must be nonsmoking room</ListItem>
<ListItem Listitem ="2" >try to arrange nonsmoking room</ListItem>
<ListItem Listitem ="3" >extra breakfast request</ListItem>
</SpecialRequest>
</SpecialRequests>
<Guarantee GuaranteeCode=”TA”>
<GuaranteesAccepted>
<GuaranteeAccepted>
<PaymentCard CardNumber="510000000008" CardType="1" CardCode="MC"
ExpireDate="1115">
<CardHolderName>Yu Jiwei</CardHolderName>
</PaymentCard>
</GuaranteeAccepted>
</GuaranteesAccepted>
</Guarantee>
<Total AmountBeforeTax="1123" AmountAfterTax="1220" CurrencyCode="USD"/>
<TPA_Extensions>
<IsReserved>true</IsReserved>
</TPA_Extensions>
<HotelReservationIDs>
// The value 501 and 507 of ResID_Type always exist
<HotelReservationID ResID_Type="501" ResID_Value="859623" />
<HotelReservationID ResID_Value="395bd98915542737fcdbb8d148f74205" ResID_Type="507"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
</HotelReservations>
</OTA_HotelResRQ>
Use Case 2: To send the booking with Ctrip virtual credit card info
…
36 Ctrip Integration API Specification
<ResGlobalInfo>
<GuestCounts>
<GuestCount Count="24" />
</GuestCounts>
<TimeSpan Start="2014-12-12 0:00:00" End="2015-1-8 0:00:00" />
<SpecialRequests>
<SpecialRequest>
<Text Language="en-us" TextFormat="PlainText"></Text>
</SpecialRequest>
</SpecialRequests>
<DepositPayments>
<GuaranteePayment>
<AcceptedPayments>
<AcceptedPayment>
<PaymentCard ExpireDate="1115" CardType="1" CardCode="MC" CardNumber="553137717100">
<CardHolderName>Ctrip</CardHolderName>
</PaymentCard>
</AcceptedPayment>
</AcceptedPayments>
</GuaranteePayment>
</DepositPayments>
<Total AmountAfterTax="17116.96" CurrencyCode="SGD" />
<TPA_Extensions>
<IsReserved>false</IsReserved>
</TPA_Extensions>
<HotelReservationIDs>
<HotelReservationID ResID_Type="501" ResID_Value="900229758" />
<HotelReservationID ResID_Type="507" ResID_Value="395bd98915542737fcdbb8d148f74205" />
</HotelReservationIDs>
</ResGlobalInfo>
…
Use Case 3: To send the booking without any credit card info (Pay at hotel).
…
<ResGlobalInfo>
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="2"/>
</GuestCounts>
<TimeSpan End="2014-3-13 0:00:00" Start="2014-3-15 0:00:00"/>
<SpecialRequests>
<SpecialRequest>
<Text Language="en-us" TextFormat="PlainText"> Please provide extra robe. </Text>
<ListItem Listitem ="1"> must be nonsmoking room</ListItem>
<ListItem Listitem ="2"> try to arrange nonsmoking room</ListItem>
<ListItem Listitem ="3">extra breakfast request </ListItem>
</SpecialRequest>
</SpecialRequests>
<Guarantee>
<GuaranteesAccepted>
<GuaranteeAccepted>
<PaymentCard />
</GuaranteeAccepted>
</GuaranteesAccepted>
</Guarantee>
<Total AmountBeforeTax="1123" AmountAfterTax="1220" CurrencyCode="USD"/>
<TPA_Extensions>
37 Ctrip Integration API Specification
<IsReserved>true</IsReserved>
</TPA_Extensions>
<HotelReservationIDs>
<HotelReservationID ResID_Type="501" ResID_Value="859623" />
</HotelReservationIDs>
</ResGlobalInfo>
…
Use Case 4: To send the booking without any credit card info (Prepay).
…
<ResGlobalInfo>
<GuestCounts>
<GuestCount Count="24" />
</GuestCounts>
<TimeSpan Start="2014-12-12 0:00:00" End="2015-1-8 0:00:00" />
<SpecialRequests>
<SpecialRequest>
<Text Language="en-us" TextFormat="PlainText"></Text>
</SpecialRequest>
</SpecialRequests>
<DepositPayments>
<GuaranteePayment>
<AcceptedPayments>
<AcceptedPayment>
<PaymentCard />
</AcceptedPayment>
</AcceptedPayments>
</GuaranteePayment>
</DepositPayments>
<Total AmountAfterTax="17116.96" CurrencyCode="SGD" />
<TPA_Extensions>
<IsReserved>false</IsReserved>
</TPA_Extensions>
<HotelReservationIDs>
<HotelReservationID ResID_Type="501" ResID_Value="900229758" />
</HotelReservationIDs>
</ResGlobalInfo>
…
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RatePla Rate code Y
ns/Rateplan/@RatePlanCode
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RatePla It is true if the payment is prepay. N
ns/Rateplan/@PrepaidIndicator
39 Ctrip Integration API Specification
OTA_HotelResRQ/HotelReservations/Hotel
There will be only one [RoomRate]
Reservation/RoomStays/RoomStay/RoomR Y
occurrence.
ates/RoomRate
The same as
OTA_HotelResRQ/HotelReservations/Hotel
OTA_HotelResRQ/HotelReservations/Hot
Reservation/RoomStays/RoomStay/RoomR Y
elReservation/RoomStays/RoomStay/Rate
ates/RoomRate/@RatePlanCode
Plans/Rateplan/@RatePlanCode
It is used to indicate the payment type.
OTA_HotelResRQ/HotelReservations/Hotel The available values are as follows:
Reservation/RoomStays/RoomStay/RateRa 501: Prepay N
tes/RateRate/@RatePlanCategory 16 : Pay at hotel
502: B2B or PKG
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RoomR The number of rooms in the reservation Y
ates/RoomRate/@NumberOfUnits
OTA_HotelResRQ/HotelReservations/Hotel
This can be multiple nodes if different
Reservation/RoomStays/RoomStay/RoomR Y
price applied for different date span
ates/RoomRate/Rates/Rate
OTA_HotelResRQ/HotelReservations/Hotel
The starting date of the rate in the form
Reservation/RoomStays/RoomStay/RoomR Y
YYYY-MM-dd. This date is inclusive.
ates/RoomRate/Rates/Rate/@EffectiveDate
OTA_HotelResRQ/HotelReservations/Hotel
The end date of the rate in the form
Reservation/RoomStays/RoomStay/RoomR Y
YYYY-MM-dd. This date is not inclusive.
ates/RoomRate/Rates/Rate/@ExpireDate
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RoomR Rate excluding the tax/fee for one night
N
ates/RoomRate/Rates/Rate/Base/@Amount and one room.
BeforeTax
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RoomR The rate including the tax/fee for one night
Y
ates/RoomRate/Rates/Rate/Base/@Amount and one room
AfterTax
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RoomR
Currency of this rate Y
ates/RoomRate/Rates/Rate/Base/@Curren
cyCode
40 Ctrip Integration API Specification
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/BasicPr Partner property id Y
opertyInfo/@HotelCode
OTA_HotelResRQ/HotelReservations/Hotel
Hotel name depends on the language of
Reservation/RoomStays/RoomStay/BasicPr N
this request.
opertyInfo/@HotelName
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ ResGuests/ The earliest arrival time for the guest N
ResGuest/@ArrivalTime
Please refer to the above XML sample.
The Surname and given name is required
OTA_HotelResRQ/HotelReservations/Hotel
info. Y
Reservation/ ResGuests/ ResGuest/Profiles
Person Name elements may be less than
the room quantity.
OTA_HotelResRQ/HotelReservations/Hotel
Value:
Reservation/ResGuests/ResGuest/Profiles/
10 – Adult N
Profileinfo/Profile/Customer/PersonName/@
8 – Child
AgeQualifyingCode
@Age
Guest age N
M : Male
@Gender N
F: Female
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Guest’s given name Y
Profileinfo/Profile/Customer/PersonName/Gi
venName
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Guest’s middle name N
Profileinfo/ Profile/Customer/PersonName/
MiddleName
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Guest’s surname Y
Profileinfo/
Profile/Customer/PersonName/SurName
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Profileinfo/ Contact given name: fix value [Ctrip] Y
Profile/Customer/ContactPerson/PersonNa
me/GivenName
41 Ctrip Integration API Specification
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Profileinfo/ Contact’s surname: fix value [Team] Y
Profile/Customer/ContactPerson/PersonNa
me/SurName
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Profileinfo/ Contact’s telephone number Y
Profile/Customer/ContactPerson/Telephone
/PhoneNumber
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGuests/ResGuest/Profiles/
Contact’s email Y
Profileinfo/
Profile/Customer/ContactPerson/Email
10:Adults
OTA_HotelResRQ/HotelReservations/Hotel
8: Child
Reservation/ResGlobalInfo/GuestCounts/G N
Please refer to the Age Qualify
uestCount/@ AgeQualifyingCode.
Code(AQS) in the appendix part
OTA_HotelResRQ/HotelReservations/Hotel The number of guests for this reservation.
Reservation/ResGlobalInfo/GuestCounts/G It shows Max Room Person Count * Room Y
uestCount/@Count Count if not per room.
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo Check in Date Y
/TimeSpan/@Start
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo Check out Date Y
/TimeSpan/@End
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/SpecialRequest The request from guest in free text format N
s/SpecialRequest/Text
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/SpecialRequest The language of this request text N
s/SpecialRequest/Text/@Language
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/SpecialRequest The value can be “PlainText” or “HTML”. N
s/SpecialRequest/Text/@TextFormat
42 Ctrip Integration API Specification
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/SpecialRequest Guests requests in options N
s/SpecialRequest/ListItem
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/SpecialRequest The language of this request text N
s/SpecialRequest/ListItem/@Language
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/SpecialRequest The request description N
s/SpecialRequest/ListItem/@TextFormat
OTA_HotelResRQ/HotelReservations/Hotel
Please refer to the Special request code in
Reservation/ResGlobalInfo/SpecialRequest N
the appendix
s/SpecialRequest/ListItem/@Listitem
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/DepositPayment Please refer to the Card Type(CAT) in the
N
s/GuaranteePayment/AcceptedPayments/A appendix
cceptPayment/paymentCard/@CardType
43 Ctrip Integration API Specification
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/DepositPayment The 3 or 4 digit CVV code from the back of
N
s/GuaranteePayment/AcceptedPayments/A the credit card.
cceptPayment/paymentCard/@SeriesCode
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/DepositPayment
Card Expire Date of the valid period N
s/GuaranteePayment/AcceptedPayments/A
cceptPayment/paymentCard/@ExpireDate
OTA_HotelResRQ/HotelReservations/Hotel
The total amount of this reservation Y
Reservation/ResGlobalInfo/Total
OTA_HotelResRQ/HotelReservations/Hotel
Default value is false. Then the “True”
Reservation/ResGlobalInfo/TPA_Extentions N
means it is an allotment booking
/IsReserved
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/HotelReservatio Reservation Number Y
nIDs/ HotelReservationID/
44 Ctrip Integration API Specification
OTA_HotelResRQ/HotelReservations/Hotel
Please refer to the Unique ID Type(UIT) in
Reservation/ResGlobalInfo/HotelReservatio Y
the appendix
nIDs/ HotelReservationID/@ResID_Type
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<Warnings>
<Warning Type="3">The Special request may not be satisfied</Warning>
</Warnings>
<HotelReservations>
<HotelReservation ResStatus="S">
<ResGlobalInfo>
<HotelReservationIDs>
<!-- Both 501 and 502 are mandatory to add in the response.-- >
<HotelReservationID ResID_Value="CTP-859623" ResID_Type="502"/>
<HotelReservationID ResID_Value="859623" ResID_Type="501"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
</HotelReservations>
</OTA_HotelResRS>
Use Case 4: Response when reservation failed, please refer to appendix to find error
types and error codes
<OTA_HotelResRS Version="2.1" EchoToken="201403211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Errors>
<Error ShortText="Property 54395 is not a valid property code" Type="3" Code="400"/>
</Errors>
<HotelReservations>
<HotelReservation ResStatus="R">
<ResGlobalInfo>
<HotelReservationIDs>
<HotelReservationID ResID_Value="859623" ResID_Type="501"/>
</HotelReservationIDs>
46 Ctrip Integration API Specification
</ResGlobalInfo>
</HotelReservation>
</HotelReservations>
</OTA_HotelResRS>
OTA_HotelResRS
/HotelReservations/HotelReservation/ResGlobalIn
Confirmation Number. Y
fo/HotelReservationIDs/
HotelReservationID/@ResID_Value
5 Cancel Reservation
Sample: There are three unique ID included in the request, they are Ctrip confirmation
code (501), partner’s confirmation code (502) and partner’s CRS/PMS hotel code (10).
<OTA_CancelRQ Version="2.1" EchoToken="201403211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<POS>
<Source>
<RequestorID ID="IDforCtrip" MessagePassword="PWforCtrip" Type="5">
<CompanyName Code="C" CodeContext="600"></CompanyName>
</RequestorID>
</Source>
</POS>
<!-- Both 501 and 502 are mandatory to add in the request.-- >
<UniqueID ID="859623" Type="501"/>
<!--Ctrip's confirmation code-->
<UniqueID ID="ABCDEF" Type="502"/>
<!--Partner's confirmation code-->
<UniqueID ID="123456" Type="10"/>
<!--Partner's Hotel Code-->
<Reasons>
<Reason>business plan changed</Reason>
</Reasons>
</OTA_CancelRQ>
This is same as
OTA_CancelRQ/POS/Source/CompanyName OTA_HotelResRQ/POS/Source/ Y
CompanyName
</Warnings>
<UniqueID ID="859623" Type="501" />
<!--Ctrip's confirmation code-->
<UniqueID ID="ABCDEF" Type="502"/>
<!--Partner's confirmation code, should be the same as before-->
</OTA_CancelRS>
The Confirmation Number Update Request message provides the ability to add or
update hotel confirmation number afterwards, in case partner’s system cannot provide
hotel confirmation number in the booking response in real-time.
OTA_HotelResNumUpdateRQ/HotelReservations
A list of reservation ID need be
/HotelReservation/ResGlobalInfo/HotelReservatio Y
updated.
nIDs/ HotelReservationID/
OTA_HotelResNumUpdateRQ
/HotelReservations/HotelReservation/ResGlobalIn
Confirmation Number. Y
fo/HotelReservationIDs/
HotelReservationID/@ResID_Value
7 Read Reservation
The Read operation enables the user to retrieve a exiting booking generated before, to
request a reservation when the booking id number has been specified.
OTA_ReadRQ/ReadRequests /ReadRequest
Confirmation Number. Y
/UniqueID/@ID
If there are some errors when retrieving status for some reservations:
<OTA_ReadRS xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="201703292247"
TimeStamp="2017-03-29T22:48:00.3557048+08:00" Version="2.2">
<Errors>
<Error Code=”245”>Reservation 170329224658137 is not found</Error>
</Errors>
<HotelReservations>
<HotelReservation ResStatus="C">
54 Ctrip Integration API Specification
<ResGlobalInfo>
<HotelReservationIDs>
<HotelReservationID ResID_Type="502" ResID_Value="160516105943195"/>
<HotelReservationID ResID_Type="501" ResID_Value="23289614"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
<HotelReservation ResStatus="R">
<ResGlobalInfo>
<HotelReservationIDs>
<HotelReservationID ResID_Type="502" ResID_Value="160516112552157"/>
<HotelReservationID ResID_Type="501" ResID_Value="23289854"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
</HotelReservations>
</OTA_ReadRS>
OTA_ReadRS/HotelReservations/HotelReservati
A list of reservation ID needs to be
on/ResGlobalInfo/HotelReservationIDs/HotelRese N
updated.
rvationID/
OTA_ReadRS/HotelReservations/HotelReservati
on/ResGlobalInfo/HotelReservationIDs/ Confirmation Number. N
HotelReservationID/@ResID_Value
56 Ctrip Integration API Specification
Require
Name Type/Comments
d
HotelAriAdjustRQMessages/
HotelAriAdjustRQMessage/ The hotel name that has changed
N
HotelDateSpanGroups/ the availability or Rate
HotelDateSpanGroup/@ HotelName
The date ranges of the changed
availability or Rate of the same
HotelAriAdjustRQMessages/ hotel.
HotelAriAdjustRQMessage/ The minimum number of this
Y
HotelDateSpanGroups/ HotelDateSpanGroup/ node is 1 and the maximum is
DateRanges unlimited,
However the maximum is
combined with the acceptable
58 Ctrip Integration API Specification
Use Case 1: Success push, it means Ctrip receives this request well
<OTA_HotelAriAdjustRS Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-17T09:30:47Z"
xmlns="http://www.opentravel.org/OTA/2003/05">
<Success/>
<UniqueID ID="3521ece1-7207-403f-8487-6140c43379a6" Type="509"/>
</OTA_ HotelAriAdjustRS>
Use Case 2: Failure push in case of format issue or business rule violated
<OTA_ OTA_HotelAriAdjustRS Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-
17T09:30:47Z" xmlns="http://www.opentravel.org/OTA/2003/05">
<Errors>
<Error Type="3" ShortText="No Match Found" Code="425">The hotelcode doesn't match.</Error>
</Errors>
<UniqueID ID="3521ece1-7207-403f-8487-6140c43379a6" Type="509"/>
</OTA_ HotelAriAdjustRS>
OTA_ HotelAriAdjustRS/Errors/
The error short description N
Error/@ShortText
Test Environment:
https://receive-ovs-vendor-hotel.ctrip.com/api/order/HotelResStaUpdate
Live Environment:
https://receive-ovs-vendor-hotel.fws.qa.nt.ctripcorp.com/api/order/HotelResStaUpdate
Unlike other interfaces, this one uses RSA encryption to access. No need for a soap header.
Please assign Request Headers with following value pairs:
60 Ctrip Integration API Specification
The encrypted public key is the encrypted info of public key, the timestamp, and the account &
password listed in the checklist. All 3 fields except timestamp are all provided by Ctrip to our
supplier.
For the encryption method of the public key, please refer to the following method.
return result;
}
In case of “ .net” environment, the public key must be converted and encapsulated to XML
format before being encrypted.
For the conversion, please refer to BouncyCastle.Crypto.dll which could be downloaded at
https://www.bouncycastle.org/
61 Ctrip Integration API Specification
</HotelReservations>
</OTA_ HotelResStaUpdateRQ>
Require
Name Type/Comments
d
Possible values:
HotelReservations / HotelReservations/@
S – Successful Y
ResStatus
R – Rejected or failed
HotelReservationIDs / HotelReservationIDs/@
Ctrip order id Y
ResID_Value
<HotelReservationIDs>
<!-- ResID_Value is Ctrip order id>
<HotelReservationID ResID_Value="CTP-859623" >
<HotelReservationID ResID_Value="CTP-859624" >
</HotelReservationIDs>
</Warnings>
</OTA_ HotelResStaUpdateRS >
10 Appendix
EWT
1 Unknown Indicates an unknown error.
Indicates that the target business system has no
2 No implementation
implementation for the intended request.
Indicates that the XML message has passed a
3 Biz rule low-level validation check, but that the business
rules for the request message were not met.
Indicates the message lacks adequate security
4 Authentication
credentials
Indicates that the security credentials in the
5 Authentication timeout
message have expired
Indicates the message lacks adequate security
6 Authorization
credentials
Indicates that a request was sent within a
Error 7 Protocol violation message exchange that does not align to the
message
and Indicates that the target business system does
Warning 8 Transaction model not support the intended transaction-oriented
Type operation
Indicates the type of authentication requested is
9 Authentical model
not recognized
Indicates that an element or attribute that is
required in by the schema (or required by
10 Required field missing
agreement between trading partners) is missing
from the message
11 Advisory
Indicates that during processing of the request
12 Processing exception
that a not further defined exception occurred.
Indicates that an involved backend application
13 Application error returned an error or warning, which is passed
back in the response message.
UIT
1 User ID Like the channel ID
4 Company
5 Travel agency OTA, like Ctrip
10 Hotel
28 Distribution channel ID Alliance ID
501 Ctrip Reservation order ID Ctrip reservation number
502 Hotel Confirmation number Hotel Confirmation number
Unique Id Type 503
Sub-account ID of
SID
Distribution channel
504 Order reference Number Reference number
The availability update
505
request ID
506 The rate update request ID
MD5 string for credit card
507 7oUaYV5dVt1D1n06Me2yyw==
information
Max request id at vendor
508
side for batch confirmation
RVS
S Success/Committed
Reservation Status C Cancelled
P Processing
R Rejected/failed
AQC
3 Under 2
5 Under 17
Age Qualifying Code
7 Infant
8 Child
10 Adult
66 Ctrip Integration API Specification
SRC
1 must be nonsmoking room
2 try to arrange nonsmoking room
3 extra breakfast request
4 extra bed request
5 must have broadband access
6 try to arrange broadband access
7 Must be double bed
Special Request Code
8 Try to arrange double bed
9 Must be twin beds
10 Try to arrange twin beds
11 Try to arrange smoking room
12 Try to arrange room on a higher floor
14 Inform the name later
15 Try to arrange room with window
16 Quiet Room Preferred
CDT
1 Credit
Card Type
2 Debit
3 Central bill
PCC
DS Discover Card
JC Japanese Credit Bureau Credit Card
Payment Card Code
VI Visa Card
AX American Express
MC Master Card
67 Ctrip Integration API Specification
30 Country tax
31 Extra person charge
32 Banquet service fee
33 Room service fee
34 Local fee
35 Goods and services tax (GST)
36 Value Added Tax (VAT)
37 Crib fee
38 Rollaway fee
39 Assessment/license tax
40 Pet sanitation fee
41 Not known
42 Child rollaway charge
43 Convention tax
44 Extra child charge
Standard food and beverage
45
gratuity
46 National government tax
47 Adult rollaway fee
48 Beverage with alcohol
49 Beverage without alcohol
50 Tobacco
51 Food
52 Total surcharges
53 State cost recovery fee
54 Miscellaneous fee
69 Ctrip Integration API Specification
The row in green means the error/warning must be caught using the code on the
interface implementation.
CODE VALUE CODE NAME
15 Invalid date
61 Invalid currency code
95 Booking already cancelled (Warning)
127 Reservation already exists (Warning)
147 Taxes incorrect
161 Search criteria invalid
240 Credit card has expired
242 Credit card number is invalid or missing
245 Invalid confirmation number
249 Invalid rate code
264 Reservation cannot be cancelled
321 Required field missing
322 No availability
381 Invalid check-in date
382 Invalid check-out date
394 Invalid item
397 Invalid number of adults
400 Invalid property code
402 Invalid room type
448 System error
450 Unable to process
506 Credit card not accepted at property
784 Time out, please modify your request
19 Name is missing or incomplete
88 Cannot cancel - service has started
99 Booking not owned by requester
107 Cannot book - too far in advance
111 Booking invalid
113 Mandatory booking details missing
132 Room/unit type - no availability
181 Invalid country code
188 Transaction error - please report
193 Cancellation process failed
197 Undetermined error - please report
241 Expiration date is invalid
243 Invalid ARC/IATA number
244 Email address is invalid
284 No reservations found for search criteria
290 Invalid state/province/territory code
291 Invalid zip/postal code
71 Ctrip Integration API Specification
/>
<AmountPercent Percent="100"/>
First Night Penalty <Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="24"
OffsetDropTime="BeforeArrival"/>
<AmountPercent NmbrOfNights="1"/>
It means from Checkin date 23:59, back to 24 hours