TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ClothFulfillmentSyncRequest req = new ClothFulfillmentSyncRequest();
ClothFulfillmentSyncRequest.FulfillmentMainOrderTopDTO obj1 = new ClothFulfillmentSyncRequest.FulfillmentMainOrderTopDTO();
obj1.setIdempotentId("123");
obj1.setEventType("ACCEPTED");
List<ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTO> list3 = new ArrayList<ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTO>();
ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTO obj4 = new ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTO();
list3.add(obj4);
obj4.setFulfillmentSubOrderId("FSB00001145023636");
ClothFulfillmentSyncRequest.InspectedResult obj6 = new ClothFulfillmentSyncRequest.InspectedResult();
obj6.setGenuineQuantity(1L);
List<ClothFulfillmentSyncRequest.DefectiveInfo> list8 = new ArrayList<ClothFulfillmentSyncRequest.DefectiveInfo>();
ClothFulfillmentSyncRequest.DefectiveInfo obj9 = new ClothFulfillmentSyncRequest.DefectiveInfo();
list8.add(obj9);
obj9.setDefectiveCount(1L);
obj9.setDefectiveReason("物流原因");
obj9.setDefectiveResponsible("EXPRESS");
obj6.setDefectiveInfos(list8);
list5.setInspectedResult(obj6);
List<ClothFulfillmentSyncRequest.LogisticsInfo> list12 = new ArrayList<ClothFulfillmentSyncRequest.LogisticsInfo>();
ClothFulfillmentSyncRequest.LogisticsInfo obj13 = new ClothFulfillmentSyncRequest.LogisticsInfo();
list12.add(obj13);
obj13.setLogisticsNo("SF1030419570000");
obj13.setCpCode("SF");
obj13.setCpName("顺丰");
obj13.setQuantity(1L);
list10.setLogisticsInfoList(list12);
obj1.setSubOrders(list3);
obj1.setFulfillmentMainOrderId("FB00001170023636");
req.setReq(obj1);
ClothFulfillmentSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
ClothFulfillmentSyncRequest req = new ClothFulfillmentSyncRequest();
ClothFulfillmentSyncRequest.FulfillmentMainOrderTopDTODomain obj1 = new ClothFulfillmentSyncRequest.FulfillmentMainOrderTopDTODomain();
obj1.IdempotentId = "123";
obj1.EventType = "ACCEPTED";
List<ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTODomain> list3 = new List<ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTODomain>();
ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTODomain obj4 = new ClothFulfillmentSyncRequest.FulfillmentSubOrderTopDTODomain();
list3.Add(obj4);
obj4.FulfillmentSubOrderId = "FSB00001145023636";
ClothFulfillmentSyncRequest.InspectedResultDomain obj5 = new ClothFulfillmentSyncRequest.InspectedResultDomain();
obj5.GenuineQuantity = 1L;
List<ClothFulfillmentSyncRequest.DefectiveInfoDomain> list7 = new List<ClothFulfillmentSyncRequest.DefectiveInfoDomain>();
ClothFulfillmentSyncRequest.DefectiveInfoDomain obj8 = new ClothFulfillmentSyncRequest.DefectiveInfoDomain();
list7.Add(obj8);
obj8.DefectiveCount = 1L;
obj8.DefectiveReason = "物流原因";
obj8.DefectiveResponsible = "EXPRESS";
obj5.DefectiveInfos= list7;
obj4.InspectedResult= obj5;
List<ClothFulfillmentSyncRequest.LogisticsInfoDomain> list10 = new List<ClothFulfillmentSyncRequest.LogisticsInfoDomain>();
ClothFulfillmentSyncRequest.LogisticsInfoDomain obj11 = new ClothFulfillmentSyncRequest.LogisticsInfoDomain();
list10.Add(obj11);
obj11.LogisticsNo = "SF1030419570000";
obj11.CpCode = "SF";
obj11.CpName = "顺丰";
obj11.Quantity = 1L;
obj4.LogisticsInfoList= list10;
obj1.SubOrders= list3;
obj1.FulfillmentMainOrderId = "FB00001170023636";
req.Req_ = obj1;
ClothFulfillmentSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new ClothFulfillmentSyncRequest;
$req = new FulfillmentMainOrderTopDTO;
$req->idempotent_id="123";
$req->event_type="ACCEPTED";
$sub_orders = new FulfillmentSubOrderTopDTO;
$sub_orders->fulfillment_sub_order_id="FSB00001145023636";
$inspected_result = new InspectedResult;
$inspected_result->genuine_quantity="1";
$defective_infos = new DefectiveInfo;
$defective_infos->defective_count="1";
$defective_infos->defective_reason="物流原因";
$defective_infos->defective_responsible="EXPRESS";
$inspected_result->defective_infos = $defective_infos;
$sub_orders->inspected_result = $inspected_result;
$logistics_info_list = new LogisticsInfo;
$logistics_info_list->logistics_no="SF1030419570000";
$logistics_info_list->cp_code="SF";
$logistics_info_list->cp_name="顺丰";
$logistics_info_list->quantity="1";
$sub_orders->logistics_info_list = $logistics_info_list;
$req->setSubOrders(json_encode($sub_orders));
$req->fulfillment_main_order_id="FB00001170023636";
$req->setReq(json_encode($req));
$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.cloth.fulfillment.sync' \
-d 'partner_id=apidoc' \
-d 'sign=FAF6F6823C34C9041048E99EBB2B32F7' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-04-04+13%3A18%3A24' \
-d 'v=2.0' \
-d 'req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.ClothFulfillmentSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.req="数据结构示例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.cloth.fulfillment.sync");
add_param(pRequest,"req","数据结构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',
'url': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.cloth.fulfillment.sync', {
'req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})