文档中心 > API类目 > 隐私保护API

taobao.top.oaid.client.decrypt (端侧OAID解密)

解码OAID(Open Addressee ID),返回收件人信息。该接口用于客户端直接查看订单隐私数据,解密数据不经过ISV服务器,且包含风控等安全检测。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
sec_once_token String 必须 abc123 安全令牌
query_list ReceiverQuery [] 必须
  • 最大列表长度:999
  • 解密请求列表,长度不要超过1(只能单笔解密,不支持批量解密)。
    • └ tid
    • String
    • 必须
    • 12345678
    • 交易订单ID
    • └ oaid
    • String
    • 必须
    • xxxxxx
    • 收件人ID (Open Addressee ID),长度在128个字符之内。
    • └ scene
    • String
    • 必须
    • 1005
    • 解密场景编号。不同场景,解密策略不同。请根据产品功能选择相应的场景编号。可选的场景:1001(顺丰电子面单发货)、1002(4通一达电子面单发货)、1003(EMS电子面单发货)、1004(其他电子面单发货)、1005(线下门店发货)、1006(手工单发货)、1007(代发货)、2001(客户售后服务)、2002(客户关怀),详情点击
    • └ secret_no_days
    • Number
    • 可选
    • 30
    • 隐私号绑定天数

    响应参数

    名称 类型 示例值 描述
    receiver_list Receiver [] 收件人列表
    • └ order_id
    • String
    • 123456
    • 交易编号
    • └ oaid
    • String
    • xxxx
    • 收件人ID (Open Addressee ID),长度在128个字符之内。
    • └ address_detail
    • String
    • 淘宝城911号
    • 收件人的详细地址
    • └ town
    • String
    • 三墎镇
    • 收货人街道地址
    • └ district
    • String
    • 西湖区
    • 收货人的所在地区
    • └ city
    • String
    • 杭州市
    • 收货人的所在城市
    • └ state
    • String
    • 浙江省
    • 收货人的所在省份
    • └ country
    • String
    • 中国
    • 收货人国籍
    • └ phone
    • String
    • 010-12345678
    • 收件人的电话号码
    • └ mobile
    • String
    • 13012345678
    • 收件人的手机号
    • └ name
    • String
    • 张三
    • 收件人的姓名
    • └ matched
    • Boolean
    • true
    • oaid是否和tid当前的oaid匹配。true:匹配,false:不匹配。当不匹配时,建议通过taobao.trade.fullinfo.get获取最新的oaid。
    • └ secret_no_expire_time
    • Date
    • 2022-09-01 00:00:00
    • 隐私号过期时间

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    TopOaidClientDecryptRequest req = new TopOaidClientDecryptRequest();
    req.setSecOnceToken("abc123");
    List<TopOaidClientDecryptRequest.ReceiverQuery> list2 = new ArrayList<TopOaidClientDecryptRequest.ReceiverQuery>();
    TopOaidClientDecryptRequest.ReceiverQuery obj3 = new TopOaidClientDecryptRequest.ReceiverQuery();
    list2.add(obj3);
    obj3.setTid("12345678");
    obj3.setOaid("xxxxxx");
    obj3.setScene("1005");
    obj3.setSecretNoDays(30L);
    req.setQueryList(list2);
    TopOaidClientDecryptResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <top_oaid_client_decrypt_response>
        <receiver_list>
            <receiver>
                <order_id>123456</order_id>
                <oaid>xxxx</oaid>
                <address_detail>淘宝城911号</address_detail>
                <town>三墎镇</town>
                <district>西湖区</district>
                <city>杭州市</city>
                <state>浙江省</state>
                <country>中国</country>
                <phone>010-12345678</phone>
                <mobile>13012345678</mobile>
                <name>张三</name>
                <matched>true</matched>
                <secret_no_expire_time>2022-09-01 00:00:00</secret_no_expire_time>
            </receiver>
        </receiver_list>
    </top_oaid_client_decrypt_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>

    错误码解释

    错误码 错误描述 解决方案
    isv.decryption-quota-exceeded 当日解密订单数量已超过额度 请商家用主账号登录申请提额 https://myseller.taobao.com/home.htm/merchant-intimity-console ,申请路径:千牛卖家中心(WEB端网页版)->店铺管理-> 隐私保护-> 提额 (如商家未在千牛卖家中心后台找到“隐私保护”页面入口,可尝试点击千牛卖家中心(WEB端网页版)首页右上角“回到旧版”操作提额申请)
    isv.invalid-argument
    isv.tid-invalid
    isv.prohibit-subaccount
    isv.oaid-invalid
    isv.prohibit-masteraccount
    isv.tid-error
    isv.no-permission:oaid
    isv.app-decryption-disabled-by-seller
    isv.prohibit-application
    isv.decryption-disabled-by-seller
    isp.call-limited
    isv.prohibit-application-user
    isv.empty-parameter
    isv.error-parameter
    isv.lack-of-balance
    isv.concurrent-query
    isv.sec-token-invalid

    API工具

    如何获得此API

    FAQ

    返回
    顶部