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

taobao.top.oaid.decrypt (OAID解密)

解码OAID(Open Addressee ID),返回收件人信息。

公共参数

请求参数

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

    响应参数

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

    请求示例

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

    响应示例

    • XML示例
    • JSON示例
    <top_oaid_decrypt_response>
        <receiver_list>
            <receiver>
                <name>张三</name>
                <mobile>13012345678</mobile>
                <address_detail>淘宝城911号</address_detail>
                <phone>010-12345678</phone>
                <oaid>xxxx</oaid>
                <tid>123456</tid>
                <town>三墎镇</town>
                <district>西湖区</district>
                <city>杭州市</city>
                <state>浙江省</state>
                <country>中国</country>
                <matched>true</matched>
                <secret_no_expire_time>2021-09-01 00:00:00</secret_no_expire_time>
                <privacy_protection>true</privacy_protection>
            </receiver>
        </receiver_list>
    </top_oaid_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.no-permission:oaid 必须是此交易的买家或卖家才能获取OAID的明文信息 保证传入的oaid所属订单和卖家SessionKey信息是一致的
    isv.decryption-size-exceeded 每次调用,最多支持20笔订单解密。 参数query_list的长度在20个之内。
    isv.oaid-invalid oaid错误 根据对应tid,排查相应oaid是否正确。
    isv.tid-invalid tid错误 排查tid是否是平台订单号。
    isv.empty-parameter 参数为空 入参query_list为空。
    isv.invalid-argument 参数错误 调整参数重试
    isv.decryption-quota-exceeded 当日解密订单数量已超过额度 请商家用主账号登录申请提额https://myseller.taobao.com/home.htm/merchant-intimity-console ,申请路径:千牛卖家中心(WEB端网页版)->店铺管理-> 隐私保护-> 提额 (如商家未在千牛卖家中心后台找到“隐私保护”页面入口,可尝试点击千牛卖家中心(WEB端网页版)首页右上角“回到旧版”操作提额申请)
    isv.app-decryption-disabled-by-seller 解密功能被商家关闭 联系商家打开
    isv.decryption-disabled-by-seller 解密功能被商家关闭 联系商家打开
    isv.prohibit-application-user
    isv.prohibit-masteraccount
    isv.decryption-scene-invalid
    isv.prohibit-application
    isv.prohibit-subaccount
    isv.tid-error
    isp.sys.error
    isv.concurrent-query
    isv.lack-of-balance
    isp.call-limited

    API工具

    如何获得此API

    FAQ

    返回
    顶部