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);
List<ClothFulfillmentSyncRequest.PackageMaterialsInfo> list11 = new ArrayList<ClothFulfillmentSyncRequest.PackageMaterialsInfo>();
ClothFulfillmentSyncRequest.PackageMaterialsInfo obj12 = new ClothFulfillmentSyncRequest.PackageMaterialsInfo();
list11.add(obj12);
obj12.setMaterialType("QPD23*23");
obj12.setUseQuantity(2L);
obj6.setPackageMaterialsInfoList(list11);
obj6.setFabricType("梭织");
obj6.setGoodsCategory("牛仔裤");
obj6.setGoodsCategoryCode("SZNZK");
list5.setInspectedResult(obj6);
List<ClothFulfillmentSyncRequest.LogisticsInfo> list15 = new ArrayList<ClothFulfillmentSyncRequest.LogisticsInfo>();
ClothFulfillmentSyncRequest.LogisticsInfo obj16 = new ClothFulfillmentSyncRequest.LogisticsInfo();
list15.add(obj16);
obj16.setLogisticsNo("SF1030419570000");
obj16.setCpCode("SF");
obj16.setCpName("顺丰");
obj16.setQuantity(1L);
ClothFulfillmentSyncRequest.PackageInfo obj18 = new ClothFulfillmentSyncRequest.PackageInfo();
obj18.setWeight(1220L);
List<ClothFulfillmentSyncRequest.PackageMaterialsInfo> list20 = new ArrayList<ClothFulfillmentSyncRequest.PackageMaterialsInfo>();
ClothFulfillmentSyncRequest.PackageMaterialsInfo obj21 = new ClothFulfillmentSyncRequest.PackageMaterialsInfo();
list20.add(obj21);
obj21.setMaterialType("QPD23*23");
obj21.setUseQuantity(2L);
obj18.setPackageMaterialsInfoList(list20);
obj18.setAllShipped(true);
obj18.setRelatedFulfillSubOrderIds(""xxxx","yyyyy"");
list17.setPackageInfo(obj18);
list13.setLogisticsInfoList(list15);
ClothFulfillmentSyncRequest.PickedResult obj23 = new ClothFulfillmentSyncRequest.PickedResult();
obj23.setFabricType("梭织");
obj23.setGoodsCategory("牛仔裤");
obj23.setGoodsCategoryCode("SZNZJ");
list22.setPickedResult(obj23);
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;
List<ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain> list10 = new List<ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain>();
ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain obj11 = new ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain();
list10.Add(obj11);
obj11.MaterialType = "QPD23*23";
obj11.UseQuantity = 2L;
obj5.PackageMaterialsInfoList= list10;
obj5.FabricType = "梭织";
obj5.GoodsCategory = "牛仔裤";
obj5.GoodsCategoryCode = "SZNZK";
obj4.InspectedResult= obj5;
List<ClothFulfillmentSyncRequest.LogisticsInfoDomain> list13 = new List<ClothFulfillmentSyncRequest.LogisticsInfoDomain>();
ClothFulfillmentSyncRequest.LogisticsInfoDomain obj14 = new ClothFulfillmentSyncRequest.LogisticsInfoDomain();
list13.Add(obj14);
obj14.LogisticsNo = "SF1030419570000";
obj14.CpCode = "SF";
obj14.CpName = "顺丰";
obj14.Quantity = 1L;
ClothFulfillmentSyncRequest.PackageInfoDomain obj15 = new ClothFulfillmentSyncRequest.PackageInfoDomain();
obj15.Weight = 1220L;
List<ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain> list17 = new List<ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain>();
ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain obj18 = new ClothFulfillmentSyncRequest.PackageMaterialsInfoDomain();
list17.Add(obj18);
obj18.MaterialType = "QPD23*23";
obj18.UseQuantity = 2L;
obj15.PackageMaterialsInfoList= list17;
obj15.AllShipped = true;
obj15.RelatedFulfillSubOrderIds = ""xxxx","yyyyy"";
obj14.PackageInfo= obj15;
obj4.LogisticsInfoList= list13;
ClothFulfillmentSyncRequest.PickedResultDomain obj19 = new ClothFulfillmentSyncRequest.PickedResultDomain();
obj19.FabricType = "梭织";
obj19.GoodsCategory = "牛仔裤";
obj19.GoodsCategoryCode = "SZNZJ";
obj4.PickedResult= obj19;
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;
$package_materials_info_list = new PackageMaterialsInfo;
$package_materials_info_list->material_type="QPD23*23";
$package_materials_info_list->use_quantity="2";
$inspected_result->package_materials_info_list = $package_materials_info_list;
$inspected_result->fabric_type="梭织";
$inspected_result->goods_category="牛仔裤";
$inspected_result->goods_category_code="SZNZK";
$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";
$package_info = new PackageInfo;
$package_info->weight="1220";
$package_materials_info_list = new PackageMaterialsInfo;
$package_materials_info_list->material_type="QPD23*23";
$package_materials_info_list->use_quantity="2";
$package_info->package_materials_info_list = $package_materials_info_list;
$package_info->all_shipped="true";
$package_info->related_fulfill_sub_order_ids="[\"xxxx\",\"yyyyy\"]";
$logistics_info_list->package_info = $package_info;
$sub_orders->logistics_info_list = $logistics_info_list;
$picked_result = new PickedResult;
$picked_result->fabric_type="梭织";
$picked_result->goods_category="牛仔裤";
$picked_result->goods_category_code="SZNZJ";
$sub_orders->picked_result = $picked_result;
$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=866015FCCE2F8FB68F5024FB389310CD' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-06-07+10%3A46%3A08' \
-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);
})