# On-request Inventories

为了获取到Dida的非即时确认型资源,您需要对 API 进行额外的开发 -- 主要在三个接口上:价格查询,价格确认,订单查询

# 价格查询

  • 请求字段 - IsNeedOnRequest
    • true 接受非即时确认报价
    • false 不接受非即时确认报价

请求示例

{
	"Header": {
		"ClientID": "DidaApiTestID",
		"LicenseKey": "TestKey"
	},
	"HotelIDList": [542586],
	"CheckInDate": "2021-09-13",
	"CheckOutDate": "2021-09-14",
	"IsRealTime": {
		"Value": true,
		"RoomCount": 1
	},
	"RealTimeOccupancy": {
		"ChildCount": 0,
		"AdultCount": 2,
		"ChildAgeDetails": []
	},
	"Nationality": "CN",
	"Currency": "CNY",
	"IsNeedOnRequest": true
}


  • 返回字段 - IsOnRequest
    • true 此报价是非即时确认报价
    • false 此报价是立即确认报价

返回示例

{
	"Success": {
		"PriceDetails": {
			"CheckOutDate": "2021-09-14 00:00:00",
			"CheckInDate": "2021-09-13 00:00:00",
			"HotelList": [{
					"HotelID": 542586,
					"Destination": {
						"CityCode": "930"
					},
					"RatePlanList": [{
							"TotalPrice": 127.07,
							"RoomStatus": 1,
							"BreakfastType": 2,
							"BedType": 2,
							"RoomOccupancy": {
								"ChildCount": 0,
								"AdultCount": 2,
								"RoomNum": 1
							},
							"PriceList": [{
									"StayDate": "2021-09-13 00:00:00",
									"Price": 127.07,
									"MealAmount": 2,
									"MealType": 2
								}
							],
							"RatePlanCancellationPolicyList": [{
									"Amount": 127.07,
									"FromDate": "2021-09-11 00:00:00"
								}
							],
							"IsOnRequest": true,
							"StandardOccupancy": 2,
							"InventoryCount": 10,
							"MaxOccupancy": 2,
							"Currency": "CNY",
							"RatePlanName": "限时特惠",
							"RatePlanID": "-8930392398183591101"
						}
					],
					"HotelName": "Wan Li Duo Hotel (Mingshu)"
				}
			]
		}
	}
}

# 价格确认

  • 请求字段 - IsNeedOnRequest
    • 如果报价是非即时确认,必须要填true;
    • 如果报价是立即确认
      • 填true:允许下单转成非即时确认(供应商有一定概率会把立即确认报价转成非即时确认)
      • 填false:只接受立即确认下单,不接受转成非即时确认

请求示例

{
	"PreBook": true,
	"CheckInDate": "2021-09-13",
	"CheckOutDate": "2021-09-14",
	"NumOfRooms": 1,
	"HotelID": 542586,
	"Header": {
		"LicenseKey": "TestKey",
		"ClientID": "DidaApiTestID"
	},
	"OccupancyDetails": [{
			"ChildCount": 0,
			"AdultCount": 2,
			"RoomNum": 1
		}
	],
	"Currency": "CNY",
	"Nationality": "CN",
	"RatePlanID": "-8930392398183591101",
	"IsNeedOnRequest": true
}


  • 返回字段 - IsOnRequest
    • true 此报价是非即时确认报价
    • false 此报价是立即确认报价

返回示例

{
	"Success": {
		"PriceDetails": {
			"CheckOutDate": "2021-09-14 00:00:00",
			"CheckInDate": "2021-09-13 00:00:00",
			"HotelList": [{
					"HotelID": 542586,
					"Destination": {
						"CityCode": "930"
					},
					"RatePlanList": [{
							"TotalPrice": 127.07,
							"RoomStatus": 1,
							"BreakfastType": 2,
							"BedType": 2,
							"RoomOccupancy": {
								"ChildCount": 0,
								"AdultCount": 2,
								"RoomNum": 0
							},
							"PriceList": [{
									"StayDate": "2021-09-13 00:00:00",
									"Price": 127.07,
									"MealAmount": 2,
									"MealType": 2
								}
							],
							"RatePlanCancellationPolicyList": [{
									"Amount": 127.07,
									"FromDate": "2021-09-11 00:00:00"
								}
							],
							"IsOnRequest": true,
							"StandardOccupancy": 2,
							"InventoryCount": 10,
							"MaxOccupancy": 2,
							"Currency": "CNY",
							"RatePlanName": "限时特惠",
							"RatePlanID": "-8930392398183591101"
						}
					],
					"HotelName": "Wan Li Duo Hotel (Mingshu)"
				}
			]
		}
	}
}

# 订单查询

  • 返回字段 - Status, 新增状态枚举【6】

  • 关于已调用下单接口但未确认订单前的状态说明

    • 【5】代表立即确认的等待(Pending)
    • 【6】代表非即时确认的等待(OnRequest)

# 下单过程中取消

  • 非即时确认: 非即时确认订单,在订单未确认前,可以主动取消,取消流程跟以往一样,先调用预取消接口,再调用取消确认接口

  • 立即确认: 不支持下单过程中取消