TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressLogisticsOrderCreateorderRequest req = new AliexpressLogisticsOrderCreateorderRequest();
req.setAddressDTOsString("");
List<AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDto> list2 = new ArrayList<AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDto>();
AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDto obj3 = new AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDto();
list2.add(obj3);
obj3.setAneroidMarkup(false);
obj3.setBreakable(false);
obj3.setCategoryCnDesc("连衣裙");
obj3.setCategoryEnDesc("dress");
obj3.setContainsBattery(false);
obj3.setHsCode("77234");
obj3.setOnlyBattery(false);
obj3.setProductDeclareAmount("1.3");
obj3.setProductId(1000L);
obj3.setProductNum(2L);
obj3.setProductWeight("1.5");
obj3.setScItemCode("scItem code");
obj3.setScItemId(1000L);
obj3.setScItemName("scItem name");
obj3.setSkuCode("sku code");
obj3.setSkuValue("sku value");
obj3.setContainsSpecialGoods(false);
obj3.setChildOrderId(1000172130022100L);
req.setDeclareProductDTOs(list2);
req.setDomesticLogisticsCompany("SF");
req.setDomesticLogisticsCompanyId(505L);
req.setDomesticTrackingNo("L12345899");
req.setPackageNum(1L);
req.setTradeOrderFrom("ESCROW");
req.setTradeOrderId(66715700375804L);
req.setUndeliverableDecision(0L);
req.setWarehouseCarrierService("CPAM_WLB_FPXSZ;CPAM_WLB_CPHSH;CPAM_WLB_ZTOBJ;HRB_WLB_ZTOGZ;HRB_WLB_ZTOSH");
req.setInvoiceNumber("38577123");
req.setTopUserKey("xxxxxxx");
AliexpressLogisticsOrderCreateorderRequest.Money obj4 = new AliexpressLogisticsOrderCreateorderRequest.Money();
obj4.setCent(99L);
obj4.setCurrencyCode("USD");
req.setInsuranceCoverage(obj4);
req.setIsAgreeUpgradeReverseParcelInsure(false);
AliexpressLogisticsOrderCreateorderResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressLogisticsOrderCreateorderRequest req = new AliexpressLogisticsOrderCreateorderRequest();
req.AddressDTOs = "";
List<AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDtoDomain> list2 = new List<AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDtoDomain>();
AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDtoDomain obj3 = new AliexpressLogisticsOrderCreateorderRequest.AeopWlDeclareProductForTopDtoDomain();
list2.Add(obj3);
obj3.AneroidMarkup = false;
obj3.Breakable = false;
obj3.CategoryCnDesc = "连衣裙";
obj3.CategoryEnDesc = "dress";
obj3.ContainsBattery = false;
obj3.HsCode = "77234";
obj3.OnlyBattery = false;
obj3.ProductDeclareAmount = "1.3";
obj3.ProductId = 1000L;
obj3.ProductNum = 2L;
obj3.ProductWeight = "1.5";
obj3.ScItemCode = "scItem code";
obj3.ScItemId = 1000L;
obj3.ScItemName = "scItem name";
obj3.SkuCode = "sku code";
obj3.SkuValue = "sku value";
obj3.ContainsSpecialGoods = false;
obj3.ChildOrderId = 1000172130022100L;
req.DeclareProductDTOs_ = list2;
req.DomesticLogisticsCompany = "SF";
req.DomesticLogisticsCompanyId = 505L;
req.DomesticTrackingNo = "L12345899";
req.PackageNum = 1L;
req.TradeOrderFrom = "ESCROW";
req.TradeOrderId = 66715700375804L;
req.UndeliverableDecision = 0L;
req.WarehouseCarrierService = "CPAM_WLB_FPXSZ;CPAM_WLB_CPHSH;CPAM_WLB_ZTOBJ;HRB_WLB_ZTOGZ;HRB_WLB_ZTOSH";
req.InvoiceNumber = "38577123";
req.TopUserKey = "xxxxxxx";
AliexpressLogisticsOrderCreateorderRequest.MoneyDomain obj4 = new AliexpressLogisticsOrderCreateorderRequest.MoneyDomain();
obj4.Cent = 99L;
obj4.CurrencyCode = "USD";
req.InsuranceCoverage_ = obj4;
req.IsAgreeUpgradeReverseParcelInsure = false;
AliexpressLogisticsOrderCreateorderResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AliexpressLogisticsOrderCreateorderRequest;
$req->setAddressDTOs("");
$declare_product_d_t_os = new AeopWlDeclareProductForTopDto;
$declare_product_d_t_os->aneroid_markup="false";
$declare_product_d_t_os->breakable="false";
$declare_product_d_t_os->category_cn_desc="连衣裙";
$declare_product_d_t_os->category_en_desc="dress";
$declare_product_d_t_os->contains_battery="false";
$declare_product_d_t_os->hs_code="77234";
$declare_product_d_t_os->only_battery="false";
$declare_product_d_t_os->product_declare_amount="1.3";
$declare_product_d_t_os->product_id="1000";
$declare_product_d_t_os->product_num="2";
$declare_product_d_t_os->product_weight="1.5";
$declare_product_d_t_os->sc_item_code="scItem code";
$declare_product_d_t_os->sc_item_id="1000";
$declare_product_d_t_os->sc_item_name="scItem name";
$declare_product_d_t_os->sku_code="sku code";
$declare_product_d_t_os->sku_value="sku value";
$declare_product_d_t_os->contains_special_goods="false";
$declare_product_d_t_os->child_order_id="1000172130022100";
$req->setDeclareProductDTOs(json_encode($declare_product_d_t_os));
$req->setDomesticLogisticsCompany("SF");
$req->setDomesticLogisticsCompanyId("505");
$req->setDomesticTrackingNo("L12345899");
$req->setPackageNum("1");
$req->setTradeOrderFrom("ESCROW");
$req->setTradeOrderId("66715700375804");
$req->setUndeliverableDecision("0");
$req->setWarehouseCarrierService("CPAM_WLB_FPXSZ;CPAM_WLB_CPHSH;CPAM_WLB_ZTOBJ;HRB_WLB_ZTOGZ;HRB_WLB_ZTOSH");
$req->setInvoiceNumber("38577123");
$req->setTopUserKey("xxxxxxx");
$insurance_coverage = new Money;
$insurance_coverage->cent="99";
$insurance_coverage->currency_code="USD";
$req->setInsuranceCoverage(json_encode($insurance_coverage));
$req->setIsAgreeUpgradeReverseParcelInsure("false");
$resp = $c->execute($req, $sessionKey);
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=aliexpress.logistics.order.createorder' \
-d 'partner_id=apidoc' \
-d 'session=c11e020c-717c-4446-8562-71cdc7afe3fe' \
-d 'sign=84A18E6580CF659A8C15C3AA3FAECCE7' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-02-04+14%3A44%3A49' \
-d 'v=2.0' \
-d 'address_d_t_os=null' \
-d 'declare_product_d_t_os=null' \
-d 'domestic_logistics_company=SF' \
-d 'domestic_logistics_company_id=505' \
-d 'domestic_tracking_no=L12345899' \
-d 'insurance_coverage=null' \
-d 'invoice_number=38577123' \
-d 'is_agree_upgrade_reverse_parcel_insure=false' \
-d 'package_num=1' \
-d 'top_user_key=xxxxxxx' \
-d 'trade_order_from=ESCROW' \
-d 'trade_order_id=66715700375804' \
-d 'undeliverable_decision=0' \
-d 'warehouse_carrier_service=CPAM_WLB_FPXSZ%3BCPAM_WLB_CPHSH%3BCPAM_WLB_ZTOBJ%3BHRB_WLB_ZTOGZ%3BHRB_WLB_ZTOSH'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AliexpressLogisticsOrderCreateorderRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.address_d_t_os=""
req.declare_product_d_t_os=""
req.domestic_logistics_company="SF"
req.domestic_logistics_company_id=505
req.domestic_tracking_no="L12345899"
req.package_num=1
req.trade_order_from="ESCROW"
req.trade_order_id=66715700375804
req.undeliverable_decision=0
req.warehouse_carrier_service="CPAM_WLB_FPXSZ;CPAM_WLB_CPHSH;CPAM_WLB_ZTOBJ;HRB_WLB_ZTOGZ;HRB_WLB_ZTOSH"
req.invoice_number="38577123"
req.top_user_key="xxxxxxx"
req.insurance_coverage=""
req.is_agree_upgrade_reverse_parcel_insure=false
try:
resp= req.getResponse(sessionkey)
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,"aliexpress.logistics.order.createorder");
add_param(pRequest,"address_d_t_os","");
add_param(pRequest,"declare_product_d_t_os","数据结构JSON示例");
add_param(pRequest,"domestic_logistics_company","SF");
add_param(pRequest,"domestic_logistics_company_id","505");
add_param(pRequest,"domestic_tracking_no","L12345899");
add_param(pRequest,"package_num","1");
add_param(pRequest,"trade_order_from","ESCROW");
add_param(pRequest,"trade_order_id","66715700375804");
add_param(pRequest,"undeliverable_decision","0");
add_param(pRequest,"warehouse_carrier_service","CPAM_WLB_FPXSZ;CPAM_WLB_CPHSH;CPAM_WLB_ZTOBJ;HRB_WLB_ZTOGZ;HRB_WLB_ZTOSH");
add_param(pRequest,"invoice_number","38577123");
add_param(pRequest,"top_user_key","xxxxxxx");
add_param(pRequest,"insurance_coverage","数据结构JSON示例");
add_param(pRequest,"is_agree_upgrade_reverse_parcel_insure","false");
pResponse = top_execute(pClient,pRequest,sessionKey);
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('aliexpress.logistics.order.createorder', {
'address_d_t_os':'',
'declare_product_d_t_os':'数据结构JSON示例',
'domestic_logistics_company':'SF',
'domestic_logistics_company_id':'505',
'domestic_tracking_no':'L12345899',
'package_num':'1',
'trade_order_from':'ESCROW',
'trade_order_id':'66715700375804',
'undeliverable_decision':'0',
'warehouse_carrier_service':'CPAM_WLB_FPXSZ;CPAM_WLB_CPHSH;CPAM_WLB_ZTOBJ;HRB_WLB_ZTOGZ;HRB_WLB_ZTOSH',
'invoice_number':'38577123',
'top_user_key':'xxxxxxx',
'insurance_coverage':'数据结构JSON示例',
'is_agree_upgrade_reverse_parcel_insure':'false'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})