TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ClothInboundSyncRequest req = new ClothInboundSyncRequest();
ClothInboundSyncRequest.InboundMainOrderTopDTO obj1 = new ClothInboundSyncRequest.InboundMainOrderTopDTO();
obj1.setIdempotentId("123");
obj1.setEventType("INBOUND_IN_PROGRESS");
List<ClothInboundSyncRequest.InboundSubOrderTopDTO> list3 = new ArrayList<ClothInboundSyncRequest.InboundSubOrderTopDTO>();
ClothInboundSyncRequest.InboundSubOrderTopDTO obj4 = new ClothInboundSyncRequest.InboundSubOrderTopDTO();
list3.add(obj4);
obj4.setInboundQuantityActual(8L);
obj4.setInboundQuantityConfirmed(10L);
obj4.setPutawayQuantityActual(8L);
obj4.setInboundQuantityDefective(2L);
obj4.setInboundSubOrderId("1");
obj1.setSubOrders(list3);
obj1.setInboundMainOrderNo("IN202501170001");
obj1.setWarehouseCode("F88_GZ001_TEST");
List<ClothInboundSyncRequest.InboundSortingRecordTopDTO> list6 = new ArrayList<ClothInboundSyncRequest.InboundSortingRecordTopDTO>();
ClothInboundSyncRequest.InboundSortingRecordTopDTO obj7 = new ClothInboundSyncRequest.InboundSortingRecordTopDTO();
list6.add(obj7);
obj7.setRecordUniqueKey("123");
obj7.setQuantity(6L);
obj7.setReturnDeliveryNumber("SF1030419570000");
obj7.setReturnDeliveryCompanyName("顺丰");
obj1.setAbnormalSortingRecords(list6);
req.setReq(obj1);
ClothInboundSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
ClothInboundSyncRequest req = new ClothInboundSyncRequest();
ClothInboundSyncRequest.InboundMainOrderTopDTODomain obj1 = new ClothInboundSyncRequest.InboundMainOrderTopDTODomain();
obj1.IdempotentId = "123";
obj1.EventType = "INBOUND_IN_PROGRESS";
List<ClothInboundSyncRequest.InboundSubOrderTopDTODomain> list3 = new List<ClothInboundSyncRequest.InboundSubOrderTopDTODomain>();
ClothInboundSyncRequest.InboundSubOrderTopDTODomain obj4 = new ClothInboundSyncRequest.InboundSubOrderTopDTODomain();
list3.Add(obj4);
obj4.InboundQuantityActual = 8L;
obj4.InboundQuantityConfirmed = 10L;
obj4.PutawayQuantityActual = 8L;
obj4.InboundQuantityDefective = 2L;
obj4.InboundSubOrderId = "1";
obj1.SubOrders= list3;
obj1.InboundMainOrderNo = "IN202501170001";
obj1.WarehouseCode = "F88_GZ001_TEST";
List<ClothInboundSyncRequest.InboundSortingRecordTopDTODomain> list6 = new List<ClothInboundSyncRequest.InboundSortingRecordTopDTODomain>();
ClothInboundSyncRequest.InboundSortingRecordTopDTODomain obj7 = new ClothInboundSyncRequest.InboundSortingRecordTopDTODomain();
list6.Add(obj7);
obj7.RecordUniqueKey = "123";
obj7.Quantity = 6L;
obj7.ReturnDeliveryNumber = "SF1030419570000";
obj7.ReturnDeliveryCompanyName = "顺丰";
obj1.AbnormalSortingRecords= list6;
req.Req_ = obj1;
ClothInboundSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new ClothInboundSyncRequest;
$req = new InboundMainOrderTopDTO;
$req->idempotent_id="123";
$req->event_type="INBOUND_IN_PROGRESS";
$sub_orders = new InboundSubOrderTopDTO;
$sub_orders->inbound_quantity_actual="8";
$sub_orders->inbound_quantity_confirmed="10";
$sub_orders->putaway_quantity_actual="8";
$sub_orders->inbound_quantity_defective="2";
$sub_orders->inbound_sub_order_id="1";
$req->setSubOrders(json_encode($sub_orders));
$req->inbound_main_order_no="IN202501170001";
$req->warehouse_code="F88_GZ001_TEST";
$abnormal_sorting_records = new InboundSortingRecordTopDTO;
$abnormal_sorting_records->record_unique_key="123";
$abnormal_sorting_records->quantity="6";
$abnormal_sorting_records->return_delivery_number="SF1030419570000";
$abnormal_sorting_records->return_delivery_company_name="顺丰";
$req->setAbnormalSortingRecords(json_encode($abnormal_sorting_records));
$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.inbound.sync' \
-d 'partner_id=apidoc' \
-d 'sign=E35DA8197C1903421171A65E196E6374' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-04-04+13%3A21%3A33' \
-d 'v=2.0' \
-d 'req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.ClothInboundSyncRequest(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.inbound.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.inbound.sync', {
'req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})