TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsExpressBillSyncRequest req = new LogisticsExpressBillSyncRequest();
LogisticsExpressBillSyncRequest.TmsMonthlyBillSyncRequest obj1 = new LogisticsExpressBillSyncRequest.TmsMonthlyBillSyncRequest();
obj1.setSupplierId("100000167");
obj1.setDeliveryCode("SF");
obj1.setId("12312321");
obj1.setMailNo("SF1312312");
obj1.setCustomerCode("1231231");
obj1.setLogisticsObjectType("托寄物");
obj1.setLogisticsObjectNum("1");
obj1.setVolume("33.22");
obj1.setLength("44.3333");
obj1.setWidth("44.3333");
obj1.setHeight("44.3333");
obj1.setActualWeight("44.3333");
obj1.setAccountWeight("44.3333");
obj1.setSpeLightWeight("44.3333");
LogisticsExpressBillSyncRequest.ContacterRequest obj2 = new LogisticsExpressBillSyncRequest.ContacterRequest();
obj2.setProvince("浙江");
obj2.setCity("杭州");
obj2.setDistrict("余杭区");
obj2.setStreet("五常街道");
obj2.setAreaId("12321");
obj2.setAddress("文一西路969号");
obj1.setReceiverInfo(obj2);
LogisticsExpressBillSyncRequest.ContacterRequest obj3 = new LogisticsExpressBillSyncRequest.ContacterRequest();
obj3.setProvince("浙江");
obj3.setCity("杭州");
obj3.setDistrict("余杭区");
obj3.setStreet("五常街道");
obj3.setAreaId("12321");
obj3.setAddress("文一西路969号");
obj1.setSenderInfo(obj3);
obj1.setClaimPrice("3344");
obj1.setProductType("1");
obj1.setTypeName("快递费用");
obj1.setFeeItem("323232");
obj1.setFee("3232.32");
obj1.setDiscount("3232.32");
obj1.setPayableAmount("3232.32");
obj1.setBusinessDate("2023-12-12");
obj1.setDeductionDate("2023-12-12");
obj1.setOriginalFee("3232.32");
obj1.setDeductionFee("3232.32");
obj1.setDeductionMonthlyFee("3232.32");
obj1.setExtendProps("{}");
req.setMonthlyBillSyncRequest(obj1);
LogisticsExpressBillSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LogisticsExpressBillSyncRequest req = new LogisticsExpressBillSyncRequest();
LogisticsExpressBillSyncRequest.TmsMonthlyBillSyncRequestDomain obj1 = new LogisticsExpressBillSyncRequest.TmsMonthlyBillSyncRequestDomain();
obj1.SupplierId = "100000167";
obj1.DeliveryCode = "SF";
obj1.Id = "12312321";
obj1.MailNo = "SF1312312";
obj1.CustomerCode = "1231231";
obj1.LogisticsObjectType = "托寄物";
obj1.LogisticsObjectNum = "1";
obj1.Volume = "33.22";
obj1.Length = "44.3333";
obj1.Width = "44.3333";
obj1.Height = "44.3333";
obj1.ActualWeight = "44.3333";
obj1.AccountWeight = "44.3333";
obj1.SpeLightWeight = "44.3333";
LogisticsExpressBillSyncRequest.ContacterRequestDomain obj2 = new LogisticsExpressBillSyncRequest.ContacterRequestDomain();
obj2.Province = "浙江";
obj2.City = "杭州";
obj2.District = "余杭区";
obj2.Street = "五常街道";
obj2.AreaId = "12321";
obj2.Address = "文一西路969号";
obj1.ReceiverInfo= obj2;
LogisticsExpressBillSyncRequest.ContacterRequestDomain obj3 = new LogisticsExpressBillSyncRequest.ContacterRequestDomain();
obj3.Province = "浙江";
obj3.City = "杭州";
obj3.District = "余杭区";
obj3.Street = "五常街道";
obj3.AreaId = "12321";
obj3.Address = "文一西路969号";
obj1.SenderInfo= obj3;
obj1.ClaimPrice = "3344";
obj1.ProductType = "1";
obj1.TypeName = "快递费用";
obj1.FeeItem = "323232";
obj1.Fee = "3232.32";
obj1.Discount = "3232.32";
obj1.PayableAmount = "3232.32";
obj1.BusinessDate = "2023-12-12";
obj1.DeductionDate = "2023-12-12";
obj1.OriginalFee = "3232.32";
obj1.DeductionFee = "3232.32";
obj1.DeductionMonthlyFee = "3232.32";
obj1.ExtendProps = "{}";
req.MonthlyBillSyncRequest_ = obj1;
LogisticsExpressBillSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LogisticsExpressBillSyncRequest;
$monthly_bill_sync_request = new TmsMonthlyBillSyncRequest;
$monthly_bill_sync_request->supplier_id="100000167";
$monthly_bill_sync_request->delivery_code="SF";
$monthly_bill_sync_request->id="12312321";
$monthly_bill_sync_request->mail_no="SF1312312";
$monthly_bill_sync_request->customer_code="1231231";
$monthly_bill_sync_request->logistics_object_type="托寄物";
$monthly_bill_sync_request->logistics_object_num="1";
$monthly_bill_sync_request->volume="33.22";
$monthly_bill_sync_request->length="44.3333";
$monthly_bill_sync_request->width="44.3333";
$monthly_bill_sync_request->height="44.3333";
$monthly_bill_sync_request->actual_weight="44.3333";
$monthly_bill_sync_request->account_weight="44.3333";
$monthly_bill_sync_request->spe_light_weight="44.3333";
$receiver_info = new ContacterRequest;
$receiver_info->province="浙江";
$receiver_info->city="杭州";
$receiver_info->district="余杭区";
$receiver_info->street="五常街道";
$receiver_info->area_id="12321";
$receiver_info->address="文一西路969号";
$monthly_bill_sync_request->receiver_info = $receiver_info;
$sender_info = new ContacterRequest;
$sender_info->province="浙江";
$sender_info->city="杭州";
$sender_info->district="余杭区";
$sender_info->street="五常街道";
$sender_info->area_id="12321";
$sender_info->address="文一西路969号";
$monthly_bill_sync_request->sender_info = $sender_info;
$monthly_bill_sync_request->claim_price="3344";
$monthly_bill_sync_request->product_type="1";
$monthly_bill_sync_request->type_name="快递费用";
$monthly_bill_sync_request->fee_item="323232";
$monthly_bill_sync_request->fee="3232.32";
$monthly_bill_sync_request->discount="3232.32";
$monthly_bill_sync_request->payable_amount="3232.32";
$monthly_bill_sync_request->business_date="2023-12-12";
$monthly_bill_sync_request->deduction_date="2023-12-12";
$monthly_bill_sync_request->original_fee="3232.32";
$monthly_bill_sync_request->deduction_fee="3232.32";
$monthly_bill_sync_request->deduction_monthly_fee="3232.32";
$monthly_bill_sync_request->extend_props="{}";
$req->setMonthlyBillSyncRequest(json_encode($monthly_bill_sync_request));
$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.logistics.express.bill.sync' \
-d 'partner_id=apidoc' \
-d 'sign=86215013E18185B3142B567201CD45A9' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-13+22%3A00%3A30' \
-d 'v=2.0' \
-d 'monthly_bill_sync_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LogisticsExpressBillSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.monthly_bill_sync_request="数据结构示例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.logistics.express.bill.sync");
add_param(pRequest,"monthly_bill_sync_request","数据结构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.logistics.express.bill.sync', {
'monthly_bill_sync_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})