alibaba.wdk.trade.discount.bill.get (订单优惠账单查询)

商家查询订单优惠账单

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param0 OrderDiscountBillQueryRequest 必须 请求参数
  • └ end_time
  • Date
  • 必须
  • 2019-05-11 00:00:00
  • 查询结束时间
  • └ next_id
  • Number
  • 可选
  • 101
  • 传入上一次查询结果的next_id,第一次查询时传0
  • └ page_size
  • Number
  • 可选
  • 20
  • 每页数量
  • └ start_time
  • Date
  • 必须
  • 2019-05-01 00:00:00
  • 查询开始时间
  • └ store_id
  • String
  • 可选
  • DRF001
  • 经营店id,store_id和out_shop_code不能同时为空
  • └ order_channel
  • Number
  • 可选
  • 1
  • 订单渠道 1代表"轻POS",2代表"淘鲜达",默认为 1
  • └ out_shop_code
  • String
  • 可选
  • A019
  • 外部门店编码

响应参数

名称 类型 示例值 描述
result OrderDiscountBillQueryResult 结果
  • └ next_id
  • Number
  • 200
  • 下一页查询的入参,当为-1时表示没有更多数据
  • discount_bills
  • OrderDiscountBillBo []
  • 账单列表
  • └ activity_id
  • Number
  • 1000001
  • 活动ID
  • └ activity_name
  • String
  • (华东)22-28 号高洁丝
  • 活动名称
  • └ activity_type
  • Number
  • 1
  • 活动类型 1:活动 2:券
  • └ buy_quantity
  • Number
  • 4
  • 购买数量
  • └ discount_fee
  • Number
  • 100
  • 优惠金额
  • └ discount_quantity
  • Number
  • 1
  • 优惠件数
  • └ discount_type
  • Number
  • 1
  • 补差类型
  • └ id
  • Number
  • 10
  • 主键id
  • └ main_order_id
  • String
  • 100000001
  • 主订单号
  • └ merchant_code
  • String
  • DRF
  • 商家编码
  • └ merchant_discount_fee
  • Number
  • 50
  • 商家优惠补差金额
  • └ order_status
  • Number
  • 1
  • 交易状态
  • └ out_order_id
  • String
  • 23213123
  • 外部订单号
  • └ sku_code
  • String
  • 312312
  • 商品编码
  • └ sku_name
  • String
  • 阿尔卑斯棒棒糖
  • 商品名称
  • └ store_id
  • String
  • DRF001
  • 经营店id
  • └ sub_order_id
  • String
  • 100000001
  • 子单号
  • └ txd_discount_fee
  • Number
  • 50
  • 淘鲜达优惠金额
  • └ biz_time
  • Date
  • 2019-05-02 00:01:00
  • 业务时间
  • └ order_channel
  • Number
  • 1
  • 订单渠道
  • └ investor
  • Number
  • 1
  • 出资方 1表示平台出资 0表示品牌商出资
  • └ return_code
  • String
  • 0
  • 结果码
  • └ return_msg
  • String
  • 成功
  • 结果文案
  • └ success
  • Boolean
  • true
  • 业务请求成功与否
  • └ total_number
  • Number
  • 1000001
  • 总数量,只在查询第一页时返回

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaWdkTradeDiscountBillGetRequest req = new AlibabaWdkTradeDiscountBillGetRequest();
AlibabaWdkTradeDiscountBillGetRequest.OrderDiscountBillQueryRequest obj1 = new AlibabaWdkTradeDiscountBillGetRequest.OrderDiscountBillQueryRequest();
obj1.setEndTime(StringUtils.parseDateTime("2019-05-11 00:00:00"));
obj1.setNextId(101L);
obj1.setPageSize(20L);
obj1.setStartTime(StringUtils.parseDateTime("2019-05-01 00:00:00"));
obj1.setStoreId("DRF001");
obj1.setOrderChannel(1L);
obj1.setOutShopCode("A019");
req.setParam0(obj1);
AlibabaWdkTradeDiscountBillGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_wdk_trade_discount_bill_get_response>
    <result>
        <next_id>200</next_id>
        <discount_bills>
            <order_discount_bill_bo>
                <activity_id>1000001</activity_id>
                <activity_name>(华东)22-28 号高洁丝</activity_name>
                <activity_type>1</activity_type>
                <buy_quantity>4</buy_quantity>
                <discount_fee>100</discount_fee>
                <discount_quantity>1</discount_quantity>
                <discount_type>1</discount_type>
                <id>10</id>
                <main_order_id>100000001</main_order_id>
                <merchant_code>DRF</merchant_code>
                <merchant_discount_fee>50</merchant_discount_fee>
                <order_status>1</order_status>
                <out_order_id>23213123</out_order_id>
                <sku_code>312312</sku_code>
                <sku_name>阿尔卑斯棒棒糖</sku_name>
                <store_id>DRF001</store_id>
                <sub_order_id>100000001</sub_order_id>
                <txd_discount_fee>50</txd_discount_fee>
                <biz_time>2019-05-02 00:01:00</biz_time>
                <order_channel>1</order_channel>
                <investor>1</investor>
            </order_discount_bill_bo>
        </discount_bills>
        <return_code>0</return_code>
        <return_msg>成功</return_msg>
        <success>true</success>
        <total_number>1000001</total_number>
    </result>
</alibaba_wdk_trade_discount_bill_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

返回
顶部