唯品会高级API - 唯品会订单查询接口 唯品会订单接口 唯品会接口

获取订单列表信息,最大查询时间区间建议不超过3天

1、注册订单侠开放平台账号

注册地址: https://www.dingdanxia.com/user/register/index.html  

2、获取接口秘钥apikey

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

3、授权唯品会账号

登录个人中心 - 授权管理 - 唯品会授权, 授权自己的唯品会账号。

4、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的apikey';
//唯品会订单查询接口
$apiurl = "http://api.tbk.dingdanxia.com/vip/order_details2";
 
 
//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
        "page"        =>1 
        //页码
        "orderTimeStart"=>"1594267100032",
        //订单时间起始 时间戳 单位毫秒
        "orderTimeEnd"=>"1594267137995"
        //订单时间结束 时间戳 单位毫秒
	    
));
 
 
//打印结果
print_r($result);
 
/**
 * post请求
 * @param string $url
 * @param array $params
 * @param int $timeout
 */
function curl_post($url, $params, $timeout = 3) {
    try {
        foreach ($params as $key => $val) {
            $post[] = "{$key}={$val}";
        }
        $post_data  = implode('&', $post);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
        return curl_exec($ch);
    }
    catch (Exception $e) {
        return false;
    }
}

5、接口返回结果

{
	"code": 200,
	"msg": "请求成功【success】",
	"total_results": 1,
	"data": [{
		"orderSource": "wap",
		"orderSn": "20031487300984",
		"settled": 0,
		"commissionEnterTime": 31507200000,
		"pid": "123456",
		"orderSubStatusName": "已失效",
		"isPrepay": 0,
		"orderTime": 1584150966000,
		"newCustomer": 2,
		"detailList": [{
			"commissionTotalCost": "239.00",
			"commCode": "330",
			"sizeId": "6918661798570873620",
			"goodsCount": 1,
			"commissionRate": "11.00",
			"orderSource": "wap",
			"goodsId": "6918661798452982548",
			"goodsThumb": "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/960169153-1971527585845714944-1971527585845714946-1_750x750_50.jpg",
			"commission": "26.29",
			"commName": "自营|女下装",
			"goodsName": "【2020春新款】荧光磨白破洞小脚翻边休闲牛仔裤",
			"status": 0
		}],
		"commission": "26.29",
		"channelTag": "123456",
		"selfBuy": 0,
		"status": 0,
		"lastUpdateTime": 1584235759000
	}]
}			  

接口文档:https://www.dingdanxia.com/doc/135/124

在线测试:https://www.dingdanxia.com/apitest/135/124

 

获取单个订单信息(订单号版):https://www.dingdanxia.com/doc/134/124

实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值