taobao.trades.sold.get-查询卖家已卖出的交易数据(根据创建时间),淘宝店铺卖出订单查询API接口,R2接口,oAuth2.0交易接口代码分享

一、taobao.trades.sold.get-查询卖家已卖出的交易数据(根据创建时间),淘宝店铺卖出订单查询API接口,R2接口,oAuth2.0交易接口代码分享

搜索当前会话用户作为卖家已卖出的交易数据(只能获取到三个月以内的交易信息)
1. 返回的数据结果是以订单的创建时间倒序排列的。
2. 返回的数据结果只包含了订单的部分数据,可通过taobao.trade.fullinfo.get获取订单详情。
注意:type字段的说明,如果该字段不传,接口默认只查4种类型订单,非默认查询的订单是不返回。遇到订单查不到的情况的,解决办法就是type加上订单类型就可正常返回了。

3.公共参数

名称 类型 必须 描述
key String 调用key(必须以GET方式拼接在URL中,点击获取测试key和secret
secret String 调用密钥
api_name String API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cache String [yes,no]默认yes,将调用缓存的数据,速度比较快
result_type String [json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
lang String [cn,en,ru]翻译语言,默认cn简体中文
version String API版本

 4.请求参数 

请求参数:api=

参数说明:其它参数:参考淘宝开放平台接口文档,与淘宝的参数一致 https://open.taobao.com/api.htm?docId=140&docType=2

名称 类型 必须 描述
api String 淘宝开放平台的接口名(如:taobao.picture.upload( 上传单张图片 ))
session String 授权换取的session_id
[其他参数] String 其它参数:参考淘宝开放平台接口文档,与淘宝的参数一致
https://open.taobao.com/api.htm?docId=140&docType=2

5.请求示例

# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://vx19970108018/taobao/custom/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&method="
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    print(json_obj)

 6.响应示例

{"response":{"trades_sold_get_response":{"request_id":"15ryekq7hious","total_results":15141,"has_next":false,"trades":{"trade":[{"adjust_fee":"0.00","alipay_id":2088602026726346,"alipay_no":"2022063022001126341458655132","buyer_area":"","buyer_nick":"tb128314132","buyer_obtain_point_fee":0,"buyer_rate":false,"cod_fee":"0.00","cod_status":"NEW_CREATED","created":"2022-06-30 08:33:19","discount_fee":"0.00","encrypt_alipay_id":"","is_brand_sale":false,"is_force_wlb":false,"is_lgtype":false,"modified":"2022-06-30 08:33:21","num":2,"num_iid":570256004747,"orders":{"order":[{"adjust_fee":"0.00","buyer_rate":false,"cid":125162005,"discount_fee":"0.50","divide_order_fee":"21.50","is_daixiao":false,"num":2,"num_iid":570256004747,"oid":"2728629360998592110","outer_iid":"19375","outer_sku_id":"31374","payment":"24.50","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i3\/2787228717\/O1CN01cnvo7a2EGRFcGRc0x_!!0-item_pic.jpg","price":"11.00","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4861417920481","sku_properties_name":"颜色分类:60W","status":"WAIT_SELLER_SEND_GOODS","title":"TPA3118数字功放模块PBTL单声道数字功放板功放模块1X60W","total_fee":"21.50","consign_time":""}]},"pay_time":"2022-06-30 08:33:21","payment":"24.50","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i3\/2787228717\/O1CN01cnvo7a2EGRFcGRc0x_!!0-item_pic.jpg","point_fee":0,"post_fee":"3.00","price":"11.00","real_point_fee":0,"received_payment":"0.00","receiver_address":"广东省中山古镇同益园街号一号铺","receiver_city":"中山市","receiver_town":"古镇镇","receiver_district":"","receiver_mobile":"19970108018","receiver_phone":"","receiver_name":"付涛","receiver_state":"广东省","receiver_zip":"000000","seller_flag":0,"has_buyer_message":false,"seller_nick":"华来信电子企业店","seller_rate":false,"shipping_type":"express","status":"WAIT_SELLER_SEND_GOODS","tid":"2728629360998592110","title":"华来信电子企业店","total_fee":"22.00","type":"fixed","trade_from":"WAP,WAP","oaid":"1NFlNyNQ8IqxrSOo7pA49OBeE1qxqkCC19RCqNzHxDzfpSTALU6GX5x1672vKCAcLvRfAQ","consign_time":"","rx_audit_status":""},{"adjust_fee":"0.00","alipay_id":2088802513427501,"alipay_no":"2022063022001127501414424827","buyer_area":"","buyer_nick":"yh4059","buyer_obtain_point_fee":0,"buyer_rate":false,"cod_fee":"0.00","cod_status":"NEW_CREATED","created":"2022-06-30 08:21:27","discount_fee":"0.00","encrypt_alipay_id":"","is_brand_sale":false,"is_force_wlb":false,"is_lgtype":false,"modified":"2022-06-30 08:21:37","num":1,"num_iid":571923617736,"orders":{"order":[{"adjust_fee":"0.00","buyer_rate":false,"cid":50006524,"discount_fee":"0.90","divide_order_fee":"12.60","is_daixiao":false,"num":1,"num_iid":571923617736,"oid":"2729601613350033734","outer_iid":"29237","outer_sku_id":"29505","payment":"15.60","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/O1CN01zI6zDl2EGR1wWGYW0_!!2787228717.jpg","price":"13.50","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4032738613488","sku_properties_name":"颜色分类:1路-导轨版;线圈电压:5V","status":"WAIT_SELLER_SEND_GOODS","title":"1路\/2路\/4路30A继电器模块带光耦隔离大电流支持高低电平5V12V24V","total_fee":"12.60","consign_time":""}]},"pay_time":"2022-06-30 08:21:37","payment":"15.60","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/O1CN01zI6zDl2EGR1wWGYW0_!!2787228717.jpg","point_fee":0,"post_fee":"3.00","price":"13.50","real_point_fee":0,"received_payment":"0.00","receiver_address":"长安街道陇北一号","receiver_city":"洛阳市","receiver_town":"长安路街道","receiver_district":"涧西区","receiver_mobile":"19970108018","receiver_phone":"","receiver_name":"杨贵妃","receiver_state":"河南省","receiver_zip":"471003","seller_flag":0,"has_buyer_message":false,"seller_nick":"华来信电子企业店","seller_rate":false,"shipping_type":"express","status":"WAIT_SELLER_SEND_GOODS","tid":"2729601613350033734","title":"华来信电子企业店","total_fee":"13.50","type":"fixed","trade_from":"WAP,WAP","oaid":"11fo04F6nYHQ2WjtX387qj7CpGTW7wsDvBCqjQiaz31IY7qkGibUeV3Eex1bib2YicIFUAOBJP","consign_time":"","rx_audit_status":""},{"adjust_fee":"0.00","alipay_id":2088702900794802,"alipay_no":"2022063022001194801457220322","buyer_area":"","buyer_nick":"liu84014696","buyer_obtain_point_fee":0,"buyer_rate":false,"cod_fee":"0.00","cod_status":"NEW_CREATED","created":"2022-06-30 08:13:04","discount_fee":"0.00","encrypt_alipay_id":"","is_brand_sale":false,"is_force_wlb":false,"is_lgtype":false,"modified":"2022-06-30 08:13:10","num":1,"num_iid":575907960323,"orders":{"order":[{"adjust_fee":"0.00","buyer_rate":false,"cid":50002928,"discount_fee":"0.78","divide_order_fee":"7.72","is_daixiao":false,"num":1,"num_iid":575907960323,"oid":"2729591713780144238","outer_iid":"10039","outer_sku_id":"","payment":"10.72","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/O1CN01uz7OIQ2EGRExJb2lx_!!2787228717.jpg","price":"8.50","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"","sku_properties_name":"","status":"WAIT_SELLER_SEND_GOODS","title":"XH-M203水位控制器 全自动水位控制器 水位开关 液位水泵控制器","total_fee":"7.72","consign_time":""}]},"pay_time":"2022-06-30 08:13:09","payment":"10.72","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/O1CN01uz7OIQ2EGRExJb2lx_!!2787228717.jpg","point_fee":0,"post_fee":"3.00","price":"8.50","real_point_fee":0,"received_payment":"0.00","receiver_address":望新街道望海北钢集团","receiver_city":"营口市","receiver_town":"望海街道","receiver_district":"鲅鱼圈区","receiver_mobile":"19970108018","receiver_phone":"","receiver_name":"刘**","receiver_state":"辽宁省","receiver_zip":"115007","seller_flag":0,"has_buyer_message":false,"seller_nick":"华来信电子企业店","seller_rate":false,"shipping_type":"express","status":"WAIT_SELLER_SEND_GOODS","tid":"2729591713780144238","title":"华来信电子企业店","total_fee":"8.50","type":"fixed","trade_from":"WAP,WAP","oaid":"1wVkllmDTZsHKZ0yxt7kuFAltLZgCiby4Qv46wKrB4kBIIMZWw5qkPKU80uqDicKQx1C3wnk","consign_time":"","rx_audit_status":""},{"adjust_fee":"0.00","alipay_id":2088222941321682,"alipay_no":"2022063022001121681435550674","buyer_area":"未知","buyer_nick":"yongyew00","buyer_obtain_point_fee":0,"buyer_rate":false,"cod_fee":"0.00","cod_status":"NEW_CREATED","created":"2022-06-30 08:11:34","discount_fee":"0.00","encrypt_alipay_id":"","is_brand_sale":false,"is_force_wlb":false,"is_lgtype":false,"modified":"2022-06-30 08:11:44","num":0,"num_iid":0,"orders":{"order":[{"adjust_fee":"0.00","buyer_rate":false,"cid":50015939,"discount_fee":"0.10","divide_order_fee":"2.40","is_daixiao":false,"num":1,"num_iid":549230697153,"oid":"2729919242173047120","outer_iid":"28954","outer_sku_id":"16892","payment":"2.40","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i1\/2787228717\/O1CN01XrmizT2EGR9wRfoR0_!!2787228717.jpg","price":"2.50","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4396130603362","sku_properties_name":"颜色分类:LCUS-1型1路-配套使用延长线","status":"WAIT_SELLER_SEND_GOODS","title":"LCUS-1型1路电脑串口USB控制继电器模块PLC开关模组LCUS-2型2路","total_fee":"2.40","consign_time":""},{"adjust_fee":"0.00","buyer_rate":false,"cid":50015939,"discount_fee":"0.10","divide_order_fee":"4.40","is_daixiao":false,"num":3,"num_iid":549230697153,"oid":"2729919242174047120","outer_iid":"28954","outer_sku_id":"27389","payment":"4.40","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/O1CN01JnzNmh2EGR9qODXOS_!!2787228717.jpg","price":"1.50","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4552774624936","sku_properties_name":"颜色分类:LCUS-2路4路-配套使用延长线","status":"WAIT_SELLER_SEND_GOODS","title":"LCUS-1型1路电脑串口USB控制继电器模块PLC开关模组LCUS-2型2路","total_fee":"4.40","consign_time":""},{"adjust_fee":"0.00","buyer_rate":false,"cid":50015939,"discount_fee":"0.10","divide_order_fee":"80.90","is_daixiao":false,"num":3,"num_iid":549230697153,"oid":"2729919242175047120","outer_iid":"28954","outer_sku_id":"15334","payment":"80.90","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/O1CN01O5DKVQ2EGR9r0cfCm_!!2787228717.jpg","price":"27.00","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4552774624935","sku_properties_name":"颜色分类:LCUS-4型4路","status":"WAIT_SELLER_SEND_GOODS","title":"LCUS-1型1路电脑串口USB控制继电器模块PLC开关模组LCUS-2型2路","total_fee":"80.90","consign_time":""}]},"pay_time":"2022-06-30 08:11:43","payment":"87.70","pic_path":"","point_fee":0,"post_fee":"0.00","price":"","real_point_fee":0,"received_payment":"0.00","receiver_address":"中国\/浙江省\/杭州市\/萧山区福龙街道下沙村六组*70号5楼菜鸟【新加坡 直邮】@*******#*************#","receiver_city":"杭州市","receiver_town":"","receiver_district":"萧山区","receiver_mobile":"19970108018","receiver_phone":"","receiver_name":"c**","receiver_state":"浙江省","receiver_zip":"000000","seller_flag":0,"has_buyer_message":false,"seller_nick":"华来信电子企业店","seller_rate":false,"shipping_type":"express","status":"WAIT_SELLER_SEND_GOODS","tid":"2729919242172047120","title":"华来信电子企业店","total_fee":"88.00","type":"fixed","trade_from":"WAP,WAP","oaid":"1pknbwNiaiaLxyNibSu4J0PPUSLBkIXnCNHvZVgFCia8LjDNuq4xfgqkTLx1PQevD6TsrzsYNg","consign_time":"","rx_audit_status":""},{"adjust_fee":"0.00","alipay_id":20889127646552801,"alipay_no":"20220630220001155281444291361","buyer_area":"移动","buyer_nick":"wuxhui41","buyer_obtain_point_fee":0,"buyer_rate":false,"cod_fee":"0.00","cod_status":"NEW_CREATED","created":"2022-06-30 08:01:24","discount_fee":"0.00","encrypt_alipay_id":"","is_brand_sale":false,"is_force_wlb":false,"is_lgtype":false,"modified":"2022-06-30 09:08:09","num":0,"num_iid":0,"orders":{"order":[{"adjust_fee":"-143.22","buyer_rate":false,"cid":50006524,"discount_fee":"1.00","divide_order_fee":"","is_daixiao":false,"num":50,"num_iid":553854397273,"oid":"1603823559028206579","outer_iid":"27875","outer_sku_id":"23173","payment":"1305.78","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i2\/2787228717\/O1CN01hloyMq2EGR12Xdxpt_!!2787228717.jpg","price":"29.00","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4557842590927","sku_properties_name":"颜色分类:USB串口控制器;线圈电压:5v;触发模式:低电平触发","status":"WAIT_BUYER_PAY","title":"16路继电器5v12v24v光耦隔离高低电平触发PLC控制板多路继电器模","total_fee":"1305.78","consign_time":""},{"adjust_fee":"-57.23","buyer_rate":false,"cid":50006524,"discount_fee":"1.00","divide_order_fee":"","is_daixiao":false,"num":20,"num_iid":553854397273,"oid":"1603823559029206579","outer_iid":"27875","outer_sku_id":"27367","payment":"521.77","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i4\/2787228717\/TB2UNA4HxSYBuNjSsphXXbGvVXa_!!2787228717.jpg","price":"29.00","refund_status":"NO_REFUND","seller_rate":false,"seller_type":"C","sku_id":"4557842590926","sku_properties_name":"颜色分类:BESTEP;线圈电压:5v;触发模式:低电平触发","status":"WAIT_BUYER_PAY","title":"16路继电器5v12v24v光耦隔离高低电平触发PLC控制板多路继电器模","total_fee":"521.77","consign_time":""},{"adjust_fee":"-56.75","buyer_rate":false,"cid":50006524,"discount_fee":"3.30","divide_order_fee":"","is_daixiao":false,"num":35,"num_iid":573694566102,"oid":"1603823559030206579","outer_iid":"28946","outer_sku_id":"27364","payment":"517.45","pic_path":"https:\/\/img.alicdn.com\/bao\/uploaded\/i1\/2787228717\/O1CN01Q49u2e2EGR0tdyfY7_!!2787228717.jpg","price":"16.50","refund_status":"NO_REFUND
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值