大淘客,让选品更简单! |

{{item.type_name}}:

API 市场 / 店铺转链
 

店铺转链
吐槽建议
应用场景:
当需要推广某个淘宝店铺内的所有商品时,可调用转链接口
接口说明:
转链即将推广的店铺和您的标识(PID)进行绑定。推广形成订单后,即可获得佣金。一键推广店铺商品,省时省力,推广更高效
使用人数: 2000+
店铺转链 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

请求地址:https://openapi.dataoke.com/api/dels/shop/convert 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/shop/get-shop-convert-info";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("sellerId", "1111111111");
paraMap.put("pid", appKey);
paraMap.put("relationId", "1");
paraMap.put("shopName", "1");
String data = ApiClient.sendReq(url, appSecret, paraMap);

SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkShopConvertRequest request = new DtkShopConvertRequest();
request.setVersion("v1.0.0");
request.setSellerId("1111111111");
request.setPid("xxx");
request.setShopName("1");
request.setRelationId("1");
DtkApiResponse < DtkShopConvertResponse > execute = client.execute(request);
 //店铺转链
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/shop/get-shop-convert-info";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new GetShopConvert();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();

package main

import (
	"fmt"
	"gitee.com/dtk-developer/openapi-sdk-go/sdk"
)

func main() {
	// 1.初始化所需要的参数appKey, appSecret, version
	var (
		appKey = "xxxxxxxxxx"
		appSecret = "xxxxxxxxxx"
		version = "v1.3.1"
	)

	// 2.初始化开放平台api的客户端句柄
	oa := &sdk.OpenApi{}
	oa.AppKey = appKey
	oa.AppSecret = appSecret
	oa.Version = version
	client :=  oa.GetClient()

	// 3.准备请求参数
	params := map[string]string {
		"sellerId": "639331017111",
	}

	// 4.业务请求,示例使用店铺转链和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.ShopConvert(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)

	// 复用client句柄
	params = map[string]string {
		// 指定接口版本
		"version": "v1.0.0",
		"content": "1👈¥fym8XiJU9Oi¥ https://s.click.taobao.com/Ys3TNlu  包邮 漫花抽纸10包4层加厚280张/包纸巾卫生纸家用实惠装面巾纸",
	}
	resp, err = client.ParseContent(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)
}
返回示例:
{ "time": 1605143776225, "code": 0, "msg": "成功", "data": { "shopLinks": "https://s.click.taobao.com/t?e=m%3D2%26s%3Dng4U0ceOgY8cQipKwQzePDAVflQIoZepyK8Cckff7TVRAdhuF14FMT4BllMe9acCxq3IhSJN6GQiOHPzqRNyYWMu07r%2BMqFT993NZchN8BKN5WQlUWaABEm4argXYs%2F4Ke3%2FbelnU7eOJ4hmg2sGJDMrRWVrG%2F%2BLUY%2FeOV%2BmC%2Fl5zZ2%2FKyHsZsvBfpBAMEs%2FWLcGHIlqvsnGJe8N%2FwNpGw%3D%3D&union_lens=lensId:TAPI@1605143774@2127f774_0746_175ba0646b2_463c@01", "longTpwd": "5.0f/u枝口~令¥fTZnclUYtg2¥打кǎItao~b或點几url链 https://m.tb.cn/h.4WVXPDz 至liulanqi【蓝月亮官方旗舰店】", "Tpwd": "¥fTZnclUYtg2¥" } }
常见错误码:
{
    "msg":"服务器错误",
    "code":-1,
    "time":1554365022200
}
错误码列表: