TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCloudprintClientinfoPutRequest req = new CainiaoCloudprintClientinfoPutRequest();
req.setJsonData("{\"printErrorInfo\": [{\"cpCode\": \"\",\"error\": \"模板文件格式错误或者数据不符合规范\",\"macAddr\": \"44:85:00:3C:56:40,00:00:00:00:00:00:00:E0\",\"state\": 4,\"time\": \"2016-09-19 17:01:53\",\"waybillCode\": \"9890000160004\"}],\"type\": \"printErrorInfo\"}");
CainiaoCloudprintClientinfoPutResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoCloudprintClientinfoPutRequest req = new CainiaoCloudprintClientinfoPutRequest();
req.JsonData = "{\"printErrorInfo\": [{\"cpCode\": \"\",\"error\": \"模板文件格式错误或者数据不符合规范\",\"macAddr\": \"44:85:00:3C:56:40,00:00:00:00:00:00:00:E0\",\"state\": 4,\"time\": \"2016-09-19 17:01:53\",\"waybillCode\": \"9890000160004\"}],\"type\": \"printErrorInfo\"}";
CainiaoCloudprintClientinfoPutResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoCloudprintClientinfoPutRequest;
$req->setJsonData("{\"printErrorInfo\": [{\"cpCode\": \"\",\"error\": \"模板文件格式错误或者数据不符合规范\",\"macAddr\": \"44:85:00:3C:56:40,00:00:00:00:00:00:00:E0\",\"state\": 4,\"time\": \"2016-09-19 17:01:53\",\"waybillCode\": \"9890000160004\"}],\"type\": \"printErrorInfo\"}");
$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=cainiao.cloudprint.clientinfo.put' \
-d 'partner_id=apidoc' \
-d 'sign=7AD81E2A19B289E4F057959D0D64CC77' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-15+14%3A59%3A47' \
-d 'v=2.0' \
-d 'json_data=%7B%5C%22printErrorInfo%5C%22%3A+%5B%7B%5C%22cpCode%5C%22%3A+%5C%22%5C%22%2C%5C%22error%5C%22%3A+%5C%22%E6%A8%A1%E6%9D%BF%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F%E9%94%99%E8%AF%AF%E6%88%96%E8%80%85%E6%95%B0%E6%8D%AE%E4%B8%8D%E7%AC%A6%E5%90%88%E8%A7%84%E8%8C%83%5C%22%2C%5C%22macAddr%5C%22%3A+%5C%2244%3A85%3A00%3A3C%3A56%3A40%2C00%3A00%3A00%3A00%3A00%3A00%3A00%3AE0%5C%22%2C%5C%22state%5C%22%3A+4%2C%5C%22time%5C%22%3A+%5C%222016-09-19+17%3A01%3A53%5C%22%2C%5C%22waybillCode%5C%22%3A+%5C%229890000160004%5C%22%7D%5D%2C%5C%22type%5C%22%3A+%5C%22printErrorInfo%5C%22%7D'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoCloudprintClientinfoPutRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.json_data="{\"printErrorInfo\": [{\"cpCode\": \"\",\"error\": \"模板文件格式错误或者数据不符合规范\",\"macAddr\": \"44:85:00:3C:56:40,00:00:00:00:00:00:00:E0\",\"state\": 4,\"time\": \"2016-09-19 17:01:53\",\"waybillCode\": \"9890000160004\"}],\"type\": \"printErrorInfo\"}"
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,"cainiao.cloudprint.clientinfo.put");
add_param(pRequest,"json_data","{\"printErrorInfo\": [{\"cpCode\": \"\",\"error\": \"模板文件格式错误或者数据不符合规范\",\"macAddr\": \"44:85:00:3C:56:40,00:00:00:00:00:00:00:E0\",\"state\": 4,\"time\": \"2016-09-19 17:01:53\",\"waybillCode\": \"9890000160004\"}],\"type\": \"printErrorInfo\"}");
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('cainiao.cloudprint.clientinfo.put', {
'json_data':'{\"printErrorInfo\": [{\"cpCode\": \"\",\"error\": \"模板文件格式错误或者数据不符合规范\",\"macAddr\": \"44:85:00:3C:56:40,00:00:00:00:00:00:00:E0\",\"state\": 4,\"time\": \"2016-09-19 17:01:53\",\"waybillCode\": \"9890000160004\"}],\"type\": \"printErrorInfo\"}'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})