TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
IndustrySecondhandReportImportRequest req = new IndustrySecondhandReportImportRequest();
IndustrySecondhandReportImportRequest.ImportQualityTestingReportVO obj1 = new IndustrySecondhandReportImportRequest.ImportQualityTestingReportVO();
obj1.setReportUserName("张三");
obj1.setReportTime(1652112000000L);
obj1.setReportId("#5432");
obj1.setProductIndexType("imei");
obj1.setProductIndexId("584727236543254");
obj1.setTitle("xx手机验机报告");
obj1.setDesc("描述");
obj1.setMainImg("http://cdn.xxx.com/yyy.jpg");
obj1.setExtraImg("");
obj1.setCommodityCondition("111");
obj1.setModelType("mobile");
obj1.setModelDetails("");
obj1.setReportType("mobile");
obj1.setReportDetails("");
req.setReport(obj1);
IndustrySecondhandReportImportResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
IndustrySecondhandReportImportRequest req = new IndustrySecondhandReportImportRequest();
IndustrySecondhandReportImportRequest.ImportQualityTestingReportVODomain obj1 = new IndustrySecondhandReportImportRequest.ImportQualityTestingReportVODomain();
obj1.ReportUserName = "张三";
obj1.ReportTime = 1652112000000L;
obj1.ReportId = "#5432";
obj1.ProductIndexType = "imei";
obj1.ProductIndexId = "584727236543254";
obj1.Title = "xx手机验机报告";
obj1.Desc = "描述";
obj1.MainImg = "http://cdn.xxx.com/yyy.jpg";
obj1.ExtraImg = "";
obj1.CommodityCondition = "111";
obj1.ModelType = "mobile";
obj1.ModelDetails = "";
obj1.ReportType = "mobile";
obj1.ReportDetails = "";
req.Report_ = obj1;
IndustrySecondhandReportImportResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new IndustrySecondhandReportImportRequest;
$report = new ImportQualityTestingReportVO;
$report->report_user_name="张三";
$report->report_time="1652112000000";
$report->report_id="#5432";
$report->product_index_type="imei";
$report->product_index_id="584727236543254";
$report->title="xx手机验机报告";
$report->desc="描述";
$report->main_img="http://cdn.xxx.com/yyy.jpg";
$report->extra_img="";
$report->commodity_condition="111";
$report->model_type="mobile";
$report->model_details="";
$report->report_type="mobile";
$report->report_details="";
$req->setReport(json_encode($report));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.industry.secondhand.report.import' \
-d 'partner_id=apidoc' \
-d 'sign=7185E36C98AF1046ECCFF4D2C3478B3B' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-04+12%3A49%3A22' \
-d 'v=2.0' \
-d 'report=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.IndustrySecondhandReportImportRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.report="数据结构示例JSON格式"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.industry.secondhand.report.import");
add_param(pRequest,"report","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.industry.secondhand.report.import', {
'report':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})