为了进行电商平台 的API开发,首先我们需要做下面几件事情。
1)开发者注册一个账号
2)然后为每个alibaba应用注册一个应用程序键(App Key) 。
3)下载alibaba API的SDK并掌握基本的API基础知识和调用
4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开发。
5)利用alibaba平台的文档中心和API测试工具,对接口进行测试。从而了解返回信息,方便程序获取。
以上是一般alibaba API应用开发的关键流程,其中通过alibaba文档中心和API测试工具,进行概念了解和接口信息查询很重要。因为这些数据就是我们需要在逐步显示出来的。alibaba 的API很多,不过都分为了好几个领域,慢慢就会了解深入了。
注册链接,获取Key和secret,免费测试
API示例:
{
"item": {
"num_iid": "60840463360",
"title": "Slip-on Daily Urban Walking Shoes",
"desc_short": "",
"price": "$47.70",
"nick": "cn1522808546pkux",
"num": 9999,
"min_num": 2,
"detail_url": "Slip-on Daily Urban Walking Shoes",
"pic_url": "https://sc04.alicdn.com/kf/HTB1GHVXaPvuK1Rjy0Faq6x2aVXa7.jpg",
"desc": "\r\n
"item_imgs": [
{
"url": "https://sc04.alicdn.com/kf/HTB1GHVXaPvuK1Rjy0Faq6x2aVXa7.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1S8U6avfsK1RjSszbq6AqBXXaz.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1LQA6apzsK1Rjy1Xbq6xOaFXak.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1p8o8as_vK1Rjy0Foq6xIxVXaJ.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1ZEZYasrrK1Rjy1zeq6xalFXai.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1unN9azLuK1Rjy0Fhq6xpdFXaw.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1ZUZYasrrK1Rjy1zeq6xalFXax.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1bqkTayHrK1Rjy0Flq6AsaFXae.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1CnsUasfrK1Rjy1Xdq6yemFXag.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1.BsOasvrK1Rjy0Feq6ATmVXaD.jpg"
},
{
"url": "https://sc04.alicdn.com/kf/HTB1HpIUaDHuK1RkSndVq6xVwpXal.jpg"
}
],
"video_url": "https://vod-icbu.alicdn.com/tB9FoF3YV1bEOMabUBf/fZIVRRvvNNNgnrI7rOB%40%40sd.mp4?w=896&h=504&e=sd&t=2132e62b16799961963693775e735d&b=icbu_video&p=*_icbu_vod_publish&tr=mp4-264-sd&iss=false",
"props_name": "191288010:-1:Color:navy;191288010:3331185:Color:White;191288010:3851110:Color:Purple;191288010:3327837:Color:black;191288010:3483425:Color:Grey;191288010:-2:Color:olive;191288010:3328925:Color:Pink;214524521:28393:Shoe Size:44;214524521:28389:Shoe Size:40;214524521:28388:Shoe Size:38;214524521:28395:Shoe Size:46;214524521:28390:Shoe Size:41;214524521:28391:Shoe Size:42;214524521:29542:Shoe Size:37;214524521:28394:Shoe Size:45;214524521:28392:Shoe Size:43;214524521:190000792:Shoe Size:39;214524521:190000791:Shoe Size:35;214524521:190000105:Shoe Size:36",
"prop_imgs": {
"prop_img": [
{
"properties": "191288010:3327837",
"url": "https://sc04.alicdn.com/kf/HTB1ZEZYasrrK1Rjy1zeq6xalFXai.jpg"
},
{
"properties": "191288010:3328925",
"url": "https://sc04.alicdn.com/kf/HTB1unN9azLuK1Rjy0Fhq6xpdFXaw.jpg"
},
{
"properties": "191288010:3331185",
"url": "https://sc04.alicdn.com/kf/HTB1ZUZYasrrK1Rjy1zeq6xalFXax.jpg"
},
{
"properties": "191288010:3483425",
"url": "https://sc04.alicdn.com/kf/HTB1bqkTayHrK1Rjy0Flq6AsaFXae.jpg"
},
{
"properties": "191288010:3851110",
"url": "https://sc04.alicdn.com/kf/HTB1CnsUasfrK1Rjy1Xdq6yemFXag.jpg"
},
{
"properties": "191288010:-1",
"url": "https://sc04.alicdn.com/kf/HTB1.BsOasvrK1Rjy0Feq6ATmVXaD.jpg"
},
{
"properties": "191288010:-2",
"url": "https://sc04.alicdn.com/kf/HTB1HpIUaDHuK1RkSndVq6xVwpXal.jpg"
}
]
},
"props": [
{
"name": "产地",
"value": "中国"
},
{
"name": "品牌名称",
"value": "HOTPOTATO"
},
{
"name": "型号",
"value": "G2"
},
{
"name": "中底材质",
"value": "EVA"
},
{
"name": "外底材料",
"value": "橡胶"
},
{
"name": "衬里材料",
"value": "网格"
},
{
"name": "性别",
"value": "男人"
},
{
"name": "性别",
"value": "男子"
},
{
"name": "鞋面材料",
"value": "飞行针织尼龙+TPU"
},
{
"name": "布料",
"value": "飞边针织物"
},
{
"name": "关键词",
"value": "时尚轻便鞋"
},
{
"name": "类型",
"value": "休闲女士平底鞋"
注:本帖只展示部分代码,响应参数,注册账号可免费测试或者点击头像联系"