TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoWaybillIiInnerUpdateRequest req = new CainiaoWaybillIiInnerUpdateRequest();
req.setSellerId(3892269560L);
CainiaoWaybillIiInnerUpdateRequest.WaybillCloudPrintUpdateRequest obj1 = new CainiaoWaybillIiInnerUpdateRequest.WaybillCloudPrintUpdateRequest();
obj1.setCpCode("POSTB");
obj1.setLogisticsServices("{ \"SVC-COD\": { \"value\": \"200\" } }");
CainiaoWaybillIiInnerUpdateRequest.PackageInfoDto obj2 = new CainiaoWaybillIiInnerUpdateRequest.PackageInfoDto();
List<CainiaoWaybillIiInnerUpdateRequest.Item> list4 = new ArrayList<CainiaoWaybillIiInnerUpdateRequest.Item>();
CainiaoWaybillIiInnerUpdateRequest.Item obj5 = new CainiaoWaybillIiInnerUpdateRequest.Item();
list4.add(obj5);
obj5.setCount(1L);
obj5.setName("鞋子");
obj2.setItems(list4);
obj2.setVolume(1L);
obj2.setWeight(1L);
obj1.setPackageInfo(obj2);
CainiaoWaybillIiInnerUpdateRequest.UserInfoDto obj6 = new CainiaoWaybillIiInnerUpdateRequest.UserInfoDto();
CainiaoWaybillIiInnerUpdateRequest.AddressDto obj7 = new CainiaoWaybillIiInnerUpdateRequest.AddressDto();
obj7.setCity("杭州市");
obj7.setDetail("西溪园区");
obj7.setDistrict("余杭区");
obj7.setProvince("浙江省");
obj7.setTown("文一西路");
obj6.setAddress(obj7);
obj6.setMobile("132432323");
obj6.setName("Foo");
obj6.setPhone("05712323241");
obj6.setOaid("abcdefghijklmn");
obj6.setCaid("abcdefghijklmn");
obj1.setRecipient(obj6);
CainiaoWaybillIiInnerUpdateRequest.UserInfoDto obj8 = new CainiaoWaybillIiInnerUpdateRequest.UserInfoDto();
obj8.setMobile("1352353325");
obj8.setName("Foo");
obj8.setPhone("05714232523");
obj1.setSender(obj8);
obj1.setTemplateUrl("http://cloudprint.cainiao.com/cloudprint/template/getStandardTemplate.json?template_id=1001");
obj1.setWaybillCode("9890000160004");
obj1.setObjectId("x");
req.setParamWaybillCloudPrintUpdateRequest(obj1);
CainiaoWaybillIiInnerUpdateRequest.ClientInfoForTopDto obj9 = new CainiaoWaybillIiInnerUpdateRequest.ClientInfoForTopDto();
obj9.setAppName("waybill");
req.setParamClientInfoForTop(obj9);
CainiaoWaybillIiInnerUpdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoWaybillIiInnerUpdateRequest req = new CainiaoWaybillIiInnerUpdateRequest();
req.SellerId = 3892269560L;
CainiaoWaybillIiInnerUpdateRequest.WaybillCloudPrintUpdateRequestDomain obj1 = new CainiaoWaybillIiInnerUpdateRequest.WaybillCloudPrintUpdateRequestDomain();
obj1.CpCode = "POSTB";
obj1.LogisticsServices = "{ \"SVC-COD\": { \"value\": \"200\" } }";
CainiaoWaybillIiInnerUpdateRequest.PackageInfoDtoDomain obj2 = new CainiaoWaybillIiInnerUpdateRequest.PackageInfoDtoDomain();
List<CainiaoWaybillIiInnerUpdateRequest.ItemDomain> list4 = new List<CainiaoWaybillIiInnerUpdateRequest.ItemDomain>();
CainiaoWaybillIiInnerUpdateRequest.ItemDomain obj5 = new CainiaoWaybillIiInnerUpdateRequest.ItemDomain();
list4.Add(obj5);
obj5.Count = 1L;
obj5.Name = "鞋子";
obj2.Items= list4;
obj2.Volume = 1L;
obj2.Weight = 1L;
obj1.PackageInfo= obj2;
CainiaoWaybillIiInnerUpdateRequest.UserInfoDtoDomain obj6 = new CainiaoWaybillIiInnerUpdateRequest.UserInfoDtoDomain();
CainiaoWaybillIiInnerUpdateRequest.AddressDtoDomain obj7 = new CainiaoWaybillIiInnerUpdateRequest.AddressDtoDomain();
obj7.City = "杭州市";
obj7.Detail = "西溪园区";
obj7.District = "余杭区";
obj7.Province = "浙江省";
obj7.Town = "文一西路";
obj6.Address= obj7;
obj6.Mobile = "132432323";
obj6.Name = "Foo";
obj6.Phone = "05712323241";
obj6.Oaid = "abcdefghijklmn";
obj6.Caid = "abcdefghijklmn";
obj1.Recipient= obj6;
CainiaoWaybillIiInnerUpdateRequest.UserInfoDtoDomain obj8 = new CainiaoWaybillIiInnerUpdateRequest.UserInfoDtoDomain();
obj8.Mobile = "1352353325";
obj8.Name = "Foo";
obj8.Phone = "05714232523";
obj1.Sender= obj8;
obj1.TemplateUrl = "http://cloudprint.cainiao.com/cloudprint/template/getStandardTemplate.json?template_id=1001";
obj1.WaybillCode = "9890000160004";
obj1.ObjectId = "x";
req.ParamWaybillCloudPrintUpdateRequest_ = obj1;
CainiaoWaybillIiInnerUpdateRequest.ClientInfoForTopDtoDomain obj9 = new CainiaoWaybillIiInnerUpdateRequest.ClientInfoForTopDtoDomain();
obj9.AppName = "waybill";
req.ParamClientInfoForTop_ = obj9;
CainiaoWaybillIiInnerUpdateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoWaybillIiInnerUpdateRequest;
$req->setSellerId("3892269560");
$param_waybill_cloud_print_update_request = new WaybillCloudPrintUpdateRequest;
$param_waybill_cloud_print_update_request->cp_code="POSTB";
$param_waybill_cloud_print_update_request->logistics_services="{ \"SVC-COD\": { \"value\": \"200\" } }";
$package_info = new PackageInfoDto;
$items = new Item;
$items->count="1";
$items->name="鞋子";
$package_info->items = $items;
$package_info->volume="1";
$package_info->weight="1";
$param_waybill_cloud_print_update_request->package_info = $package_info;
$recipient = new UserInfoDto;
$address = new AddressDto;
$address->city="杭州市";
$address->detail="西溪园区";
$address->district="余杭区";
$address->province="浙江省";
$address->town="文一西路";
$recipient->address = $address;
$recipient->mobile="132432323";
$recipient->name="Foo";
$recipient->phone="05712323241";
$recipient->oaid="abcdefghijklmn";
$recipient->caid="abcdefghijklmn";
$param_waybill_cloud_print_update_request->recipient = $recipient;
$sender = new UserInfoDto;
$sender->mobile="1352353325";
$sender->name="Foo";
$sender->phone="05714232523";
$param_waybill_cloud_print_update_request->sender = $sender;
$param_waybill_cloud_print_update_request->template_url="http://cloudprint.cainiao.com/cloudprint/template/getStandardTemplate.json?template_id=1001";
$param_waybill_cloud_print_update_request->waybill_code="9890000160004";
$param_waybill_cloud_print_update_request->object_id="x";
$req->setParamWaybillCloudPrintUpdateRequest(json_encode($param_waybill_cloud_print_update_request));
$param_client_info_for_top = new ClientInfoForTopDto;
$param_client_info_for_top->app_name="waybill";
$req->setParamClientInfoForTop(json_encode($param_client_info_for_top));
$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.waybill.ii.inner.update' \
-d 'partner_id=apidoc' \
-d 'sign=2D915FFF7DCA324E51CCE728B934FF3C' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-15+14%3A09%3A43' \
-d 'v=2.0' \
-d 'param_client_info_for_top=null' \
-d 'param_waybill_cloud_print_update_request=null' \
-d 'seller_id=3892269560'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoWaybillIiInnerUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.seller_id=3892269560
req.param_waybill_cloud_print_update_request=""
req.param_client_info_for_top=""
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.waybill.ii.inner.update");
add_param(pRequest,"seller_id","3892269560");
add_param(pRequest,"param_waybill_cloud_print_update_request","数据结构JSON示例");
add_param(pRequest,"param_client_info_for_top","数据结构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('cainiao.waybill.ii.inner.update', {
'seller_id':'3892269560',
'param_waybill_cloud_print_update_request':'数据结构JSON示例',
'param_client_info_for_top':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})