电商API的数据类型
电商API提供的数据种类多样,一般可分为以下几类:
1.商品数据:商品ID、商品名称、商品价格、库存、属性、轮番图等。
2.交易数据:订单号、付款时间、收货人等。
3.店铺数据:店铺ID、店铺名称、开店时间、店铺评分等。
4.营销数据:促销信息、优惠券信息、秒杀活动等。
常见的电商API
1.Taobao API:淘宝API可以获取到淘宝平台上各种商品、类目、店铺等信息,并且能够实现下单、退款、物流等操作。
2.JD API:京东API与淘宝API类似,也可以获取到京东平台上各种商品、类目、店铺等信息,并且支持下单、退货、物流等操作。
3.PDD API:拼多多API可以获取到拼多多平台上各种商品、店铺等数据,同时也支持下单、发货等操作。
请求示例Curl PHP PHPsdk JAVA C# Python
<?php // 请求示例 url 默认请求参数已经URL编码处理 // 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php $method = "GET"; $url = "https://api-gw.onebound.cn/pinduoduo/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=1620002566"; $curl = curl_init(); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($curl, CURLOPT_FAILONERROR, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_ENCODING, "gzip"); var_dump(curl_exec($curl)); ?>x
响应示例
{ "item": { "num_iid": "1620002566", "title": "【2件套】套装秋冬新款仿獭兔毛钉珠皮草毛毛短外套加厚大衣女装", "desc_short": "", "price": "95.4", "total_price": "", "suggestive_price": "", "orginal_price": "115", "nick": "果果家气质女装", "num": 20, "min_num": 0, "detail_url": "http://yangkeduo.com/goods.html?goods_id=1620002566", "pic_url": "https://omsproductionimg.yangkeduo.com/images/2018-06-06/864126a1f461e606796b2204d18a09e9.jpeg", "brand": null, "brandId": "", "item_imgs": [ { "url": "https://omsproductionimg.yangkeduo.com/images/2017-12-12/bcf848aa71c6389607ae7a84b70f1543.jpeg" }, { "url": "https://omsproductionimg.yangkeduo.com/images/2017-12-12/176019babfdecffa1d9f98f40b7e99b4.jpeg" }, { "url": "https://omsproductionimg.yangkeduo.com/images/2017-12-12/efb5db42397550bffd3211ca6f197498.jpeg" }, { "url": "https://omsproductionimg.yangkeduo.com/images/2017-12-12/d209ef7bcc9183c3bb8ca1dfdb108d49.jpeg" }, { "url": "https://omsproductionimg.yangkeduo.com/images/2017-12-12/74257ab65f3f00da7a90fde9042fe640.jpeg" }, { "url": "https://t00img.yangkeduo.com/goods/images/2019-08-17/e8fbd9cb-cc74-4caa-9380-84c46d27b008.jpg" }, { "url": "https://t00img.yangkeduo.com/goods/images/2019-08-17/d76f515b-e375-4060-b94e-cf64f6b0964e.jpg" }, { "url": "https://t00img.yangkeduo.com/goods/images/2019-08-17/f2f279b5-6000-4fbe-b99b-7c1cbd7884ea.jpg" } ], "rootCatId": 8439, "cid": 0, "favcount": 0, "fanscount": 0, "crumbs": [], "created_time": "", "modified_time": "", "delist_time": "", "desc": "<div><img src=\"https://img.pddpic.com/mms-material-img/2022-09-18/3f89d470-1af8-4dee-b529-6d62aa2ea3b7.png\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2019-02-15/ddf6fe7b-b536-4183-932d-69a1189a3f59.png\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/20f659b04d3e7e5851c27ff9931c96fc.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2019-11-14/4420a8c3-49ed-46d8-ab55-15e7a638ca31.jpg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/26c3e9d5cfbaf4e8f13b2bdd38f48d71.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/0aa872fa74599dad7b6aefe6b6c035c0.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/6bc959e32a30424c7a5284a37676999c.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/1fa9861a8c99c5e9e8119fd2239fef5a.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/b62cabf1d2320c5761e3f4c15203fb20.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/6f6e54376a66cbc78e16700d4c424fe1.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/2f60753dfc875a6876adc35833a69d31.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/ae0116e589d8de712f8dafd0c356cefe.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/da910c98fcc8de1b4d2d1498cd7899fd.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/140349649d8b7d08c8e88bfbbaa2f900.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/a953bae2eeb7364ef3ef2976a97d07eb.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/4da59828136c3b1308aad0aa990778a7.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-09-02/4a365b61a80e47288c8609ccd5982396.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-11-17/cd0a8a96b783a51236812ce24c59a329.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-11-17/16008ac19768d05e7dee16406ff958a1.jpeg\"></div><div><img src=\"https://t00img.yangkeduo.com/goods/images/2018-11-17/ef1d17b69ebf9449a8bb52459b168c26.jpeg\"></div><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-3.648930112754a&p=3702633709&k=i_key&t=1686712370\" style=\"display:none\" />", "item_weight": "", "item_size": "", "location": "", "post_fee": "", "express_fee": "", "ems_fee": "", "shipping_to": "", "has_discount": "", "video": null, "is_virtual": "", "sample_id": "", "is_promotion": "", "props_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:119128:尺码:S(90斤以下);1226:96784:尺码:M(90-100斤);1226:33651:尺码:L(100-110斤);1226:33652:尺码:XL(110-120斤);1226:33653:尺码:2XL(120-130斤);1226:33656:尺码:3XL(130-140斤);1215:1115501666:颜色:米色两件套(外套+裙子);1215:105309781:颜色:蓝色两件套(外套+裙子)", "prop_imgs": { "prop_img": [ { "properties": "1215:1115500378", "url": "https://t00img.yangkeduo.com/goods/images/2018-08-28/062d42b525a7c786920cbb83ac772af7.jpeg" }, { "properties": "1215:1115501666", "url": "https://t00img.yangkeduo.com/goods/images/2018-08-28/415bed99d5a925123d7b7c39547205de.jpeg" }, { "properties": "1215:105309781", "url": "https://t00img.yangkeduo.com/goods/images/2018-11-17/2f202934f16f0eee41257b77bf489262.jpeg" } ] }, "property_alias": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:119128:尺码:S(90斤以下);1226:96784:尺码:M(90-100斤);1226:33651:尺码:L(100-110斤);1226:33652:尺码:XL(110-120斤);1226:33653:尺码:2XL(120-130斤);1226:33656:尺码:3XL(130-140斤);1215:1115501666:颜色:米色两件套(外套+裙子);1215:105309781:颜色:蓝色两件套(外套+裙子)", "props": [ { "name": "面料材质", "value": "仿皮草" }, { "name": "成分含量", "value": "71%(含)—80%(含)" }, { "name": "版型", "value": "修身" }, { "name": "领型", "value": "圆领" }, { "name": "衣长", "value": "短款" }, { "name": "是否带毛领", "value": "不带毛领" }, { "name": "主风格", "value": "气质名媛" } ], "total_sold": "", "skus": { "sku": [ { "price": "95.4", "total_price": "115", "properties": "1215:1115500378;1226:119128", "properties_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:119128:尺码:S(90斤以下)", "orginal_price": "115", "quantity": 108, "sku_id": 57114357891 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115500378;1226:96784", "properties_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:96784:尺码:M(90-100斤)", "orginal_price": "115", "quantity": 38, "sku_id": 57114357892 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115500378;1226:33651", "properties_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:33651:尺码:L(100-110斤)", "orginal_price": "115", "quantity": 58, "sku_id": 57114357893 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115500378;1226:33652", "properties_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:33652:尺码:XL(110-120斤)", "orginal_price": "115", "quantity": 114, "sku_id": 57114357894 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115500378;1226:33653", "properties_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:33653:尺码:2XL(120-130斤)", "orginal_price": "115", "quantity": 200, "sku_id": 57114357895 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115500378;1226:33656", "properties_name": "1215:1115500378:颜色:粉色两件套(外套+裙子);1226:33656:尺码:3XL(130-140斤)", "orginal_price": "115", "quantity": 126, "sku_id": 57114357896 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115501666;1226:119128", "properties_name": "1215:1115501666:颜色:米色两件套(外套+裙子);1226:119128:尺码:S(90斤以下)", "orginal_price": "115", "quantity": 961, "sku_id": 57114357897 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115501666;1226:96784", "properties_name": "1215:1115501666:颜色:米色两件套(外套+裙子);1226:96784:尺码:M(90-100斤)", "orginal_price": "115", "quantity": 135, "sku_id": 57114357898 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115501666;1226:33651", "properties_name": "1215:1115501666:颜色:米色两件套(外套+裙子);1226:33651:尺码:L(100-110斤)", "orginal_price": "115", "quantity": 135, "sku_id": 57114357899 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115501666;1226:33652", "properties_name": "1215:1115501666:颜色:米色两件套(外套+裙子);1226:33652:尺码:XL(110-120斤)", "orginal_price": "115", "quantity": 578, "sku_id": 57114357900 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115501666;1226:33653", "properties_name": "1215:1115501666:颜色:米色两件套(外套+裙子);1226:33653:尺码:2XL(120-130斤)", "orginal_price": "115", "quantity": 124, "sku_id": 57114357901 }, { "price": "95.4", "total_price": "115", "properties": "1215:1115501666;1226:33656", "properties_name": "1215:1115501666:颜色:米色两件套(外套+裙子);1226:33656:尺码:3XL(130-140斤)", "orginal_price": "115", "quantity": 249, "sku_id": 57114357902 }, { "price": "95.4", "total_price": "115", "properties": "1215:105309781;1226:119128", "properties_name": "1215:105309781:颜色:蓝色两件套(外套+裙子);1226:119128:尺码:S(90斤以下)", "orginal_price": "115", "quantity": 556, "sku_id": 103851107855 }, { "price": "95.4", "total_price": "115", "properties": "1215:105309781;1226:96784", "properties_name": "1215:105309781:颜色:蓝色两件套(外套+裙子);1226:96784:尺码:M(90-100斤)", "orginal_price": "115", "quantity": 514, "sku_id": 103851107856 }, { "price": "95.4", "total_price": "115", "properties": "1215:105309781;1226:33651", "properties_name": "1215:105309781:颜色:蓝色两件套(外套+裙子);1226:33651:尺码:L(100-110斤)", "orginal_price": "115", "quantity": 843, "sku_id": 103851107857 }, { "price": "95.4", "total_price": "115", "properties": "1215:105309781;1226:33652", "properties_name": "1215:105309781:颜色:蓝色两件套(外套+裙子);1226:33652:尺码:XL(110-120斤)", "orginal_price": "115", "quantity": 546, "sku_id": 103851107858 }, { "price": "95.4", "total_price": "115", "properties": "1215:105309781;1226:33653", "properties_name": "1215:105309781:颜色:蓝色两件套(外套+裙子);1226:33653:尺码:2XL(120-130斤)", "orginal_price": "115", "quantity": 561, "sku_id": 103851107853 }, { "price": "95.4", "total_price": "115", "properties": "1215:105309781;1226:33656", "properties_name": "1215:105309781:颜色:蓝色两件套(外套+裙子);1226:33656:尺码:3XL(130-140斤)", "orginal_price": "115", "quantity": 570, "sku_id": 103851107854 } ] }, "seller_id": "", "sales": 0, "shop_id": "461742", "props_list": { "1215:1115500378": "颜色:粉色两件套(外套+裙子)", "1226:119128": "尺码:S(90斤以下)", "1226:96784": "尺码:M(90-100斤)", "1226:33651": "尺码:L(100-110斤)", "1226:33652": "尺码:XL(110-120斤)", "1226:33653": "尺码:2XL(120-130斤)", "1226:33656": "尺码:3XL(130-140斤)", "1215:1115501666": "颜色:米色两件套(外套+裙子)", "1215:105309781": "颜色:蓝色两件套(外套+裙子)" }, "seller_info": { "nick": "果果家气质女装", "zhuy": "https://mobile.yangkeduo.com/mall_page.html?mall_id=461742&msn=4433pm74zfzaktrcoppyi6hovu_axbuy&mall_info=%7B%22mall_name%22%3A%22%E6%9E%9C%E6%9E%9C%E5%AE%B6%E6%B0%94%E8%B4%A8%E5%A5%B3%E8%A3%85%22%7D&has_decoration=1", "shop_name": "果果家气质女装" }, "tmall": false, "error": "", "warning": "", "url_log": [], "coupon_activity": "", "stuff_status": "", "shopinfo": [], "method": "", "promo_type": "", "props_img": { "1215:1115500378": "https://t00img.yangkeduo.com/goods/images/2018-08-28/062d42b525a7c786920cbb83ac772af7.jpeg", "1215:1115501666": "https://t00img.yangkeduo.com/goods/images/2018-08-28/415bed99d5a925123d7b7c39547205de.jpeg", "1215:105309781": "https://t00img.yangkeduo.com/goods/images/2018-11-17/2f202934f16f0eee41257b77bf489262.jpeg" }, "_ddf": "jc", "format_check": "ok", "desc_img": [ "https://img.pddpic.com/mms-material-img/2022-09-18/3f89d470-1af8-4dee-b529-6d62aa2ea3b7.png", "https://t00img.yangkeduo.com/goods/images/2019-02-15/ddf6fe7b-b536-4183-932d-69a1189a3f59.png", "https://t00img.yangkeduo.com/goods/images/2018-09-02/20f659b04d3e7e5851c27ff9931c96fc.jpeg", "https://t00img.yangkeduo.com/goods/images/2019-11-14/4420a8c3-49ed-46d8-ab55-15e7a638ca31.jpg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/26c3e9d5cfbaf4e8f13b2bdd38f48d71.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/0aa872fa74599dad7b6aefe6b6c035c0.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/6bc959e32a30424c7a5284a37676999c.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/1fa9861a8c99c5e9e8119fd2239fef5a.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/b62cabf1d2320c5761e3f4c15203fb20.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/6f6e54376a66cbc78e16700d4c424fe1.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/2f60753dfc875a6876adc35833a69d31.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/ae0116e589d8de712f8dafd0c356cefe.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/da910c98fcc8de1b4d2d1498cd7899fd.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/140349649d8b7d08c8e88bfbbaa2f900.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/a953bae2eeb7364ef3ef2976a97d07eb.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/4da59828136c3b1308aad0aa990778a7.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-09-02/4a365b61a80e47288c8609ccd5982396.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-11-17/cd0a8a96b783a51236812ce24c59a329.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-11-17/16008ac19768d05e7dee16406ff958a1.jpeg", "https://t00img.yangkeduo.com/goods/images/2018-11-17/ef1d17b69ebf9449a8bb52459b168c26.jpeg" ], "shop_item": [], "relate_items": [] },