需要 read_draft_orders 权限点。
更多权限点使用信息,请参考:
GET https://{handle}.myshopline.com/admin/openapi/v20210901/orders/draft_orders.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
草稿单列表
查询参数
  • ids string
    草稿单号,多个以逗号分隔,最大支持100个
    Example: 2505749057828590456543, 2505749057828590456543
  • limit integer
    查询数量限制,默认50,不能超过1000
    Example: 10
  • page_info string
    加密后的请求参数,用于上一页、下一页,直接取该字段解析访问
  • status string
    草稿单状态,open-处理中,completed-已完成
    Example: open
  • updated_at_max string
    草稿单更新时间(结束)(格式见IOS8601)
    Example: 2023-01-05T10:05:45+00:00
  • updated_at_min string
    草稿单更新时间(开始)(格式见IOS8601)
    Example: 2023-01-04T10:05:45+00:00
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • link
    包含上一页、下一页的请求参数
  • traceId
    traceId
响应体
  • draft_ordersobject[]
    草稿单列表信息
  • 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、false
    Example: true
  • street_name string
    街道名称
  • street_number string
    街道编码,自定义编号
    Example: 4200006
  • zip string
    收货地址邮政编号
    Example: 92503
  • create_by string
    创建人账号编码
    Example: 4201057379
  • create_time long
    创建时间,时间戳格式
    Example: 1667638652832
  • currency string
    店铺币种
    Example: USD
  • customerobject
    买家信息
  • area_code string
    联系方式 区号
  • email string
    用户邮箱
  • id string
    用户id
  • phone string
    用户手机号
  • id string
    草稿单号
    Example: 2505659131831930856670
  • invoice_url string
    invoice链接
  • 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 string
    折扣数额,折扣值,当折扣类型为DISCOUNT_AMOUNT_PERCENTAGE时,此值最大默认100,最小为0
    Example: 1.00
  • value_type string
    折扣类型:fixed_amount(固定金额)、percentage(百分比)
    Example: fixed_amount
  • gift_card boolean
    是否为礼品卡商品:true、false
    Example: 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、false
    Example: true
  • taxable boolean
    是否收税:true、false
    Example: true
  • title string
    商品标题
  • variant_id string
    商品sku序列号
    Example: 18056577393793239655103258
  • variant_title string
    商品属性值
  • logistics_amount string
    运费总金额
    Example: 2.00
  • logistics_tax string
    运费总税费
    Example: 2.00
  • note string
    草稿单备注
    Example: 客户想要尽快发货
  • note_attributesobject[]
    附加信息
  • name string
    名称
  • value string
  • order_id string
    由当前草稿单生成的订单单号
    Example: 21056577640603870897253153
  • payment_termsobject
    支付渠道信息
  • pay_channel_deal_id string
    外部渠道支付流水号
  • pay_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
    城市名称
  • city_code string
    城市编码,自定义编号
    Example: Riverside
  • company string
    公司名称
    Example: 4200006
  • country string
    国家或是地区名称
    Example: 美国
  • country_code string
    国家或是地区编码,两位的编码缩写(ISO-3166-1)
    Example: US
  • delivery_store_code string
    门店编码,自定义编号
    Example: 4200006
  • delivery_store_name string
    门店名称
  • district string
    行政区名称
  • district_code string
    行政区编码,自定义编号
    Example: 4200006
  • first_name string
    Example: Tom
  • last_name string
    Example: Washington
  • name string
    全名
  • phone string
    联系电话
    Example: 13100000000
  • province string
    州或是省名称
    Example: 加利福尼亚州
  • province_code string
    州或是省编码,自定义编号
    Example: 4200006
  • street_name string
    街道名称
  • street_number string
    街道编码,自定义编号
    Example: 4200006
  • zip string
    收货地址邮政编号
    Example: 92503
  • shipping_linesobject
    订单物流信息
  • delivery_id string
    送货方式ID、运费模板ID
  • price string
    物流运费,精度2的double类型的字符串
    Example: 12.41
  • shipping_type string
    物流类型 system-系统物流;custom-自定义物流
    Example: system
  • title string
    运费模板名称
  • status string
    草稿单状态:open 、 complete
    Example: open
  • stock_reserved boolean
    订单维度库存预留标识:true、flase
    Example: true
  • stock_reserved_time long
    订单维度库存预预留时间
    Example: 1667638652832
  • tags array
    草稿单标签,多个标签间用逗号分隔,店铺维度最大支持99个标签
    Example: shine,bili
  • total_line_items_price string
    当前草稿单商品总金额
    Example: 2.00
  • total_price string
    当前草稿单总金额,商品售价-折扣+税费+运费
    Example: 2.00
  • update_by string
    更新人账号编码
    Example: 4201057379
  • update_time long
    更新时间,时间戳格式
    Example: 1667638652832
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20210901

ParamOptions

— header required
— query
— query
— query
— query
— query
— query

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20210901/orders/draft_orders.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
指定时间查询
Response
{
"draft_orders": [
{
"create_by": "1610440173818",
"create_time": 1657160962086,
"currency": "USD",
"customer": {
"email": "sky@shopline.com",
"id": "2200471716"
},
"id": "2505483345370481170532",
"invoice_url": "https://us-store.myshopline.com/invoices/2505483345370481170532?secret=98FD269656B481F247AD087915C2EBC90F8FEBFAE216428AF66F3621BE05222A",
"line_items": [
{
"gift_card": false,
"id": "16054736883558949914773562180547368835614664972535620",
"price": "19.88",
"product_id": "16054736883558949914773562",
"product_source": "main_site",
"quantity": 1,
"requires_shipping": true,
"title": "优惠码",
"variant_id": "18054736883561466497253562",
"variant_title": " YELLOW"
}
],
"logistics_amount": "0.0",
"logistics_tax": "0.0",
"payment_terms": {
"pay_channel_deal_id": "5463129954391690352",
"pay_status": "unpaid",
"payment_channel_name": "Paypal"
},
"product_tax": "0.0",
"shipping_lines": {
"price": "0.0",
"shipping_type": "custom",
"title": "免运费"
},
"status": "open",
"stock_reserved": false,
"total_line_items_price": "19.88",
"total_price": "19.88",
"update_by": "1610440173818",
"update_time": 1672996187540
},
{
"create_by": "2000008416",
"create_time": 1672998659376,
"currency": "USD",
"customer": {
"email": "test@shoplineapp.com",
"id": "2223243707"
},
"id": "2505749057828590456543",
"invoice_url": "https://us-store.myshopline.com/invoices/2505749057828590456543?secret=12A88A2583F0C225799572FAA5DC85161E3692D128EFEF3D1E2EF91A09673723",
"line_items": [
{
"gift_card": false,
"id": "16057477328340821055433562180574773283446798151735620",
"price": "1.0",
"product_id": "16057477328340821055433562",
"product_source": "main_site",
"quantity": 2,
"requires_shipping": true,
"title": "哈密瓜",
"variant_id": "18057477328344679815173562"
}
],
"logistics_amount": "0.0",
"logistics_tax": "0.0",
"note": "备注",
"payment_terms": {
"pay_channel_deal_id": "5748627027600126224",
"pay_status": "unpaid",
"payment_channel_name": "ACH Direct Debit"
},
"product_tax": "0.0",
"shipping_lines": {
"price": "0.0"
},
"status": "open",
"stock_reserved": false,
"tags": [
"商品定制"
],
"total_line_items_price": "2.0",
"total_price": "2.0",
"update_by": "2000008416",
"update_time": 1672998742733
}
]
}
这篇文章对你有帮助吗?

Error loading component.

Error loading component.