更新订单
PUT https://{handle}.myshopline.com/admin/openapi/v20260601/orders/:id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。指定订单更新信息。如果字段传空值或不传,则不更新该字段信息。
路径参数
- id string required订单 ID。
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。例子:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
orderobject
订单信息。area_code string买家国家或地区的手机区号。customer_id string买家 ID。email string买家的邮箱地址。id string订单号。line_itemsobject[]
需要更新标签的商品。id string商品快照表的 ID,系统生成,与订单 ID 唯一确认一个商品。tags string商品标签,多个以英文逗号分割,会覆盖现有标签。note_attributesobject[]
商家备注日志。name string卖家标识,表明备注来源。value string备注内容。phone string买家的手机号码。shipping_addressobject
收货地址。address1 string地址的第一行。通常是街道地址或邮政信箱编号等信息。address2 string地址的第二行。通常是公寓、套房或单元等信息。area string地址中的区县名称。area_code string地址中的区县编码。city string地址中的城市。city_code string地址中的城市编码。company string收件人所在的公司名称。 最大长度限制:64country string地址中的国家或区域。 最大长度限制:64email string收件人的邮箱。first_name string收件人的名。last_name string收件人的姓。 最大长度限制:64latitude string地址所在的纬度。longitude string地址所在的经度。phone string收件人的手机号。province string地址中的省份。province_code string地址中省份或区域的编码,该编码为系统自动生成。zip string地址的邮编信息。tags string商品标签,多个以逗号隔开。
状态码
- 200
- 400
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
orderobject
订单信息。app_id string应用方 ID。billing_addressobject
用于邮寄账单发票的地址。address1 string账单地址的第一行。通常是街道地址或邮政信箱编号等信息。address2 string账单地址的第二行。通常是公寓、套房或单元等信息。city string账单地址中的城市。company string账单收件人所在的公司名称。country string账单地址中的国家或区域。first_name string账单收件人的名。last_name string账单收件人的姓。name string账单收件人的全名。phone string账单收件人的手机号。province string账单地址中的省份。province_code string地址中省份或区域的编码,该编码为系统自动生成。standard_province_code stringzip string账单地址的邮编信息。browser_ip string买家下单时的浏览器 IP 地址。cancel_reason string卖家取消原因。cart_token string购物车数据的唯一标识。checkout_id string弃单 ID。checkout_token string弃单数据的唯一标识,C 端用户发起结算,会生成弃单 。client_detailsobject
客户端详细信息。browser_ip string买家下单时的浏览器 IP 地址。session_hash string会员会话加密信 息。user_agent string客户端代理。companyobject
买家下单时买家所在的公司信息。id string公司 ID。location_id string地点 ID。tax_registration_id string税号信息。credit_limitobject
信用支付信息。credit_limit_currency string信用额度币种,与店铺币种相同。三位币种码,遵循 ISO 4217 国际标准。is_credit_limit boolean订单是否使用了信用支付。true:有使用false:未使用
outstanding_credit_limit string占用的信用额度总和。初始和total_credit_limit相等,如果后续有类似还款操作,占用的额度则相应减少。total_credit_limit string使用的信用额度总和,即该笔订单用了多少信用额度支付。current_subtotal_price string商品金额总和,为商品单价 * 数量,以店铺币种展示。current_total_discounts string折扣金额总和,数值保留到小数点后两位,为营销优惠 + 人工折扣,以店铺币种展示。current_total_discounts_setobject
折扣金额总和,数值保留到小数点后两位,为营销优惠 + 人工折扣,分别以买家币种金额和店铺币种金额展示。current_total_price string订单总额,以店铺币种金额展示。current_total_tax string税费金额总和,以店铺币种金额展示customerobject
买家信息。addressesobject
买家地址信息。address1 string买家地址的第一行。通常是街道地址或邮政信箱编号等信息。address2 string买家地址的第二行。通常是公寓、套房或单元等信息。city string买家地址中的城市。country string买家地址中的国家或区域。first_name string买家地址中收件人的名。last_name string买家地址中收件人的姓。name string买家的姓名。phone string买家的手机号码。province string买家地址中的省份。province_code string地址中省份或区域的编码,该编码为系统自动生成。zip string买家地址的邮编信息。area_code string国家或地区的手机区号。currency string三位币种码,遵循 ISO 4217 国际标准。email string买家的邮箱地址。first_name string买家的名。id string买家 ID。last_name string买家的姓。phone string买家的手机号。customer_locale string买家语种编码 + 国家或地区码。语种编码遵循 ISO 639 标准。国家或地区码遵循 ISO 3166-1 标准。无法获取到语言信息时,仅返回国家或地区代码。deduct_member_point_amount string当前订单会员积分抵扣金额,以店铺币 种展示。数值保留到小数点后两位。deduct_member_point_amount_setobject
当前订单会员积分抵扣金额,分别以买家币种金额和店铺币种金额展示。discount_applicationsobject[]
折扣信息。allocation_method string折扣的范围。有效枚举值包括:across: 按照购买总数折扣each: 按照单个商品分别折扣
示例:如一次购买三个相同的商品,折扣为 10 元。如果allocation_method为across代表三个一起减 10 元;如果allocation_method为each代表每个减 10 元。code string折扣码。description string自定义折扣的描述。target_selection string折扣范围。有效枚举值包括:explicit