TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest req = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest();
AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.Consignorderoutofstockcallbackrequest obj1 = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.Consignorderoutofstockcallbackrequest();
obj1.setSupplierId("11111");
obj1.setOutBizId("121333");
obj1.setBizOrderCode("p000232");
List<AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.Outofstockitems> list3 = new ArrayList<AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.Outofstockitems>();
AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.Outofstockitems obj4 = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.Outofstockitems();
list3.add(obj4);
obj4.setSubOrderCode("33222223");
obj4.setScItemId("333222");
obj4.setLackQuantity(1L);
obj1.setOutOfStockItems(list3);
obj1.setOutOfStockReason("没货了");
req.setConsignorderOutofstockCallbackRequest(obj1);
AlibabaAscpUopSupplierConsignorderOutofstockCallbackResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest req = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest();
AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.ConsignorderoutofstockcallbackrequestDomain obj1 = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.ConsignorderoutofstockcallbackrequestDomain();
obj1.SupplierId = "11111";
obj1.OutBizId = "121333";
obj1.BizOrderCode = "p000232";
List<AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.OutofstockitemsDomain> list3 = new List<AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.OutofstockitemsDomain>();
AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.OutofstockitemsDomain obj4 = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest.OutofstockitemsDomain();
list3.Add(obj4);
obj4.SubOrderCode = "33222223";
obj4.ScItemId = "333222";
obj4.LackQuantity = 1L;
obj1.OutOfStockItems= list3;
obj1.OutOfStockReason = "没货了";
req.ConsignorderOutofstockCallbackRequest_ = obj1;
AlibabaAscpUopSupplierConsignorderOutofstockCallbackResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest;
$consignorder_outofstock_callback_request = new Consignorderoutofstockcallbackrequest;
$consignorder_outofstock_callback_request->supplier_id="11111";
$consignorder_outofstock_callback_request->out_biz_id="121333";
$consignorder_outofstock_callback_request->biz_order_code="p000232";
$out_of_stock_items = new Outofstockitems;
$out_of_stock_items->sub_order_code="33222223";
$out_of_stock_items->sc_item_id="333222";
$out_of_stock_items->lack_quantity="1";
$consignorder_outofstock_callback_request->out_of_stock_items = $out_of_stock_items;
$consignorder_outofstock_callback_request->out_of_stock_reason="没货了";
$req->setConsignorderOutofstockCallbackRequest(json_encode($consignorder_outofstock_callback_request));
$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.ascp.uop.supplier.consignorder.outofstock.callback' \
-d 'partner_id=apidoc' \
-d 'session=d625026c-2584-4e7d-a03d-d63a8246deb4' \
-d 'sign=E5B411BE653003B1E0530B74056C5F7A' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-24+16%3A04%3A16' \
-d 'v=2.0' \
-d 'consignorder_outofstock_callback_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAscpUopSupplierConsignorderOutofstockCallbackRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.consignorder_outofstock_callback_request=""
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.ascp.uop.supplier.consignorder.outofstock.callback");
add_param(pRequest,"consignorder_outofstock_callback_request","数据结构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.ascp.uop.supplier.consignorder.outofstock.callback', {
'consignorder_outofstock_callback_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})