API Lists
City List
Hotel List
Details of static information
Quotation interface
Price change increment interface
Order quotation interface
Create Order
Cancel Order
Query order

Create Order

request method: http, return json format.
Order 30 seconds is regarded as timeout.
For an order that requests multiple days, if the cancellation rules are different every day, the most stringent day shall prevail.

Interface address

Name Request format test address
Create Order POST http://58.250.56.5:8158/api/order/createOrder.json?reqData=xxx

System input parameters

Name code type samole description
Customer ID appKey String SZ28276 JL provide
Number of rooms roomNum Integer 2 Several RoomGroup correspond to several rooms
time stamp timestamp String 1516816895000 Unix timestamp
digital signature sign String 063cae11a00896187f80eecbf922364a Signature method: md5 (md5 (secretKey+appKey)+timestamp) md5 uses 32-bit lowercase.
version version String 3.0.1 Version information, please refer to version description

System output parameters

Name code type samole description
result code code Integer 0 0 indicates that the request is successful; non-0 indicates that there is a business exception.
Results description errorMsg String misdescription
version version String 3.0.1
Result object result String Different requests are different objects, and incorrect requests generally return empty
Response code respId String The only code of a single response. Please provide the code for troubleshooting business problems

input parameter

Name code type Whether it is mandatory samole description
Customer order number customerOrderCode String yes none
Hotel No hotelId Integer yes none
Product No keyId String yes none
Check in date checkInDate String yes yyyy-MM-dd
Check out date checkOutDate String yes yyyy-MM-dd
Daily price nightlyPrices String yes 200.58|120.6|120.8
Total amount totalPrice Double yes
Room information roomGroups RoomGroup[] yes none The common setting is one room for two adults, and several RoomGroup correspond to several rooms
Remarks to the hotel hotelRemark String no
Cell Phone contactPhone String no 13800138000 Contact mobile phone.

RoomGroup

The object includes room occupancy information.

attribute

Name code type Whether it is mandatory samole description
Name of occupant checkInPersions CheckInPersion[] yes
Number of adults adults Integer yes Default: occupant name object size
Number of children children Integer no
Age of children childAges String no Child age (multiple times are divided by |). The number of ages should be consistent with the number of children

CheckInPersion

The object includes the name of the room.

attribute

Name code type Whether it is mandatory samole description
Last name of the occupant lastName String yes Cannot contain special characters
Name of occupant firstName String yes Cannot contain special characters
Document type cardtype String no IDC Provide one of the following information
① ID card: IDC;②. Passport: PSP;③. Taiwan ID card: TWC;④. Mainland residents' travel permit to Taiwan: CTT;⑤. Hong Kong and Macao Pass: CTH
ID code customerIDCard String no 400400190001014004 ID card information of the occupant
nationality nationality String no CHN Three letter reference http://doc.chacuo.net/iso-3166-1 (The fields are not required to be transferred, but there may be a risk that the guests will not be able to stay due to nationality problems if they do not transfer them to Hong Kong, Macao and overseas hotels)

sample

            	{"head":{"appKey":"SZ28276","timestamp":"1516816895000","sign":"063cae11a00896187f80eecbf922364a","version":"3.0.1"},"data":{"customerOrderCode":"R15644321358","hotelId":171870,"keyId":"SGS8GA#4A2SG#S2F262#S2F244#A||13#1318581569168081061#||EQW7PWEPEW","checkInDate":"2017-12-21","checkOutDate":"2017-12-23","nightlyPrices":"601|601","roomGroups":[{"adults":2,"checkInPersions":[{"lastName":"姓名","firstName":"test"}]}],"hotelRemark":"酒店备注","totalPrice":1202.0}}
            	

Return parameters

Name code type samole description
Order No orderCode String JLA20118010978888
Order Status orderStatus Integer none 1: To be confirmed, 2: Confirmed, 3: Rejected, 4: Cancelled, 5: Checked in

Return example

Return example
            	{"code":0,"errorMsg":"","result":{"createOrder":{"orderCode":"JLA20118010955385","orderStatus":2}},"respId":"27c8689c-8fa1-4999-8e00-f6847df96ed1"}