接口使用场景等说明:本接口功能:
1、批量查询商品信息
2、批量检测是否为淘客商品或下架。
3、批量检测产品是否为营销库产品(返回值字段material_lib_type=1时为营销库产品),当您要用到会员运营ID时,会使用到。
环境 | http 地址 | https 地址 |
---|---|---|
正式环境 | http://api.veapi.cn/tbk/tkiteminfo | 暂无 |
参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
ids | String | 是 | Wnr7tQPxtQCg-BVORbxsrv3jZY | 你要检测的批量商品ID列表,用英文逗号相连。一次最大40个ID。ID必须是A-B全段字符型ID入参。如: 5mmRxkntxt0G74DC0OWHYCV-krVR92U8kAGPDqvT5,4DDqWdyigtYWnr7tQPxtQCg-BVORbxsrv3jZYn2HD6 |
get_tlj_info | Number | 否 | 1或0 | 是否获取单品淘礼金剩余数量,0-否,1-是,默认否(仅开通淘礼金权限媒体可查) |
GET/POST http://api.veapi.cn/tbk/getitems?vekey=xxx&ids=qkOxQw5u2t4v6QV42bU3zqhWt0-WJ3M2bIQKDokWK5UdG,OqMrXY9Tzt6kwn2GyKuVKbiMtJ-KkyBKPijnB2qRnBiny
$api="http://api.veapi.cn/tbk/getitems?vekey=xxx&ids=qkOxQw5u2t4v6QV42bU3zqhWt0-WJ3M2bIQKDokWK5UdG,OqMrXY9Tzt6kwn2GyKuVKbiMtJ-KkyBKPijnB2qRnBiny"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api); //curl_setopt($ch, CURLOPT_POST, true); //POST方式时启用 //curl_setopt($ch, CURLOPT_POSTFIELDS, $postData ); //POST方式时传参 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //如果使用https请启用 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //如果使用https请启用 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); //返回数据流,不直接输出 curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快 curl_setopt($ch, CURLOPT_TIMEOUT, 6); //允许执行的最长秒数。这里设定6S curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); echo $result; //返回值
import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpRequest; public class testGetParam { public static void main(String[] args) { // API网址 String url = "http://api.veapi.cn/tbk/getitems?vekey=xxx&ids=qkOxQw5u2t4v6QV42bU3zqhWt0-WJ3M2bIQKDokWK5UdG,OqMrXY9Tzt6kwn2GyKuVKbiMtJ-KkyBKPijnB2qRnBiny"; // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权 //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", ""); // 发送请求 String result = HttpRequest.get(url) .timeout(10000)//设置超时,毫秒 .execute().body(); System.out.println(result); } }
import requests # 要访问的API网页 target_url = "http://api.veapi.cn/tbk/getitems?vekey=xxx&ids=qkOxQw5u2t4v6QV42bU3zqhWt0-WJ3M2bIQKDokWK5UdG,OqMrXY9Tzt6kwn2GyKuVKbiMtJ-KkyBKPijnB2qRnBiny" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
参数名称 | 参数类型 | 示例值 | 描述 |
---|---|---|---|
cat_name | String | 女装 | 一级类目名称 |
num_iid | String | 123 | 商品ID |
title | String | 连衣裙 | 商品标题 |
pict_url | String | http://gi4.md....jpg | 商品主图 |
small_images | String[] | http://gi4....jpg | 商品小图列表 |
reserve_price | String | 102.00 | 商品一口价格 |
zk_final_price | String | 88.00 | 折扣价(元)若属于预售商品,付定金时间内,折扣价=预售价 |
user_type | Number | 1 | 卖家类型,0表示集市,1表示商城,3表示特价版 |
provcity | String | 杭州 | 商品所在地 |
item_url | String | http://detail..id=xxx | 商品链接 |
seller_id | Number | 123 | 卖家id |
volume | Number | 1 | 本字段已失效,值总是0,请使用annual_vol字段。30天销量 |
annual_vol | Number | 30 | 年销量,不是实时变化。是T+1更新过去365天的数据。显示规则:0,展示“0” (0,100],展示精确值 (100,1000],每层100递增,如展示100+、200+、900+ (1000,10000],每层1000递增,如展示1000+、2000+、9000+ (10000,100000],每层1w递增,如展示1万+、2万+、9万+ (100000,1000000],每层10万递增,如展示10万+、20万+、90万+ (1000000,~),展示“100万+” |
nick | String | xx旗舰店 | 店铺名称 |
cat_leaf_name | String | 情趣内衣 | 叶子类目名称 |
is_prepay | Boolean | true | 是否加入消费者保障 |
shop_dsr | Number | 23 | 店铺dsr 评分 |
ratesum | Number | 13 | 卖家等级 |
i_rfd_rate | Boolean | true | 退款率是否低于行业均值 |
h_good_rate | Boolean | true | 好评率是否高于行业均值 |
h_pay_rate30 | Boolean | true | 成交转化是否高于行业均值 |
free_shipment | Boolean | true | 是否包邮 |
material_lib_type | String | 1 | 商品库类型,支持多库类型输出,以英文逗号分隔“,”分隔,1:营销商品主推库,如果值为空则不属于1这种商品类型 |
presale_discount_fee_text | String | 付定金立减20元 | 预售商品-商品优惠信息 |
presale_tail_end_time | Number | 1937297392332 | 预售商品-付定金结束时间(毫秒) |
presale_tail_start_time | Number | 1937297392332 | 预售商品-付尾款开始时间(毫秒) |
presale_end_time | Number | 1937297392332 | 预售商品-付定金结束时间(毫秒) |
presale_start_time | Number | 1937297392332 | 预售商品-付定金开始时间(毫秒) |
presale_deposit | String | 100 | 预售商品-定金(元) |
ju_play_end_time | Number | 1937297392332 | 聚划算满减 -结束时间(毫秒) |
ju_play_start_time | Number | 1937297392332 | 聚划算满减-开始时间(毫秒) |
play_info | String | 玩法 | 1聚划算满减:满N件减X元,满N件X折,满N件X元) 2天猫限时抢:前N分钟每件X元,前N分钟满N件每件X元,前N件每件X元) |
tmall_play_activity_end_time | Number | 1937297392332 | 天猫限时抢可售 -结束时间(毫秒) |
tmall_play_activity_start_time | Number | 1937297392332 | 天猫限时抢可售 -开始时间(毫秒) |
ju_online_start_time | String | 1581868800000 | 聚划算信息-聚淘开始时间(毫秒) |
ju_online_end_time | String | 1582300799000 | 聚划算信息-聚淘结束时间(毫秒) |
ju_pre_show_start_time | String | 1581868800000 | 聚划算信息-商品预热开始时间(毫秒) |
ju_pre_show_end_time | String | 1582300799000 | 聚划算信息-商品预热结束时间(毫秒) |
sale_price | String | 168 | 活动价 |
kuadian_promotion_info | String | ["每100减20","每200减50"] | 跨店满减信息 |
superior_brand | String | 1 | 是否品牌精选,0不是,1是 |
hot_flag | String | 1 | 是否是热门商品,0不是,1是 |
input_num_iid | String | sdfqere-123dfqweq | 入参的(新)商品ID |
tlj_remain_num | Number | 19000 | 单品淘礼金今日剩余可创建个数,仅当传入get_tlj_info=1参数时才返回该值 |
activity_tag_list | Map[] | 货品展示标识列表 | |
└─ tag_name | String | 淘宝好价节 | (聚划算商品额外返回“聚划算”)货品展示标识,展示在商品标题前的商品活动标 |
{ "error": "0", "msg": "查询成功!", "id_count": 1, "success": 1, "fail": 0, "fail_ids": "", "data": [ { "input_item_iid": "djNkzqhZt3OPPBJMPTDVRtet3-bpYkRdsBoBkzmqNtK", "item_basic_info": { "brand_name": "swisse", "category_name": "鱼油/深海鱼油", "free_shipment": "false", "is_prepay": "true", "item_url": "https://uland.taobao.com/item/edetail?id=G0j6MdqS8tYQ5bWd4QfvbdTgUJ-bpYkRdsBoBkzmqNtK", "level_one_category_name": "保健食品/膳食营养补充食品", "material_lib_type": "1", "pict_url": "https://img.alicdn.com/bao/uploaded/i2/2549841410/O1CN016mN0J51MHpOYucgCA_!!2549841410-0-tmg_sticker_hand.jpg", "provcity": "浙江 杭州", "seller_id": "4692892268749674138", "shop_title": "天猫国际自营全球超级店", "short_title": "Swisse斯维诗高浓度深海鱼油", "small_images": [ "https://img.alicdn.com/i3/2549841410/O1CN01IYQqRF1MHpMSXrjnG_!!2549841410.jpg", "https://img.alicdn.com/i2/2215338820950/O1CN01yQhHRL1It98PNrGqL_!!2215338820950-0-scmitem1000.jpg", "https://img.alicdn.com/i1/2215338820950/O1CN01MfZcJn1It98Jh4Juv_!!2215338820950-0-scmitem1000.jpg", "https://img.alicdn.com/i2/2215338820950/O1CN01Skp8I71It98MTJ04N_!!2215338820950-0-scmitem1000.jpg" ], "superior_brand": "0", "title": "【自营】Swisse斯维诗高浓度深海鱼油omega3软胶囊DHA/EPA400粒", "user_type": "1", "volume": "10000", "white_image": "https://img.alicdn.com/bao/uploaded/O1CN01ClJuvq1ozcTT4YBOV_!!6000000005296-0-yinhe.jpg" }, "item_id": "G0j6MdqS8tYQ5bWd4QfvbdTgUJ-bpYkRdsBoBkzmqNtK", "presale_info": { "presale_deposit": "", "presale_discount_fee_text": "" }, "price_promotion_info": { "final_promotion_path_list": { "final_promotion_path_map_data": [ { "promotion_desc": "每件直降160元", "promotion_end_time": "1711900799000", "promotion_fee": "160", "promotion_start_time": "1711641600000", "promotion_title": "单品直降" }, { "promotion_desc": "满300减30", "promotion_end_time": "1711900799000", "promotion_fee": "30", "promotion_start_time": "1711641600000", "promotion_title": "购物券" } ] }, "final_promotion_price": "149", "more_promotion_list": { "more_promotion_map_data": [ { "promotion_desc": "满600减70", "promotion_end_time": "1711900799000", "promotion_start_time": "1711641600000", "promotion_title": "购物券" }, { "promotion_desc": "满1000减120", "promotion_end_time": "1711900799000", "promotion_start_time": "1711641600000", "promotion_title": "购物券" } ] }, "predict_rounding_up_price": "132.49", "predict_rounding_up_price_desc": "需凑单", "promotion_tag_list": { "promotion_tag_map_data": [ { "tag_name": "88VIP95折" }, { "tag_name": "低于去年促销价" } ] }, "reserve_price": "499.00", "zk_final_price": "339" }, "publish_info": { "income_rate": "0.45" } } ], "request_id": "unbieGi" }