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

qimen.alibaba.wdk.pos.order.extra.rights.query (根据订单商品明细查询商家额外促销活动)

用户下单后,更新订单商品查询商家促销活动信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
params OrderDO 必须 参数对象
  • └ card_type
  • String
  • 可选
  • 大润发会员卡
  • 会员卡别
  • └ card_no
  • String
  • 可选
  • 10125052708
  • 会员卡号
  • └ store_code
  • String
  • 必须
  • CSDRF01001
  • 经营店编码
  • item_list
  • ItemDO []
  • 必须
  • 订单商品列表
  • └ item_code
  • String
  • 必须
  • 1977873
  • 商品货号
  • └ unit
  • String
  • 可选
  • 标品单位
  • └ quantity
  • Number
  • 可选
  • 1
  • 标品购买数量
  • └ inv_unit
  • String
  • 可选
  • 库存单位(非标品使用)
  • └ inv_quantity
  • String
  • 可选
  • 2.0
  • 库存单位购买数量(非标品使用)
  • └ pay_amt
  • Number
  • 必须
  • 1000
  • 折扣后金额(分)
  • └ order_id
  • String
  • 可选
  • 124354346546
  • 订单号
  • └ attribute
  • String
  • 可选
  • {"channel_code": "darunfa", "pos_code": "0001"}
  • 附加信息,json对象(key-value): channel_code:收银机渠道号,如:大润发换购POS-darunfa pos_code:收银通道号

响应参数

名称 类型 示例值 描述
errCode String SUCCESS 错误码
errMessage String 成功 错误信息
success Boolean true true:成功 false:失败
extraRights RightsDO [] 额外权益列表
  • └ type
  • Number
  • 2
  • 权益类型,1-列印 2-停车券
  • └ content
  • String
  • [{"type":1, "content": [{"content":["恭喜您获得29次1元换购机会"],"locate": "left","size":"1","type":"text"},{"content":["2018年至昨日累计消费760.78元,可参加超值换购活动"],"locate":"left","size":"1","type":"text"},{"content":[ "您可获得47个集点 "],"locate":"left","size":"1","type":"text"}]}]
  • 小票定制 小票样式内容以JsonArray的形式传输至POS客户端。Array中的每个元素代表小票上的一行内容,并约定内容格式如下: [{ "locate":"left/right/center/leftAndRight", "type":"text/qrcode/barcode/logo", "size":"1-8", "content":[ "str param1", "str param2", "...", ] } ] 格式说明 locate(位置): left-内容居左 right-内容居右 center-内容居中 leftAndRight-内容左右对齐 type(类型): text-文本 qrcode-二维码 barcode-条形码 logo-商家logo图片 size(字体大小):1-8 content(内容,数组):param1-barcode/qrcode/text的文本内容 param2-右侧文本内容(type=text, locate=leftAndRight情况下)

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlibabaWdkPosOrderExtraRightsQueryRequest req = new AlibabaWdkPosOrderExtraRightsQueryRequest();
AlibabaWdkPosOrderExtraRightsQueryRequest.OrderDO obj1 = new AlibabaWdkPosOrderExtraRightsQueryRequest.OrderDO();
obj1.setCardType("大润发会员卡");
obj1.setCardNo("10125052708");
obj1.setStoreCode("CSDRF01001");
List<AlibabaWdkPosOrderExtraRightsQueryRequest.ItemDO> list3 = new ArrayList<AlibabaWdkPosOrderExtraRightsQueryRequest.ItemDO>();
AlibabaWdkPosOrderExtraRightsQueryRequest.ItemDO obj4 = new AlibabaWdkPosOrderExtraRightsQueryRequest.ItemDO();
list3.add(obj4);
obj4.setItemCode("1977873");
obj4.setUnit("包");
obj4.setQuantity(1L);
obj4.setInvUnit("包");
obj4.setInvQuantity("2.0");
obj4.setPayAmt(1000L);
obj1.setItemList(list3);
obj1.setOrderId("124354346546");
obj1.setAttribute("{\"channel_code\": \"darunfa\", \"pos_code\": \"0001\"}");
req.setParams(obj1);
AlibabaWdkPosOrderExtraRightsQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<errCode>SUCCESS</errCode>
<errMessage>成功</errMessage>
<success>true</success>
<extraRights>
    <rights_d_o>
        <type>2</type>
        <content>[{&quot;type&quot;:1, &quot;content&quot;: [{&quot;content&quot;:[&quot;恭喜您获得29次1元换购机会&quot;],&quot;locate&quot;:   &quot;left&quot;,&quot;size&quot;:&quot;1&quot;,&quot;type&quot;:&quot;text&quot;},{&quot;content&quot;:[&quot;2018年至昨日累计消费760.78元,可参加超值换购活动&quot;],&quot;locate&quot;:&quot;left&quot;,&quot;size&quot;:&quot;1&quot;,&quot;type&quot;:&quot;text&quot;},{&quot;content&quot;:[   &quot;您可获得47个集点   &quot;],&quot;locate&quot;:&quot;left&quot;,&quot;size&quot;:&quot;1&quot;,&quot;type&quot;:&quot;text&quot;}]}]</content>
    </rights_d_o>
</extraRights>

异常示例

  • 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

返回
顶部