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

alibaba.wdk.pos.item.discountcode.get (方法入参outSkuId、ownCode 二选一必填; 用于扫码查商品和电子秤两个场景.支持新折扣码)

移动POS获取商品接口支持新折扣码

公共参数

请求参数

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

响应参数

名称 类型 示例值 描述
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
  • 1001
  • outSkuId
  • └ period
  • String
  • 60天
  • 保质期天数
  • └ price
  • Number
  • 1564
  • 单价
  • └ 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
  • └ sale_spec
  • String
  • 3瓶
  • saleSpec
  • └ barcode_spec
  • String
  • 1.00
  • 箱码规格
  • └ code_status
  • Number
  • 0
  • 码状态:0 ,正常,-1,无效(已核销或已过期)
  • └ code_value
  • String
  • TH123
  • 码类型对应的码值
  • └ code_type
  • Number
  • 5
  • ItemCode(1,"普通商品码"), ZkmCodeV1(2,"旧折扣码,YH开头"), ZkmCodeV2(3,"新折扣码,Z开头"), CardCode(4,"礼品卡卡号"), VoucherCode(5,"提货券电子凭证码,TH开头"),;
  • └ item_tags
  • Number []
  • 6658,79234,91394,156610
  • 商品标
  • process_items
  • ProcessItemDo []
  • 加工商品列表
  • └ promotion_price
  • Number
  • 优惠价:分
  • 150
  • └ promotion_title
  • String
  • 优惠活动
  • 优惠活动
  • └ total_price
  • Number
  • 总价:分
  • 150
  • └ inv_unit
  • String
  • 单位
  • kg
  • └ weighing
  • Boolean
  • 是否称重
  • true
  • └ weight
  • String
  • 重量
  • 1.5
  • └ quantity
  • Number
  • 数量
  • 1
  • └ price
  • Number
  • 单价:分
  • 100
  • └ title
  • String
  • 商品名称
  • 商品名称
  • └ shop_id
  • String
  • 店铺id
  • 123456
  • └ out_sku_id
  • String
  • 商品skuid
  • 0101000
  • └ item_id
  • Number
  • 商品id
  • 12300000
  • └ item_weight
  • String
  • 单位重量
  • itemWeight
  • └ expiration_time_hour
  • Number
  • 保质期小时数
  • 10

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaWdkPosItemDiscountcodeGetRequest req = new AlibabaWdkPosItemDiscountcodeGetRequest();
req.setShopId("33571001");
req.setOutSkuId("123456");
req.setBarCode("691245");
req.setDiscount("30");
req.setDiscountCode("Z306903944350726");
AlibabaWdkPosItemDiscountcodeGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_wdk_pos_item_discountcode_get_response>
    <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>1001</out_sku_id>
        <period>60天</period>
        <price>1564</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>
        <sale_spec>3瓶</sale_spec>
        <barcode_spec>1.00</barcode_spec>
        <code_status>0</code_status>
        <code_value>TH123</code_value>
        <code_type>5</code_type>
        <item_tags>
            <number>6658</number>
            <number>79234</number>
            <number>91394</number>
            <number>156610</number>
        </item_tags>
        <process_items>
            <process_item_do>
                <promotion_price>优惠价:分</promotion_price>
                <promotion_title>优惠活动</promotion_title>
                <total_price>总价:分</total_price>
                <inv_unit>单位</inv_unit>
                <weighing>是否称重</weighing>
                <weight>重量</weight>
                <quantity>数量</quantity>
                <price>单价:分</price>
                <title>商品名称</title>
                <shop_id>店铺id</shop_id>
                <out_sku_id>商品skuid</out_sku_id>
                <item_id>商品id</item_id>
            </process_item_do>
        </process_items>
        <item_weight>单位重量</item_weight>
        <expiration_time_hour>保质期小时数</expiration_time_hour>
    </target>
</alibaba_wdk_pos_item_discountcode_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>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部