alibaba.ascp.logistics.identcode.query (SN查询接口)

SN查询接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
root_cat_id String 必须 1512 根类目ID,"1101": "笔记本电脑", "1512": "手机类目", "50019780": "平板电脑"
ident_code_list String 必须 1234567890 识别码列表
ident_type String 必须 SN 识别码类型,SN,IMEI
brand_id String 必须 11119 品牌ID,"11119": "Lenovo/联想", "11656": "Asus/华硕", "11813": "Huawei/华为", "21660": "Hasee/神舟", "21999": "MSI/微星", "26683": "Dell/戴尔", "26691": "Acer/宏碁", "28247": "OPPO", "30111": "Apple/苹果", "31140": "HP/惠普", "91621": "vivo", "3506680": "MIUI/小米", "184048021": "ThinkPad", "590022244": "honor/荣耀", "600184882": "OnePlus/一加", "616784001": "MACHENIKE", "639188075": "THUNDEROBOT", "775486237": "MECHREVO/机械革命", "1880225553": "ROG/玩家国度", "7051840193": "iQOO(数码)"
available Boolean 可选 true 是否可用

响应参数

名称 类型 示例值 描述
result ResultDTO 请求结果
  • ident_code_list
  • TopIdentCodeDTO []
  • 识别码列表
  • └ ident_code
  • String
  • 1234567890
  • 识别码
  • └ ident_type
  • String
  • SN
  • 识别码类型,SN/IMEI
  • └ brand_id
  • String
  • 11119
  • 品牌ID
  • └ root_cat_id
  • String
  • 1512
  • 根类目ID
  • └ available
  • Boolean
  • true
  • 是否可用
  • └ un_available_reason
  • String
  • 已被使用
  • 不可用原因
  • └ success
  • Boolean
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpLogisticsIdentcodeQueryRequest req = new AlibabaAscpLogisticsIdentcodeQueryRequest();
req.setRootCatId("1512");
req.setIdentCodeList("1234567890");
req.setIdentType("SN");
req.setBrandId("11119");
req.setAvailable(true);
AlibabaAscpLogisticsIdentcodeQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ascp_logistics_identcode_query_response>
    <result>
        <ident_code_list>
            <top_ident_code_d_t_o>
                <ident_code>1234567890</ident_code>
                <ident_type>SN</ident_type>
                <brand_id>11119</brand_id>
                <root_cat_id>1512</root_cat_id>
                <available>true</available>
                <un_available_reason>已被使用</un_available_reason>
            </top_ident_code_d_t_o>
        </ident_code_list>
        <success>true</success>
    </result>
</alibaba_ascp_logistics_identcode_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

返回
顶部