取消订单

取消酒店预订单

请求方式#

POST

uri: /reservation/cancel

Content-Type: application/json


请求参数说明#

RequestHeader#

公共请求头[引用]

RequestBody#

参数类型是否必填最大长度示例描述
resIdStringY64华住订单号

响应参数说明#

公共响应参数[引用]

响应码-code[引用]

content#

参数类型是否必填最大长度示例描述
penaltyAmountBigDecimalN-取消罚金,财务对账的参考字段
penaltyCurrencyCodeStringN8取消罚金对应币种

响应码#

异常码异常类型说明
1000Success
5401Reservation cannot be cancelled订单不可取消
5402Reservation already cancelled预订已取消
5403Reservation not found未找到订单
5404Reservation not belong to requester订单与当前渠道不匹配
5405Reservation cannot be cancelled - service has started取消失败,订单已入住或离店
其他全局异常码全局异常[引用]

报文示例#

Case1: 正常取消#

请求示例#

{
"resId":"R200031####135470001"
}

响应成功示例#

{
"code":1000,
"content":{
"penaltyAmount": 100,
"penaltyCurrencyCode":"CNY"
}
}

响应失败示例#

{
"code":5402,
"message":"Reservation already cancelled"
}