• 阿里妈妈获得商品详情 API 返回值说明


    item_get-获得商品详情  注册开通

    onebound.alimama.item_get

    公共参数

    请求地址: https://api-gw.onebound.cn/alimama/item_get

    名称类型必须描述
    keyString调用key(必须以GET方式拼接在URL中)
    secretString调用密钥
    api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
    cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
    result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
    langString[cn,en,ru]翻译语言,默认cn简体中文
    versionStringAPI版本

    请求参数

    请求参数:num_iid=30007045064

    参数说明:num_iid:商品ID

    响应参数

    Version: Date:

    名称类型必须示例值描述

    num_iid

    Bigint0520813250866宝贝ID

    title

    String0三刃木折叠刀过安检创意迷你钥匙扣钥匙刀军刀随身多功能小刀包邮宝贝标题

    price

    Float025.8价格

    total_price

    Float00

    suggestive_price

    Float00

    orginal_price

    String025.80原价

    nick

    String0欢乐购客栈掌柜昵称

    num

    Int03836库存

    min_num

    Int00最小购买数

    detail_url

    String0http://item.taobao.com/item.htm?id=520813250866宝贝链接

    pic_url

    String0//gd2.alicdn.com/imgextra/i4/2596264565/TB2p30elFXXXXXQXpXXXXXXXXXX_!!2596264565.jpg宝贝图片

    rootCatId

    Int050013886顶级分类ID

    cid

    Int050014822

    crumbs

    Mix0[]导航菜单

    desc

    String0商品详情

    desc_img

    Mix0[]商品详情图片

    item_imgs

    Mix0[{ "url": "//gd3.alicdn.com/imgextra/i4/2596264565/TB2p30elFXXXXXQXpXXXXXXXXXX_!!2596264565.jpg"}商品图片

    location

    String0发货地

    video

    Mix0[{"pic": "https://img.alicdn.com/imgextra/i4/1795410438/O1CN01ZORTQ01F6dyavtEur_!!1795410438.jpg", "url": "//cloud.video.taobao.com/play/u/1795410438/p/1/e/1/t/8/218504165570.swf","type": "item"}]商品视频

    prop_imgs

    Mix0{"prop_img": [ {"properties": "1627207:1347647754", "url": "//gd2.alicdn.com/imgextra/i3/2596264565/TB2.XeblVXXXXXkXpXXXXXXXXXX_!!2596264565.jpg"}]}商品属性图片列表

    skus

    Mix0{"sku": [{"price": "39", "total_price": null, "orginal_price": "39.00", "properties": "1627207:1347647754", "properties_name": "1627207:1347647754:颜色分类:长方形带开瓶器+送工具刀卡+链子", "quantity": "305", "sku_id": "3166598625985"}]商品规格信息列表

    sales

    Int0138销量

    props_list

    Mix0{20509:9974422: 尺码:36}商品属性

    seller_info

    Mix0{"nick": "欢乐购客栈", "city": null, "level": 12, "bail": "2000", "rate": 96, "score": "4.8", "delivery_score": "4.8", "item_score": "4.8", "shop_type": null, "user_num_id": "2596264565", "sid": "127203758", "title": "欢乐购客栈", "zhuy": "//shop127203758.taobao.com", "company_name": null, "menu": [] }卖家信息

    tmall

    Boolean0false是否天猫

    url_log

    Mix0[]

    props_img

    Mix01627207:28326": "//img.alicdn.com/imgextra/i2/2844096782/O1CN01VrjpXt1zyCc9DvERE_!!2844096782.jpg属性图片

    shop_item

    Mix0[]

    relate_items

    Mix0[]

    请求示例

    	
    -- 请求示例 url 默认请求参数已经URL编码处理
    curl -i "https://api-gw.onebound.cn/alimama/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=30007045064"

    响应示例

    {
    	"item": {
    		"num_iid": 520813250866,
    		"title": "三刃木折叠刀过安检创意迷你钥匙扣钥匙刀军刀随身多功能小刀包邮",
    		"price": "25.8",
    		"total_price": 0,
    		"suggestive_price": 0,
    		"orginal_price": "25.8",
    		"nick": "欢乐购客栈",
    		"num": 999,
    		"min_num": 1,
    		"detail_url": "https://item.taobao.com/item.htm?id=520813250866",
    		"pic_url": "https://img.alicdn.com/bao/uploaded/i4/2596264565/O1CN01mbmuAB1jaogMUWhv8_!!2596264565.jpg",
    		"rootCatId": 0,
    		"cid": 0,
    		"crumbs": [],
    		"desc": "<img src=\"https://img.alicdn.com/bao/uploaded/i4/2596264565/O1CN01mbmuAB1jaogMUWhv8_!!2596264565.jpg\"><img src=\"https://img.alicdn.com/i3/2596264565/O1CN01dVHKvp1jaogIQyUBv_!!2596264565.jpg\"><img src=\"https://img.alicdn.com/i1/2596264565/TB2a.x.lVXXXXXPXpXXXXXXXXXX_!!2596264565.jpg\"><img src=\"https://img.alicdn.com/i4/2596264565/TB2p30elFXXXXXQXpXXXXXXXXXX_!!2596264565.jpg\"><img src=\"https://img.alicdn.com/i4/2596264565/TB2j2cTXib_F1JjSZFzXXc6KXXa_!!2596264565.jpg\">",
    		"desc_img": [
    			"https://img.alicdn.com/bao/uploaded/i4/2596264565/O1CN01mbmuAB1jaogMUWhv8_!!2596264565.jpg",
    			"https://img.alicdn.com/i3/2596264565/O1CN01dVHKvp1jaogIQyUBv_!!2596264565.jpg",
    			"https://img.alicdn.com/i1/2596264565/TB2a.x.lVXXXXXPXpXXXXXXXXXX_!!2596264565.jpg",
    			"https://img.alicdn.com/i4/2596264565/TB2p30elFXXXXXQXpXXXXXXXXXX_!!2596264565.jpg",
    			"https://img.alicdn.com/i4/2596264565/TB2j2cTXib_F1JjSZFzXXc6KXXa_!!2596264565.jpg"
    		],
    		"item_imgs": [
    			{
    				"url": "https://img.alicdn.com/i3/2596264565/O1CN01dVHKvp1jaogIQyUBv_!!2596264565.jpg"
    			},
    			{
    				"url": "https://img.alicdn.com/i1/2596264565/TB2a.x.lVXXXXXPXpXXXXXXXXXX_!!2596264565.jpg"
    			},
    			{
    				"url": "https://img.alicdn.com/i4/2596264565/TB2p30elFXXXXXQXpXXXXXXXXXX_!!2596264565.jpg"
    			},
    			{
    				"url": "https://img.alicdn.com/i4/2596264565/TB2j2cTXib_F1JjSZFzXXc6KXXa_!!2596264565.jpg"
    			}
    		],
    		"location": "广东 深圳",
    		"video": [],
    		"prop_imgs": {
    			"prop_img": []
    		},
    		"skus": {
    			"sku": []
    		},
    		"sales": 15,
    		"props_list": [],
    		"seller_info": {
    			"level": null,
    			"shop_type": null,
    			"user_num_id": 2596264565,
    			"cid": null,
    			"delivery_score": null,
    			"item_score": null,
    			"score_p": null
    		},
    		"tmall": "false",
    		"url_log": [],
    		"data_from": "top",
    		"props_img": [],
    		"shop_item": [],
    		"relate_items": []
    	},
    	"secache": "64c12f48d0fc41e6e3c1d05413965aca",
    	"secache_time": 1608881812,
    	"secache_date": "2020-12-25 15:36:52",
    	"translate_status": "",
    	"translate_time": 0,
    	"language": {
    		"default_lang": "cn",
    		"current_lang": "cn"
    	},
    	"error": "",
    	"reason": "",
    	"error_code": "0000",
    	"cache": 0,
    	"api_info": "today:4 max:5000",
    	"execution_time": 0.134,
    	"server_time": "Beijing/2020-12-25 15:36:52",
    	"client_ip": "115.151.187.107",
    	"call_args": {
    		"num_iid": "520813250866"
    	},
    	"api_type": "alimama",
    	"translate_language": "zh-CN",
    	"translate_engine": "baidu",
    	"server_memory": "2.72MB",
    	"request_id": "4.5fe59694a937e"
    }

    异常示例

    {
      "error": "item-not-found",
      "reason": "商品没找到",
      "error_code": "2000",
      "success": 0,
      "cache": 0,
      "api_info": "today:0 max:10000",
      "execution_time": 0.081,
      "server_time": "Beijing/2020-06-10 23:44:00",
      "call_args": [],
      "api_type": "taobao",
      "request_id": "15ee0ffc041242"}

    相关资料

    错误码解释

    状态代码(error_code)状态信息详细描述是否收费
    0000success接口调用成功并返回相关数据
    2000Search success but no result接口访问成功,但是搜索没有结果
    4000Server internal error服务器内部错误
    4001Network error网络错误
    4002Target server error目标服务器错误
    4003Param error用户输入参数错误忽略
    4004Account not found用户帐号不存在忽略
    4005Invalid authentication credentials授权失败忽略
    4006API stopped您的当前API已停用忽略
    4007Account stopped您的账户已停用忽略
    4008API rate limit exceeded并发已达上限忽略
    4009API maintenanceAPI维护中忽略
    4010API not found with these valuesAPI不存在忽略
    4012Please add api first请先添加api忽略
    4013Number of calls exceeded调用次数超限忽略
    4014Missing url param参数缺失忽略
    4015Wrong pageToken参数pageToken有误忽略
    4016Insufficient balance余额不足忽略
    4017timeout error请求超时
    5000unknown error未知错误
  • 相关阅读:
    vue学习(5)vue高阶slot插槽使用
    Miniconda 使用进阶,把它添加到右键菜单中
    修改AVD默认存放位置
    vue-admin相关问题记录
    【JavaScript】DOM查询(子节点、父节点、兄弟节点)源码详解
    Linux systemd 定时任务
    【k8s故障处理篇】创建Deployment时报错“Deployment in version “v1“ cannot be handled as a Deployment....“
    快速构建基本的SpringCloud微服务
    恶补《操作系统》3_2——王道学习笔记
    国标GB28181协议客户端开发(一)整体流程和技术选型
  • 原文地址:https://blog.csdn.net/m0_72059466/article/details/125432249