用户取消预约

更新时间 2024-07-24 02:58:49
收藏
我的收藏
开发者可用该接口替用户发起取消预约。开平会根据下单时指定的取消政策决定是否允许取消。​

使用限制​

无​

接口说明​

基本信息​

名称​
描述​
HTTP URL​
HTTP Method​
POST​
Scope​
industry_open.trade.book​
权限要求​
无需用户授权​

请求头​

参考通用参数

请求参数​

名称​
类型​
必填​
描述​
book_id​
string​
是​
预约单id,len(book_id) <= 64 byte​
open_id​
string​
是​
用户OpenID​
cancel_reason​
list<string>​
是​
取消原因​

请求示例​

text
复制
curl --location --request POST 'https://open.douyin.com/api/apps/trade/v2/user_cancel_book' \
--header 'Content-Type: application/json' \
--header 'access_token: xxxxxxxxxxxxxxx'
--data-raw='{
"book_id" : "mock_book_id",
"open_id" : "xxxxxxxxxx",
"cancel_reason" : [
"xxxxxx",
"xxxxxx"
]
}'

响应参数​

名称​
类型​
是否必填​
描述​
extra
object
额外信息

extra 信息​

名称
类型
是否必填
描述
示例值
error_code​
int​
是​
错误码,0为成功​
0​
description​
string​
是​
错误码描述​
success​
sub_error_code​
int​
是​
子错误码​
0​
sub_description​
string​
是​
子错误码描述​
success​
logid​
string​
是​
请求id​
2022092115392201020812109511046​
now​
int​
是​
毫秒级时间戳​
1663745962686​

响应示例​

正常示例​

text
复制
"extra": {
"sub_error_code": 0,
"sub_description": "success",
"logid": "2022092115392201020812109511046",
"now": 1663745962686,
"error_code": 0,
"description": "success"
}

错误码​

详情参见错误码/返回码 。​