编辑草稿单
PUT https://{handle}.myshopline.com/admin/openapi/v20210901/orders/draft_orders.json
handle
:店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com
的店铺,其 handle
是 open001
。更新草稿单
请求头
- Content-Type required字段值固定为
application/json; charset=utf-8
- Authorization string required资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
draft_orderobject
草稿单对象billing_addressobject
支付账单地址address1 string详细地址信息1,用作补充信息(最大255个字符)Example:8899 Garfield Street
address2 string详细地址信息2,用作补充信息(最大255个字符)Example:Apartment 5
area string行政区名称(最大64个字符)area_code string行政区编码,自定义编号Example:4200006
city string城市名称(最大64个字符)city_code string城市编码,自定义编号company string公司名称Example:SHOPLINE
country string国家或是地区名称(最大64个字符)Example:美国
country_code string国家或是地区编码,两位的编码缩写(ISO-3166-1)Example:US
email string用户邮箱Example:test@shoplineapp.com
first_name string用户 名(最大64个字符)Example:Tom
last_name string用户 姓(最大64个字符)Example:Washington
phone string联系电话(最大32个字符)Example:13100000000
province string州或是省编码,自定义编号(最大64个字符)Example:加利福尼亚州
province_code string支付账单收件人省编码Example:4200006
same_as_receiver boolean是否与收货信息相同(相同下面参数可以不传)zip string收货地址邮政编号Example:92503
calc_sku_stock_mode string required计算库存模式:not_limit,无限库存;real,真实库存;reserve_real:预留库存+真实库存Example:not_limit
customerobject
买家信息area_code string联系方式 区号email string用户邮箱id string required用户idphone string用户手机号discount_amount_ext string订单优惠金额,精度2的double类型的字符串,eg:"12.41"Example:2.00
discount_amount_ext_name string订单优惠名称(最大64个字符)Example:满减
id string required草稿单号Example:2505659131831930856670
language_infoobject
语言信息customer_language string买家侧下单语种(优先使用此语种)merchant_language string卖家侧下单语种(优先使用买家侧语种)line_itemsobject[] required
商品信息列表applied_discountobject
商品折扣信息description string折扣描述title string折扣名称value long折扣数额,折扣值,当折扣类型为DISCOUNT_AMOUNT_PERCENTAGE时,此值最大默认100,最小为0value_type string折扣类型:fixed_amount(固定金额)、percentage(百分比)gift_card boolean是否为礼品卡商品id string订单商品行id, 唯一确认一个商品行price string商品售价,精度2的double类型的字符串,eg:"12.41"product_id string required商品idproduct_source string required商品来源 main_site主站商品、customize自定义商品quantity integer required商品数量title string商品名称variant_id string required商品skuIdnote string草稿单备注Example:客户想要尽快发货
note_attributesobject[]
附加信息name string名称value string值outer_id string操作唯一标识,同一个id只能执行一次操作payment_termsobject
付款信息pay_channel_id string required支付方式idpay_status string required付款状态payment_channel_name string支付渠道名称shipping_addressobject
收货人地址信息address1 string详细地址信息1,用作补充信息(最大255个字符)Example:8899 Garfield Street
address2 string详细地址信息2,用作补充信息(最大255个字符)Example:Apartment 5
city string城市名称(最大64个字符)Example:Riverside
company string公司名称Example:SHOPLINE
country string国家或是地区名称(最大64个字符)Example:美国
country_code string国家或是地区编码,两位的编码缩写(ISO-3166-1)Example:US
district string行政区名称(最大64个字符)district_code string行政区编码,自定义编号Example:4200006
first_name string名(最大64个字符)Example:Tom
last_name string姓(最大64个字符)Example:Washington
phone string联系电话(最大32个字符)Example:13100000000
province string州或是省名称(最大64个字符)Example:加利福尼亚州
province_code string州或是省编码,自定义编号Example:4200006
zip string收货地址邮政编号Example:92503
shipping_linesobject
物流信息delivery_id string送货方式ID、运费模板IDprice string自定义运费,精度2的double类型的字符串,eg:"12.41"shipping_type string required物流类型 system-系统物流;custom-自定义物流。当物流为系统物流时只需要传delivery_id,当物流类型伟自定义物流时传title和price字段title string自定义配送名称stock_reserved boolean required订单维度库存预留标识:true、flaseExample:true
stock_reserved_time long订单维度库存预预留时间Example:1669280400000
tags array草稿单标签,多个标签间用逗号分隔,店铺维度最大支持99个标签Example:shine,bili
响应
- 200
- 401
- 429
更多状态码信息请参考 HTTP 状态码
响应头
traceId
traceId
响应体
draft_orderobject
草稿单billing_addressobject
支付账单地址address1 string详细地址信息1,用作补充信息Example:8899 Garfield Street
address2 string详细地址信息2,用作补充信息Example:Apartment 5
area string行政区名称area_code string行政区编码,自定义编号Example:4200006
city string城市名称Example:Riverside
city_code string城市编码,自定义编号Example:4200006
company string公司名称Example:SHOPLINE
country string国家或是地区名称Example:美国
country_code string国家或是地区编码,两位的编码缩写(ISO-3166-1)Example:US
email string用户邮箱Example:test@shoplineapp.com
first_name string用户 名Example:Tom
last_name string用户 姓Example:Washington
phone string联系电话Example:13100000000
province string州或是省名称Example:加利福尼亚州
province_code string州或是省编码,自定义编号Example:4200006
same_as_receiver boolean是否与收货信息相同:true、falseExample:true
zip string收货地址邮政编号Example:92503
buyer_infoobject
买家信息area_code string联系方式 区号email string用户邮箱id string用户idphone string用户手机号create_time long创建时间,时间戳格式Example:1667638652832
currency string店铺币种Example:USD
discount_amount_ext string订单优惠金额,精度2的double类型的字符串,eg:"12.41"discount_amount_ext_name string订单优惠名称id string草稿单号Example:2505659131831930856670
invoice_url stringinvoice链接line_itemsobject[]
商品信息列表applied_discountobject
商品自定义折扣信息amount string折扣金额,精度2的double类型的字符串,eg:"12.41"Example:1.00
before_amount string商品售价,精度2的double类型的字符串,eg:"12.41"Example:3.00
description string折扣描述Example:满两件减5元
title string折扣名称Example:满减
value long折扣数额,折扣值,当折扣类型为DISCOUNT_AMOUNT_PERCENTAGE时,此值最大默认100,最小为0Example:1
value_type string折扣类型:fixed_amount(固定金额)、percentage(百分比)Example:fixed_amount
gift_card boolean是否为礼品卡商品:true、falseExample:true
id string商品行id, 唯一确认一个商品行price string商品参加自定义折扣后的金额Example:2.00
product_id string商品spu序列号Example:16056577393789045351043258
product_source string商品来源 main_site主站商品、customize自定义商品Example:main_site
quantity integer商品数量Example:1
requires_shipping boolean是否需要实物运输发货:true、falseExample:true
title string商品标题variant_id string商品sku序列号Example:18056577393793239655103258
variant_title string商sku标题logistics_price string运费总金额Example:2.00
logistics_tax string运费总税费Example:2.00
note string草稿单备注Example:客户想要尽快发货
note_attributesobject[]
附加信息name string名称value string值payment_termsobject
付款信息pay_channel_id string支付渠道IDpay_status string支付单状态:未支付unpaid、已支付paid 草稿单生成订单后,该状态不会同步订单的支付状态Example:unpaid
payment_channel_name string支付渠道名称product_tax string商品总税费Example:2.00
shipping_addressobject
收货地址address1 string详细地址信息1,用作补充信息Example:8899 Garfield Street
address2 string详细地址信息2,用作补充信息Example:Apartment 5
city string城市名称Example:Riverside
company string公司名称Example:SHOPLINE
country string国家或是地区名称Example:美国
country_code string国家或是地区编码,两位的编码缩写(ISO-3166-1)Example:US
district string行政区名称district_code string行政区编码,自定义编号first_name string名Example:Tom
last_name string姓Example:Washington
phone string联系电话Example:13100000000
province string州或是省名称Example:加利福尼亚州
province_code string州或是省编码,自定义编号Example:4200006
zip string收货地址邮政编号Example:92503
shipping_linesobject
物流信息delivery_id string送货方式ID、运费模板IDprice long物流运费,精度2的double类型的字符串shipping_type string物流类型 system-系统物流;custom-自定义物流Example:system
title string物流名称status integer草稿单状态:open 、 completestock_reserved boolean订单维度库存预留标识:true、flaseExample:true
stock_reserved_time long订单维度库存预预留时间Example:1669280400000
store_id string店铺idtags array草稿单标签,多个标签间用逗号分隔,店铺维度最大支持99个标签Example:shine,bili
total_line_items_price string当前草稿单商品总金额Example:2.00
total_price string当前草稿单总金额,商品售价-折扣+税费+运费Example:2.00
update_time long更新时间,时间戳格式Example:1667638652832
API Explorer
调试台
这篇文章对你有帮助吗?
Error loading component.