API文档中心

热门接口:产品ID找同款全量维权查询万能转链字符串ID转换 (有API需求可联系本站)

淘客渠道订单维权查询接口文档

调用权限:核心接口会员卡调用,订单查询卡
接口使用场景等说明:

本接口是用来查询淘宝联盟渠道和会员订单的维权查询,在联盟官网“效果报表——订单数据——渠道效果报表——维权退款订单明细”,查询面没有“全量维权订单”接口范围广。


【推荐使用全量维权订单查询接口——可以查询普通订单、渠道订单、会员订单的维权】


适用范围:

目前只支持淘宝联盟的渠道订单和会员订单维权(即带渠道relationId参数和sid的订单)查询,

暂时不支持普通常规淘客维权订单,如果需要查询普通订单,请使用全理维权订单查询接口。


其它说明:

目前参数只能通过start_time参数开始的时间点,不断翻页查询淘宝联盟维权订单,不能指定时间段,因此,目前只能通过不断地翻页来查,建议你每次查询,固定一个时间类型(比如以维权发起时间),然后如果有取得返回值,则提取最后一笔订单的维权发起时间(tk_refund_time),做为下一次查询的start_time参数时间起点。

调用说明

本接口需要您在会员中心授权(如果多用户可传入sessionkey参数)

接口请求地址

环境 http 地址 https 地址
正式环境 http://api.veapi.cn/tbk/refundorder 暂无

请求方式:GETPOST

请求参数

参数名称 参数类型 必填 示例值 描述
vekey String V123M56 公共参数,接口秘钥,请在会员中心获取
page_no Number 1 页码
page_size Number 1 页大小。
search_type Number 1 1-维权发起时间,2-订单结算时间(正向订单),3-维权完成时间,4-订单创建时间,5-订单更新时间,即增量查询订单(出参更新字段modified_time)。
refund_type Number 1 1 表示2方,2表示3方,0表示不限
start_time Date 2018-10-10 00:00:00 开始时间
biz_type Number 1 1代表渠道关系id,2代表会员关系id
sessionkey String 7002 多用户专用。如果您的会员卡是多用户版订单查询接口,若要查不同的帐号,请提供该帐号授权的sessionkey值
account_id String 联盟号id 会员中心有多个授权时,用本参数指定要查询哪一个联盟号id下的订单,联盟号ID请到会员中心授权页查看

请求示例

  • HTTP
  • PHP
  • JAVA
  • PYTHON
GET/POST  http://api.veapi.cn/tbk/refundorder?vekey=xxx&start_time=2020-12-20+11:40:00&search_type=1&refund_type=1&biz_type=1 

使用curl函数,curl不是php原生库,需要安装才能使用

$api="http://api.veapi.cn/tbk/refundorder?vekey=xxx&start_time=2020-12-20+11:40:00&search_type=1&refund_type=1&biz_type=1";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api);
//curl_setopt($ch, CURLOPT_POST, true);  //POST方式时启用
//curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );  //POST方式时传参

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  //如果使用https请启用
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);  //如果使用https请启用
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );   //返回数据流,不直接输出
curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快
curl_setopt($ch, CURLOPT_TIMEOUT, 6);  //允许执行的最长秒数。这里设定6S
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

echo $result; //返回值
使用okhttp3/httpclient/jsoup/hutool,以hutool为例:

import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpRequest;

public class testGetParam {

    public static void main(String[] args) {
        // API网址
        String url = "http://api.veapi.cn/tbk/refundorder?vekey=xxx&start_time=2020-12-20+11:40:00&search_type=1&refund_type=1&biz_type=1";
        // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
        //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");

        // 发送请求
        String result = HttpRequest.get(url)
                .timeout(10000)//设置超时,毫秒
                .execute().body();
        System.out.println(result);
    }
}
推荐使用 requests,支持访问http,https网页:

import requests
		
# 要访问的API网页
target_url = "http://api.veapi.cn/tbk/refundorder?vekey=xxx&start_time=2020-12-20+11:40:00&search_type=1&refund_type=1&biz_type=1"

# 发送请求
response = requests.get(target_url)

# 获取页面内容
if response.status_code == 200:
	print response.text

返回值(JSON)

参数名称 参数类型 示例值 描述
result_code Number 200 接口返回值信息,跟rpc架构保持一致
biz_error_desc String   业务错误信息
biz_error_code Number 102 业务错误码101,102,103
page_no Number 1 页码
page_size Number 20 页大小
total_count Number 1 总值
tb_trade_parent_id Number 188414580 淘宝订单编号
special_id Number   会员关系id
relation_id Number 221316456 渠道关系id
tk3rd_pub_id Number   第三方推广者memberid
tk_pub_id Number   推广者memberid
tk_subsidy_fee_refund3rd_pub String   第三方应该返还的补贴
tk_commission_fee_refund3rd_pub String   第三方应该返还的佣金
tk_subsidy_fee_refund_pub String 0.0500 第二方应该返还的补贴(不包括技术服务费)
tk_commission_fee_refund_pub String   第二方应该返还的佣金(不包括技术服务费)
tk_refund_suit_time Date   维权完成时间
tk_refund_time Date 2020-12-20 12:41:22 维权创建时间
earning_time Date 2020-12-20 11:44:25 订单结算时间
tb_trade_create_time Date 2020-12-17 16:48:36 订单创建时间
refund_status Number 15 维权状态:4-维权创建(淘客结算回执) ,2-维权成功(淘客结算回执) ,3-维权失败(淘客结算回执) ,11-发生多次维权,待处理,12-从淘客处补扣(钱已结给淘客) 等待扣款,13-从淘客处补扣(钱已结给淘客) 扣款成功,14-从卖家处补扣(钱已结给卖家) 等待扣款,15-从卖家处补扣(钱已结给卖家)扣款成功
tb_auction_title String 南极人男士睡衣 宝贝标题
tb_trade_id Number 84145804 淘宝子订单编号
refund_fee String 59.0000 维权金额
tb_trade_finish_price String 59.0000 结算金额
tk_pub_show_return_fee String 1.8300 应返商家金额(二方)
tk3rd_pub_show_return_fee String   应返商家金额(三方)
refund_type Number   1表示2方,2表示3方
alsc_pid String   (口碑订单)口碑父订单号
alsc_id String   (口碑订单)口碑子订单号
modified_time Date   更新时间

返回示例

【提示】推广链接通常有时效性,示例中的链接为创建文档时生成,仅用于展示返回结果使用,有可能已失效。
{ "error": "0", "msg": "操作成功", "data": { "biz_error_code": 0, "data": { "page_no": 1, "page_size": 30, "results": { "result": [ { "earning_time": "2020-12-2011:44:25", "refund_fee": "59.0000", "refund_status": 2, "refund_type": 1, "relation_id": 2648201592, "tb_auction_title": "南极人男士睡衣男薄款夏季夏天长袖纯棉春秋冬全棉青年家居服套装", "tb_trade_create_time": "2020-12-1716:48:36", "tb_trade_finish_price": "59.0000", "tb_trade_id": 1448841458045748332, "tb_trade_parent_id": 1448841458045748332, "tk_commission_fee_refund_pub": "1.4200", "tk_pub_id": 316680049, "tk_pub_show_return_fee": "1.8300", "tk_refund_suit_time": "2020-12-2212:20:55", "tk_refund_time": "2020-12-2012:41:22", "tk_subsidy_fee_refund_pub": "0.0500" } ] }, "total_count": 1 }, "result_code": 200 } }

错误码

如果error不为0时,请点此查看错误码表格

在线
客服

会员请加QQ群交流:

微信
咨询

加微信咨询
顶部