0% found this document useful (0 votes)
667 views

Ctrip Integration API Specification v2.8.20191227 PDF

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
667 views

Ctrip Integration API Specification v2.8.20191227 PDF

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Ctrip creates this document to clarify each of the Ctrip

integration APIs about the technical details. In each section,


Partner will also find sample requests, responses, as well as the
comment of each node, field and attribute.

Ctrip Integration API


Specification
Version 2.8

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

Date Modification Modifier


2017-11-27 Add Error code 498: The booking is processing James Yu
2017-12-11 Add guarantee code in reservation request as an attribute for James Yu
[Guarantee] field
2018-02-24 Add Age, Gender and AgeQualifyingCode for [PersonName] field in the James Yu
reservation request;
Add comment on contact information in reservation request
Add attribute [ResStatus] for [HotelReservation] field in OTA_ReadRS
Add more sample of exception handling in OTA_ReadRS part
Add value definition for attribute [OffsetDropTime]
2018-06-05 Details Angel Liu
2018-07-06 Details Angel Liu
2018-08-08 Replace the attribute[StayDateRange] with [DateRange] in the Angel Liu
OTA_HotelAvailGetRQ request
2018-08-14 Replace the wrong attribute [occupany] with the right one [occupancy] Angel Liu
in the OTA_HotelAvailGetRS
2018-10-10 New B2B price Suite Wood lin
2018-10-25 Replace the wrong attributeLengthsOfStay with the right one Angel Liu
LengthOfStay in the OTA_HotelAvailNotifRQ
2019-02-19 Add the interface of OTA_HotelAriAdjustRQ and Angel Liu
OTA_HotelAriAdjustRS
2019-04-15 Modify the Los description of the A interface to make it clearer; Angel Liu
Add cancellation Policy Samples in Appendix;
Add the description of all cancellation;
Add some case of the Cascading Cancellation Policies;
Modify the required definition for attribute[CurrencyCode];
Add the PKG code 502 in all the attribute [RatePlanCategory];
2019-07-18 Correct some sample erros,and clarify some descriptions(push Jelly Ding
interfaces)
2019-09-18 Delete pull interface Jelly Ding
2019-11-04 Add update reservation status interface Jelly Ding
3 Ctrip Integration API Specification

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

7.2 Request node definition ........................................................................................52


7.3 Response XML sample .........................................................................................53
7.4 Response node definition .....................................................................................54
8 Push Availability, Inventory and Rate Adjust ................................................................56
8.1 Request XML sample ............................................................................................56
8.2 Request node definition ........................................................................................57
8.3 Response XML sample .........................................................................................58
8.4 Response node definition .....................................................................................58
9 Update reservation status ...........................................................................................59
9.1 Request XML sample ............................................................................................59
9.2 Request node definition ........................................................................................62
9.3 Response XML sample .........................................................................................62
9.4 Response node definition .....................................................................................63
10 Appendix .......................................................................................................................64
10.1 Error and Warning Type ....................................................................................64
10.2 Unique ID Type...................................................................................................65
10.3 Reservation Status .............................................................................................65
10.4 Age Qualifying Code ..........................................................................................65
10.5 Special Request Code .......................................................................................66
10.6 Card Type ...........................................................................................................66
10.7 Payment Card Code ..........................................................................................66
10.8 Rate with digits ...................................................................................................67
10.9 Fee Tax Type......................................................................................................67
10.10 Charge Type .......................................................................................................69
10.11 Error/Warning Code supported by Ctrip...........................................................70
10.12 Cancellation Policy Samples .............................................................................71
5 Ctrip Integration API Specification

Overview

This document describes


 XML specifications for one or more supported operation(s) within the Ctrip
integration interface based on the OTA 2014 standard.
 The development scopes.
 Formats of the individual XML tags & applicable values.
 XML message instances (examples). In the message instances below, field names
in bold indicate mandatory fields.
 Other considerations related to the specific operation or set of operations.

Interface Integration Platform

Through vendor
push or Ctrip pull to
build cache in Ctrip

Users browse hotels in one location

Ctrip uses cache data from multiple vendors


to calculate staring prices

Enter into Hotel List


Page

Users select one particular hotel

Enter into Hotel


Detail Page

Call Hotel
Use Cache Data in Duplication Transaction
Vendor Mode Availability Check
Ctrip Database Mode Mode
from Vendor

Ctrip will merge,


de-duplicate and
display Data from
multiple sources

Process continue in next page


6 Ctrip Integration API Specification

Users select one connectivity product

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

The development scope for Partner Platform is as follows:


 The implementation of ARI push is mandatory.(Section 2 & 3)
 The implementation of shopping is mandatory.(Section 5)
 The implementation of booking is mandatory.(Section 6)
 The implementation of cancelation is mandatory.(Section 7)
7 Ctrip Integration API Specification

Access Web Services


All Web Services except for the following Special ones:
https://vendor-
ctrip.fws.ctripqa.com/Hotel/OTAReceive/OTAReceiveService.asmx
Update Reservation Confirmation Number:
Test
https://vendor-
Environment
ctrip.fws.ctripqa.com/Hotel/OTAReceive/HotelResNumUpdate.asmx
Push Availability, Inventory and Rate Adjust:
https://vendor-
ctrip.fws.ctripqa.com/Hotel/OTAReceive/OTAHotelAriAdjustRQ.asmx

All Web Services except for the following Special ones:


https://vendor.ctrip.com/Hotel/OTAReceive/OTAReceiveService.asmx
Update Reservation Confirmation Number:
Live/Production https://vendor.ctrip.com/Hotel/OTAReceive/HotelResNumUpdate.asmx
Environment
Push Availability, Inventory and Rate Adjust:
https://vendor.ctrip.com/Hotel/OTAReceive/OTAHotelAriAdjustRQ.asmx

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.

1.1 Authentication & Soap Structure


<OTA_ HotelAvailNotifRQ Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-17T09:30:47Z"
xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="54394" MessagePassword="123qaz" Type="1">
<CompanyName Code="C" CodeContext="600"/>
</RequestorID>
</Source>
</POS>
<RatePlans>
<RatePlan>

</RatePlan>
</RatePlans>
</OTA_HotelRatePlanRQ>

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 full request will be like below.


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<OTA_ HotelAvailNotifRQ Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-
17T09:30:47Z" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="54394" MessagePassword="123qaz" Type="1">
<CompanyName Code="C" CodeContext="600"/>
</RequestorID>
</Source>
</POS>
<RatePlans>
<RatePlan>…
</RatePlan>
</RatePlans>
</OTA_ HotelAvailNotifRQ >
</soap:Body>
</soap:Envelope>
In the remaining document, Soap part is not depicted in the samples.

1.2 Authentication Element Definition

Node Type/Comments Required


RequestorID/@ID The account name to access the service Y
The account password to access the
RequestorID/@MessagePassword Y
service
RequestorID/@Type User Category.
For push related interfaces (Vendor call
Ctrip), value is 1. Y
For other interfaces, (Ctrip calls vendor),
value is 5.
CompanyName/@Code The organization category of the partner. It
Y
has only one default value “C”.
CompanyName/@CodeContext This is a unique ID to identify the partner.
Y
It is generated and provided by Ctrip
9 Ctrip Integration API Specification

1 Push Availability and Inventory

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.

1.1 Request XML sample

User Case 1: Push Daily Room Status


<OTA_HotelAvailNotifRQ Version="2.1" 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"/>
</AvailStatusMessage>
<AvailStatusMessage BookingLimit="10" BookingLimitMessageType="SetLimit">
<StatusApplicationControl End="2012-08-13" Start="2012-08-13" RatePlanCode="PPCode"
InvTypeCode="AlQQ" RatePlanCategory="501"/>
<RestrictionStatus Status="Close"/>
</AvailStatusMessage>
<AvailStatusMessage BookingLimit="10" BookingLimitMessageType="SetLimit">
<StatusApplicationControl End="2012-08-13" Start="2012-08-13" RatePlanCode="PKGCode"
InvTypeCode="AlQQ" RatePlanCategory="502"/>
<RestrictionStatus Status="Open"/>
</AvailStatusMessage>
</AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

User Case 2: Push FPLOS


<AvailStatusMessage>
<StatusApplicationControl Start="2015-12-03" End="2015-12-06" RatePlanCode="RACK" InvTypeCode="KING"
RatePlanCategory="16"/>
<LengthsOfStay FixedPatternLength="8">
<LengthOfStay MinMaxMessageType="FullPatternLOS">
<LOS_Pattern FullPatternLOS="10001111"></LOS_Pattern>
</LengthOfStay>
</LengthsOfStay>
</AvailStatusMessage>

User Case 3: Push Daily Restrictions


<AvailStatusMessages>
<AvailStatusMessage>
<StatusApplicationControl Start="2015-01-01" End="2015-02-28" InvTypeCode="King"
RatePlanCode="Rack"/>
10 Ctrip Integration API Specification

<RestrictionStatus Restriction="Master" Status="Open"/>


</AvailStatusMessage>
<AvailStatusMessage>
<StatusApplicationControl Start="2015-03-01" End="2015-03-31" InvTypeCode="King"
RatePlanCode="Rack"/>
<RestrictionStatus Restriction="Arrival" Status="Close"/>
</AvailStatusMessage>
<AvailStatusMessage>
<StatusApplicationControl Start="2015-04-01" End="2015-04-30" InvTypeCode="King"
RatePlanCode="Rack"/>
<RestrictionStatus Restriction="Departure" Status="Close"/>
</AvailStatusMessage>
<AvailStatusMessage>
<StatusApplicationControl Start="2015-05-01" End="2015-12-31" InvTypeCode="King"
RatePlanCode="Rack"/>
<RestrictionStatus Restriction="Master" Status="Close"/>
</AvailStatusMessage>
<AvailStatusMessage>
<StatusApplicationControl Start="2015-01-01" End="2015-01-31" InvTypeCode="King"
RatePlanCode="Rack"/>
<LengthsOfStay>
<LengthOfStay MinMaxMessageType="SetMinLOS" Time="2" TimeUnit="Day"/>
<LengthOfStay MinMaxMessageType="SetMaxLOS" Time="5" TimeUnit="Day"/>
</LengthsOfStay>
</AvailStatusMessage>
</AvailStatusMessages>

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>

1.2 Request node definition

Name Type/Comments Required


OTA_HotelAvailNotifRQ /@Version The current Ctrip API version Y
The language of the text in request.
OTA_HotelAvailNotifRQ /@PrimaryLangID Y
The default value is en-us.
OTA_HotelAvailNotifRQ /@TimeStamp The timestamp of this request Y
Partner hotel code, Limit of length :16
AvailStatusMessages/@HotelCode Y
Bytes
The inventory of room, which means
AvailStatusMessage/@BookingLimit the number of room that guest can N
book.
The only allowed value is “SetLimit”
that means the operation is setting the
AvailStatusMessage/@BookingLimitMessageType N
number of room instead of adding or
deducting the number.
Rate Plan Code which represents a
StatusApplicationControl /@RatePlanCode room rate product, like standard rate, Y
promotion rate.
16: Pay at hotel
StatusApplicationControl /@RatePlanCategory 501: Prepay Y
502: B2B or PKG
12 Ctrip Integration API Specification

Room Type Code which means a code


StatusApplicationControl/@InvTypeCode Y
of physical room type
Type of restriction

Master: Common Status(optional,


Attribute 'Status' could be passed with
RestrictionStatus/@Restriction or without it. Either way, it reprents the N
same things : Room Status)
Departure: Status of Departure
Arrival: Status of Arrival

It indicates the room availability.


RestrictionStatus/@Status Open: available Y
Close: unavailable
Penalty type, below 3 types are
CancelPenalty/AmountPercent/ Y
alternatives, must choose one
Number of stay nights of the hotel to
CancelPenalty/AmountPercent/@NmbrOfNights N
calculate the amount of penalty.
The percentage is used to calculate
CancelPenalty/AmountPercent/@Percent N
the amount of penalty.

CancelPenalty/AmountPercent/@Amount Fixed amount of penalty N

ISO currency code. Usually it is filled


CancelPenalty/AmountPercent/@CurrencyCode N
as the code from hotel content
You must select from [Offset] or
CancelPenalty/Deadline Y
[AbsoluteDeadline]

CancelPenalty/Deadline /@OffsetTimeUnit The units of time, Unit is Hour or Day N

The number of units, which is range


CancelPenalty/Deadline /@OffsetUnitMultiplier N
from 0 to 23899
Calculation type of cancellation
deadline.Possible values:
CancelPenalty/Deadline /@OffsetDropTime BeforeArrival; N
AfterBooking;
AfterConfirmation
A detail deadline, hotel local time. With
CancelPenalty/Deadline /@AbsoluteDeadline the highest priority, other values are N
ignored if this attribute has value.

AvailStatusMessage/LengthsOfStays/LengthOfStay N

The length of stay-in. It should be the


LengthsOfStays/@FixedPatternLength same as the length of value in field N
@FullPatternLOS
13 Ctrip Integration API Specification

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/@MinMaxMessageType To remove “SetMinLOS”, set value of N


TimeUnit as 1.

To remove “SetMaxOS”, set value of


TimeUnit as 999.

The default Min LOS is 1 and Max LOS


is 999.

LengthOfStay/@Time The length of stay-in N

LengthOfStay/@TimeUnit Unit of time, default value is [Day]. N

LengthOfStay/LOS_Pattern N

A numeric string with only integer 0 or


1. The length must be the same as
@FixedPatternLength.

1: Status Open
0: Status Close

Ex:
Start="2015-12-03" End="2015-12-06"
10001111

The pattern means it is not allowed to


LOS_Pattern/@FullPatternLOS N
check-out on the date which number is
0. As the sample, the length of stay
allowed is 1,5,6,7 and 8. The min LOS
is 1 and max LOS is 8.

For the range from start date to end


date, the days must follow the pattern
specified, as the sample, Dec.3 rd, 4th,
5th, and 6th mush follow pattern
10001111. (The end date is included in
that range)
14 Ctrip Integration API Specification

1.3 Response XML sample

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>

1.4 Response node definition

Name Type/Comments Required


OTA_HotelAvailNotifRS /@version The current Ctrip API version Y
OTA_HotelAvailNotifRS The language of the text in response. The default
Y
/@PrimaryLangID value is en-us.
OTA_HotelAvailNotifRS /@TimeStamp The timestamp of this response Y
Normally the value is Success. It just tells that Ctrip
OTA_HotelAvailNotifRS/Success System successfully receive this request, but may N
not begin processing it.

It returns format error, currency error, invalid


OTA_HotelAvailNotifRS/Errors N
business data

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

The OTA_HotelRateAmountNotifRQ message is used to push the rate to Ctrip System.


As current Ctrip’s solution, the success response will be returned immediately once
15 Ctrip Integration API Specification

Ctrip system receives this request, but the actual rate updates are in an asynchronous
process.

2.1 Request XML sample

User Case 1: Push Daily Rate


<OTA_HotelRateAmountNotifRQ Version="2.1" PrimaryLangID="en-us" TimeStamp="2018-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"></CompanyName>
</RequestorID>
</Source>
</POS>
<RateAmountMessages HotelCode="29087">
<RateAmountMessage>
<StatusApplicationControl RatePlanCategory="16" RatePlanCode="12345" InvTypeCode="AlQQ"/>
<Rates>
<Rate Start="2012-08-13" End="2012-09-10">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="500" AmountAfterTax="600"
CurrencyCode="CNY">
<Taxes>
<Tax Type="Exclusive" Code="28" Percent="20" CurrencyCode="CNY" ChargeUnit="19"/>
</Taxes>
</BaseByGuestAmt>
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" Lunch="true" Dinner="true" NumberOfMeal="1" />
</Rate>
<Rate Start="2012-09-11" End="2012-10-14">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="720" AmountAfterTax="720" CurrencyCode="CNY">
<Taxes>
<Tax Type="Inclusive" Code="28" Percent="15" CurrencyCode="CNY" ChargeUnit="19"/>
</Taxes>
</BaseByGuestAmt>
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" Lunch="true" Dinner="true" NumberOfMeal="1" />
</Rate>
</Rates>
</RateAmountMessage>
<RateAmountMessage>
<StatusApplicationControl RatePlanCategory="501" RatePlanCode="12345" InvTypeCode="AlQQ"/>
<Rates>
<Rate End="2012-08-13" Start="2012-08-13">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="550" AmountAfterTax="550" CurrencyCode="CNY"/>
</BaseByGuestAmts>
<MealsIncluded Breakfast="false" />
</Rate>
<Rate End="2012-08-14" Start="2012-08-14">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="540" AmountAfterTax="540" CurrencyCode="CNY"/>
16 Ctrip Integration API Specification

</BaseByGuestAmts>
<MealsIncluded Breakfast="false" />
</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>

User Case 2: Push LOS Rate


<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2015-02-
12T00:00:00" Version="2.1" PrimaryLangID="en-us">
<POS>
<Source>
<RequestorID ID="Test" Type="10" MessagePassword="Test">
<CompanyName Code="H" CodeContext="4085" />
</RequestorID>
</Source>
</POS>
<RateAmountMessages HotelCode="54394">
<RateAmountMessage>
<StatusApplicationControl RatePlanCode="280236" RatePlanCategory="16" InvTypeCode="AlQQ"/>
<Rates>
<Rate Start="2015-02-03" End="2015-02-06" LOS="9">
<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" />
<DailyRate Day="3" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
<DailyRate Day="4" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
<DailyRate Day="5" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
<DailyRate Day="6" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
<DailyRate Day="7" AmountBeforeTax="100.00" AmountAfterTax="120.00" />
<DailyRate Day="8" AmountBeforeTax="200.00" AmountAfterTax="240.00" />
<DailyRate Day="9" AmountBeforeTax="100.00" AmountAfterTax="120.00" />
</Tpa_Extensions>
</BaseByGuestAmt>
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" NumberOfMeal="2" />
</Rate>
<Rate Start="2015-02-07" End="2015-02-07" LOS="3">
<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" />
<DailyRate Day="3" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
</Tpa_Extensions>
</BaseByGuestAmt>
</BaseByGuestAmts>
17 Ctrip Integration API Specification

<MealsIncluded Breakfast="true" NumberOfMeal="2" />


</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>

User Case 3: Push Rate with Number of Guest


<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2015-02-
12T00:00:00" Version="2.1" PrimaryLangID="en-us">
<POS>
<Source>
<RequestorID ID="Test" Type="10" MessagePassword="Test">
<CompanyName Code="H" CodeContext="4085" />
</RequestorID>
</Source>
</POS>
<RateAmountMessages HotelCode="54394">
<RateAmountMessage>
<StatusApplicationControl RatePlanCode="280236" RatePlanCategory="16" InvTypeCode="STD" />
<Rates>
<Rate Start="2015-02-03" End="2015-02-11">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="100" AmountAfterTax="120"
CurrencyCode="SGD" AgeQualifyingCode="10" NumberOfGuests="1" />
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" NumberOfMeal="2" />
</Rate>
<Rate Start="2015-02-03" End="2015-02-11">
<BaseByGuestAmts>
<BaseByGuestAmt Code="Sell" AmountBeforeTax="100" AmountAfterTax="120"
CurrencyCode="SGD" AgeQualifyingCode="10" NumberOfGuests="2" />
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" NumberOfMeal="2" />
</Rate>
</Rates>
</RateAmountMessage>
</RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>

User Case 4: Push LOS Rate with Number of Guest


<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2015-02-
12T00:00:00" Version="2.1" PrimaryLangID="en-us">
<POS>
<Source>
<RequestorID ID="Test" Type="10" MessagePassword="Test">
<CompanyName Code="H" CodeContext="4085" />
</RequestorID>
</Source>
</POS>
<RateAmountMessages HotelCode="54394">
<RateAmountMessage>
<StatusApplicationControl RatePlanCode="280236" RatePlanCategory="16" InvTypeCode="STD" />
<Rates>
18 Ctrip Integration API Specification

<Rate Start="2015-02-07" End="2015-02-07" LOS="3">


<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" />
<DailyRate Day="3" AmountBeforeTax="150.00" AmountAfterTax="180.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" />
<DailyRate Day="3" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
</Tpa_Extensions>
</BaseByGuestAmt>
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" NumberOfMeal="2" />
</Rate>
</Rates>
</RateAmountMessage>
<RateAmountMessage>
<StatusApplicationControl RatePlanCode="280236" RatePlanCategory="16" InvTypeCode="STD" />
<Rates>
<Rate Start="2015-02-08" End="2015-02-08" LOS="3">
<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" />
<DailyRate Day="3" AmountBeforeTax="150.00" AmountAfterTax="180.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" />
<DailyRate Day="3" AmountBeforeTax="150.00" AmountAfterTax="180.00" />
</Tpa_Extensions>
</BaseByGuestAmt>
</BaseByGuestAmts>
<MealsIncluded Breakfast="true" NumberOfMeal="2" />
</Rate>
</Rates>
</RateAmountMessage>
<RateAmountMessage>
<StatusApplicationControl RatePlanCode="280236" RatePlanCategory="16" InvTypeCode="STD" />
19 Ctrip Integration API Specification

<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>

2.2 Request node definition

Name Type/Comments Required


OTA_HotelRateAmountNotifRQ/@version The current Ctrip API version Y
The language of the text in
OTA_HotelRateAmountNotifRQ/@PrimaryLangID request. The default value is en- Y
us.
OTA_HotelRateAmountNotifRQ/@TimeStamp The timestamp of this request Y
/RateAmountMessages/@HotelCode Hotel ID Y
Rate Plan Code which used to
/RateAmountMessage/StatusApplicationControl
combine with RoomTypeCode Y
/@RatePlanCode
to generate a room rate
It is used to indicate the
payment type. The available
/RateAmountMessage/StatusApplicationControl values are as follows:
Y
/@RatePlanCategory 501: Prepay
16: Pay at hotel
502: B2B or PKG
/RateAmountMessage /StatusApplicationControl Room Type Code which means
Y
/@InvTypeCode a code of physical room type
20 Ctrip Integration API Specification

/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.

If selling price is pushed, the


value here is [Sell].
/BaseByGuestAmts/BaseByGuestAmt/@Code Y
If cost is pushed, the value here
is [Cost].

/BaseByGuestAmt/@AmountBeforeTax The rate without tax and fee Y

/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/@AmountAfterTax The rate included in tax and fee. Y

/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

/BaseByGuestAmt/@NumberOfGuests The number of guests stay-in N

Daily Rate
/BaseByGuestAmt/Tpa_Extensions/DailyRate When there is LOS setting, the N
tag is mandatory

/DailyRate/@Date The effective day N

/DailyRate/@AmountBeforeTax The rate without tax and fee N

/DailyRate/@AmountAfterTax The rate included in tax and fee. N

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.

2.3 Response XML sample

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>

2.4 Response node definition

Name Type/Comments Required


OTA_HotelRateAmountNotifRS /@version The current Ctrip API version Y
The language of the text in
OTA_HotelRateAmountNotifRS/@PrimaryLangID response. The default value is en- Y
us.
OTA_HotelRateAmountNotifRS/@TimeStamp The timestamp of this response Y
Normally the value is Success. It just
tells that Ctrip System successfully
OTA_HotelRateAmountNotifRS /Success N
receive this request, but may not
begin processing it.

It returns format error, currency


OTA_HotelRateAmountNotifRS /Errors N
error, invalid business data

OTA_HotelRateAmountNotifRS/UniqueID/@ID A unique ID to identify the request Y


The request type:
OTA_HotelRateAmountNotifRS/UniqueID/@Type 505: availability request Y
506: rate request

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.

3.1 Request XML sample

Use Case 1: without occupancy


Get all ARI using hotel code, including the rate with different occupancies
<OTA_HotelAvailRQ EchoToken="String" TimeStamp="2001-12-17T09:30:47.0Z" PrimaryLangID="en-
us" xmlns="http://www.opentravel.org/OTA/2003/05">
23 Ctrip Integration API Specification

<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>

3.2 Request node definition

Name Type/Comments Required

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

HotelRef Hotel information. Y


Partner hotel code. Only one hotel code will be
@HotelCode Y
delivered in one request
StayDateRange Stay date range for search. Y
@Start The Start date of stay. Y
The End date of stay. The max length of stay is 28
@End Y
days
RatePlanCandidates Collection of requested rate plans. N
RatePlanCandidate N
Requested rate plan code by caller.
@RatePlanCode N
Only one rate plan code will be delivered in Ctrip
RoomStayCandidates Collections of room stay candidates Y
RoomStayCandidate Individual room stay candidate. Y
Requested room type code, only one room type code
@RoomTypeCode N
will be delivered in one request
@Quantity Number of rooms, maximum value is 20 Y
GuestCounts Collection of guest information Y
An element that identifies the number of guests and
ages of the guests in the request, which determines
GuestCount Y
what the rate base on the occupancy at each
property is.
The qualifying age groups. Refer to Age Qualifying
Code (AQC)in the appendix
@AgeQualifyingCode Y
Currently the code of child has not been supported in
Ctrip system.
The number of guests in one Age Qualifying Code.
This attribute is option. If it is left out in the RQ, the
RS should include all rates with different
occupancies. Otherwise, only the rates of this
@Count corresponding occupancies is returned in the RS. N

It is the occupancy of single room since Ctrip does


not support different room type in singe shopping
request.

3.3 Response XML sample

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>

3.4 Response node definition


Name Type/Comments Required
OTA_HotelAvailRS Y
A date and time indicated when the request is created.
@TimeStamp Sample: 2018-04-24T18:00:00+07:00(Zone 7 East) Y
@EchoToken Additional information to identify a request. Y
@Version The version of the request and response. Y
@PrimaryLangID The primary language code Y
An empty element when the request is successfully
Success N
processed.

The information about the reason of not creating an


Warnings
offer, like no inventory, no rates and etc.
31 Ctrip Integration API Specification

The Warning Type, please refer to the Appendix Error


Warnings/Warning/@Type N
and Warning Type

The Warning Code, please refer to the Appendix Error


Warnings/Warning/@Code N
Code supported by Ctrip

@ShortText A short description of the error message N


@Code Warning Code N
@Type Warning Type N
Details about the room stay including guest counts, the
time span of this room stay, pointers to Res Guests,
RoomStays Y
guest memberships, comments and Special requests
pertaining to this particular room stay.
RoomStay Room stay information Y
RoomTypes A collection of room types specific to a room stay. Y
RoomType Room type information. Y
@RoomTypeCode The room type code Y
Always return available Inventory
@NumberOfUnits If the value is not available, just don’t return this N
attribute in the response
RoomDescription N
Text Name of the room type N
RatePlans Rate plan information Y
The rate plan element contains all the rate information
RatePlan Y
of a single rate plan code
@RatePlanCode The rate plan code. Y
For prepaid or package rate, this value should be true.
@PrepaidIndicator N
For post-pay rate, this value should be false
RatePlanDescription Description of this rate N
Text Name of the rate plan N
CancelPenalties Y
CancelPenalty Total penalties Y
@PolicyCode A code to represent cancellation policy N
One mode should be selected, [Offset] or absolute
Deadline Y
mode.
@OffsetTimeUnit The units of time, Unit is Hour or Day N
@OffsetUnitMultiplier The number of units, which is range from 0 to 23899 N
Calculation type of cancellation deadline.
@OffsetDropTime Possible values: BeforeArrival; N
AfterBooking; AfterConfirmation
A detail deadline, hotel local time. With the highest
@AbsoluteDeadline N
priority, other values are ignored if has this
32 Ctrip Integration API Specification

Penalty type, below 3 types are alternatives, must


AmountPercent Y
choose one
The number of nights of the hotel stay that are used to
@NmbrOfNights N
calculate the amount of penalty.
The percentage is used to calculate the amount of
@Percent N
penalty.
@Amount Fixed amount of penalty N
ISO currency code. Usually it is filled as the code from
@CurrencyCode N
hotel content
@TaxInclusive Penalty includes the tax or not. N
PenaltyDescription Y
Text The description of penalty N
MealsIncluded The meal information of the rate Y
True: breakfast inclusive
@Breakfast Y
False: breakfast exclusive
True: lunch inclusive
@Lunch Y
False: lunch exclusive
True: dinner inclusive
@Dinner Y
False: dinner exclusive
The number of meal which is offered by hotel. It is
mandatory if one of @Breakfast/Lunch/Dinner is true.
@NumberOfMeal Y
This value is 0 when @Breakfast/Lunch/Dinner is all
false.
RoomRates N
A collection of room rates associated with a room type
RoomRate N
and a rate plan code.
@RoomTypeCode The room type code. Y
@RatePlanCode The rate –plan code. Y
Category of the rate plan. 501: prepay; 16: Pay at
@RatePlanCategory Y
hotel ; 502: B2B or PKG
Rates Y
The rate amount. Please group rate together if they
Rate Y
have the same rate value for consecutive nights.
@EffectiveDate The starting date for the Rate. Y
@ExpireDate The ending for the Rate. Y
The base amount charged for the accommodation and
Base Y
service
The amount charged for base room rate. Exclusive tax
and fee
@AmountBeforeTax Y
It is also a rate per night per room no matter what
room quantity passed in the xml request.
Inclusive tax and fee.
The value is allowed to be 0 if it’s a free night.
@AmountAfterTax Y
It is also a rate per night per room no matter what
room quantity passed in the xml request.
@CurrencyCode The code specifying a monetary unit. Use ISO 4217. Y
33 Ctrip Integration API Specification

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

4.1 Request XML sample

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>

4.2 Request node definition

Name Type/Comments Required


OTA_HotelResRQ /@version Current Ctrip API version Y
The language of the text in request. The
OTA_HotelResRQ/@PrimaryLangID N
default value is en-us.
OTA_HotelResRQ/@TimeStamp The timestamp of this request N
Simple string returned verbatim in the
response as passed in the request. It is
OTA_HotelResRQ/@EchoToken N
used to match requests with responses to
simulate session state.
38 Ctrip Integration API Specification

If this field is true, then it is a resent RQ.


OTA_HotelResRQ/@RetransmissionIndicat
Partners should avoid the duplicated N
or
booking using this field.
The unique identifier to indicate who is
OTA_HotelResRQ/POS/Source/
sending reservation. This value usually is Y
RequestorID/@ID
the channel/OTA ID.

OTA_HotelResRQ/POS/Source/RequestorI User Category.


Y
D/@Type The value is 5 here

OTA_HotelResRQ/POS/Source/ The password for the authorized channel


Y
RequestorID/@MessagePassword account.
OTA_HotelResRQ/POS/Source/ The organization category of the partner. It
Y
RequestorID/CompanyName/@Code has only one default value “C”.
OTA_HotelResRQ/POS/Source/
The ID of channel sending this reservation
RequestorID/CompanyName/@CodeConte Y
It’s defined by Ctrip.
xt
Reservation ID from channel. Usually this
is the Ctrip reservation ID. All rooms are
OTA_HotelResRQ/UniqueID/@ID Y
under this reservation ID.
Please refer to the UID in the appendix
Please refer to the UID in the appendix
OTA_HotelResRQ/UniqueID/@Type 501 : Ctrip reservation ID Y
502 : Hotel confirmation number

OTA_HotelResRQ/HotelReservations/Hotel There will be only one [HotelReservation]


Y
Reservation occurrence.

OTA_HotelResRQ/HotelReservations/Hotel This attribute is useless if the request is a


N
Reservation/@ResStatus new booking.
OTA_HotelResRQ/HotelReservations/Hotel
There will be only one [RoomType]
Reservation/RoomStays/RoomStay/RoomT Y
occurrence.
ypes/RoomType
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/RoomStays/RoomStay/RoomT Room Type Code Y
ypes/RoomType/@RoomTypeCode

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

Boolean. Default value is false.


OTA_HotelResRQ/HotelReservations/Hotel
False – indicates the guests count is for all
Reservation/ResGlobalInfo/GuestCounts/@ N
the rooms; True – each GuestCount node
IsPerRoom
specifies the guests account for one room.

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

Only used for Post Pay information (Pay at


Hotel).Please refer to the user case 1.
OTA_HotelResRQ/HotelReservations/Hotel
Please enable handling empty payment N
Reservation/ResGlobalInfo/Guarantee
card information. if no credit card
information passed by Ctrip. Refer to the
user case 3 for more detail.

For post pay reservation request, the


OTA_HotelResRQ/HotelReservations/Hotel
value [TA] means [Guarantee Needed],
Reservation/ResGlobalInfo/Guarantee/@Gu N
the value [3P] means [no need of
aranteeCode
guarantee].

Only used for Prepayment information


(Advance pay) .Please refer to the user
case 2.
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/DepositPayment N
Please enable handling empty payment
s
card information. If no credit card
information passed by Ctrip. Please refer
to the user case 4 for more detail.

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

Credit card type:


OTA_HotelResRQ/HotelReservations/Hotel
VI : Visa
Reservation/ResGlobalInfo/DepositPayment
MC : Master card N
s/GuaranteePayment/AcceptedPayments/A
Please refer to Payment Card code(PCC)
cceptPayment/paymentCard/@CardCode
in the appendix
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/DepositPayment
s/GuaranteePayment/AcceptedPayments/A Card Number N
cceptPayment/paymentCard/@CardNumbe
r

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 The total amount without the tax of this


Reservation/ResGlobalInfo/Total/@Amount reservation N
BeforeTax
OTA_HotelResRQ/HotelReservations/Hotel The total amount including the tax of this
Reservation/ResGlobalInfo/Total/@Amount reservation Y
AfterTax
OTA_HotelResRQ/HotelReservations/Hotel
Reservation/ResGlobalInfo/Total/@Currenc Currency Code Y
yCode

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

Please refer to the Unique ID Type (UIT)


in the appendix.

Special note for 507 in @ResID_Type:


The MD5 string mentioned in appendix is
a combination of [Card No.] & [Card
Holder Name] & [ExpireDate].

Ex:If original string is


4392250012345670&Yu Jiwei&1115, then
OTA_HotelResRQ/HotelReservations/Hotel
the final MD5 string should be
Reservation/ResGlobalInfo/HotelReservatio Y
395bd98915542737fcdbb8d148f74205.
nIDs/ HotelReservationID/@ResID_Value
The MD5 string is generated by Ctrip and
passed to partner side. And the partner
need to compare the Credit Card
information encrypted using MD5 with the
MD5 string in Booking request. The
expected request is those two value are
same. If not, it means the CC information
is distorted, the booking should be
rejected by Partner.

4.3 Response XML sample

Use Case 1: Successful response without warnings


<OTA_HotelResRS Version="2.2" EchoToken="201403211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<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 2: Successful response with warnings


<OTA_HotelResRS Version="2.1" EchoToken="201403211421"
45 Ctrip Integration API Specification

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 3: Duplicate request, actually the request is processed successfully


<OTA_HotelResRS Version="2.1" EchoToken="201403211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<Warnings>
<Warning Type="3" Code="127">This creation is already successfully processed</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>

4.4 Response node definition

Name Type/Comments Required

OTA_HotelResRS /Success The reservation is successful. N


When Success returned, maybe
OTA_HotelResRS/Warnings N
the Warnings also will be returned
The Warning Type, please refer to
OTA_HotelResRS/Warnings/Warning/@Type the Appendix Error and Warning N
Type
The Warning Code, please refer to
OTA_HotelResRS/Warnings/Warning/@Code the Appendix Error Code supported N
by Ctrip
When Errors returned, No Success
OTA_HotelResRS/Errors N
Node returned.
OTA_HotelResRS/Errors/Error/@ShortText The error short description N
The Error Type, please refer to the
OTA_HotelResRS/Errors/Error/@Type N
Appendix Error and Warning Type
Please refer to the Appendix Error
OTA_HotelResRS/Errors/Error/@Code N
code supported by Ctrip
Please refer to the Reservation
OTA_HotelResRS
Status(RVS) in the appendix code Y
/HotelReservations/HotelReservation/@ResStatus
list
Allows returning multiple hotel
confirmation numbers. Also we
recommend returning the channel
OTA_HotelResRS
reservation ID here.
/HotelReservations/HotelReservation/ResGlobalIn Y
fo/HotelReservationIDs/ HotelReservationID/
Only when Success for the
reservation, this code should be
returned.
Please refer to the Unique ID Type
(UIT) in the appendix.
Both 501 and 502 are mandatory to
OTA_HotelResRS
add in the response.
/HotelReservations/HotelReservation/ResGlobalIn
It’s better to provide hotel Y
fo/HotelReservationIDs/
confirmation number used for check
HotelReservationID/@ResID_Type
in for code [502].
If not, you can provide your own
confirmation number.
47 Ctrip Integration API Specification

OTA_HotelResRS
/HotelReservations/HotelReservation/ResGlobalIn
Confirmation Number. Y
fo/HotelReservationIDs/
HotelReservationID/@ResID_Value

5 Cancel Reservation

5.1 Request XML sample

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>

5.2 Request node definition

Name Type/Comments Required


Simple string returned verbatim in
the response as passed in the
OTA_CancelRQ/@EchoToken request. Can be used to match N
requests with responses to
simulate session state.
This is same as
OTA_CancelRQ/POS/Source/RequestorID OTA_HotelResRQ/POS/Source/ Y
RequestorID
48 Ctrip Integration API Specification

This is same as
OTA_CancelRQ/POS/Source/CompanyName OTA_HotelResRQ/POS/Source/ Y
CompanyName

Please refer to the user case 1,


OTA_CancelRQ/UniqueID user case 2 and the UID in the Y
appendix.

The reason of this cancellation.


OTA_CancelRQ/Reasons/Reason N
Currently Ctrip doesn’t fill this field

5.3 Response XML sample

Use Case 1: Success on partner’s platform


<OTA_CancelRS Version="2.1" EchoToken="201403121021"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<UniqueID ID="859623" Type="501"/>
<!--Ctrip's confirmation code-->
<UniqueID ID="ABCDEF" Type="502"/>
<!--Partner's confirmation code-->
</OTA_CancelRS>

Use Case 2: Success with warning message


<OTA_CancelRS Version="2.1" EchoToken="201403121021"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<Warnings>
<Warning Type="3">May need to double confirm with hotel</Warning>
</Warnings>
<UniqueID ID="859623" Type="501" />
<!--Ctrip's confirmation code-->
<UniqueID ID="ABCDEF" Type="502"/>
<!--Partner's confirmation code-->
</OTA_CancelRS>

Use Case 3: Duplicate cancellation which operation is actually successful


<OTA_CancelRS Version="2.1" EchoToken="201403121021"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<Warnings>
<Warning Type="3" Code="95">The reservation has been cancelled already</Warning>
49 Ctrip Integration API Specification

</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>

Use Case 4: Failure


<OTA_CancelRS Version="2.1" EchoToken="201403121021"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Errors>
<Error ShortText="Reservation 859623 cannot be found" Type="3" Code="245"/>
</Errors>
<UniqueID ID="859623" Type="501"/>
<!--Ctrip's confirmation code-->
</OTA_CancelRS>

5.4 Response node definition

Name Type/Comments Required


This value is the same as the
OTA_CancelRS/@EchoToken EchoToken in the corresponding N
request.
The reservation is cancelled
OTA_CancelRS/Success N
successfully
This is same as
OTA_CancelRS/Warnings N
OTA_HotelResRS/Warnings
This is same as
OTA_CancelRS/Errors N
OTA_HotelResRS/Errors

Please refer to the user case 1, user


case 2, user case 3, user case 4 and
OTA_CancelRS/UniqueID the UID in the appendix. Y

Fill in Code 501 and 502


50 Ctrip Integration API Specification

6 Update Reservation Confirmation Number

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.

6.1 Request XML sample


<OTA_HotelResNumUpdateRQ Version="2.5" EchoToken="201702211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<HotelReservations>
<HotelReservation>
<ResGlobalInfo>
<HotelReservationIDs>
<!--Partner's confirmation code 502, should be the same as before-->
<HotelReservationID ResID_Value="56224SB053845" ResID_Type="502"/>
<!--Ctrip's confirmation code 501-->
<HotelReservationID ResID_Value="2876705925" ResID_Type="501"/>
<!—The Update Reservation Confirmation code 504-->
<HotelReservationID ResID_Value="859623" ResID_Type="504"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
</HotelReservations>
</OTA_HotelResNumUpdateRQ >

6.2 Request node definition

Name Type/Comments Required

OTA_HotelResNumUpdateRQ/HotelReservations
A list of reservation ID need be
/HotelReservation/ResGlobalInfo/HotelReservatio Y
updated.
nIDs/ HotelReservationID/

Please refer to the Unique ID Type


(UIT) in the appendix.
The type 501 and 502 are original
OTA_HotelResNumUpdateRQ
Ctrip order id and partner
/HotelReservations/HotelReservation/ResGlobalIn
confirmation returned in Y
fo/HotelReservationIDs/
OTA_HotelResRS before.
HotelReservationID/@ResID_Type
504 is new hotel confirmation
number need be added or updated
afterwards.
51 Ctrip Integration API Specification

OTA_HotelResNumUpdateRQ
/HotelReservations/HotelReservation/ResGlobalIn
Confirmation Number. Y
fo/HotelReservationIDs/
HotelReservationID/@ResID_Value

6.3 Response XML sample

Use Case 1: Successful response


<OTA_HotelResNumUpdateRS Version="2.5" EchoToken="201703211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
</OTA_HotelResNumUpdateRS>

Use Case 2: Failure


<OTA_ HotelResNumUpdateRS Version="2.5" EchoToken="201703211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Errors>
<Error ShortText="Reservation ID 2876705925 does not exist" Type="1" Code="245"/>
</Errors>
</OTA_HotelResNumUpdateRS>

6.4 Response node definition

Name Type/Comments Required

OTA_HotelResNumUpdateRS /Success The update is successful. N


When Errors returned, No Success
OTA_HotelResNumUpdateRS /Errors N
Node returned.
OTA_HotelResNumUpdateRS The Error Type, please refer to the
N
/Errors/Error/@Type Appendix Error and Warning Type
OTA_HotelResNumUpdateRS Please refer to the Appendix Error
N
/Errors/Error/@Code code supported by Ctrip
52 Ctrip Integration API Specification

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.

7.1 Request XML sample


<OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="201703292247"
TimeStamp="2017-03-29T22:47:58.1708455+08:00" Version="2.2" ReservationType="Hotel">
<POS>
<Source>
<RequestorID ID="Ctrip" Type="5" MessagePassword="123qaz">
<CompanyName Code="C" CodeContext="134" />
</RequestorID>
</Source>
</POS>
<ReadRequests>
<ReadRequest>
<UniqueID ID="34437045" Type="501" />
<UniqueID ID="170329224658137" Type="502" />
</ReadRequest>
<ReadRequest>
<UniqueID ID="2328961204" Type="501" />
<UniqueID ID="160516105943195" Type="502" />
</ReadRequest>
<ReadRequest>
<UniqueID ID="2328985402" Type="501" />
<UniqueID ID="160516112552157" Type="502" />
</ReadRequest>
</ReadRequests>
</OTA_ReadRQ>

7.2 Request node definition

Name Type/Comments Required

OTA_ReadRQ/ReadRequests /ReadRequest A list of reservation ID need be


Y
/UniqueID updated.

OTA_ReadRQ/ReadRequests /ReadRequest Please refer to the Unique ID Type


Y
/UniqueID/@Type (UIT) in the appendix.
53 Ctrip Integration API Specification

The type 501 and 502 are original


Ctrip order id and partner
confirmation returned in
OTA_HotelResRS before.

OTA_ReadRQ/ReadRequests /ReadRequest
Confirmation Number. Y
/UniqueID/@ID

7.3 Response XML sample


<OTA_ReadRS xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="201703292247"
TimeStamp="2017-03-29T22:48:00.3557048+08:00" Version="2.2">
<Success />
<HotelReservations>
<HotelReservation ResStatus="S">
<ResGlobalInfo>
<HotelReservationIDs>
<HotelReservationID ResID_Type="502" ResID_Value="170329224658137"/>
<HotelReservationID ResID_Type="501" ResID_Value="34437045"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
<HotelReservation ResStatus="C">
<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>

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>

7.4 Response node definition

Name Type/Comments Required

OTA_ReadRS/Success The update is successful. N


When Errors returned, No Success
OTA_ReadRS/Errors N
Node returned.
The Error Type, please refer to the
OTA_ReadRS/Errors/Error/@Type N
Appendix Error and Warning Type
Please refer to the Appendix Error
OTA_ReadRS/Errors/Error/@Code N
code supported by Ctrip
Possible values:
S – Successful
OTA_ReadRS/HotelReservations/HotelReservati
C – Cancelled Y
on/@ResStatus
R – Rejected or failed
P – Pending for confirmation

OTA_ReadRS/HotelReservations/HotelReservati
A list of reservation ID needs to be
on/ResGlobalInfo/HotelReservationIDs/HotelRese N
updated.
rvationID/

Please refer to the Unique ID Type


(UIT) in the appendix.
OTA_ReadRS/HotelReservations/HotelReservati
The type 501 and 502 are original
on/ResGlobalInfo/HotelReservationIDs/ N
Ctrip order id and partner
HotelReservationID/@ResID_Type
confirmation returned in
OTA_HotelResRS before.
55 Ctrip Integration API Specification

OTA_ReadRS/HotelReservations/HotelReservati
on/ResGlobalInfo/HotelReservationIDs/ Confirmation Number. N
HotelReservationID/@ResID_Value
56 Ctrip Integration API Specification

8 Push Availability, Inventory and Rate Adjust

The OTA_HotelAriAdjustRQ message is used to push the corresponding hotel code


and change date information to Ctrip System when the supplier’s availability or Rate
change. After Ctrip receives the message, it will take the initiative to get the latest
availability and Rate through the OTA_HotelAvailRQ message.As current Ctrip’s
solution, the success response will be returned immediately once Ctrip system
receives this request, but the actual availability and rate update are in an
asynchronous process.

8.1 Request XML sample


<OTA_HotelAriAdjustRQ Version="2.1" PrimaryLangID="en-us" TimeStamp="2001-12-17T09:30:47Z"
xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="CtripTest" MessagePassword="SamplePW" Type="1">
<CompanyName Code="C" CodeContext="3"></CompanyName>
</RequestorID>
</Source>
</POS>
<HotelAriAdjustRQMessages>
<HotelAriAdjustRQMessage>
<HotelDateSpanGroups>
<!-- Zero or more repetitions-- >
<HotelDateSpanGroup HotelCode="29087" HotelName=”Test hotel one”>
<!-- Zero or more repetitions-- >
<DateRanges End="2019-08-14" Start="2019-08-13" />
<DateRanges End="2019-08-15" Start="2019-08-14" />
</HotelDateSpanGroup>
<HotelDateSpanGroup HotelCode="29088" HotelName =”Test hotel two”>
<DateRanges End="2019-08-14" Start="2019-08-13" />
<DateRanges End="2019-08-15" Start="2019-08-14" />
</HotelDateSpanGroup>
</HotelDateSpanGroups>
</HotelAriAdjustRQMessage>
</HotelAriAdjustRQMessages>
</ OTA_HotelAriAdjustRQ >
57 Ctrip Integration API Specification

8.2 Request node definition

Require
Name Type/Comments
d

OTA_ HotelAriAdjustRQ/@version Current Ctrip API version Y

The language of the text in


OTA_ HotelAriAdjustRQ/@PrimaryLangID request. The default value is en- N
us.

OTA_ HotelAriAdjustRQ/@TimeStamp The timestamp of this request N

The hotel infomation that has


changed the availability or Rate.
The minimum number of this
node is 1 and the maximum is
unlimited,
HotelAriAdjustRQMessages/
However the maximum is
HotelAriAdjustRQMessage/ Y
combined with the acceptable
HotelDateSpanGroups/ HotelDateSpanGroup
QPS transfer value of you.
Because the more hotel code
and change date range you
transfer, the higher your QPS
requirements.
HotelAriAdjustRQMessages/
HotelAriAdjustRQMessage/ The hotel code that has changed
Y
HotelDateSpanGroups/ the availability or Rate
HotelDateSpanGroup/@ HotelCode

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

QPS transfer value of you.


Because the more hotel code
and change date range you
transfer, the higher your QPS
requirements.
HotelAriAdjustRQMessages/
HotelAriAdjustRQMessage/ The start date of the changed
Y
HotelDateSpanGroups/ HotelDateSpanGroup/ availability or Rate of the hotel.
DateRanges/@Start
The End date of the changed
availability or Rate of the hotel.
HotelAriAdjustRQMessages/ For Example, IF rate of the hotel
HotelAriAdjustRQMessage/ Code A changes on day 2019-
Y
HotelDateSpanGroups/ HotelDateSpanGroup/ 02-15. Then
DateRanges/@ End <DateRanges End="2019-02-16"
Start="2019-02-15" />

8.3 Response XML sample

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>

8.4 Response node definition

Name Type/Comments Required


OTA_ HotelAriAdjustRS/@version The current Ctrip API version Y
OTA_ The language of the text in response.
Y
HotelAriAdjustRS/@PrimaryLangID The default value is en-us.
OTA_ HotelAriAdjustRS/@TimeStamp The timestamp of this response Y
59 Ctrip Integration API Specification

Normally the value is Success. It just


tells that Ctrip System successfully
OTA_ HotelAriAdjustRS/Success receive this request, but may not N
begin processing it. Success and
Errors must return one.

A unique ID to identify the


OTA_ HotelAriAdjustRS /UniqueID/@ID Y
request,it’s a string

The request type, It is a static data,


OTA_ HotelAriAdjustRS
value is always 590. Y
/UniqueID/@Type

When Errors returned, No Success


OTA_ HotelAriAdjustRS/Errors Node returned. Success and Errors N
must return one.

OTA_ HotelAriAdjustRS/Errors/ The Error Type, please refer to the


N
Error/@Type Appendix Error and Warning Type

OTA_ HotelAriAdjustRS/Errors/
The error short description N
Error/@ShortText

Please refer to the Appendix Error


OTA_HotelResRS/Errors/Error/@Code N
code supported by Ctrip

9 Update reservation status

The OTA_HotelResStaUpdateRQ message is used to update reservation status


timely. Update reservation and Read reservation interfaces can be developed at
the same time. When partner develops [Read] interface, Ctrip will call your [Read]
interface for the status update every minute. If partner’s
System has the status in advance, partner can also use this [update] interface to
push the status first. In this way, Ctrip can get the latest status timely.

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

"Accept": default value “application/xml”.


"code": the “Group id” of supplier (provided by Ctrip).
"type": default value “0”.
"encrypt": encrypted public key.

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.

public static String genEncryptInfo(String publicKey, String account,String passWord)


{
String result="";
try {
//get utc time
String timeSpan = String.valueOf(DateTime.now(DateTimeZone.UTC).getMillis());
String text = String.format("%s:%s:%s", account, passWord, timeSpan);
byte[] encryptByte = Base64Utils.encode(encryptByPublicKey(text.getBytes(), publicKey));
result = new String(encryptByte);
}
catch (Exception ex)
{
//log exception
}

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

The encryption of .net environment is similar to java

9.1 Request XML sample


<OTA_HotelResStaUpdateRQ Version="2.5" EchoToken="201702211421"
<HotelReservations>
<HotelReservation ResStatus="S">
<HotelReservationIDs>
<!-- ResID_Value is Ctrip order id and mandatory to add in the response.-- >
<HotelReservationID ResID_Value="CTP-859623" >
<HotelReservationID ResID_Value="CTP-859624" >
</HotelReservationIDs>
</HotelReservation>
<HotelReservation ResStatus="R">
<HotelReservationIDs>
<!-- ResID_Value is Ctrip order id and mandatory to add in the response.-- >
<HotelReservationID ResID_Value="CTP-859625" >
<HotelReservationID ResID_Value="CTP-859626" >
</HotelReservationIDs>
</HotelReservation>
62 Ctrip Integration API Specification

</HotelReservations>
</OTA_ HotelResStaUpdateRQ>

9.2 Request node definition

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

9.3 Response XML sample

Use Case 1: Successful response


<OTA_HotelResStaUpdateRS Version="2.5" EchoToken="201703211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
</OTA_HotelResStaUpdateRS>

Use Case 2: Success with warning message


<OTA_ HotelResStaUpdateRS Version="2.1" EchoToken="201403121021"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Success/>
<Warnings>
<Warning type=“AlreadyConfirmed” > The reservation status has been confirmed already,please
check and stop update </Warning>
<HotelReservationIDs>
<!-- ResID_Value is Ctrip order id>
<HotelReservationID ResID_Value="CTP-859623">
<HotelReservationID ResID_Value="CTP-859624">
</HotelReservationIDs>
<Warning type=“Notfound”> Reservation IDs does not exist </Warning>
63 Ctrip Integration API Specification

<HotelReservationIDs>
<!-- ResID_Value is Ctrip order id>
<HotelReservationID ResID_Value="CTP-859623" >
<HotelReservationID ResID_Value="CTP-859624" >
</HotelReservationIDs>
</Warnings>
</OTA_ HotelResStaUpdateRS >

Use Case 3: Failure


<OTA_ HotelResStaUpdateRS Version="2.5" EchoToken="201703211421"
xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Errors Code = “exception occurred in processing Please push again” />
</OTA_HotelResStaUpdateRS>

9.4 Response node definition

Name Type/Comments Required


Possible values:
HotelReservations /
S – Successful Y
HotelReservations/@ ResStatus
R – Rejected or failed
HotelReservationIDs /
Ctrip order id Y
HotelReservationIDs/@ ResID_Value
64 Ctrip Integration API Specification

10 Appendix

10.1 Error and Warning Type

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.

14 MD 5 Check Failed MD5 string check fails in reservation


65 Ctrip Integration API Specification

10.2 Unique ID Type

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

10.3 Reservation Status

RVS
S Success/Committed
Reservation Status C Cancelled
P Processing
R Rejected/failed

10.4 Age Qualifying Code

AQC
3 Under 2
5 Under 17
Age Qualifying Code
7 Infant
8 Child
10 Adult
66 Ctrip Integration API Specification

10.5 Special Request Code

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

10.6 Card Type

CDT
1 Credit
Card Type
2 Debit
3 Central bill

10.7 Payment Card Code

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

10.8 Rate with digits

Value passed Value after processing


115 115
115.2 115.2
115.23 115.23
115.234 115.23
115.237 115.24
115.2345 Fail

10.9 Fee Tax Type


CODE LIST NAME CODE VALUE CODE NAME
Fee Tax Type FTT
1 Bed tax
2 City hotel fee
3 City tax
4 County tax
5 Energy tax
6 Federal tax
7 Food & beverage tax
8 Lodging tax
9 Maintenance fee
10 Occupancy tax
11 Package fee
12 Resort fee
13 Sales tax
14 Service charge
15 State tax
16 Surcharge
17 Total tax
18 Tourism tax
19 VAT/GST tax
20 Surplus Lines Tax
21 Insurance Premium Tax
22 Application Fee
23 Express Handling Fee
24 Exempt
25 Standard
26 Zero-rated
27 Miscellaneous
28 Room Tax
29 Early checkout fee
68 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

10.10 Charge Type

CODE LIST NAME CODE VALUE CODE NAME


Charge Type CHG
1 Daily
2 Hourly
3 Half day
4 Additions per stay
5 Per occurrence
6 Per event
7 Per person
8 First use
9 One time use
10 Per minute
11 Per function
12 Per stay
13 Complimentary
14 Other
15 Maximum charge
16 Over-minute charge
17 Weekly
18 Per room per stay
19 Per room per night
20 Per person per stay
21 Per person per night
22 Minimum charge
23 Per rental
24 Per item
25 Per room
26 Per reservation/booking
27 Per gallon
28 Per dozen
29 Per tray
30 Per order
31 Per unit
32 One way
33 Round trip
70 Ctrip Integration API Specification

10.11 Error/Warning Code supported by Ctrip

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

298 City in address is required


304 Invalid expiration format MMYY
306 Invalid association id or promo code
310 Required data missing: last name
311 Required data missing: first name
313 Required data missing: credit card type
314 Required data missing: country of residence
315 Required data missing: confirmation number
316 Required data missing: phone number
317 Invalid phone number
320 Invalid value
346 Closed to arrivals
352 Invalid credit card type
353 Departure date is past dated
361 Invalid hotel
362 Invalid number of nights
363 Invalid number of rooms
364 Error rate range
365 Error credit card
375 Hotel not active
377 Invalid - max number of nights exceeded
436 Rate does not exist
459 Invalid request code
497 Authorization error
110 Confirm the booking offline
498 The booking is processing
321 HotelCode is empty

10.12 Cancellation Policy Samples

Cancellation Policy XML Sample


Scenario
Free Cancellation <Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="0"
OffsetDropTime="BeforeArrival"/>
<AmountPercent Percent="0"/>
Non Refundable <Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="23899"
OffsetDropTime="BeforeArrival"/>
<AmountPercent Percent="100"/>
Non Refundable(use <Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="0"
afterbooking and offset is 0 OffsetDropTime="AfterBooking"/>
hour) <AmountPercent Percent="100"/>
Non Refundable(use a <Deadline AbsoluteDeadline=” AbsoluteDeadline="2017-04-
timestamp in the past) 24T18:00:00”
72 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

Cascading Cancellation Policies:


<CancelPenalties>
<CancelPenalty>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="96"
OffsetDropTime="BeforeArrival"/>
<AmountPercent Percent="50"/>
</CancelPenalty>
<CancelPenalty>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="48"
OffsetDropTime="BeforeArrival"/>
<AmountPercent Percent="80"/>
</CancelPenalty>
<CancelPenalty>
<Deadline OffsetTimeUnit="Hour" OffsetUnitMultiplier="24"
OffsetDropTime="BeforeArrival"/>
<AmountPercent Percent="100"/>
</CancelPenalty>
</CancelPenalties>

You might also like