获取订单列表(增强版)
本接口为增强型订单列表接口,除了订单列表标准的查询条件之外,还可以按买家留言、订单旗帜、卖家备注、宝贝Id等条件查询订单。
一、请求参数
请求URL:
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| appid | String | 是 | 合作伙伴AppId | |
| timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
| seller_nick | String | 是 | oms38173182 | 抖店的账号,对应蜂巢授权返回doudianseller字段 |
| sign | String | 是 |
业务参数
| 参数名 | 类型 | 是否必须 | 示例值 | 说明 |
|---|---|---|---|---|
| create_time_start | Date | 和update_time_start 2选1 | 2022-08-01 10:00:00 | 订单创建时间开始。格式:yyyy-MM-dd HH:mm:ss |
| create_time_end | Date | 和update_time_start 2选1 | 2022-08-01 12:00:00 | 订单创建时间结束。格式:yyyy-MM-dd HH:mm:ss |
| update_time_start | Date | 和create_time_start 2选1 | 2022-08-01 10:00:00 | 订单更新时间开始。格式:yyyy-MM-dd HH:mm:ss |
| update_time_end | Date | 和create_time_end 2选1 | 2022-08-01 12:00:00 | 订单更新时间结束。格式:yyyy-MM-dd HH:mm:ss |
| page | int | 否 | 1 | 当前页,默认1 |
| page_size | int | 否 | 10 | 每页大小, 最大500, 每100为一个阶梯 |
| buyer_message | String | 否 | 买家留言 ,受buyer_message_op控制 | |
| buyer_message_op | String | 否 | 对买家留言的操作。 all 或是不传值,买家留言将不参与查询; eq: 等于 ; ne: 不等于; like: 模糊匹配(包含) | |
| seller_memo | String | 否 | 卖家备注,受seller_memo_op控制 | |
| seller_memo_op | String | 否 | 对卖家备注的操作。 all 或是不传值,卖家备注将不参与查询; eq: 等于 ; ne: 不等于; like: 模糊匹配(包含) | |
| seller_flag | int | 否 | 0为灰色旗标,5为红色旗标,数字越大颜色越深 0灰 1紫 2青 3绿 4橙 5红 | |
| product_id | long | 否 | 商品id | |
| product_name | String | 否 | 商品名称 | |
| tid | string | false | 订单号, 如果多个订单号,请用英文逗号”,”隔开 | |
| order_by | String | 否 | create_time | |
| order_asc | Bool | 否 | 排序类型,小到大或大到小,默认大到小 | |
| b_type | Int64 | 否 | 2 | 【下单端】 0、站外 1、火山 2、抖音 3、头条 4、西瓜 5、微信 6、值点app 7、头条lite 8、懂车帝 9、皮皮虾 11、抖音极速版 12、TikTok 13、musically 14、穿山甲 15、火山极速版 16、服务市场 26、番茄小说 27、UG教育营销电商平台 28、Jumanji 29、电商SDK |
| after_sale_status_desc | String | 否 | refund_success | 售后状态:all-全部,in_aftersale-售后中,refund-退款中,refund_success-退款成功,refund_fail-退款失败,exchange_success-换货成功 aftersale_close-售后关闭 |
| tracking_no | String | 否 | 435435 | 物流单号 |
| order_type | Int64 | 否 | 1 | 【订单类型】 0、普通订单 2、虚拟商品订单 4、电子券(poi核销) 5、三方核销 |
| order_status | String | 否 | 1 | 订单状态,”,”分隔多个状态 。 1 待确认/待支付-订单创建完毕;105-已支付; 2-备货中; 101-部分发货; 3-已发货(全部发货);4- 已取消;5 已完成(已收货)。 注:查询全部状态,传入空字符串; |
二、请求示例代码
Java
@Test public void GetOrderListExt() throws Exception { Map<String, Object> data = new HashMap<String, Object>(); data.put("appid", Config.AppId); Long timestamp = System.currentTimeMillis() / 1000; data.put("timestamp", timestamp.toString()); data.put("seller_nick", Config.DDSellerNick); data.put("create_time_start","2022-07-10 00:00:00" ); data.put("create_time_end", "2022-08-05 00:00:00"); data.put("order_by", "create_time"); data.put("order_asc", false); data.put("order_status", 2); data.put("seller_flag",4); data.put("page", "1"); data.put("page_size", 10); data.put("sign", Sign(data,Config.AppSecret)); // 调用服务API String resp = doHttpRequest(Config.DDTradeListExtUrl, data); System.out.println(resp); }三、返回结果
{ "code":0, "message":"ok", "data":{ "page":1, "total":7, "size":1, "shop_order_list":[ { "shop_id":4463798, "shop_name":"抖店开放平台测试专用店", "open_id":"", "order_id":"4962455340371850688", "open_address_id": "#aMZjXO9QJ5g12E9qDm+ab3CCSeYaceQR0lzzkLZ5M227Ii/0clehXUZblxXiulhUgDuyi7nkX9o29dgKyoqvfHmwePwhQ8Ac3gLyc9f221S2yjCDja0oidr3PZst+5rc2rVpMgUUrfY5", "order_level":2, "biz":2, "biz_desc":"小店", "order_type":0, "order_type_desc":"普通订单", "trade_type":0, "trade_type_desc":"普通", "order_status":2, "order_status_desc":"备货中", "main_status":2, "main_status_desc":"备货中", "pay_time":1659507021, "order_expire_time":1800, "finish_time":0, "create_time":1659507012, "update_time":1659599590, "cancel_reason":"", "buyer_words":"测试买家订单留言", "seller_words":"fZJS008368096332,;宅急送(ZJS008368153264,ZJS008370336166,ZJS008370336170)", "b_type":2, "b_type_desc":"抖音", "sub_b_type":3, "sub_b_type_desc":"H5", "app_id":1128, "pay_type":2, "channel_payment_no":"2022080322001492891430537350", "order_amount":1, "pay_amount":1, "post_amount":0, "post_insurance_amount":0, "modify_amount":0, "modify_post_amount":0, "promotion_amount":0, "promotion_shop_amount":0, "promotion_platform_amount":0, "shop_cost_amount":0, "platform_cost_amount":0, "promotion_talent_amount":0, "promotion_pay_amount":0, "post_tel":"18*******74", "post_receiver":"沝", "post_addr":{ "province":{ "name":"广东省", "id":"44" }, "city":{ "name":"深圳市", "id":"440300" }, "town":{ "name":"福田区", "id":"440304" }, "street":{ "name":"沙头街道", "id":"440304005" }, "detail":"沙头街道福强路****号深圳文化创意园" }, "exp_ship_time":1660319999, "ship_time":0, "logistics_info":[
], "sku_order_list":[ { "order_id":"4962455340371850688", "parent_order_id":"4962455340371850688", "order_level":3, "biz":2, "biz_desc":"小店", "order_type":0, "order_type_desc":"普通订单", "trade_type":0, "trade_type_desc":"普通", "order_status":2, "order_status_desc":"备货中", "main_status":2, "main_status_desc":"备货中", "pay_time":1659507021, "order_expire_time":1800, "finish_time":0, "create_time":1659507012, "update_time":1659507023, "cancel_reason":"", "b_type":2, "b_type_desc":"抖音", "sub_b_type":3, "sub_b_type_desc":"H5", "send_pay":0, "send_pay_desc":"-", "author_id":0, "author_name":"", "theme_type":"0", "theme_type_desc":"-", "app_id":1128, "room_id":0, "content_id":"", "video_id":"", "origin_id":"99514375927_3555024075120325438", "cid":0, "c_biz":8, "c_biz_desc":"小店自卖", "page_id":0, "pay_type":2, "channel_payment_no":"2022080322001492891430537350", "order_amount":1, "pay_amount":1, "post_insurance_amount":0, "modify_amount":0, "modify_post_amount":0, "promotion_amount":0, "promotion_shop_amount":0, "promotion_platform_amount":0, "shop_cost_amount":0, "platform_cost_amount":0, "promotion_talent_amount":0, "promotion_pay_amount":0, "code":"", "exp_ship_time":1660319999, "ship_time":0, "logistics_receipt_time":0, "confirm_receipt_time":0, "goods_type":0, "product_id":3555024075120325438, "sku_id":1735851598454807, "spec":[ { "name":"颜色", "value":"6727白色" }, { "name":"尺码", "value":"XXXL" } ], "first_cid":20009, "second_cid":20189, "third_cid":0, "fourth_cid":0, "out_sku_id":"22061726896489", "supplier_id":"", "out_product_id":"2206172643792", "warehouse_ids":[
], "out_warehouse_ids":[
], "inventory_type":"", "inventory_type_desc":"", "reduce_stock_type":1, "reduce_stock_type_desc":"下单减库存", "origin_amount":1, "has_tax":false, "item_num":1, "sum_amount":1, "source_platform":"", "product_pic":"https://p6-aio.ecombdimg.com/obj/ecom-shop-material/v1_ALSUvYM_71100414845941844510798_836a191d0f02ff98f2f4d01cd5db5978_sx_236546_www800-800", "is_comment":0, "product_name":"【测试商品勿拍】前缀华夫格假两件男士卫衣圆领春秋季潮牌腰果花", "inventory_list":[ { "warehouse_id":"", "out_warehouse_id":"", "inventory_type":1, "inventory_type_desc":"普通库存", "count":1, "warehouse_type":0 } ], "post_amount":0, "pre_sale_type":0, "after_sale_info":{ "after_sale_status":0, "after_sale_type":0, "refund_status":0 }, "promotion_redpack_amount":0, "promotion_redpack_platform_amount":0, "promotion_redpack_talent_amount":0, "receive_type":0, "need_serial_number":false, "ad_env_type":"", "sku_order_tag_ui":[ { "key":"pay_for_bad_label", "text":"坏损包退", "hover_text":"", "tag_type":"", "help_doc":"https://school.jinritemai.com/doudian/web/article/aHKK3UGTKEHB", "sort":0, "extra":"" }, { "key":"supply_7day_return_label", "text":"7天", "hover_text":"", "tag_type":"", "help_doc":"https://school.jinritemai.com/doudian/web/article/101835?from=shop_article", "sort":0, "extra":"" }, { "key":"cert_insurance_label", "text":"正品保障", "hover_text":"", "tag_type":"", "help_doc":"https://school.jinritemai.com/doudian/web/article/113754?rank=0\u0026fromPage=search_result\u0026searchInfo=7784423912345834344%3A0%3A0\u0026query=%E6%AD%A3%E5%93%81%E4%BF%9D%E9%9A%9C", "sort":0, "extra":"" }, { "key":"c_biz_self_sell", "text":"小店自卖", "hover_text":"达人通过「我的店铺」、或通过链接添加人店一体店铺商品(无官方店铺情况下,添加渠道号店铺商品也算)到橱窗、视频、直播,产生的订单为自卖订单", "tag_type":"grey", "help_doc":"", "sort":0, "extra":"" } ], "product_id_str":"", "appointment_ship_time":0, "room_id_str":"", "given_product_type":"", "master_sku_order_id":"", "card_voucher":null, "bundle_sku_info":null, "account_list":null, "sku_customization_info":null, "author_cost_amount":0, "only_platform_cost_amount":0 } ], "seller_remark_stars":4, "order_phase_list":[
], "doudian_open_id":"1@#HRgdNatn1aeLWwuf+ROVSQrCWXwquDqaZhy81IKrJji2a5tyoTt3MS6CjPWHvtu3nLg=", "serial_number_list":[
], "promotion_redpack_amount":0, "promotion_redpack_platform_amount":0, "promotion_redpack_talent_amount":0, "user_id_info":{ "id_card_no":"", "id_card_name":"" }, "appointment_ship_time":0, "d_car_shop_biz_data":{ "poi_id":"", "poi_name":"", "poi_addr":"", "poi_tel":"", "coupon_right":[
], "poi_pname":"", "poi_city_name":"", "poi_adname":"" }, "shop_order_tag_ui":null, "total_promotion_amount":0, "post_origin_amount":0, "post_promotion_amount":0, "user_tag_ui":null, "author_cost_amount":0, "only_platform_cost_amount":0 } ] }}说明: code为0表示成功,非0为失败,message会包含失败原因。 data字段包含订单列表的数据,返回订单的字段说明参见订单列表字段文档
说明doudian_open_id 是买家用户标识,doudian_open_id 在相同店铺里,不同的订单都一样。 如果不同的店铺,即使同一个买家,其doudian_open_id也不同。