# 淘宝店铺信息
接口地址: http://www.damaijia168.com/vv/external/getShopInfo
请求方式: POST
传参方式: JSON
返回格式: JSON
# 请求头参数
| 参数 | 类型 | 必选 | 值 | 示例 |
|---|---|---|---|---|
| Authorization | string | 是 | 授权 access_token | 1798c6aadec33d1bc2f5b707f1049aefexxxx |
# 请求参数
| 参数 | 类型 | 必选 | 描述 |
|---|---|---|---|
| goods_url | string | 是 | 商品链接 |
| type | string | 否 | 类型(0-淘宝,1-天猫,2-拼多多) |
# [#]请求示例
{
"goods_url":"https://item.taobao.com/item.htm?id=63540767****",
"type":"0"
}
# 请求代码示例
cURL请求代码示例
curl --location --request POST 'http://www.damaijia168.com/vv/external/getShopInfo?goods_url=https://item.taobao.com/item.htm?id=635407677***&type=1' \
--header 'Authorization: 1798c6aadec33d1bc2f5b707f1049aefexxxx' \
--header 'Cookie: __yjs_duid=1_dee3bfba5b90592372d209eda95c772a1616035269331'
PHP请求代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.damaijia168.com/vv/external/get-shop-info?goods_url=https://item.taobao.com/item.htm?id=635407677***&type=1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Authorization: 1798c6aadec33d1bc2f5b707f1049aefexxxx',
'Cookie: __yjs_duid=1_dee3bfba5b90592372d209eda95c772a1616035269331'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
JAVA请求代码示例
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://www.damaijia168.com/vv/external/get-shop-info?goods_url=https://item.taobao.com/item.htm?id=635407677***&type=1")
.method("POST", null)
.addHeader("Authorization", "1798c6aadec33d1bc2f5b707f1049aefexxxx")
.addHeader("Cookie", "__yjs_duid=1_dee3bfba5b90592372d209eda95c772a1616035269331")
.build();
Response response = client.newCall(request).execute();
Python请求代码示例
import requests
import json
url = "http://www.damaijia168.com/vv/external/getShopInfo"
payload = json.dumps({
"goods_url": "https://item.taobao.com/item.htm?id=63540767****",
"type": "0"
})
headers = {
'Authorization': 'd964d7b9c4365a538d9b12661f748977',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# 响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| ----shop_Id | int | 第三方卖家店铺 id |
| ----shopName | string | 第三方卖家店铺名字 |
| ----shopUrl | string | 店铺地址,天猫/C 店 |
| ----taoShopUrl | string | 淘宝店铺地址 |
| ----shopIcon | string | 第三方卖家店铺图标 |
| ----showShopLinkIcon | string | showShopLinkIcon |
| ----shopCard | string | 店铺卡片 |
| ----shopType | string | 店铺类型 |
| ----simpleShopDOStatus | string | simpleShopDOStatus |
| ----shopVersion | string | 店铺版本 |
| ----shopTextColor | string | 店铺文本颜色 |
| ----deduct_money | int | 消耗点券 |
| status | int | 状态码,0为成功 |
# 返回数据
{
"data": {
"shop_Id":60000006 ,
"shopName": "****",
"shopUrl": "shop.m.taobao.co**********************7677503",
"taoShopUrl": "//shop.m.taobao.com/shop/shop_index**********************77503",
"shopIcon": "http://img.alicdn.com/imgextra**********************FXa.jpg",
"showShopLinkIcon": "false",
"shopCard": "本店共***件宝贝在热卖",
"shopType": "C",
"simpleShopDOStatus": "C",
"shopVersion": "",
"shopTextColor": "#111111",
"deduct_money": 4
},
"status": 0
}
# 错误码
| 状态码(status) | 错误信息 | 解决方案 |
|---|---|---|
| 132 | 请求格式必须为JSON | 修改请求参数格式为json |
| 422 | 参数列表不合法,在err中会给出提示 | 根据提示做相应修改 |
| 200 | 认证失败 | 请确保请求头里的Authorization存在或者未过期 |