万邦京东获得jd商品分类 API 返回值说明

131 阅读3分钟

cat_get-获得jd商品分类API测试工具

onebound.jd.cat_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版本

请求参数

请求参数:cid=0

参数说明:cid:商品分类ID,可以用cid=0来获得所有一级类目

响应参数

名称类型是否隐私示例值描述
idInt54商品分类ID
nameString服饰配件、饰品分类名
pidString0父分类ID
root_idString0根分类ID
itemMix{"id": 127464010,"name": "帽子/头巾","pid": "54","root_id": 0,sub[]}子分类id:子分类名称

请求示例

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

响应示例

	"itmes": {
		"itme": [
			{
				"id": 1319,
				"name": "母婴",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1672,
				"name": "礼品箱包",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1320,
				"name": "食品饮料、保健食品",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 6144,
				"name": "珠宝",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 6728,
				"name": "汽车用品",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1318,
				"name": "运动健康",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 6233,
				"name": "玩具乐器",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 4938,
				"name": "彩票、旅行、充值、票务",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 12218,
				"name": "生鲜",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 12379,
				"name": "整车",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1713,
				"name": "图书、音像、电子书刊",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 9987,
				"name": "手机",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 737,
				"name": "家用电器",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 652,
				"name": "数码",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1620,
				"name": "家居家装",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 670,
				"name": "电脑办公",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 6196,
				"name": "厨具",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1316,
				"name": "个护化妆",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 1315,
				"name": "服饰内衣",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 5025,
				"name": "钟表",
				"pid": 0,
				"root_id": 0
			},
			{
				"id": 11729,
				"name": "鞋靴",
				"pid": 0,
				"root_id": 0
			}
		]
	},
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:67 max:10100 all[161=67+24+70];expires:2030-12-31",
	"execution_time": "0.072",
	"server_time": "Beijing/2023-01-11 14:13:11",
	"client_ip": "106.6.32.188",
	"call_args": [],
	"api_type": "jd",
	"translate_language": "zh-CN",
	"translate_engine": "baidu",
	"server_memory": "3.58MB",
	"request_id": "gw-1.63be5377b5fa8",
	"last_id": "1469791737"
}

异常示例相关资料错误码解释

状态代码(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未知错误否**