提交编辑结果
POST https://{handle}.myshopline.com/admin/openapi/v20270301/orders/order_edit_commit.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。订单编辑-提交接口,编辑订单为一组组合接口(开始编辑,修改商品数量,增加普通商品行,增加自定义商品行,增加商品行折扣,移除商品行折扣,订单编辑提交),需要调用编辑订单-开始接口,开启一次编辑,如果该接口调用有错误,会在返回值user_errors字段中拿到错误,调用方如果调用订单编辑提交接口出错,需要根据返回的order数据中是否已经对本次编辑进行了更新,如果返回的order没值,需要通过订单列表查询接口查询订单数据中是否已经本次编辑进行了更新,如果明确数据,没更新,可以进行重试(注意:重试需要从order_edit.json订单编辑开始接口开始进行整套编辑订单接口重新调用)
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。例子:
Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA
请求体
requestobject
请求体id string required编辑订单草稿单id(可以从调用订单编辑-开始接口返回参数中获取)例子:2108973455469898notify_customer boolean是否需要通知客户
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
orderobject
订单信息,字段描述、示例请参考订单列表响应结果current_subtotal_price string当前商品总和,商品总价*数量例子:78.08currency string交易币种例子:USDcurrent_total_discounts_setobject
presentment_moneyobject
买家侧金额amount string金额例子:3.25currency_code string币种信息例子:USDshop_moneyobject
卖家侧金额amount string金额例子:3.25currency_code string币种例子:USDfulfillmentsobject[]
包裹信息order_id string订单号例子:21056577640603870897253153id string包裹编号例子:22046737798141702810214336line_itemsobject[]
商品列表id string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:312taxable boolean是否收税例子:truetitle string商品标题例子:漂亮的裙子fulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fulfilledvendor string供应商例子:供应商tax_linesobject[]
税费信息price_setobject
税费多币种信息presentment_moneyobject
买家侧金额amount string金额例子:3.25currency_code string币种例子:USDshop_moneyobject
卖家侧金额信息amount string金额例子:3.25currency_code string币种例子:USDrate double税率例子:1title string税费名称例子:税费price string税费,精度2例子:3.25fulfillable_quantity integer可发货数量例子:1price string商品售价,精度2例子:23.09name stringsku标题,同title例子:商品名称product_id stringspu序列号例子:16056761559984840457934011grams double重量(克)例子:100fulfillment_service string物流商名称例子:顺丰quantity integer订单中的商品数量例子:1variant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"例子:大requires_shipping boolean是否需要发货sku string商品码,barCode例子:18056761559987524812644011variant_id string商品sku序列号例子:18056761559987524812644011attribute string商品属性:名称 - 属性值 多个以逗号", "分割 如:颜色 - 红色, 尺寸 - X例子:红色updated_at string更新时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00tracking_number string第三方物流单号例子:yun0001shipment_status string包裹状态例子:fulfilledtracking_company string物流公司名称例子:顺丰国际created_at string创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00status string物流配送状态, success-已发货; cancelled-已取消;例子:cancelledtracking_url string物流公司url例子:https://www.sf-international.com/name string发货单短号例子:1032-F2updated_at string订单更新时间,(格式见IOS8601)例子:2012-05-01T14:22:25-04:00name string自定义订单号例子:test1001financial_status string支付状态,unpaid,authorized, pending,partially_paid,paid,partially_refunded,refunded例子:unpaidcurrent_total_tax string税费总和,商品税 + 运费税例子:8.00deduct_member_point_amount string当前订单会员积分抵扣金额例子:3.25processed_at stringprocessed_at 成单时间,格式:2023-04-12T22:59:52+08:00例子:2023-04-12T22:59:52+08:00id string订单号,系统自定义编号例子:21050224312121887324667162cancelled_at string订单取消时间(结束)(格式见IOS8601),2012-05-01T14:22:25-04:00例子:2012-05-01T14:22:25-04:00current_total_price string税费总和,商品税 + 运费税例子:8.00discount_applicationsobject[]
折扣信息target_type string1)line_item、shipping_line例子:line_itemvalue string折扣的具体值(可以是 N折,也可以是具体的 金额值)例子:20target_selection string1)explicit(折扣分配到明确选择的行) 2)all(折扣分配到所有行) 3)ENTITLED(折扣仅分配到其有权使用的行)例子:explicitvalue_type string百分比折扣、金额折扣例子:fixed_amountcode string折扣码例子:1Q3UMQM8RBP5title string自动折扣的标题例子:折扣标题allocation_method string1)across(该值分布在所有授权行中) 2)each(该值应用于每个授权行)例子:acrosstype string折扣类型例子:manualdescription string自定义折扣的描述例子:折扣描述cancel_reason string卖家取消原因例子:“不想买了”checkout_token string结算页token例子:c2c4a58186b9d96395d7e6b5c2969577note_attributesobject[]
商家备注日志,日期内容create_time string备注创建时间(格式见IOS8601)例子:2012-05-01T14:22:25-04:00name string备注来源(卖家标识)例子:备注来源value string备注内容例子:备注内容app_id string应用方id例子:222222shipping_linesobject[]
物流信息phone string电话例子:13243214565price_setobject
物流运费多资源信息shop_moneyobject
店铺侧金额信息amount string金额,精度2例子:8.00currency_code string币种例子:USDpresentment_moneyobject
买家侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00requested_fulfillment_service_id string运输服务代号例子:LX88888title string物流名称例子:顺丰国际discounted_price string折扣金额,精度2例子:8.00tax_linesobject[]
物流征税列表title string税费名称例子:税费price string税费例子:8.00price_setobject
税费多币种信息shop_moneyobject
卖家侧金额信息amount string金额,精度2例子:8.00currency_code string币种例子:USDpresentment_moneyobject
买家侧金额信息amount string金额例子:8.00currency_code string币种例子:USDrate double税率例子:1code string物流编号例子:SFdiscounted_price_setobject
折扣多币种金额presentment_moneyobject
买家侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00shop_moneyobject
店铺侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00source string运费来源例子:来源discount_allocationsobject[]
折扣明细discount_application_index integer折扣索引信息: 标明在折扣明细中的位置例子:1amount string折扣金额,精度2例子:8.00amount_setobject
折扣多币种金额presentment_moneyobject
买家侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00shop_moneyobject
店铺侧金额信息currency_code string币种例子:USDamount string金额,精度2例子:8.00price string物流运费,精度2例子:8.00shipping_price string原运费金额值(非折扣后金额)例子:8.00tax_linesobject[]
税费信息price_setobject
税费多币种信息presentment_moneyobject
买家侧金额信息currency_code string币种amount string金额,精度2例子:USDshop_moneyobject
卖家侧金额信息amount string金额,精度2例子:3.25currency_code string币种例子:USDrate double税率例子:1title string税费名称例子:税费price string税费金额例子:3.25checkout_id string弃单id例子:2404785166526352972864total_weight double商品总重量(g)例子:100line_itemsobject[]
订单商品快照信息requires_shipping boolean是否需要发货例子:trueid string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:417location_id stringpos场景下店铺对应的地点例子:5327026538935748524price string商品售价,精度2例子:3.25taxable boolean是否收税例子:truediscount_allocationsobject[]
营销折扣明细金额多币种amount string折扣明细金额例子:8.00amount_setobject
折扣明细金额多币种presentment_moneyobject
支付币种amount string金额,精度2例子:8.00currency_code string币种例子:USDshop_moneyobject
店铺币种amount string金额,精度2例子:8.00currency_code string币种例子:USDdiscount_application_index integer标明在折扣明细中的位置例子:1product_id stringspu序列号例子:16056761559984840457934011fulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fulfilledsku string商品码,barCode例子:18056761559987524812644011variant_id string商品sku序列号例子:18056761559987524812644011title string商品标题例子:好看的裙子fulfillment_service string物流商名称例子:顺丰tax_linesobject[]
税费信息price_setobject
税费多币种信息shop_moneyobject
卖家侧币种amount string金额例子:3.25currency_code string币种例子:USDpresentment_moneyobject
买家侧币种currency_code string币种例子:USDamount string金额