• 获得微店商品详情 API


    一、参数

    公共参数

    请求地址: https://api-gw.onebound.cn/micro/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=2749499386

    参数说明:num_iid:微店商品ID

    响应参数

    Version: Date:

    名称类型必须示例值描述

    num_iid

    Bigint02749499386宝贝ID

    title

    String0Swarovski施华洛世奇LIFELONG BOW 流苏蝴蝶结浪漫妩媚女款项链饰品礼物5447082宝贝标题

    desc_short

    String0Swarovski施华洛世奇LIFELONG BOW 流苏蝴蝶结浪漫妩媚女款项链饰品礼物5447082商品简介

    price

    Float045价格

    total_price

    Float00

    suggestive_price

    Float00

    orginal_price

    String045原价

    nick

    String0达薇妮珠宝掌柜昵称

    num

    Int0库存

    min_num

    Int00最小购买数

    detail_url

    String0https://weidian.com/item.html?itemID=2749499386宝贝链接

    pic_url

    String0https://si.geilicdn.com/pcitem1288244399-3b300000016a3fd26d6f0a217216_800_800.jpg宝贝图片

    brand

    String0品牌名称

    brandId

    Int0品牌ID

    rootCatId

    Int0顶级分类ID

    cid

    Int0

    crumbs

    Mix0[]导航菜单

    created_time

    String0

    modified_time

    String0

    delist_time

    String0

    desc

    String0商品详情

    desc_img

    Mix0[https://si.geilicdn.com/pcitem1288244399-23910000016a40086f230a217216_790_420.jpg]商品详情图片

    item_imgs

    Mix0[{ "url": "https://si.geilicdn.com/pcitem1288244399-3b300000016a3fd26d6f0a217216_800_800.jpg"}商品图片

    item_weight

    String0

    item_size

    String0

    location

    String0发货地

    express_fee

    Float00.00快递费用

    ems_fee

    Float0EMS费用

    post_fee

    Float0物流费用

    shipping_to

    String0发货至

    has_discount

    Boolean0false是否有优惠

    video

    Mix0]商品视频

    is_virtual

    String0

    sample_id

    String0商品风格标识ID

    is_promotion

    Boolean0false是否促销

    props_name

    String00:561195188:项链:流苏蝴蝶结项链;商品属性名

    prop_imgs

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

    property_alias

    String020509:9974422:36;1627207:28326:红色;20509:9975710:38;1627207:28326:红色;20509:9981357:40;1627207:28326:红色商品属性别名

    props

    Mix0[{ "name": "产地","value": "中国" }]商品属性

    total_sold

    Int0

    skus

    Mix0{"sku": [{"price": "39", "orginal_price": "39.00", "properties": "0:561195188;", "properties_name": "0:561195188:项链:流苏蝴蝶结项链;", "quantity": "305", "sku_id": "10668572309"}]商品规格信息列表

    seller_id

    Int0卖家ID

    sales

    Int0138销量

    shop_id

    Int01288244399店铺ID

    props_list

    Mix0{"0:561195188": "项链:流苏蝴蝶结项链"}商品属性

    seller_info

    Mix0{ "title": "达薇妮珠宝", "shop_name":"达薇妮珠宝", "zhuy": "https://weidian.com/?userid=1288244399","level": 3, "shop_type": 3, "user_num_id": "1288244399", "nick": "达薇妮珠宝" }卖家信息

    tmall

    Boolean0false是否天猫

    error

    String0错误信息

    warning

    String0警告信息

    url_log

    Mix0[]

    favcount

    Int00

    fanscount

    Int00

    method

    String0item_tmall:pget_item

    promo_type

    String0

    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/micro/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=2749499386"

      前往获取key和secret

    响应示例

    1. {
    2. "item": {
    3. "num_iid": "2749499386",
    4. "title": "Swarovski施华洛世奇LIFELONG BOW 流苏蝴蝶结浪漫妩媚女款项链饰品礼物5447082",
    5. "desc_short": "Swarovski施华洛世奇LIFELONG BOW 流苏蝴蝶结浪漫妩媚女款项链饰品礼物5447082",
    6. "price": 45,
    7. "total_price": 0,
    8. "suggestive_price": 0,
    9. "orginal_price": "45",
    10. "nick": "达薇妮珠宝",
    11. "num": "",
    12. "min_num": 0,
    13. "detail_url": "https://weidian.com/item.html?itemID=2749499386",
    14. "pic_url": "https://si.geilicdn.com/pcitem1288244399-3b300000016a3fd26d6f0a217216_800_800.jpg",
    15. "brand": "",
    16. "brandId": "",
    17. "rootCatId": "",
    18. "cid": "",
    19. "favcount": "",
    20. "fanscount": "",
    21. "crumbs": [],
    22. "created_time": "",
    23. "modified_time": "",
    24. "delist_time": "",
    25. "desc": "\"https://si.geilicdn.com/pcitem1288244399-23910000016a40086f230a217216_790_420.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-25490000016a40086f650a217252_790_402.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-064c0000016a400870600a21924b_790_503.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-61250000016a400870900a219248_790_308.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-0e370000016a400871960a21924a_790_600.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-25730000016a400874400a217252_790_600.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-61470000016a400874790a219248_790_600.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-26c00000016a400875df0a217205_790_600.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-34850000016a400876a90a20b7b9_790_834.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-23c00000016a4008754e0a217216_790_379.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-06800000016a400876500a21924b_790_524.jpg\"/>\"https://si.geilicdn.com/pcitem1288244399-25840000016a400875e90a217252_790_427.jpg\"/>",
    26. "desc_img": [
    27. "https://si.geilicdn.com/pcitem1288244399-23910000016a40086f230a217216_790_420.jpg",
    28. "https://si.geilicdn.com/pcitem1288244399-25490000016a40086f650a217252_790_402.jpg",
    29. "https://si.geilicdn.com/pcitem1288244399-064c0000016a400870600a21924b_790_503.jpg",
    30. "https://si.geilicdn.com/pcitem1288244399-61250000016a400870900a219248_790_308.jpg",
    31. "https://si.geilicdn.com/pcitem1288244399-0e370000016a400871960a21924a_790_600.jpg",
    32. "https://si.geilicdn.com/pcitem1288244399-25730000016a400874400a217252_790_600.jpg",
    33. "https://si.geilicdn.com/pcitem1288244399-61470000016a400874790a219248_790_600.jpg",
    34. "https://si.geilicdn.com/pcitem1288244399-26c00000016a400875df0a217205_790_600.jpg",
    35. "https://si.geilicdn.com/pcitem1288244399-34850000016a400876a90a20b7b9_790_834.jpg",
    36. "https://si.geilicdn.com/pcitem1288244399-23c00000016a4008754e0a217216_790_379.jpg",
    37. "https://si.geilicdn.com/pcitem1288244399-06800000016a400876500a21924b_790_524.jpg",
    38. "https://si.geilicdn.com/pcitem1288244399-25840000016a400875e90a217252_790_427.jpg"
    39. ],
    40. "item_imgs": [
    41. {
    42. "url": "https://si.geilicdn.com/pcitem1288244399-3b300000016a3fd26d6f0a217216_800_800.jpg"
    43. }
    44. ],
    45. "item_weight": "",
    46. "item_size": "",
    47. "location": "",
    48. "post_fee": "",
    49. "express_fee": "",
    50. "ems_fee": "",
    51. "shipping_to": "",
    52. "has_discount": "",
    53. "video": [],
    54. "is_virtual": "",
    55. "sample_id": "",
    56. "is_promotion": "false",
    57. "props_name": "0:561195188:项链:流苏蝴蝶结项链;",
    58. "prop_imgs": {
    59. "prop_img": []
    60. },
    61. "property_alias": "",
    62. "props": [],
    63. "total_sold": "0",
    64. "skus": {
    65. "sku": [
    66. {
    67. "price": "45.00",
    68. "orginal_price": "45.00",
    69. "properties": "0:561195188;",
    70. "properties_name": "0:561195188:项链:流苏蝴蝶结项链;:",
    71. "quantity": 957,
    72. "sku_id": 10668572309
    73. }
    74. ]
    75. },
    76. "seller_id": "",
    77. "sales": 106,
    78. "shop_id": 1288244399,
    79. "props_list": [
    80. {
    81. "0:561195188": "项链:流苏蝴蝶结项链"
    82. }
    83. ],
    84. "seller_info": {
    85. "title": "达薇妮珠宝",
    86. "shop_name": "达薇妮珠宝",
    87. "zhuy": "https://weidian.com/?userid=1288244399",
    88. "level": 3,
    89. "shop_type": 3,
    90. "user_num_id": 1288244399,
    91. "nick": "达薇妮珠宝"
    92. },
    93. "tmall": "false",
    94. "error": "",
    95. "warning": "",
    96. "url_log": [],
    97. "stuff_status": "",
    98. "data_from": "micro",
    99. "method": "",
    100. "promo_type": null,
    101. "props_img": null,
    102. "rate_grade": "",
    103. "priceRange": [],
    104. "shop_item": [],
    105. "relate_items": []
    106. },
    107. "secache": "bca4a25047d7b435e098ecb97efd77dd",
    108. "secache_time": 1611128224,
    109. "secache_date": "2021-01-20 15:37:04",
    110. "translate_status": "",
    111. "translate_time": 0,
    112. "language": {
    113. "default_lang": "cn",
    114. "current_lang": "cn"
    115. },
    116. "error": "",
    117. "reason": "",
    118. "error_code": "0000",
    119. "cache": 0,
    120. "api_info": "today:0 max:10000",
    121. "execution_time": 3.061,
    122. "server_time": "Beijing/2021-01-20 15:37:04",
    123. "client_ip": "115.151.186.91",
    124. "call_args": {
    125. "num_iid": "2749499386",
    126. "area_id": "440111"
    127. },
    128. "api_type": "micro",
    129. "translate_language": "zh-CN",
    130. "translate_engine": "baidu",
    131. "server_memory": "2.75MB",
    132. "request_id": "1.6007dd9d4909b"
    133. }

    异常示例

    1. {
    2. "error": "item-not-found",
    3. "reason": "商品没找到",
    4. "error_code": "2000",
    5. "success": 0,
    6. "cache": 0,
    7. "api_info": "today:0 max:10000",
    8. "execution_time": 0.081,
    9. "server_time": "Beijing/2020-06-10 23:44:00",
    10. "call_args": [],
    11. "api_type": "taobao",
    12. "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未知错误
  • 相关阅读:
    Android SurfaceView预览相机黑屏问题解决方案
    深度学习中的偏差、方差、正则化
    JAVA毕业设计的工资管理系统计算机源码+lw文档+系统+调试部署+数据库
    新渲染引擎、自定义设计和高质量用户体验的样例应用 Wonderous 现已开源
    杰理之内置 FM 没有声音【篇】
    【云原生 • Kubernetes】kubernetes 核心技术 - Service
    从理解js双重递归执行顺序到用递归方式实现二叉树中序遍历
    SpringBoot+Vue项目自媒体社区平台
    PHP邮箱验证码功能优化的策略?怎么配置?
    卫星遥感·格物致知丨卫星遥感的力量——自然灾害监测的太空之眼—洪涝灾害监测
  • 原文地址:https://blog.csdn.net/Noah_ZX/article/details/126006949