取消订单
POST https://{handle}.myshopline.com/admin/openapi/v20260901/orders/:id/cancel.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。取消订单
路径参数
- id string required订单号例子:
"21050342939778451436179579"
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。例子:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
- amount double金额例子:
100 - cancel_reason string取消原因例子:
" don ' t want to buy " - currency string币种例子:
"CNY" - email boolean是否发送邮件例子:
true - processed_at string取消订单实际发生时间例子:
2023-04-12T22:59:52+08:00 - refund_type string退款类型:
OriginalPayment Refund:原路退款Manual:手动标记退款
当支付渠道为Paypal,不传时默认值为:OriginalPayment Refund。其他支付渠道默认值:Manual。 - restock boolean库存是否回退 ture:库存回退 false和空字段为不回退库存例子:
true
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
orderobject
订单信息,字段描述、示例请参考订单列表响应结果app_id string应用方idbilling_addressobject
账单地址信息address1 string详细地址1例子:address1address2 string详细地址2,备选例子:address2city string城市例子:New Yorkcompany string公司名称例子:New companycountry string国家例子:UScountry_code string国家码例子:USfirst_name string姓例子:Tomlast_name string名例子:Washingtonname string全名例子:Tom Washingtonphone string电话例子:12756431298province string省份例子:Californiaprovince_code string省份码例子:4200006standard_province_code string账单地址中省份的编码,该编码为二位的 ISO 3166-2 国际编码,区别于province_code返参为自定义编码。zip string邮编例子:51234browser_ip string客户端ip例子:157.119.232.35cancel_reason string卖家取消原因例子:" don ' t want to buy "cancelled_at string订单取消时间(结束)(格式见IOS8601),2012-05-01T14:22:25-04:00例子:2012-05-01T14:22:25-04:00cart_token string购物车token例子:c2c4a58186b9d96395d7e6b5c2969577checkout_id string弃单id例子:2404785166526352972864checkout_token string结算页token例子:2404785166526352972864client_detailsobject
客户端详细信息browser_ip string详细地址1例子:157.119.232.35session_hash stringsessionId例子:90c6724a-cf0d-4517-bd61-5c2727c2f886user_agent string客户端代理例子:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Sacompanyobject
公司信息id stringid例子:1005619945158043247856location_id string地点id例子:3005619945158043247856tax_registration_id string税号信息