文档中心 > API类目 > 五道口API

alibaba.wdk.pos.item.get (商品读取接口)

方法入参outSkuId、ownCode 二选一必填; 用于扫码查商品和电子秤两个场景

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
shop_id String 必须 33571001 所在的门店Id
out_sku_id String 可选 641121 ERP商品编码 outSkuId、barCode 二选一必填
bar_code String 可选 6945653235632 标准69码(13位)或 自编码(7位) outSkuId、barCode 二选一必填

响应参数

名称 类型 示例值 描述
issuccess Boolean true 调用成功
target PosItemDo module 返回结果
  • └ avg_weight
  • String
  • 1.2
  • 均重
  • └ bar_code
  • String
  • 6935421365512
  • * 条码 * 标准码(13位69码)或 自编码(7位)
  • └ eat_method
  • String
  • 加热
  • 食用方法
  • └ if_tracing
  • Boolean
  • false
  • 是否追溯
  • └ ingredients
  • String
  • 新鲜剂,香精..
  • 配料表
  • └ inv_unit
  • String
  • 单位(库存单位:斤、瓶)
  • └ item_lable_type
  • String
  • str
  • 商品标签类型,控制非标商品的商品标签的大小和格式
  • └ out_sku_id
  • String
  • 1234351
  • outskuId
  • └ period
  • String
  • 60天
  • 保质期天数
  • └ price
  • Number
  • 156432
  • 单价
  • └ price_lable_type
  • String
  • str
  • 标价签类型,控制价格标签的大小和格式
  • └ production_place
  • String
  • 浙江杭州
  • 产地
  • └ rank
  • String
  • 五星
  • 等级
  • └ if_promotion
  • Boolean
  • true
  • 是否促销
  • └ promotion_end
  • String
  • 2015/12/8 0:00
  • 促销结束时间
  • └ promotion_price
  • Number
  • 2000
  • 促销价
  • └ promotion_reason
  • String
  • 让利
  • 促销原因
  • └ promotion_start
  • String
  • 2015/12/1 0:00
  • 促销开始时间
  • └ promotion_type
  • String
  • 1
  • 促销类型 1:限购 2:满减
  • └ short_name
  • String
  • 辣鸡
  • 标题简称
  • └ storage_condition
  • String
  • 冰冻保存
  • 保存条件
  • └ title
  • String
  • 农家牛肉
  • 商品标题
  • └ vendor
  • String
  • 杭州食府
  • 生产商名称
  • └ vendor_addr
  • String
  • 浙江
  • 生产商地址
  • └ weighing
  • Boolean
  • false
  • 是否秤重
  • └ has_zp_act
  • Boolean
  • ture
  • 是否有赠品活动
  • └ discount_code
  • String
  • zkm22338
  • 折扣码
  • service_items
  • SimpleServiceItemDo []
  • serviceItems
  • └ item_id
  • Number
  • 23874910834
  • itemId
  • └ shop_id
  • String
  • 1000847028
  • shopId
  • └ title
  • String
  • 热加工
  • title
  • └ price
  • Number
  • 500
  • price
  • └ pic_url
  • String
  • \/\/img.alicdn.com\/imgextra\/i2\/2680068332\/TB2L0qVlolnpuFjSZFjXXXTaVXa_!!2680068332.jpg
  • picUrl
  • └ barcode_spec
  • String
  • 1.00
  • 箱码规格
  • └ sale_spec
  • String
  • 3瓶
  • saleSpec

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaWdkPosItemGetRequest req = new AlibabaWdkPosItemGetRequest();
req.setShopId("33571001");
req.setOutSkuId("641121");
req.setBarCode("6945653235632");
AlibabaWdkPosItemGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_wdk_pos_item_get_response>
    <issuccess>true</issuccess>
    <target>
        <avg_weight>1.2</avg_weight>
        <bar_code>6935421365512</bar_code>
        <eat_method>加热</eat_method>
        <if_tracing>false</if_tracing>
        <ingredients>新鲜剂,香精..</ingredients>
        <inv_unit>斤</inv_unit>
        <item_lable_type>str</item_lable_type>
        <out_sku_id>1234351</out_sku_id>
        <period>60天</period>
        <price>156432</price>
        <price_lable_type>str</price_lable_type>
        <production_place>浙江杭州</production_place>
        <rank>五星</rank>
        <if_promotion>true</if_promotion>
        <promotion_end>2015/12/8 0:00</promotion_end>
        <promotion_price>2000</promotion_price>
        <promotion_reason>让利</promotion_reason>
        <promotion_start>2015/12/1 0:00</promotion_start>
        <promotion_type>1</promotion_type>
        <short_name>辣鸡</short_name>
        <storage_condition>冰冻保存</storage_condition>
        <title>农家牛肉</title>
        <vendor>杭州食府</vendor>
        <vendor_addr>浙江</vendor_addr>
        <weighing>false</weighing>
        <has_zp_act>ture</has_zp_act>
        <discount_code>zkm22338</discount_code>
        <service_items>
            <simple_service_item_do>
                <item_id>23874910834</item_id>
                <shop_id>1000847028</shop_id>
                <title>热加工</title>
                <price>500</price>
            </simple_service_item_do>
        </service_items>
        <pic_url>\/\/img.alicdn.com\/imgextra\/i2\/2680068332\/TB2L0qVlolnpuFjSZFjXXXTaVXa_!!2680068332.jpg</pic_url>
        <barcode_spec>1.00</barcode_spec>
        <sale_spec>3瓶</sale_spec>
    </target>
</alibaba_wdk_pos_item_get_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案
isv.param.error 参数错误 请检查入参,必填项是否已填
isv.item.not.found 未找到商品 请检查入参值是否正确
isp.item.not.online 商品未发布上线 请联系相关人员上架商品
isp.system.error 系统错误 服务端内部错误
isp.top-remote-connection-timeout 远程服务调用超时 调用超时,重新调用。 (所有接口都有可能遇到的错误,其他接口就不再列出)

API工具

如何获得此API

FAQ

返回
顶部