查询草稿单
GET https://{handle}.myshopline.com/admin/openapi/v20260301/orders/draft_orders.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。根据指定条件查询草稿单信息。
查询参数
- checkout_ids string弃单的唯一标识 ID,多个使用英文逗号拼接,最大支持100个。Example:
2505749057828590456543, 2505749057828590456543 - ids string草稿单的唯一标识符 ID,查询多个使用英文逗号拼接。最大个数限制:100Example:
10 - page_info string分页查询的唯一标识,用于定位特定页面。该字段值需要在你已经查询完分页信息后,在该接口响应头中的
link字段值中获取。例如,你获取到的link的值为<https://{handle}.myshopline.com/admin/openapi/{version}/orders/draft_orders.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next",那么page_info的值为eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9。关于更多如何使用分页信息,请参考 分页机制。Example:7AFD7393C6E7CF18672C038477E2EF6A463464BDBAF766DD8F8CB8E0085F82419A94B80084BCDA0B838B3F13C302A2C9044E - sort_condition string排序规则。例如:
create_at:desc,id:asc,先按create_at倒序,再按id正序。Example:create_at:desc,id:asc - updated_at_max string草稿单更新时间的查询截止点。需与
updated_at_min配合使用,共同确定查询的时间区间。时间格式遵循 ISO 8601 国际标准。Example:2023-01-05T10:05:45+00:00 - limit string查询数量限制。默认值:
50取值范围:0-1000Example:50 - status string草稿单状态。有效枚举值包含:
open:处理中completed:已完成
Example:open - updated_at_min string草稿单更新时间的查询起始点。需与
updated_at_max配合使用,共同确定查询的时间区间。时间格式遵循 ISO 8601 国际标准。Example:2023-01-04T10:05:45+00:00
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
状态码
- 200
- 401
- 429
更多状态码信息参考 HTTP 状态码。
响应头
link
提供分页数据的 URL 链接。你可以获取该字段值中的page_info信息用于下一次分页请求中。当你请求的页面存在上一页或下一页的时候,该字段会被返回。关于更多如何使用分页信息,请参考 分页机制。traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
draft_ordersobject[]
草稿单列表信息。billing_addressobject
支付账单地址。address1 string支付账单地址的第一行。通常是街道地址或邮政信箱编号等信息。Example:8899 Garfield Streetaddress2 string支付账单地址的第二行。通常是公寓、套房或单元等信息。Example:Apartment 5area string支付账单地址中的行政区名称。Example:East townarea_code string支付账单地址中的行政区编码,自定义编号。Example:4200006city string支付账单地址的城市。Example:Riversidecity_code string支付账单地址中城市的编码。Example:4200006company string公司名称。Example:SHOPLINEcountry string支付账单地址的国家或地区。Example:Usaemail string账单收件人的邮箱。Example:test@shoplineapp.comfirst_name string账单收件人的名。Example:Tomlast_name string账单收件人的姓。Example:Washingtonphone string账单收件人的联系方式。Example:13100000000province string账单地址中的州或省。Example:Californiasame_as_receiver boolean该地址是否与收货信息相同。true: 相同false: 不同
Example:truestandard_province_code string账单地址中省份的编码,该编码为二位的 ISO 3166-2 国际编码,区别于province_code返参为自定义编码。street_name string街道名称。Example:Streetstreet_number string街道编码,自定义编号。Example:4200006zip string收货地址邮政编号。Example:92503checkout_ids string弃单的唯一标识 ID,多个使用英文逗号拼接。companyobject
公司信息。id string公司的唯一标识符 ID。Example:1005619945158043247856location_id string公司地点的唯一标识符 ID。Example:3005619945158043247856tax_registration_id string税号。Example:213213create_by string创建人账号编码。Example:4201057379customerobject
买家信息。area_code string买家联系地址的区号。Example:0000email string用户邮箱。Example:xxx@gmail.comfirst_name string用户的名。Example:Xiaoliuid string用户的唯一标识符 ID。Example:2200000611last_name string用户的姓。Example:Wangphone string用户手机号。Example:1888888888888discount_amount_ext string订单优惠金额,以店铺币种金额展示。Example:2.00discount_amount_ext_setobject
订单优惠金额,分别以买家币种金额和店铺币种金额展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00discountable boolean是否叠加营销优惠。true: 叠加false: 不叠加
默认值:falseExample:trueid string草稿单的唯一标识符 ID。Example:2505659131831930856670invoice_url stringInvoice 链接。Example:https://xxxxx.myshopline.com/invoices/xxxx?secret=xxxxline_itemsobject[]
商品行信息列表。applied_discountobject
商品自定义折扣信息。amount string折扣金额,数值保留到小数点后两位。例如,88.98。Example:1.00amount_setobject
折扣金额,分别以买家 币种金额和店铺币种金额展示。 以店铺币种金额展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额,数值保留到小数点后两位。例如,88.98。Example:2.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00before_amount string商品售价,数值保留到小数点后两位。例如,88.98。Example:3.00before_amount_setobject
商品售价,分别以买家币种金额和店铺币种金额展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00description string折扣描 述。Example:5 yuan off for two more piecestitle string折扣名称。Example:Full reductionvalue string折扣数额,当折扣类型为DISCOUNT_AMOUNT_PERCENTAGE时,此值最大默认100,最小为0。Example:1.00value_type string折扣值的类型。有效枚举值包含:fix_amount:固定金额percentage:百分比
Example:fixed_amountgift_card boolean该商品是否为礼品卡商品。true: 是礼品卡商品false: 不是礼品卡商品
Example:trueid string商品行的唯一标识符 ID。Example:100000000image_url string图片链接。Example:http://www.abc.com/123price string商品参加自定义折扣后的金额。Example:2.00price_setobject
商品参加自定义折扣后的金额。分别以买家币种金额和店铺币种金额展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00product_id string商品 SPU 序列号。Example:16056577393789045351043258product_source string商品来源。有效枚举值包含:main_site:主站商品customize:自定义商品
Example:main_sitepropertiesobject[]
商品定制信息。name string定制名称。Example:valueshow boolean该信息是否要在前端展示。true: 展示false: 不展示
Example:truetype string附加信息类型。有效枚举值包含:text:文本类型picture:图片类型link:链接类型
Example:text-oneurls array附加信息类型跳转链接。Example:["https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0"]value string自定义属性值。Example:valuequantity integer订单中的商品数量。Example:1requires_shipping boolean商品是否需要实物运输发货。true: 需要发货false: 不需要发货
默认值:trueExample:truesku string商家定义的商品货号。tax_linesobject[]
该商品税费信息。name string税费名称。Example:TAXprice string税费金额。商品实际收税以此字段金额为准。Example:8.00price_setobject
税费价格信息。分别以买家币种金额和店铺币种金额展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额。数值保留到小数点后两位。例如,88.98。Example:8.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:8.00rate double税率。Example:1type string税费类型,用于区分商品税和运费税。有效枚举值包含:product_tax:商品税shipping_tax:运费税
Example:shipping_taxtaxable boolean该商品是否含税。true:含税false:不含税
默认值:tureExample:truetitle string该商品的标题。Example:CustomProductsvariant_id string商品的 SKU 序列号,商品款式的唯一标识 ID。Example:18056577393793239655103258variant_title string商品属性值。Example:RED / Llogistics_amount string运费总金额。数值保留到小数点后两位。例如,88.98。Example:2.00logistics_amount_setobject
运费总金额。分别以买家币种金额和店铺币种金额 展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00logistics_tax string运费总税费。Example:2.00logistics_tax_setobject
运费总税费。分别以买家币种金额和店铺币种金额展示。presentment_moneyobject
买家侧金额信息。amount string买家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00shop_moneyobject
卖家侧金额信息。amount string卖家侧金额。数值保留到小数点后两位。例如,88.98。Example:2.00market_name string市场名称。Example:Usa marketmarket_region_country_code string市场国家。Example:USnote string草稿单备注。Example:Customer wants to ship asapnote_attributesobject[]
附加信息。name string名称。Example:xxxxvalue string值。Example:2order_id string由当前草稿单生成的订单单号payment_termsobject
支付条款和付款信息。created_at string支付条款创建时间。格式:ISO 8601。例子:2024-08-31T02:20:26+08:00due_in_days integer当条款类型为NET时提供,多少天后未付款则到期。id string唯一识别该支付条款的 ID。overdue boolean支付条款是否超时。true:超时false:未超时
pay_channel_deal_id string外部渠道支付流水号。pay_status string支付单状态。有效枚举值包含:unpaid:未支付paid:已支付
草稿单生成订单后,该状态不会同步订单的支付状态。payment_channel_name string支付渠道。payment_schedulesobject[]
与付款条件相关联的一组时间表。payment_terms_name string用于创建付款条件的付款条件模板的名称。payment_terms_type string用于创建付款条件的付款条件模板类型。有效枚举值包含:FIXED:商家指定日期FULFILLMENT:完成发货日期NET:固定条件日期RECEIPT:发送账单日期UNKNOWN:未知类型
updated_at string支付条款的更新时间。格式:ISO 8601。例子:2024-08-31T02:20:26+08:00po_number stringB2B 场景在订单上记录的采购订单号。presentment_currency_code string市场币种。该字段值为三位币种码,遵循 ISO 4217 标准。例如:USD。product_tax string商品总税费。product_tax_setobject
商品总税费。分别以买家币种金额和店铺币种金额展示。shipping_addressobject
收货地址信息。address1 string收货人详细地址的第一行。通常是街道地址或邮政信箱编号等信息。address2 string收货人详细地址的第二行。通常是公寓、套房或单元等信息。city string收货地址中的城市。city_code string收货地址中城市的编码。company string公司名称。country string国家或是地区名称country_code string收货地址中国家的二位国家码,遵循 ISO 3166-1 国际标准,例如:US。delivery_store_code string门店编码,自定义编号。delivery_store_name string门店名称。district string收货地址中的区。district_code string收货地址中区的编码。first_name string收件人的名。last_name string收件人的姓。name string收件人的全名。phone string联系电话。province string收货地址中的州或省。province_code string收货地址中省份的编码,该编码可以是自定义编号或者为二位的 ISO 3166-2 国际编码。standard_province_code string地址中省份的编码,该编码为二位的 ISO 3166-2 国际编码,区别于province_code返参为自定义编码。street_name string街道名称。street_number string街道编码,自定义编号。zip string收货地址邮政编号。shipping_linesobject
订单物流信息。delivery_id string送货方式 ID。price string物流运费。数值保留到小数点后两位。例如,88.98。shipping_type string物流类型。有效枚举值包含:system:系统物流custom:自定义物流
title string运费模板名称。status string草稿单状态。有效枚举值包含:open:处理中completed:已完成
stock_reserved boolean订单维度库存返还类型。有效枚举值包含:no_restock:未返还cancel:取消return:返还
stock_reserved_time long订单维度库存预预留时间。tags array草稿单标签,多个标签间用逗号分隔,店铺维度最大支持 99 个标签。tax_linesobject[]
草稿单税费信息。name string税费名称。price string税费金额。商品实际收税以此字段金额为准。price_setobject
价格信息。分别以买家币种金额和店铺币种金额展示。rate double税率。该信息只做展示作用。type string税费类型,用于区分商品税和运费税。有效枚举值包含:product_tax:商品税shipping_tax:运费税
total_line_items_price string当前草稿单商品总金额。total_line_items_price_setobject
商品总金额。分别以买家币种金额和店铺币种金额展示。total_price string商品金额总和,为商品总价 * 数量,以店铺币种展示。total_price_setobject
商品金额总和,为商品总价 * 数量,分别以买家币种和店铺币种展示。update_by string更新人账号编码。update_time long草稿单更新时间。格式:ISO 8601。例子:2024-08-31T02:20:26+08:00
API Explorer
调试台
这篇文章对你有帮助吗?