接口使用场景等说明:本接口用于查询抖音站内达人的订单,抖客不可用。
达人在抖音内通过视频橱窗等方式推广的订单,在2023年4月后官方把达人与抖客的订单查询接口分离,原有抖客订单查询接口无法再查询达人的订单。因此,您需要使用本接口来查询达人订单。
注意:
1、本接口所用的授权和抖客的授权不通用。请到“会员中心——授权管理——抖音达人授权”用您的达人帐号授权。
2、达人授权只能保持15天,多用户或企业版会员,可以使用本站提供的刷新接口来定时刷新接口,具体原理请参考TOKEN刷新接口。
| 环境 | http 地址 | https 地址 |
|---|---|---|
| 正式环境 | http://api.veapi.cn/douyin/alliance_kol_orders | 暂无 |
| 参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
| size | Int64 | 否 | 默认15 | 每页订单数目,取值区间: [1, 20] |
| cursor | String | 否 | 6917944236115432742 | 下一页索引(首次请求时参数不传),在请求第二页时才使用,功能相当于翻页参数. |
| start_time | String | 否 | 2006-01-02 15:04:05 | 支付时间开始,最早支持90天前 |
| end_time | String | 否 | 2006-01-02 15:04:05 | 支付时间结束 |
| order_ids | String | 否 | 4737996432465788974,4737996432465780075 | 订单号。多个订单号用英文 , 分隔,最多支持10个订单号 |
| time_type | String | 否 | pay | 查询时间类型。pay: 支付时间(默认); update:联盟侧更新时间,非订单状态更新时间 |
| sessionkey | String | 否 | 7002 | 多用户专用。如果您的会员卡是多用户版订单查询接口,若要查不同的达人帐号的订单,请提供该达人帐号授权的token值,授权方法参考这里 |
| open_id | String | 否 | _000Qh4imrY0VhyMOUgxxJb9qK2hW9BW9YWx | 多用户专用。配合sessionkey使用。其值为授权时返回的userid值。如果不提供sessionkey参数则也无需提供open_id值。 |
GET/POST http://api.veapi.cn/douyin/alliance_kol_orders?vekey=xxx&start_time=2023-04-24+00:00:00&end_time=2023-04-25+23:59:59&order_ids=
$api="http://api.veapi.cn/douyin/alliance_kol_orders?vekey=xxx&start_time=2023-04-24+00:00:00&end_time=2023-04-25+23:59:59&order_ids="; $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; //返回值
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/douyin/alliance_kol_orders?vekey=xxx&start_time=2023-04-24+00:00:00&end_time=2023-04-25+23:59:59&order_ids=";
// JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
//System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
// 发送请求
String result = HttpRequest.get(url)
.timeout(10000)//设置超时,毫秒
.execute().body();
System.out.println(result);
}
}
import requests # 要访问的API网页 target_url = "http://api.veapi.cn/douyin/alliance_kol_orders?vekey=xxx&start_time=2023-04-24+00:00:00&end_time=2023-04-25+23:59:59&order_ids=" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
| 参数名称 | 参数类型 | 示例值 | 描述 |
|---|---|---|---|
| cursor | String | 4737996432465788974 | 下一页索引,最后一页返回空 |
| order_id | String | 4737996432465788974 | 订单号 |
| product_id | String | 3450632721376902816 | 商品id |
| product_name | String | 测试商品 | 商品名称 |
| product_img | String | https://tosv.boe.byted.org/obj/temai/7e92a281163e33cedef99d8735d1e90bwww828-708 | 商品图片URL |
| author_account | String | 我的昵称 | 作者账号昵称(抖音/火山作者) |
| author_openid | String | f190e172-5fd8-4b7b-babb-f32323e60f7b | 作者抖音open_id |
| shop_name | String | 我的店铺 | 商家名称 |
| total_pay_amount | Int64 | 2100 | 订单支付金额,单位分 |
| commission_rate | Int64 | 2000 | 达人佣金率,此处保存为真实数据x1万之后,如真实是0.35,这里是3500 |
| flow_point | String | PAY_SUCC | 订单状态(PAY_SUCC:支付完成,REFUND:退款,SETTLE:结算,CONFIRM:确认收货) |
| app | String | 抖音 | App名称(抖音,火山) |
| update_time | String | 2006-01-02 15:04:05 | 更新时间 [联盟侧订单更新时间] |
| pay_success_time | String | 2006-01-02 15:04:05 | 付款时间 |
| settle_time | String | 2006-01-02 15:04:05 | 结算时间,结算前为空字符串 |
| pay_goods_amount | Int64 | 1100 | 预估参与结算金额 |
| settled_goods_amount | Int64 | 0 | 实际参与结算金额 |
| estimated_commission | Int64 | 165 | 达人预估佣金收入,单位分 |
| real_commission | Int64 | 0 | 达人实际佣金收入,单位分 |
| extra | String | 其他 | |
| item_num | Int64 | 1 | 商品数目 |
| shop_id | Int64 | 12345 | 店铺ID |
| refund_time | String | 2006-01-02 15:04:05 | 退款订单退款时间 |
| pid_info | Pidinfo | 分销订单相关参数 | |
| estimated_total_commission | Int64 | 580 | 总佣金(预估),对应百应订单明细中的总佣金 |
| estimated_tech_service_fee | Int64 | 58 | 预估平台技术服务费 |
| pick_source_client_key | String | jifji32rnu3jit43 | 选品App client_key |
| pick_extra | String | dddd | 选品来源自定义参数 |
| author_short_id | String | 4234123474 | 达人抖音号/火山号 |
| media_type | String | shop_list | 带货体裁。shop_list:橱窗;video:视频;live:直播;others:其他(如图文、微头条、问答、西瓜长视频等) |