选购测试请求
为帮助测试您的集成能否处理潜在的选购错误状态,针对所有 Rapid 选购 API 方法提供了多个测试请求。
测试选购重要说明
- 要针对 Rapid 选购 API 方法发送测试请求,请在预订申请中包含名为 Test 的其他 HTTP 标头,并使用下表中的相应值。
- 发送测试标头失败或发送无效的测试标头将导致实时处理选购。
- 使用测试标头将使静态“预设”消息作为响应返回。因此,返回的房价、内容等可能与正在测试的住宿无关。
选购
测试标头值 | 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 | 不适用 |
价格检查
测试标头值 | 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 |
押金政策
测试标头值 | 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 |
关于 HTTP 错误代码的更多信息,请参见常见错误响应。