选购测试请求
测试您对可能出现的购物错误情况的处理能力。
重要说明
- 要发送 Rapid Shopping API 方法的测试请求,请在预订请求中包含名为 test 的附加 HTTP 标头,并使用下表中的相应值。
- 发送测试标头失败或发送无效的测试标头将导致实时处理选购。
- 使用测试标头会返回静态的“预设”响应。因此,返回的房价、内容等可能与正在测试的住宿无关。
- 使用测试标头从 Shop 请求返回的价格检查令牌或链接不应在存根价格检查请求中重复使用。尝试重复使用该令牌或链接可能会导致 400 错误
invalid_input。 - 对于使用测试标头的快速价格检查,请求格式应为:
/properties/{property_id}/rooms/{room_id}/rates/{rate_id} - 当包含有效的测试标头值时,
property_id、room_id和rate_id不需要来自之前的 Shop 响应。可以使用任何数值来返回预设的价格查询响应。
选购
| 测试标头值 | HTTP 代码和响应 | 状态 |
|---|---|---|
standard | 200 - Standard response | available |
no_availability | 200 - Standard response | sold_out |
unknown_internal_error | 500 - Internal error | 不适用 |
service_unavailable | 503 - Service unavailable error | 不适用 |
marketing_fee_details | 200 - Standard response | available |
价格检查
| 测试标头值 | HTTP 代码和响应 | 状态 |
|---|---|---|
available | 200 - Standard response | available |
price_changed | 200 - Standard response | price_changed |
sold_out | 200 - Standard response | sold_out |
unknown_internal_error | 500 - Internal error | NA |
service_unavailable | 503 - Service unavailable error | NA |
marketing_fee_details | 200 - Standard response | available |
押金政策
| 测试标头值 | HTTP 代码和响应 |
|---|---|
all | 200 - Standard response with all options |
night | 200 - Standard night-based deposit response |
amount | 200 - Standard amount-based deposit response |
percent | 200 - Standard percentage-based deposit response |
remainder | 200 - Standard remainder-based deposit response |
unknown_internal_error | 500 - Internal error |
service_unavailable | 503 - Service unavailable error |