文档中心 > API类目 > 质检品控API

taobao.ts.subscribe.get (淘宝服务订购关系查询)

ts订购关系状态查询. 暂只支持1口价服务.

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
servcie_item_code String 必须 ts-9394-1
  • 最大长度:64
  • 服务收费项code
    nick String 必须 hz0799
  • 最大长度:32
  • 订购用户昵称

    响应参数

    名称 类型 示例值 描述
    service_subscribe ServiceSubscribe 订购关系对象
    • └ service_item_code
    • String
    • ts-11111-1
    • 服务收费项code
    • └ nick
    • String
    • hz0079
    • 订购者昵称
    • └ all_num
    • Number
    • 100
    • 订购总数
    • └ used_num
    • Number
    • 10
    • 已经使用的数量
    • └ gmt_expiry
    • Date
    • 2000-01-01 00:00:00
    • 过期时间
    • └ future_price
    • String
    • 1341
    • 将要被使用的那条质检订单的价格
    • └ future_sub_id
    • Number
    • 1341234123
    • 将要被消耗的质检订单ID
    • usage_detail_list
    • QualityUsageDetail []
    • 该用户该收费项目下面的所有的订购记录详情
    • └ sub_id
    • Number
    • 131234123
    • 订购ID
    • └ user_id
    • Number
    • 341234123
    • 用户ID
    • └ purchas_amount
    • Number
    • 13
    • 该订单订购的数量
    • └ application_amount
    • Number
    • 1
    • 该订单已经使用的数量
    • └ available_amount
    • Number
    • 12
    • 该订单中尚未使用的数量
    • └ article_item_code
    • String
    • ts-qt-1234
    • 质检服务的收费项目码
    • └ price
    • String
    • 12.23
    • 该订单中每个质检服务的价格
    • └ start_date
    • Date
    • 2000-01-01 00:00:00
    • 该订单的开通时间
    • └ end_date
    • Date
    • 2000-01-01 00:00:00
    • 该订单的到期时间
    • └ avaliable_num
    • Number
    • 可用数量

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    TsSubscribeGetRequest req = new TsSubscribeGetRequest();
    req.setServcieItemCode("ts-9394-1");
    req.setNick("hz0799");
    TsSubscribeGetResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <ts_subscribe_get_response>
        <service_subscribe>
            <service_item_code>ts-11111-1</service_item_code>
            <nick>hz0079</nick>
            <all_num>100</all_num>
            <used_num>10</used_num>
            <gmt_expiry>2000-01-01 00:00:00</gmt_expiry>
            <future_price>1341</future_price>
            <future_sub_id>1341234123</future_sub_id>
            <usage_detail_list>
                <quality_usage_detail>
                    <sub_id>131234123</sub_id>
                    <user_id>341234123</user_id>
                    <purchas_amount>13</purchas_amount>
                    <application_amount>1</application_amount>
                    <available_amount>12</available_amount>
                    <article_item_code>ts-qt-1234</article_item_code>
                    <price>12.23</price>
                    <start_date>2000-01-01 00:00:00</start_date>
                    <end_date>2000-01-01 00:00:00</end_date>
                </quality_usage_detail>
            </usage_detail_list>
            <avaliable_num></avaliable_num>
        </service_subscribe>
    </ts_subscribe_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

    返回
    顶部