Quotation interface
Request method: http,Returns the json format.
Interface address
Name | Request format | test address |
---|---|---|
Quotation interface | GET | http://58.250.56.5:8158/api/hotel/queryRatePlan.json?reqData=xxx |
System input parameters
Name | code | type | samole | description |
---|---|---|---|---|
Customer ID | appKey | String | SZ28276 | JL provide |
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 means the request is successful; Non 0 indicates that there is a business exception. |
Results description | errorMsg | String | Error description | |
version | version | String | 3.0.1 | |
Result object | result | String | Different requests are different objects, and wrong requests are generally returned as null | |
Response code | respId | String | The unique code of a single response. Please provide the code for troubleshooting business problems |
Quotation Query: enter parameters
Name | code | type | Whether it is mandatory | samole | description |
---|---|---|---|---|---|
Hotel No | hotelId | Integer | yes | none | |
Check in date | checkInDate | String | yes | yyyy-MM-dd | |
Departure date | checkOutDate | String | yes | yyyy-MM-dd The maximum entry and departure date cannot exceed 90 days | |
Room information | roomGroups | RoomGroup[] | no | 2成人 | The common setting is one room and two adults |
Skip subscription rule verification | isSkipCheckCondition | Boolean | no | true | It is very important. By default, true skips the verification of reservation rules, and false does not. Customers need to parse the reservation rules themselves when they get them. |
RoomGroup
The object includes room occupancy information.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Number of adults | adults | Integer | Default 2 | |
Number of children | children | Integer | ||
Age of children | childAges | String | Age of children (comma for multiple). The number of ages should be consistent with the number of children |
sample
{"head":{"appKey":"SZ28276","timestamp":"1516816895000","sign":"063cae11a00896187f80eecbf922364a","version":"3.0.1"},"data":{"hotelId":1,"checkInDate":"2018-01-10","checkOutDate":"2018-01-20"}}
Return parameters
Name | code | type | samole | description |
---|---|---|---|---|
Hotel product array | hotelRatePlanList | HotelRatePlan[] | none | hotelRatePlanList See the following table for definitions |
HotelRatePlan
Hotel quotation objects include quotation and term information.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Hotel No | hotelId | Integer | none | |
Room type array | rooms | Room[] | none | rooms See the following table for definitions |
Subscription Terms Array | bookingRules | BookingRule[] | none | bookingRules See the following table for definitions |
Cancel clause array | refundRules | RefundRule[] | none | refundRules See the following table for definitions |
Room
The object includes the product list information of the house type.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Room type No | roomTypeId | String | none | none |
Product array | ratePlans | RatePlan[] | none |
RatePlan
RatePlan The object includes product information.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Product No | keyId | String | none | Unique product number |
Supplier ID | supplierId | Integer | none | Differentiate prices |
Real name information identifier | idcardflag | Integer | -1 | Represent whether the hotel needs to upload the ID card information when placing an order. 1.The default value is -1, that is, there is no need to upload ID card information; 2.If it is 0, the identity and phone information of the check-in person will be verified when the order is created. |
House type name | keyName | String | 标准房 | |
Bed type name | bedName | String | 大床 | |
Maximum occupancy | maxOccupancy | Integer | 2 | Maximum occupancy |
currency | currency | String | CNY | |
Price type number | rateTypeId | String | none | |
Payment Type | paymentType | Integer | none | 0预付 |
breakfast | breakfast | Integer | none | 0: No breakfast, 1: One copy, 2: Two copies 99: bed early, -1: breakfast included (the number of breakfast is uncertain) |
Night price array | nightlyRates | NightlyRate[] | none | |
Subscription term number | bookingRuleId | String | none | |
Cancellation clause No | refundRuleId | String | none | If it is blank, it is 1 by default and cannot be returned. |
Applicable market | market | String | CHN,HKG| | Applicable market, applicable market | Not applicable market, not applicable market -1 before or after the delimiter indicates no restriction |
Prohibited sales channels | banota | string | 0 | The default value of -1 means no ban, 0 for all, 1 for Ctrip, 2 for Yilong, 3 for Meituan, 4 for Feizhu, 5 for where |
Gift package information | promotions | Promotion[] | none |
NightlyRate
NightlyRate Objects include room price, room status, and inventory information.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Quota Type | formulaTypen | String | For example: quota room, private room, etc., the meaning of the code corresponding to the field is only meaningful for Shenzhen Jetty Travel | |
date | date | String | none | yyyy-MM-dd |
price | cose | Double | none | |
Atrial state | status | Integer | none | 1: Reserved room, 2: To be checked, 3: Full room, 4: Time limited confirmation |
inventory | currentAlloment | Integer | none | Inventory quantity |
breakfast | breakfast | Integer | none | Here is the calendar breakfast, which needs to be obtained first. If there is no node, the breakfast of the next level node will be obtained |
Invoicing | ifInvoice | Integer | none | 1: Invoicable 2: Non invoicable |
Subscription term number | bookingRuleId | String | none | Priority access, no node or no terms will lead to the next level of node terms |
Cancellation clause No | refundRuleId | String | none | Priority access, no node or no terms will lead to the next level of node terms |
BookingRule
The object includes subscription term information.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Subscription term number | bookingRuleId | String | none | |
Start Date | startDate | String | none | Quotation effective time yyyy MM dd HH: mm: ss is empty, indicating no limit |
End Date | endDate | String | none | Quotation end time yyyy MM dd HH: mm: ss is empty, indicating no limit |
Minimum number of reservations | minAmount | Integer | 1 | Minimum number of rooms reserved |
Maximum number of bookings | maxAmount | Integer | 7 | Maximum number of rooms reserved |
Minimum stay days | minDays | Integer | 1 | Minimum stay days |
Maximum stay days | maxDays | Integer | 30 | Maximum stay days |
Minimum advance booking time | minAdvHours | Integer | 0 | Minimum advance booking time (calculated at 23:59:59 of the check-in date selected by the user) |
Maximum advance booking time | maxAdvHours | Integer | -1 | The maximum advance booking time (calculated at 23:59:59 of the check-in date selected by the user) -1 means unlimited |
Valid week | weekSet | String | 1,2,3,4,5,6,7 | Valid week. 7 stands for Sunday, 1 stands for Monday, and so on. Orders cannot be placed if the day is not within the week |
Daily sales start time | startTime | String | HH:mm | Sales starting hours, default value: 00:00 |
End of day sales time | endTime | String | HH:mm | The sales end hour, the default value is 30:00, which means that reservations can be made before 6:00 am the next day |
Subscription description | bookingNotices | String | none | There is no strong verification for the preset description. Please pay attention to reasonable use. |
RefundRule
The object includes cancellation term information. If it is blank, it is 1 by default and cannot be returned.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Cancellation clause No | refundRuleId | String | none | |
Cancellation clause rule | refundRuleType | Integer | none | When the returned data is empty, it cannot be cancelled by default; 1: Non refundable, 2: Cancellation within time limit |
30 minute free cancellation is supported | thirtyMinFreeCancelPolicy | boolean | none | Whether it supports free cancellation 30 minutes after confirmation. True indicates support, and False indicates no support (if not filled in, 30 minute free cancellation is not supported by default) |
N hours before check-in | refundRuleHours | Integer | none | 30 |
Cancellation of guest fines | deductType | Integer | none | 1 deduction of the full amount, 0 deduction of the first night's room fee |
Promotion
The object includes gift package information.
attribute
Name | code | type | samole | description |
---|---|---|---|---|
Promotion name | marketingName | String | none | |
Gift package start time | startDate | String | yyyy-MM-dd | Effective at store time |
End time of gift package | endDate | String | yyyy-MM-dd | |
Gift package description | description | String | none | Gift package description |
Gift Bag Value | marketingPrice | Double | none | |
bucket type | timeLimitType | Integer | none | 0: Reservation limit 1: Check in limit 2: Time limit |
Week validity | weekEffectiveDate | String | 1,2,3,4,5,6,7 | |
Promotion method | promotionMethod | Integer | none | 0: once per room 1: daily per room 2: others |
Promotion type | promotionType | Integer | none | 1: Including gift package 2: delayed check-out 3: including catering 4: including tourist tickets 5: including discounts/vouchers 6: including transportation 7: others |
Return example
{"code":0,"errorMsg":"","result":{"hotelRatePlanList":[{"hotelId":1,"rooms":[{"roomTypeId":"17","ratePlans":[{"keyId":"S#S#SG#2SF6#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"2156","paymentType":0,"breakfast":2,"bookingRuleId":"","refundRuleId":"1","nightlyRates":[{"date":"2018-01-10","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":250,"status":0,"currentAlloment":2}]},{"keyId":"S#S#SG#S#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"1","paymentType":0,"breakfast":0,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-10","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-10","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-10","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-11","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-11","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-12","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-12","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-13","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-13","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-14","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-14","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-15","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-15","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-16","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-16","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-17","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":160,"status":0,"currentAlloment":0},{"date":"2018-01-17","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":160,"status":0,"currentAlloment":0},{"date":"2018-01-18","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":160,"status":0,"currentAlloment":0},{"date":"2018-01-19","cose":250,"status":0,"currentAlloment":2}]},{"keyId":"S#D9D#SG#S#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"1","paymentType":0,"breakfast":0,"bookingRuleId":"##W#7#W#9Q#Q#PW#WOEORO4O5OTO7","refundRuleId":"1","nightlyRates":[{"date":"2018-01-10","cose":200,"status":0,"currentAlloment":10},{"date":"2018-01-11","cose":200,"status":0,"currentAlloment":10},{"date":"2018-01-12","cose":200,"status":0,"currentAlloment":10},{"date":"2018-01-13","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-14","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-15","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-16","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-17","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-18","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-19","cose":100,"status":0,"currentAlloment":10}]},{"keyId":"S#S#SG#4#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"4","paymentType":0,"breakfast":99,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":260,"status":0,"currentAlloment":2}]}]},{"roomTypeId":"22","ratePlans":[{"keyId":"S#S#22#4#A","keyName":"标准房(大床)(大床)","bedName":"大床","currency":"CNY","rateTypeId":"4","paymentType":0,"breakfast":99,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-11","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-12","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-13","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-14","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-15","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-16","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-17","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-18","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-19","cose":277,"status":0,"currentAlloment":3}]},{"keyId":"S#S#22#S#A","keyName":"标准房(大床)(大床)","bedName":"大床","currency":"CNY","rateTypeId":"1","paymentType":0,"breakfast":0,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-11","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-12","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-13","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-14","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-15","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-16","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-17","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-18","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-19","cose":281,"status":0,"currentAlloment":3}]}]}],"bookingRules":[{"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","minAmount":1,"maxAmount":7,"minDays":1,"maxDays":90,"minAdvHours":34,"maxAdvHours":-1,"weekSet":"1,2,3,4,5,6,7","bookingNotices":""},{"bookingRuleId":"##W#7#W#9Q#Q#PW#WOEORO4O5OTO7","minAmount":1,"maxAmount":7,"minDays":1,"maxDays":90,"minAdvHours":0,"maxAdvHours":-1,"weekSet":"1,2,3,4,5,6,7","bookingNotices":""}],"refundRules":[{"refundRuleId":"1","refundRuleType":1},{"refundRuleId":"2350","refundRuleType":2,"refundRuleHours":35,"deductType":0}]}]},"respId":"c98d5fb5-6295-4c32-b87b-85e27d4e0618"}