Admin/merchant/goods/specification/attribute (o2o)
跳到导航
跳到搜索
应用场景
某个规格的属性列表
接口名称
admin/merchant/goods/specification/attribute
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
token | token | 是 | string | token | |
规格id | specification_id | 是 | int | 规格id | |
分页信息 | pagination | 是 | pagination字典 | 分页信息 | |
└每页显示条数 | count | 是 | Int | 每页显示条数 | |
└当前页数 | page | 是 | Int | 当前页数 |
举例如下
{
"token" : "d122e3c72332c5af12a71d77c9f1462f5901d276",
"specification_id":52,
"pagination" : {
"count" : 10,
"page" : 1
},
}
返回参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
返回状态码 | status | 是 | status字典 | {"succeed" : 1} | 返回请求接口后的数据,succeed为1代表成功,0则为失败,失败后则返回error_code(错误code)及error_desc(错误说明) |
返回信息 | data | 是 | Array | 请求接口提供的返回信息 | |
└属性所属规格模板id | specification_id | 是 | Int | 属性所属规格模板id | |
└属性所属规格模板名称 | specification_name | 是 | String | 属性所属规格模板名称 | |
└属性id | attr_id | 是 | int | 属性id | |
└属性名称 | attr_name | 是 | string | 属性名称 | |
└属性类型 | attr_cat_type | 是 | string | 属性类型 (common普通color颜色) | |
└属性可选值列表 | attr_values | 是 | array | 属性可选值列表 | |
└属性色值列表 | color_values | 是 | array | 属性色值列表 | |
分页信息 | paginated | 是 | paginated字典 | 分页信息 | |
└总条数 | total | 是 | Int | 总条数 | |
└当前返回数组的总条数 | count | 是 | Int | 当前返回数组的总条数 | |
是否有下一页 | more | 是 | Int | 1:有下一页,0:没有下一页 | 是否有下一页 |
成功举例如下
{
"data": [
{
"specification_id": 52,
"specification_name": "手机",
"attr_id":969,
"attr_name ":"AA",
"attr_cat_type":"color",
"attr_values":[
"11",
"22",
"33"
],
"color_values":[
"#47899e",
"#00ff19"
],
},
{
"specification_id": 52,
"specification_name": "手机",
"attr_id":970,
"attr_name":"BB",
"attr_cat_type":"common",
"attr_values":{
"OOO",
"PPPP",
},
"color_values":[],
}
],
"status": {
"succeed": 1
},
"paginated": {
"total": 99,
"count": 99,
"more": 1
}
}
失败举例如下
{
"status" : {
"succeed" : 0,
"error_code" : 100,
"error_desc" : "Invalid session",
}
}
注:错误编码