## 取消訂單
**說明**:所有取消訂單均 ***需要我方后臺審核***。我方審核通過后,會對審核過且集成取消訂單通知接口的合作方進行訂單取消通知。
退款邏輯說明:
程序申請退款,首先會進行退款有效性校驗。即客戶是否可退款,可退款數量等。
1. 如果申請退款數量超出可退看數量,那么程序會返回退款失敗并返回可退款數量。合作方請及時更新可退款數量。避免超出數量的退款提交。
2. 如果訂單已申請退款、已退款成功再次申請、已消費完成等。這時候會返回退款失敗并返回我方訂單狀態給合作方。便于合作方及時更新訂單信息。
3. 未通過審核或審核成功后暫未成功對接的合作方。可通過訂單查詢接口。來進行訂單狀態更新。
4. **對于合作方網站的過期退款操作**,最遲在產品驗票結束時間后 **5天** 內提交退款請求,由聯合客服進行審核處理,超時未處理的均為不能退款訂單,請合作方進行排查是否退款請求不合適。
+++
post:/openapi/index.php?method=cancelOrder
*int:partnerId#聯合分配的合作方ID。
*json:body#提交內容json格式數據,參考提交數據demo
<<<
提交數據demo
{
"partnerId": 1985,
"body": {
"orderId": "string",
"LHOrderId": "string",
"sellPrice": 5,
"quantity": 3,
}
}
body字段介紹(*號為必填項)
*string: orderId # 訂單id unique
*string: LHOrderId # 聯合票務訂單ID unique
string: refundId # 退款流水號,如果沒有,自動使用訂單號。
*int: quantity # 訂單數量 integer (int32)
<<<
success
{
"code":10000,
"describe":"執行成功",
"partnerId":3528,
"body":{
"LHOrderId":"15354",
"orderStatus":6,
"reQuantity":3
}
}
<<<
error
{
"code":20000,
"describe":"執行失敗",
"partnerId":3528,
"body":{
"LHOrderId":"15354",
"orderStatus":7,
"reQuantity":0,
"reStatus":2
}
}
<<<
返回參數說明:
開頭為 '*' 表示必填項
*int: code # 交互碼 取值請參考交互碼類型映射表
*string: describe # 交互描述
*int: partnerId # 合作方ID
*json: body # 返回body內容,字段說明如下↓
返回body內容說明
*string: LHOrderId # 聯合訂單ID
*int: orderStatus # 訂單狀態,取值請參考 開發必讀》訂單返回狀態說明
*int: reQuantity # 可退款數量
int: reStatus # 失敗時返回我方訂單狀態,取值請參考 開發必讀》退款狀態詳細說明
+++