文档中心 > International Hotel

Book an Order

更新时间:2025/01/02 访问次数:11893

Scenario

A customer submits check-in information on Fliggy which will trigger booking an order to external vendor’s system.

Requirements

  1. Carry out idempotence according to the order No. of Fliggy which means that the same result is returned even the interface is called several times for the same order request and no repeated booking is made in CRS.
  2. It is not required that the booking result will be immediately returned. Asynchronous processing will be realized after successful feedback receiving.
  3. The processing capacity should be reasonably evaluated and disclosed. Fliggy will launch flow according to performance requirements.
    The third-party system implements the trial order method according to the definition of the interface and shifts it into service. The Fliggy system will create an order by calling the third party booking request service when the user places an order.

Method to receive the interface called by Fliggy

  1. The third party provides a service address for receiving request from Fliggy (notes: all interface requests share the same address) and the user name and password for the purpose of validation.
  2. Kindly to distinguish different request types through root element of xml request structure, and handle request/response according to criteria belowed.

Request URL

POST https://{vendor's host}/createOrder

Request parameters

O: Optional; R: Required; SR: Special Required

Name Type O/R/SR Limitation Example Description
TaoBaoOrderId long R   tabao order id. The third party should decide if the order has existed according to the id so as to avoid idempotence and repeated order placing. 1387784033263
specialRequest string R   Two Single Beds/One Double Bed/No Preference/No Smoking Room/Smoking Room/Quiet Room/Good View/No Preference When placing an order, users can choose according to their Bed Type Preference and Special Request
TaoBaoHotelId long R   taobao hotel id 123456789
HotelCode String R Max length:64 OTA hotel id or hotel id in third-party system 80
TaoBaoRoomTypeId long R   taobao room type id 123456978
RoomTypeCode String R Max length:64 OTA room type id or room type id in third party system 1205
RateCode String R 64 OTA rate plan id or rate plan id in third party system VIP
RateKey String R   The rate key of this room, this is returned by RoomAvailabilityResponse  
RateCategory String O   1.instant reservation pre-sell voucher  
CheckIn String R format:yyyy-MM-dd Check-in date 2013-12-24
CheckOut String R format:yyyy-MM-dd Check-out date 2013-12-26
TotalPrice Decimal R   Total price of order(TotalPrice contains sellers discount amount). 638.50
PaidPrice Decimal O   Paid price of order. 638.50
CurrencyCode String R   The currency code for the price. CNY
ContactSurname String O Max length: 32 Contact surname Gong
ContactName String O Max length: 32 Contact name Tai
ContactPhone String O Max length: 32 Contact telephone 138000000
ContactEmail String O Max length: 255 Contact email 123@taobao.com
Memo String O   The requirement from customers who book this order We will arrive late
PaxNameRooms   R   Contain a list of the occupancy, the length of list is equal to the room number  
PaxNameRooms.PaxNameRoom   R   The occupancy details  

PaxNameRoom.RoomIndex

int

R

Range: 1-5

The room index of occupancy, begins with 1

1

PaxNameRoom.Adults

int

R

Range: 1-5

The number of adults

2

PaxNameRoom.Children

int

R

Range: 1-3

The number of children

2

PaxNameRoom.ChildrenAges

 

R

 

Contain a list of children ages, the size is equal to the number of children

 

PaxNameRoom.ChildrenAges.age

int

R

Range: 1-17

The age of children

2

PaxNameRoom.PaxNames

 

R

 

Contain a list of names

 

PaxNameRoom.PaxName

 

R

 

The name details of occupancy.

 

PaxNameRoom.PaxName.Surname

String

R

 

Surname

Li

PaxNameRoom.PaxName.Name

String

R

  name Yang

PaxNameRoom.PaxName.Type

String

R

  Customer type, adult or children Adults

PaxNameRoom.PaxName. SalesCountry

String

R

 

This RP is only available to users in the market 「SalesCountry」 The input parameter must be unique.

CN

PaxNameRoom.PaxName. UserCountry

String

R

 

This RP is only available to users with nationality 「UserCountry」 The input parameter must be unique.

CN

 

 

XML example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CreateOrderRequest>
	<AuthenticationToken>
		<Username>taobao</Username>
		<RequestTimestamp>1499927639</RequestTimestamp>
		<Signature>8a52844e60f67107492d61453976c4c18a4db44e35d4ae9175359515ad0183e4</Signature>
	</AuthenticationToken>
	<CheckIn>2017-08-06</CheckIn>
	<CheckOut>2017-08-07</CheckOut>
	<RateKey>W</RateKey>
	<RateCode>20170807</RateCode>
	<RateCategory>1</RateCategory>
	<RoomTypeCode>20170806</RoomTypeCode>
	<HotelCode>sell</HotelCode>
	<PaymentType>1</PaymentType>
	<PaxNameRooms>
		<PaxNameRoom>
			<RoomIndex>1</RoomIndex>
			<Adults>2</Adults>
			<Children>0</Children>
			<PaxNames>
				<PaxName>
					<Surname>YE</Surname>
					<Name>ZHENMIING</Name>
					<Type>Adults</Type>
                                        <SalesCountry>CN</SalesCountry>
                                        <UserCountry>CN</UserCountry>
				</PaxName>
				<PaxName>
					<Surname>FU</Surname>
					<Name>GUIJIN</Name>
					<Type>Adults</Type>
                                        <SalesCountry>CN</SalesCountry>
                                        <UserCountry>CN</UserCountry>
				</PaxName>
			</PaxNames>
		</PaxNameRoom>
	</PaxNameRooms>
	<TaoBaoHotelId>15240016320</TaoBaoHotelId>
	<TaoBaoRoomTypeId>38661148784</TaoBaoRoomTypeId>
	<TaoBaoOrderId>26521149070581666</TaoBaoOrderId>
	<specialRequest>Two Single Beds</specialRequest>
        <CurrencyCode>USD</CurrencyCode>
	<TotalPrice>77.21</TotalPrice>
        <PaidPrice>77.21</PaidPrice>
	<ContactSurname>YE</ContactSurname>
	<ContactName>ZHENMIING</ContactName>
	<ContactEmail>957218821@qq.com</ContactEmail>
	<ContactPhone>15324233331</ContactPhone>
</CreateOrderRequest>

Return result

Name Type O/R/SR Limitation Description Example
TaoBaoOrderId long R   Tao bao order id  

XML example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CreateOrderResponse>
	<ResponseTimestamp>32423532523</ResponseTimestamp>
	<TaoBaoOrderId>3236564218054628</TaoBaoOrderId>
</CreateOrderResponse>

FAQ

关于此文档暂时还没有FAQ
返回
顶部