TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTradeOrderModifyRequest req = new AlibabaTradeOrderModifyRequest();
AlibabaTradeOrderModifyRequest.OrderModifyRequest obj1 = new AlibabaTradeOrderModifyRequest.OrderModifyRequest();
obj1.setTradeId("24668306501026709");
AlibabaTradeOrderModifyRequest.LogisticsDetail obj2 = new AlibabaTradeOrderModifyRequest.LogisticsDetail();
AlibabaTradeOrderModifyRequest.Address obj3 = new AlibabaTradeOrderModifyRequest.Address();
obj3.setZip("461670");
obj3.setCountry("United States of America");
obj3.setAddress("Bank of new york");
obj3.setCity("New York");
obj3.setProvinceCode("California");
obj3.setCityCode("NY");
obj3.setContactPerson("james");
AlibabaTradeOrderModifyRequest.Phone obj4 = new AlibabaTradeOrderModifyRequest.Phone();
obj4.setArea("0512");
obj4.setCountry("86");
obj4.setNumber("13890876543");
obj3.setTelephone(obj4);
AlibabaTradeOrderModifyRequest.Phone obj5 = new AlibabaTradeOrderModifyRequest.Phone();
obj5.setArea("SH");
obj5.setCountry("CH");
obj5.setNumber("461670");
obj3.setFax(obj5);
obj3.setAlternateAddress("test");
obj2.setShipmentAddress(obj3);
obj2.setShipmentMethod("sea");
obj2.setTradeTerm("FOB");
obj2.setCarrier("DHL");
obj2.setCarrierCode("DHL");
AlibabaTradeOrderModifyRequest.ShipmentDate obj6 = new AlibabaTradeOrderModifyRequest.ShipmentDate();
obj6.setDuration(5L);
AlibabaTradeOrderModifyRequest.DateVo obj7 = new AlibabaTradeOrderModifyRequest.DateVo();
obj7.setFormatDate("2019-11-11");
obj7.setTimeStamp(4123459999L);
obj6.setDate(obj7);
obj6.setType("absolute");
obj2.setShipmentDate(obj6);
obj2.setFulfillmentChannel("TAD");
obj1.setLogisticsDetail(obj2);
AlibabaTradeOrderModifyRequest.PaymentDetail obj8 = new AlibabaTradeOrderModifyRequest.PaymentDetail();
obj8.setShipmentFee("20");
obj8.setTotalAmount("300");
obj8.setProductAmount("200");
obj8.setShipmentInsuranceFee("80");
obj8.setInitialAmount("150");
obj8.setValueAddServiceAmount("0");
obj8.setTaxAmount("0");
obj8.setCurrency("USD");
obj1.setPaymentDetail(obj8);
obj1.setRemark("test");
List<AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProduct> list10 = new ArrayList<AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProduct>();
AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProduct obj11 = new AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProduct();
list10.add(obj11);
obj11.setProductId(62337348461L);
obj11.setName("helloworld");
obj11.setSkuId("-1");
obj11.setUnit("set");
obj11.setQuantity("100");
obj11.setUnitPriceStr("2");
obj11.setCurrency("USD");
obj11.setEncryptProductId("XJG87654");
obj1.setProductList(list10);
obj1.setVersion("1576114051021");
req.setParamOrderModify(obj1);
AlibabaTradeOrderModifyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaTradeOrderModifyRequest req = new AlibabaTradeOrderModifyRequest();
AlibabaTradeOrderModifyRequest.OrderModifyRequestDomain obj1 = new AlibabaTradeOrderModifyRequest.OrderModifyRequestDomain();
obj1.TradeId = "24668306501026709";
AlibabaTradeOrderModifyRequest.LogisticsDetailDomain obj2 = new AlibabaTradeOrderModifyRequest.LogisticsDetailDomain();
AlibabaTradeOrderModifyRequest.AddressDomain obj3 = new AlibabaTradeOrderModifyRequest.AddressDomain();
obj3.Zip = "461670";
obj3.Country = "United States of America";
obj3.Address = "Bank of new york";
obj3.City = "New York";
obj3.ProvinceCode = "California";
obj3.CityCode = "NY";
obj3.ContactPerson = "james";
AlibabaTradeOrderModifyRequest.PhoneDomain obj4 = new AlibabaTradeOrderModifyRequest.PhoneDomain();
obj4.Area = "0512";
obj4.Country = "86";
obj4.Number = "13890876543";
obj3.Telephone= obj4;
AlibabaTradeOrderModifyRequest.PhoneDomain obj5 = new AlibabaTradeOrderModifyRequest.PhoneDomain();
obj5.Area = "SH";
obj5.Country = "CH";
obj5.Number = "461670";
obj3.Fax= obj5;
obj3.AlternateAddress = "test";
obj2.ShipmentAddress= obj3;
obj2.ShipmentMethod = "sea";
obj2.TradeTerm = "FOB";
obj2.Carrier = "DHL";
obj2.CarrierCode = "DHL";
AlibabaTradeOrderModifyRequest.ShipmentDateDomain obj6 = new AlibabaTradeOrderModifyRequest.ShipmentDateDomain();
obj6.Duration = 5L;
AlibabaTradeOrderModifyRequest.DateVoDomain obj7 = new AlibabaTradeOrderModifyRequest.DateVoDomain();
obj7.FormatDate = "2019-11-11";
obj7.TimeStamp = 4123459999L;
obj6.Date= obj7;
obj6.Type = "absolute";
obj2.ShipmentDate= obj6;
obj2.FulfillmentChannel = "TAD";
obj1.LogisticsDetail= obj2;
AlibabaTradeOrderModifyRequest.PaymentDetailDomain obj8 = new AlibabaTradeOrderModifyRequest.PaymentDetailDomain();
obj8.ShipmentFee = "20";
obj8.TotalAmount = "300";
obj8.ProductAmount = "200";
obj8.ShipmentInsuranceFee = "80";
obj8.InitialAmount = "150";
obj8.ValueAddServiceAmount = "0";
obj8.TaxAmount = "0";
obj8.Currency = "USD";
obj1.PaymentDetail= obj8;
obj1.Remark = "test";
List<AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProductDomain> list10 = new List<AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProductDomain>();
AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProductDomain obj11 = new AlibabaTradeOrderModifyRequest.TradeEcologyOrderCreateProductDomain();
list10.Add(obj11);
obj11.ProductId = 62337348461L;
obj11.Name = "helloworld";
obj11.SkuId = "-1";
obj11.Unit = "set";
obj11.Quantity = "100";
obj11.UnitPriceStr = "2";
obj11.Currency = "USD";
obj11.EncryptProductId = "XJG87654";
obj1.ProductList= list10;
obj1.Version = "1576114051021";
req.ParamOrderModify_ = obj1;
AlibabaTradeOrderModifyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaTradeOrderModifyRequest;
$param_order_modify = new OrderModifyRequest;
$param_order_modify->trade_id="24668306501026709";
$logistics_detail = new LogisticsDetail;
$shipment_address = new Address;
$shipment_address->zip="461670";
$shipment_address->country="United States of America";
$shipment_address->address="Bank of new york";
$shipment_address->city="New York";
$shipment_address->province_code="California";
$shipment_address->city_code="NY";
$shipment_address->contact_person="james";
$telephone = new Phone;
$telephone->area="0512";
$telephone->country="86";
$telephone->number="13890876543";
$shipment_address->telephone = $telephone;
$fax = new Phone;
$fax->area="SH";
$fax->country="CH";
$fax->number="461670";
$shipment_address->fax = $fax;
$shipment_address->alternate_address="test";
$logistics_detail->shipment_address = $shipment_address;
$logistics_detail->shipment_method="sea";
$logistics_detail->trade_term="FOB";
$logistics_detail->carrier="DHL";
$logistics_detail->carrier_code="DHL";
$shipment_date = new ShipmentDate;
$shipment_date->duration="5";
$date = new DateVo;
$date->format_date="2019-11-11";
$date->time_stamp="4123459999";
$shipment_date->date = $date;
$shipment_date->type="absolute";
$logistics_detail->shipment_date = $shipment_date;
$logistics_detail->fulfillment_channel="TAD";
$param_order_modify->logistics_detail = $logistics_detail;
$payment_detail = new PaymentDetail;
$payment_detail->shipment_fee="20";
$payment_detail->total_amount="300";
$payment_detail->product_amount="200";
$payment_detail->shipment_insurance_fee="80";
$payment_detail->initial_amount="150";
$payment_detail->value_add_service_amount="0";
$payment_detail->tax_amount="0";
$payment_detail->currency="USD";
$param_order_modify->payment_detail = $payment_detail;
$param_order_modify->remark="test";
$product_list = new TradeEcologyOrderCreateProduct;
$product_list->product_id="62337348461";
$product_list->name="helloworld";
$product_list->sku_id="-1";
$product_list->unit="set";
$product_list->quantity="100";
$product_list->unit_price_str="2";
$product_list->currency="USD";
$product_list->encrypt_product_id="XJG87654";
$param_order_modify->product_list = $product_list;
$param_order_modify->version="1576114051021";
$req->setParamOrderModify(json_encode($param_order_modify));
$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=alibaba.trade.order.modify' \
-d 'partner_id=apidoc' \
-d 'session=5c648b2e-e8b4-4e74-b17e-6d0337526be5' \
-d 'sign=B2AC26D16DE99C44C5224EC5BC188D1B' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-22+04%3A23%3A00' \
-d 'v=2.0' \
-d 'param_order_modify=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaTradeOrderModifyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_order_modify=""
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,"alibaba.trade.order.modify");
add_param(pRequest,"param_order_modify","数据结构JSON示例");
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('alibaba.trade.order.modify', {
'param_order_modify':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})