外卖联盟高级接口 - 美团联盟接口 美团外卖CPS+CPA推广活动推广API接口

订单侠开放平台-美团联盟CPS外卖红包API可以一键生成适用于H5、App端推广活动页面链接,用户通过活动页链接领取相关优惠券红包,红包可在美团APP、美团外卖APP、美团外卖小程序下单且选择在线支付时使用。

    Api接口可完美支持用户分佣、生成的推广链接支持DeepLink、H5内可唤起美团App领券。

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

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

2、获取接口秘钥apikey

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

3、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的apikey';
//s.click淘宝客短连接解析商品id接口
$apiurl = "http://api.tbk.dingdanxia.com/waimai/meituan_privilege";


//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
	//渠道方用户唯一标识,渠道可自定义,长度不超过50,参数中不能包含dingdanxia,用于向用户返佣,支持小写字母和数字的格式,其它字符可能造成无法正常跟单
	"sid"        => "1234"
));


//打印结果
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;
    }
}

4、接口返回结果

{
    "code":200,
    "msg":"请求成功【success】",
    "data":{
        "h5":"https://runion.meituan.com/url?key=a144a9fa40a42c55af00214bb4bb3993971&url=https%3A%2F%2Fi.meituan.com%2Fawp%2Fhfe%2Fblock%2Fa945391288b790d558b7%2F78716%2Findex.html%3Fappkey%3Da144a9fa40a42c55af00214bb4bb3993971%3A2dingdanxia123456&sid=2dingdanxia123456",
        "deeplink":"imeituan://www.meituan.com?web?url=https%3A%2F%2Frunion.meituan.com%2Furl%3Fkey%3Da144a9fa40a42c55af00214bb4bb3993971%26url%3Dhttps%253A%252F%252Fi.meituan.com%252Fawp%252Fhfe%252Fblock%252Fa945391288b790d558b7%252F78716%252Findex.html%253Fappkey%253Da144a9fa40a42c55af00214bb4bb3993971%253A2dingdanxia123456%26sid%3D2dingdanxia123456&lch=cps:waimai:3:a144a9fa40a42c55af00214bb4bb3993971:2dingdanxia123456",
        "h5_evoke":"https://w.dianping.com/cube/evoke/increase/meituan.html?lch=cps:waimai:1:a144a9fa40a42c55af00214bb4bb3993971:2dingdanxia123456&url=https%3A%2F%2Frunion.meituan.com%2Furl%3Fkey%3Da144a9fa40a42c55af00214bb4bb3993971%26url%3Dhttps%253A%252F%252Fi.meituan.com%252Fawp%252Fhfe%252Fblock%252Fa945391288b790d558b7%252F78716%252Findex.html%253Fappkey%253Da144a9fa40a42c55af00214bb4bb3993971%253A2dingdanxia123456%26sid%3D2dingdanxia123456"
    }
}
		

    接口文档:https://www.dingdanxia.com/doc/174/173

    在线测试:https://www.dingdanxia.com/apitest/174/173

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

抵扣说明:

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

余额充值