拼多多高级API - 拼多多订单详情接口 拼多多订单详情查询接口 拼多多查询订单详情接口 拼多多接口

获取订单详情

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/pdd/order_detail";
 
 
//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
        "order_sn"  =>订单号,
));
 
 
//打印结果
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】",
	"data": {
		"goods_price": 1280,
		"promotion_rate": 100,
		"cps_sign": "CC_200425_8735184_70977074_8eb0813f2cc2aef440cb74ec23064ff9",
		"pid": "8735184_70977074",
		"type": 0,
		"order_status": 4,
		"order_create_time": 1587779788,
		"order_settle_time": 1587780120,
		"order_verify_time": null,
		"order_group_success_time": 1587779799,
		"order_amount": 1280,
		"order_modify_at": 1587780120,
		"auth_duo_id": 8516041,
		"cpa_new": 0,
		"goods_score": 1,
		"goods_name": "美粮坊手抓饼50片-20片早餐灌煎饼面饼皮原味手抓饼批发家庭装",
		"batch_no": "",
		"url_last_generate_time": 1587779665,
		"point_time": null,
		"goods_quantity": 1,
		"goods_id": 177891541,
		"goods_thumbnail_url": "http://t00img.yangkeduo.com/goods/images/2019-06-10/f5df7b940e11e653631e5532f2e17d2c.jpeg",
		"order_receive_time": null,
		"custom_parameters": "1234",
		"promotion_amount": 128,
		"order_pay_time": 1587779799,
		"group_id": 1106485232476830800,
		"duo_coupon_amount": 1,
		"return_status": 2,
		"order_status_desc": "审核失败",
		"fail_reason": "审核失败原因:订单发生退款",
		"request_id": "15877859294375109",
		"order_sn": "200425-485232476830887",
		"zs_duo_id": 0
	}
}			  

接口文档:https://www.dingdanxia.com/doc/146/86

在线测试:https://www.dingdanxia.com/apitest/146/86

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

抵扣说明:

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

余额充值