alibaba.wdk.pos.trade.query (轻pos品牌营销查询接口)

轻pos品牌营销场景,外部商家查询营销信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
query_request FastBuyPosQueryRequest 可选 查询请求
  • └ machine_id
  • String
  • 可选
  • 2222
  • pos机id
  • └ out_order_id
  • String
  • 必须
  • 2233
  • 外部订单id
  • └ store_id
  • String
  • 可选
  • 2222
  • 经营店id
  • └ out_shop_code
  • String
  • 可选
  • A019
  • 外部门店编码

响应参数

名称 类型 示例值 描述
result FastBuyPosQueryResult 查询返回结果
  • └ biz_order_id
  • String
  • 222233
  • 五道口订单id
  • └ coupon_fee
  • Number
  • 23
  • 优惠券优惠金额
  • └ order_status
  • Number
  • 1
  • 订单状态:1为已下单,未支付;2为交易完成;3为已退款;4为已关单
  • └ promotion_fee
  • Number
  • 34
  • 优惠活动优惠金额
  • └ return_code
  • String
  • PARAM_CHECK_ERROR
  • 返回的错误码
  • └ return_msg
  • String
  • 参数校验失败
  • 错误信息
  • └ success
  • Boolean
  • true
  • 是否调用成功
  • └ item_promotions
  • String
  • { "254177": "[{\"activityId\":9094040204,\"promotionFee\":73}]", "268982": "[{\"activityId\":9094040204,\"promotionFee\":77}]", "302548": "[{\"activityId\":9094040204,\"promotionFee\":87}]", "330575": "[{\"activityId\":9094040204,\"promotionFee\":63}]" }
  • 商品分摊优惠

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaWdkPosTradeQueryRequest req = new AlibabaWdkPosTradeQueryRequest();
AlibabaWdkPosTradeQueryRequest.FastBuyPosQueryRequest obj1 = new AlibabaWdkPosTradeQueryRequest.FastBuyPosQueryRequest();
obj1.setMachineId("2222");
obj1.setOutOrderId("2233");
obj1.setStoreId("2222");
obj1.setOutShopCode("A019");
req.setQueryRequest(obj1);
AlibabaWdkPosTradeQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_wdk_pos_trade_query_response>
    <result>
        <biz_order_id>222233</biz_order_id>
        <coupon_fee>23</coupon_fee>
        <order_status>1</order_status>
        <promotion_fee>34</promotion_fee>
        <return_code>PARAM_CHECK_ERROR</return_code>
        <return_msg>参数校验失败</return_msg>
        <success>true</success>
        <item_promotions>{     &quot;254177&quot;: &quot;[{\&quot;activityId\&quot;:9094040204,\&quot;promotionFee\&quot;:73}]&quot;,     &quot;268982&quot;: &quot;[{\&quot;activityId\&quot;:9094040204,\&quot;promotionFee\&quot;:77}]&quot;,     &quot;302548&quot;: &quot;[{\&quot;activityId\&quot;:9094040204,\&quot;promotionFee\&quot;:87}]&quot;,     &quot;330575&quot;: &quot;[{\&quot;activityId\&quot;:9094040204,\&quot;promotionFee\&quot;:63}]&quot;   }</item_promotions>
    </result>
</alibaba_wdk_pos_trade_query_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

返回
顶部