淘宝开放平台API - 查询卖家已卖出的交易数据

简介: 淘宝开放平台(Taobao Open Platform)是基于淘宝各类电子商务业务的开放平台,提供外部合作伙伴参与服务淘宝用户的各类原材料,如业务API、账号体系、数据推送,奇门网关等。它是大淘宝电子商务基础服务的重要开放途径,将推动各行各业定制、创新、进化,并最终促成新商业文明生态圈的建立。我们的使命是把淘宝网的商品、用户、交易、物流等一系列电子商务基础服务,像水、电、煤一样输送给有需要的商家、开发者、社区媒体和各行各业。

淘宝开放平台(Taobao Open Platform)是基于淘宝各类电子商务业务的开放平台,提供外部合作伙伴参与服务淘宝用户的各类原材料,如业务API、账号体系、数据推送,奇门网关等。它是大淘宝电子商务基础服务的重要开放途径,将推动各行各业定制、创新、进化,并最终促成新商业文明生态圈的建立。我们的使命是把淘宝网的商品、用户、交易、物流等一系列电子商务基础服务,像水、电、煤一样输送给有需要的商家、开发者、社区媒体和各行各业。


适用返利系统、ERP、OMS软件等,需要通过商品API接口获取商品详情信息,或者订单详情来满足业务场景需要。具体包括:商品的标题、价格、SKU、主图、评价、订单详情、用户地址、等维度信息。


重点优化了抓取速度、及抓取稳定性,接口REST方式进行调用,支持Java、php、python等主流编程语言。


一、注册万邦开放平台账号


二、获取接口秘钥apikey


登录个人中心 - 系统设置 - 接口管理 找到接秘钥apikey,apikey 接口秘钥是调用接口的唯一凭证,请妥善保管!

三、请求示例


$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TradesSoldGetRequest;
$req->setFields("tid,type,status,payment,orders,rx_audit_status");
$req->setStartCreated("2000-01-01 00:00:00");
$req->setEndCreated("2000-01-01 23:59:59");
$req->setStatus("ALL_WAIT_PAY");
$req->setBuyerNick("zhangsan");
$req->setType("game_equipment");
$req->setExtType("service");
$req->setRateStatus("RATE_UNBUYER");
$req->setTag("time_card");
$req->setPageNo("1");
$req->setPageSize("40");
$req->setUseHasNext("true");
$req->setBuyerOpenId("AAHm5d-EAAeGwJedwSHpg8bT");
$resp = $c->execute($req, $sessionKey);

四、响应示例


<trades_sold_get_response>
    <total_results>100</total_results>
    <trades>
        <trade>
            <seller_nick>我在测试</seller_nick>
            <buyer_open_uid>AAHk5d-EAAeGwJedwSFu0XXX</buyer_open_uid>
            <title>麦包包</title>
            <type>fixed(一口价)</type>
            <created>2000-01-01 00:00:00</created>
            <tid>2231958349</tid>
            <acookie_id>1a11a0987628772c002ec7d0eec2a352</acookie_id>
            <sid>NP1021246146</sid>
            <seller_rate>true</seller_rate>
            <buyer_rate>true</buyer_rate>
            <status>TRADE_NO_CREATE_PAY</status>
            <payment>200.07</payment>
            <discount_fee>200.07</discount_fee>
            <adjust_fee>200.07</adjust_fee>
            <post_fee>200.07</post_fee>
            <total_fee>200.07</total_fee>
            <pay_time>2000-01-01 00:00:00</pay_time>
            <end_time>2000-01-01 00:00:00</end_time>
            <modified>2000-01-01 00:00:00</modified>
            <async_modified>2000-01-01 00:00:00</async_modified>
            <consign_time>2000-01-01 00:00:00</consign_time>
            <received_payment>200.07</received_payment>
            <commission_fee>200.07</commission_fee>
            <alipay_no>2009112081173831</alipay_no>
            <alipay_id>2011082299567459</alipay_id>
            <buyer_area>浙江省杭州市</buyer_area>
            <nut_feature>;buyernick:tester;card:123;buyerArea:杭州</nut_feature>
            <pic_path>http://img08.taobao.net/bao/uploaded/i8/T1jVXXXePbXXaoPB6a_091917.jpg</pic_path>
            <num_iid>3424234</num_iid>
            <price>200.07</price>
            <cod_fee>12.07</cod_fee>
            <cod_status>EW_CREATED(订单已创建)</cod_status>
            <shipping_type>free</shipping_type>
            <num>1</num>
            <point_fee>0</point_fee>
            <real_point_fee>0</real_point_fee>
            <buyer_obtain_point_fee>0</buyer_obtain_point_fee>
            <receiver_name>****东方</receiver_name>
            <receiver_state>浙江省</receiver_state>
            <receiver_city>杭州市</receiver_city>
            <receiver_district>西湖区</receiver_district>
            <receiver_town>三墎镇</receiver_town>
            <receiver_address>****淘宝城</receiver_address>
            <receiver_zip>223700</receiver_zip>
            <receiver_mobile>****1826</receiver_mobile>
            <receiver_phone>****5372</receiver_phone>
            <seller_flag>1</seller_flag>
            <is_lgtype>true</is_lgtype>
            <lg_aging_type>次日达</lg_aging_type>
            <lg_aging>2012-06-19 15:16:14</lg_aging>
            <is_brand_sale>true</is_brand_sale>
            <is_force_wlb>true</is_force_wlb>
            <has_buyer_message>true</has_buyer_message>
            <credit_card_fee>30.5</credit_card_fee>
            <trade_from>WAP,JHS</trade_from>
            <step_trade_status>FRONT_NOPAID_FINAL_NOPAID</step_trade_status>
            <step_paid_fee>525.70</step_paid_fee>
            <mark_desc>该订单需要延长收货时间</mark_desc>
            <has_yfx>true</has_yfx>
            <yfx_fee>0.50</yfx_fee>
            <yfx_id>135751716473138</yfx_id>
            <yfx_type>taojinbi</yfx_type>
            <trade_source>ownshop</trade_source>
            <send_time>2000-01-01</send_time>
            <seller_can_rate>true</seller_can_rate>
            <is_part_consign>true</is_part_consign>
            <is_wt>true</is_wt>
            <is_daixiao>true</is_daixiao>
            <o2o>crm</o2o>
            <o2o_guide_id>123456</o2o_guide_id>
            <o2o_guide_name>西湖门店导购员1</o2o_guide_name>
            <o2o_shop_id>123456</o2o_shop_id>
            <o2o_shop_name>西湖门店</o2o_shop_name>
            <o2o_delivery>inshop</o2o_delivery>
            <o2o_out_trade_id>123456</o2o_out_trade_id>
            <orders>
                <order>
                    <title>山寨版测试机器</title>
                    <pic_path>http://img08.taobao.net/bao/uploaded/i8/T1jVXXXePbXXaoPB6a_091917.jpg</pic_path>
                    <price>200.07</price>
                    <num_iid>2342344</num_iid>
                    <sku_id>5937146</sku_id>
                    <outer_iid>152e442aefe88dd41cb0879232c0dcb0</outer_iid>
                    <outer_sku_id>81893848</outer_sku_id>
                    <refund_status>SUCCESS(退款成功)</refund_status>
                    <status>TRADE_NO_CREATE_PAY</status>
                    <oid>2231958349</oid>
                    <total_fee>200.07</total_fee>
                    <payment>200.07</payment>
                    <discount_fee>200.07</discount_fee>
                    <adjust_fee>1.01</adjust_fee>
                    <divide_order_fee>21.00</divide_order_fee>
                    <part_mjz_discount>21.00</part_mjz_discount>
                    <sku_properties_name>颜色:桔色;尺码:M</sku_properties_name>
                    <item_meal_id>2564854632</item_meal_id>
                    <item_meal_name>M8原装电池:便携支架:M8专用座充:莫凡保护袋</item_meal_name>
                    <num>1</num>
                    <buyer_rate>true</buyer_rate>
                    <seller_rate>true</seller_rate>
                    <refund_id>2231958349</refund_id>
                    <seller_type>B(商城商家)</seller_type>
                    <cid>123456</cid>
                    <end_time>2012-04-07 00:00:00</end_time>
                    <consign_time>2013-01-13 15:23:00</consign_time>
                    <shipping_type>post</shipping_type>
                    <logistics_company>顺风快递</logistics_company>
                    <invoice_no>05432465</invoice_no>
                    <bind_oid>23194074143138</bind_oid>
                    <is_daixiao>true</is_daixiao>
                    <ticket_outer_id>123456abcd</ticket_outer_id>
                    <ticket_expdate_key>100FFFFFF02374020000002001020304000A</ticket_expdate_key>
                    <is_www>true</is_www>
                    <store_code>南京QDHEWL-0004</store_code>
                    <tmser_spu_code>家装干支装服务</tmser_spu_code>
                    <sub_order_tax_fee>0</sub_order_tax_fee>
                    <sub_order_tax_rate>0</sub_order_tax_rate>
                    <zhengji_status>1</zhengji_status>
                    <md_qualification>true_access</md_qualification>
                    <md_fee>999</md_fee>
                    <sub_order_tax_promotion_fee>0</sub_order_tax_promotion_fee>
                    <tax_free>true</tax_free>
                    <tax_coupon_discount>0</tax_coupon_discount>
                    <special_refund_type>priceProtect</special_refund_type>
                    <is_devalue_fee>true</is_devalue_fee>
                    <is_idle>1</is_idle>
                    <promise_collect_time>2000-01-01 00:00:00</promise_collect_time>
                    <is_force_dc>true</is_force_dc>
                    <shp_info>
                        <ship_info>
                            <transport_type>express,seller,instant等</transport_type>
                        </ship_info>
                    </shp_info>
                </order>
            </orders>
            <service_orders>
                <service_order>
                    <oid>110770592823138</oid>
                    <item_oid>110770592803138</item_oid>
                    <service_id>2342344</service_id>
                    <service_detail_url>http://wt.taobao.com/plan.htm?plan_id=planId</service_detail_url>
                    <num>1</num>
                    <price>39.09</price>
                    <payment>29.98</payment>
                    <title>滚筒洗衣机</title>
                    <total_fee>39.09</total_fee>
                    <buyer_nick>小倩2005</buyer_nick>
                    <refund_id>2231958349</refund_id>
                    <seller_nick>麦包包</seller_nick>
                    <pic_path>http://img08.taobao.com/bao/upload/i8/T1jVXXXePb_a0908.jpg</pic_path>
                    <tmser_spu_code>家装干支装服务</tmser_spu_code>
                </service_order>
            </service_orders>
            <zero_purchase>true</zero_purchase>
            <receiver_country>中国</receiver_country>
            <order_tax_fee>0</order_tax_fee>
            <shop_pick>1</shop_pick>
            <rx_audit_status>0</rx_audit_status>
            <post_gate_declare>true</post_gate_declare>
            <cross_bonded_declare>true</cross_bonded_declare>
            <order_tax_promotion_fee>0</order_tax_promotion_fee>
            <service_type>timedd,jiaju</service_type>
            <is_o2o_passport>true</is_o2o_passport>
            <tmall_delivery>true</tmall_delivery>
            <threepl_timing>true</threepl_timing>
            <cn_service>84_50</cn_service>
            <cutoff_minutes>660</cutoff_minutes>
            <es_time>4</es_time>
            <delivery_time>2018-06-09 12:13:14</delivery_time>
            <collect_time>2018-06-09 12:13:14</collect_time>
            <dispatch_time>2018-06-09 12:13:14</dispatch_time>
            <sign_time>2018-06-09 12:13:14</sign_time>
            <delivery_cps>STO</delivery_cps>
            <es_range>09:00-12:00</es_range>
            <es_date>2018-06-09</es_date>
            <os_range>09:00-12:00</os_range>
            <os_date>2018-06-09</os_date>
            <asdp_biz_type>logistics_upgrade</asdp_biz_type>
            <asdp_ads>201</asdp_ads>
            <drug_register>1</drug_register>
            <promise_sign_time>2000-01-01 00:00:00</promise_sign_time>
            <oaid>2w2RYE45iahnF4aiaJ7pHKCJ3Hwnbgnq2PH3AfpQVyWZNHKS9wNgAAOUfCVt9XZMetogNHwc</oaid>
            <scenario_group>TXD_B2C_FRESH_HALFDAY</scenario_group>
            <is_force_dc>true</is_force_dc>
            <buyer_nick>我在测试</buyer_nick>
        </trade>
    </trades>
    <has_next>true</has_next>
</trades_sold_get_response>
相关文章
|
6月前
|
JSON 缓存 算法
如何通过API获取1688商品类目数据:技术实现指南
1688开放平台提供alibaba.category.get接口,支持获取全量商品类目树。RESTful架构,返回JSON数据,含类目ID、名称、层级等信息。需注册账号、创建应用并授权。请求需签名认证,QPS限10次,建议缓存更新周期≥24小时。
536 2
|
6月前
|
JSON 安全 API
亚马逊商品列表API秘籍!轻松获取商品列表数据
亚马逊商品列表API(SP-API)提供标准化接口,支持通过关键词、分类、价格等条件搜索商品,获取ASIN、价格、销量等信息。采用OAuth 2.0认证与AWS签名,保障安全。数据以JSON格式传输,便于开发者批量获取与分析。
|
6月前
|
API 开发工具 开发者
百宝箱开放平台 ✖️ API 使用过程中的常见问题
本文介绍了百宝箱OpenAPI调用的关键步骤与常见问题处理,涵盖会话ID获取、授权令牌配置、用户ID填写及多轮对话参数匹配等核心要点,帮助开发者快速定位并解决接口报错问题。
537 1
|
6月前
|
JSON 监控 API
小红书笔记评论API:一键获取分层评论与用户互动数据
小红书笔记评论API可获取指定笔记的评论详情,包括内容、点赞数、评论者信息等,支持分页与身份认证,返回JSON格式数据,适用于舆情监控、用户行为分析等场景。
|
6月前
|
数据采集 JSON API
微店API使用指南:高效获取商品列表数据
本文介绍如何使用Python爬虫调用微店item_search接口,根据关键词搜索商品并获取商品列表数据,涵盖请求方式、JSON数据解析、分页参数设置及筛选排序功能,适用于电商数据分析与竞品研究。
|
6月前
|
JSON API 数据格式
淘宝拍立淘按图搜索API系列,json数据返回
淘宝拍立淘按图搜索API系列通过图像识别技术实现商品搜索功能,调用后返回的JSON数据包含商品标题、图片链接、价格、销量、相似度评分等核心字段,支持分页和详细商品信息展示。以下是该API接口返回的JSON数据示例及详细解析:
|
6月前
|
JSON 安全 API
淘宝天猫上货API接口技术指南
本文介绍淘宝天猫上货API,详解其RESTful接口原理、认证流程及Python调用示例。涵盖商品添加、签名生成、响应处理,并提供代码实现与最佳实践,助力开发者高效实现自动化批量上架。
615 3
|
6月前
|
自然语言处理 监控 API
速卖通商品详情API秘籍!轻松获取SKU属性数据
速卖通商品详情API(aliexpress.item.get)支持通过编程获取商品标题、价格、SKU、库存、销量、物流模板、评价及店铺信息,适用于价格监控、选品分析等场景。接口支持多语言返回,采用AppKey+AppSecret+Token认证,需签名验证,确保安全调用。
|
6月前
|
XML JSON API
苏宁商品详情API秘籍!轻松获取商品详情数据
苏宁商品详情API基于RESTful架构,支持JSON/XML格式,通过AppKey、AppSecret与签名三重认证,结合OAuth 2.0实现安全调用。开发者可获取商品名称、价格、销量、库存、促销等实时数据,适用于电商分析与商业智能。接口强制使用HTTPS协议,支持POST/GET请求,统一采用UTF-8编码,确保数据传输安全可靠。
|
6月前
|
安全 API
亚马逊商品详情 API 秘籍!轻松获取 SKU 属性数据
亚马逊商品详情API是官方接口,通过ASIN获取商品标题、价格、库存、评价等50余项数据,支持多站点查询。包含Product Advertising API与MWS两类,分别用于商品信息获取和卖家店铺管理,采用AWS4-HMAC-SHA256认证,保障请求安全。