取消订单
POST https://{handle}.myshopline.com/admin/openapi/v20270301/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 eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA
请求体
- 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 - amount double金额例子:
100 - cancel_reason string取消原因例子:
" don ' t want to buy " - currency string币种例子:
"CNY"
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
orderobject
订单信息,字段描述、示例请参考订单列表响应结果current_subtotal_price_setobject
当前商品总和多币种信息, 买卖家币种和金额一致presentment_moneyobject
买家侧币种amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额amount string金额,精度2例子:8.00currency_code string币种code例子:USDcurrent_total_discounts_setobject
presentment_moneyobject
买家侧金额amount string金额例子:8.00currency_code string币种信息例子:USDshop_moneyobject
卖家侧金额amount string金额例子:8.00currency_code string币种例子:USDfinancial_status string支付状态,unpaid,authorized, pending,partially_paid,paid,partially_refunded,refunded例子:"paid"total_tip_received_setobject
小费,多币种信息presentment_moneyobject
买家侧币种信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种信息amount string金额例子:8.00currency_code string币种例子:USDcurrent_total_price string订单总额,以店铺币种金额展示。例子:8.00current_total_tax_setobject
税费总和多币种信息, 买卖家币种和金额一致presentment_moneyobject
买家侧币种amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种amount string金额例子:8.00currency_code string币种例子:USDdiscount_codesobject[]
优惠码信息code string优惠码例子:1Q3UMQM8RBP5type string优惠类型,减金额;打折;免运费;固定售价;最低价商品免费;打包价;第N件打折;例子:Reduction amountamount string优惠金额,精度2例子:8.00amount_setobject
优惠金额,多币种信息presentment_moneyobject
买家侧币种amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种amount string金额例子:8.00currency_code string币种例子:USDpayment_detailsobject[]
支付单信息order_seq string订单号例子:23057287797738260472676128pay_amount double支付金额例子:8.23pay_status string支付单状态, unpaid-未支付;pending-支付中;risking-风控中;paid-已支付;paid_overtime-支付失败;paid_failed-支付失败;例子:unpaidstatus_msg string支付单状态码描述例子:PENDING_REVIEWcreate_time string支付单创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00pay_channel_deal_id string外部渠道支付流水号例子:pi_3MI897Hezv8FxjBO1uGxMPhXpay_seq string支付单号例子:23057287797738260472676128processed_at string支付创建时间,格式:2023-04-12T22:59:52+08:00例子:2023-04-12T22:59:52+08:00status_code string支付状态码例子:RISK_PENDINGstore_id string店铺id例子:1644828244663tax_linesobject[]
税费信息rate double税率例子:1title string税费名称例子:taxesprice string税费金额,精度2例子:8.00price_setobject
税费多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDtax_number string税号例子:11111111taxes_included boolean总计额是否包含税额例子:truetotal_discounts string折扣总额,营销优惠+人工折扣例子:8.00current_subtotal_price string当前商品总和,商品总价*数量例子:8.00fulfillmentsobject[]
包裹信息created_at string创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00id string包裹编号例子:22046737798141702810214336order_id string订单号例子:21056577640603870897253153shipment_status string包裹状态例子:fulfilledtracking_company string物流公司名称例子:SF Internationaltracking_number string第三方物流单号例子:SF10122233322222line_itemsobject[]
商品列表price_setobject
商品售价,多币种信息presentment_moneyobject
买家侧币种amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种currency_code string币种例子:USDamount string金额例子:8.00product_id stringspu序列号例子:16056761559984840457934011requires_shipping boolean是否需要发货例子:truetaxable boolean是否收税例子:truetax_linesobject[]
税费信息price string税费,精度2例子:8.00price_setobject
税费多币种信息presentment_moneyobject
买家侧金额amount string描金额述例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息currency_code string币种例子:USDamount string金额例子:8.00rate double税率例子:1title string税费名称例子:taxesfulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fulfilledgrams double重量(克)例子:100id string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:231sku string商品码,barCode例子:18056761559987524812644011variant_id string商品sku序列号例子:18056761559987524812644011variant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"例子:bigname stringsku标题,同title例子:Product nametitle string商品名称例子:Nice looking skirtvendor string供应商例子:Supplierfulfillable_quantity integer可发货数量例子:2fulfillment_service string物流商名称例子:SF Internationalprice string商品售价,精度2例子:8.00quantity integer订单中的商品数量例子:2status string物流配送状态, success-已发货; cancelled-已取消;例子:successtracking_info_listobject[]
物流追踪信息列表,若指定该入参,则单个入参的tracking_url、tracking_number、tracking_company被拦截。最多传入 10 个追踪信息。tracking_company string物流服务商。tracking_number string物流单号。tracking_url string追踪链接。tracking_url string物流公司url例子:https://www.sf-international.com/updated_at string更新时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00id string订单号,系统自定义编号例子:21050224312121887324667162checkout_token string结算页token例子:2404785166526352972864currency string交易币种例子:USDcurrent_total_discounts string折扣总和,精度2,营销优惠+人工折扣例子:8.00email string买家邮箱,二者必有其一例子:test1001@Gmail.comorder_status_url string订单状态页url例子:https://shoptest.myshoplinestg.com/trade/thank_you?mainOrderMark=xxx&mainOrderSeq=200565776406008509presentment_currency string买家侧币种,同卖家侧币种例子:USDshipping_addressobject
收货地址standard_province_code string地址中省份的编码,该编码为二位的 ISO 3166-2 国际编码,区别于province_code返参为自定义编码。zip string邮编例子:92503address2 string详细地址2,备选例子:address2longitude string经度例子:31city string城市例子:New Yorklast_name string姓例子:Washingtonaddress1 string详细地址1例子:address1company string公司名称例子:New companycountry_code string国家码例子:USprovince_code string省份码例子:4200006country string国家例子:USfirst_name string名例子:Tomlatitude string纬度例子:45name string全名例子:Tom Washingtonphone string电话例子:13100000000province string省份例子:Californiashipping_linesobject[]
物流信息tax_linesobject[]
物流征税列表price string税费例子:8.00price_setobject
税费多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
店铺侧金额信息amount string金额例子:8.00currency_code string币种例子:USDrate double税率例子:1title string税费名称例子:taxescode string物流编号例子:SF123332435364discounted_price string折扣金额,精度2例子:8.00discounted_price_setobject
折扣多币种金额presentment_moneyobject
买家侧金额信息amount string金额,精度2例子:8.00currency_code string币种例子:USDshop_moneyobject
店铺侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00shipping_price_setobject
原运费金额值(非折扣后金额),多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDsource string运费来源例子:SHOPLINEtitle string物流名称例子:SF Internationaldiscount_allocationsobject[]
折扣明细amount string折扣金额,精度2例子:8.00amount_setobject
折扣多币种金额presentment_moneyobject
买家侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00shop_moneyobject
店铺侧金额信息amount string金额,精度2例子:8.00currency_code string币种例子:USDdiscount_application_index integer折扣索引信息:标明在折扣明细中的位置例子:1price string物流运费,精度2例子:8.00price_setobject
物流运费多资源信息presentment_moneyobject
买家侧金额信息currency_code string币种例子:USDamount string金额例子:8.00shop_moneyobject
店铺侧金额信息amount string金额例子:8.00currency_code string币种例子:USDrequested_fulfillment_service_id string运输服务代号例子:LX88888shipping_price string原运费金额值(非折扣后金额)例子:8.00total_discounts_setobject
折扣总额多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDtotal_outstanding_setobject
未付款金额总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDcreated_at string订单创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00current_total_duties_setobject
当前商品总关税presentment_moneyobject
买家侧金额信息amount string金额例子:8.88currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.88currency_code string币种例子:USDline_itemsobject[]
订单商品快照信息fulfillable_quantity integer可发货数量例子:2gift_card boolean是否为礼品卡商品例子:truegrams double重量(克)例子:100harmonized_system_code string协调制度代码例子:harmonized system codeprice string商品售价,精度2例子:8.00requires_shipping boolean是否需要发货例子:truesku string商品码,barCode例子:18056761559987524812644011discount_allocationsobject[]
营销折扣明细金额多币种amount_setobject
折扣明细金额多币种presentment_moneyobject
支付币种amount string金额,精度2例子:8.00currency_code string币种例子:USDshop_moneyobject
店铺币种amount string金额,精度2例子:8.00currency_code string币种例子:USDdiscount_application_index integer折扣索引信息:标明在折扣明细中的位置例子:1amount string折扣明细金额例子:8.00id string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:413location_id stringpos场景下店铺对应的地点例子:5327026538935748524name stringsku标题,同title例子:Product namequantity integer订单中的商品数量例子:2title string商品标题例子:Nice looking skirtfulfillment_service string物流商名称例子:SF Internationalfulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:Fulfilledproduct_id stringspu序列号例子:16056761559984840457934011tax_linesobject[]
税费信息price string税费,精度2例子:8.00price_setobject
税费多币种信息presentment_moneyobject
买家侧币种信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种信息amount string金额例子:8.00currency_code string币种例 子:USDrate double税率例子:1title string税费名称例子:taxestype string税费用类型,用于区分是商品税还是运费税,枚举值如下 product_tax:商品税 shipping_tax:运费税例子:shipping_taxvariant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"例子:bigdutiesobject[]
关税信息tax_linesobject[]
税费明细列表price_setobject
税费多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.88currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.88currency_code string币种例子:USDrate double税率rate_percentage double税率(百份比的值,即rate * 100)title string税费标题country_code_of_origin string原产地/发货地的国家代码harmonized_system_code string海关编码id string关税编号priceobject
关税多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.88currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.88currency_code string币种例子:USDprice_setobject
商品售价,多币种信息presentment_moneyobject
买家侧币种amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种amount string金额例子:8.00currency_code string币种例子:USDtaxable boolean是否收税例子:truevariant_id string商品sku序列号例子:18056761559987524812644011vendor string供应商例子:Suppliercountry_code_of_origin string原产地国家例子:Country of originnote string商家备注内容例子:Merchant notesnote_attributesobject[]
商家备注日志,日期内容name string备注来源(卖家标识)例子:Note sourcevalue string备注内容例子:Note sourcecreate_time string备注创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00tags string订单标签例子:Labelapp_id string应用方idname string自定义订单号例子:test1001total_tax string税费总和,精度2, 商品税 + 运费税例子:8.00cart_token string购物车token例子:c2c4a58186b9d96395d7e6b5c2969577customerobject
买家信息addressesobject
买家地址信息phone string电话例子:12345678931province string省份例子:Californiaprovince_code string省份码例子:4200006city string城市例子:New Yorkcountry string国家例子:UScountry_code string国家码例子:USfirst_name string姓例子:Tomlast_name string名例子:Washingtonname string全名例子:Tom Washingtonzip string邮编例子:54123address1 string详细地址1例子:address1address2 string详细地址2,备选例子:address2area_code string手机区号例子:+86first_name string名例子:Tomlast_name string姓例子:Washingtonphone string用户手机号例子:12345678931created_at string买家创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00currency string币种例子:USDemail string用户邮箱例子:test1001@Gmail.comid string用户id例子:4201057495updated_at string买家更新时间例子:2012-05-01T14:22:25-04:00phone string买家联系方式,二者必有其一例子:12903001000subtotal_price_setobject
商品折后价总和多币种信息shop_moneyobject
店铺侧金额信息amount string金额例子:8.00currency_code string币种例子:USDpresentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDcustomer_locale string买家国家,语种编码+国家名称缩写例子:enCNfulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fulfilledorder_source string订单来源渠道例子:possubtotal_price string商品折后价总和, 商品总价 - 营销优惠 - 人工折扣例子:8.00tax_type string税号类型例子:Typetotal_line_items_price_setobject
商品原价总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDtotal_shipping_price_setobject
订单运费总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDdiscount_applicationsobject[]
该订单应用的所有折扣信息allocation_method string活动的折扣应用范围 1)across(该值分布在所有授权行中) 2)each(该值应用于每个授权行)例子:acrosscode string活动的具体描述例子:1Q3UMQM8RBP5value string活动的折扣值例子:20description string活动的具体描述例子:Descriptiontarget_selection string活动的折扣应用具体对象 1)explicit(折扣分配到明确选择的商品行或运费行) 2)all(折扣分配到所有商品行或运费行) 3)ENTITLED(折扣仅分配到其有权使用的商品行或运费行)例子:explicittarget_type string活动的折扣应用对象 1)line_item 2)shipping_line例子:line_itemtitle string活动的具体描述例子:Descriptiontype string活动折扣类型 1)manual(自定义类型) 2)automatic(自动折扣类型) 3)discount_code(折扣码类型)例子:manualvalue_type string活动的折扣值类型,包含百分比和固定金额两类例子:fixed_amountprocessed_at stringprocessed_at 成单时间,格式:2023-04-12T22:59:52+08:00例子:2023-04-12T22:59:52+08:00user_id string买家id例子:4201057495browser_ip string客户端ip例子:157.119.232.35cancel_reason string卖家取消原因例子:" don ' t want to buy "client_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 Sacurrent_total_tax string税费总和,商品税 + 运费税例子:8.00deduct_member_point_amount_setobject
当前订单会员积分抵扣金额,多币种信息shop_moneyobject
卖家侧币种currency_code string币种例子:USDamount string金额例子:8.00presentment_moneyobject
买家侧币种currency_code string币种例子:USDamount string金额例子:8.00processed_user_id string订单创建者例子:4201057495total_weight double商品总重量(g)例子:100cancelled_at string订单取消时间(结束)(格式见IOS8601),2012-05-01T14:22:25-04:00例子:2012-05-01T14:22:25-04:00companyobject
公司信息id stringid例子:1005619945158043247856location_id string地点id例子:3005619945158043247856tax_registration_id string税号信息例子:213213payment_gateway_names array付款方式列表,该订单所用到的付款方式列表, SLpayments ,Paypal(PayPal支付), Oceanpay(钱海支付), TwoCheckout,AsiaBill, Stripe,Pacypay, WorldPay, COD(货到付款), CUSTOM(自定义), adjustPay(资金调整), Xendit(xendit信用卡), XenditOther例子:["PayPal"]total_line_items_price string商品原价总和,精度2total_outstanding string未付款金额总和,精度2例子:Amounttotal_tip_received string小费,精度2例子:8.00updated_at string订单更新时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00billing_addressobject
账单地址信息last_name string名例子:Washingtonname string全名例子:Tom Washingtonphone string电话例子:12756431298standard_province_code string账单地址中省份的编码,该编码为二位的 ISO 3166-2 国际编码,区别于province_code返参为自定义编码。city string城市例子:New Yorkcompany string公司名称例子:New companycountry_code string国家码例子:USprovince string省份例子:Californiaprovince_code string省份码例子:4200006zip string邮编例子:51234address1 string详细地址1例子:address1address2 string详细地址2,备选例子:address2country string国家例子:USfirst_name string姓例子:Tomdeduct_member_point_amount string当前订单会员积分抵扣金额例子:8.00total_tax_setobject
税费总和,多币种信息presentment_moneyobject
买家侧币种信息amount string金额例子:8.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种信息currency_code string金额例子:USDamount string币种例子:8.00checkout_id string弃单id例子:2404785166526352972864current_total_price_setobject
订单总额,分别以买家币种金额和店铺币种金额展示。refundsobject[]
退款列表transactionsobject[]
退款交易信息created_at string创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00currency string币种例子:USDkind string交易类型(authorization, capture, sale, void, refund)例子:authorizationprocessed_at string更新时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00user_id string买家id例子:4201057495amount string金额例子:8.00id string退款id例子:2605659027312156877634order_id string订单号例子:21056577640603870897253153status string处理状态, pending, failure, success, and error例子:pendinguser_id string用户id例子:4201057495created_at string退款单创建时间 (格式见IOS8601)例子:2012-05-01T14:22:25-04:00id string退款id例子:2605659027312156877634note string退款备注例子:Refund Notesorder_id string订单号例子:21056577640603870897253153processed_at string更新时间 (格式见IOS8601)例子:2012-05-01T14:22:25-04:00refund_line_itemsobject[]
退款详细信息id string退款单号例子:2605659027312156877634line_item_id string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:302quantity integer数量,商品数量例子:1restock_type string库存返还类型,no_restock-未返还,cancel-取消, return-返还 只有未返还例子:no_restocksubtotal double退款金额合计,精度2例子:8subtotal_setobject
退款金额合计,多币种信息,卖家和买家侧相同presentment_moneyobject
买家侧币种信息amount string金额例子:3.25currency_code string币种例子:USDshop_moneyobject
卖家侧币种信息amount string金额例子:3.25currency_code string币种例子:USDtotal_tax_setobject
总税额,多币种信息presentment_moneyobject
买家侧币种信息amount string金额例子:7.00currency_code string币种例子:USDshop_moneyobject
卖家侧币种信息amount string金额例子:7.00currency_code string币种例子:USDline_itemobject
退款商品行title string商品标题例子:Nice looking skirtvendor string