TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallInventoryQueryForstoreRequest req = new TmallInventoryQueryForstoreRequest();
List<TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequest> list2 = new ArrayList<TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequest>();
TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequest obj3 = new TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequest();
list2.add(obj3);
obj3.setScItemCode("1001");
obj3.setStoreCode("D25");
obj3.setScItemId(123L);
obj3.setInvStoreType(6L);
obj3.setSkuId(0L);
obj3.setItemType(2L);
req.setParamList(list2);
TmallInventoryQueryForstoreResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallInventoryQueryForstoreRequest req = new TmallInventoryQueryForstoreRequest();
List<TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequestDomain> list2 = new List<TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequestDomain>();
TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequestDomain obj3 = new TmallInventoryQueryForstoreRequest.InventoryQueryForStoreRequestDomain();
list2.Add(obj3);
obj3.ScItemCode = "1001";
obj3.StoreCode = "D25";
obj3.ScItemId = 123L;
obj3.InvStoreType = 6L;
obj3.SkuId = 0L;
obj3.ItemType = 2L;
req.ParamList_ = list2;
TmallInventoryQueryForstoreResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallInventoryQueryForstoreRequest;
$param_list = new InventoryQueryForStoreRequest;
$param_list->sc_item_code="1001";
$param_list->store_code="D25";
$param_list->sc_item_id="123";
$param_list->inv_store_type="6";
$param_list->sku_id="0";
$param_list->item_type="2";
$req->setParamList(json_encode($param_list));
$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=tmall.inventory.query.forstore' \
-d 'partner_id=apidoc' \
-d 'session=182d4e88-4dd5-4e61-8686-60b4428e1063' \
-d 'sign=155A43F9FCBFC678FF864EFCDEF31A00' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+18%3A03%3A41' \
-d 'v=2.0' \
-d 'param_list=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallInventoryQueryForstoreRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_list=""
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,"tmall.inventory.query.forstore");
add_param(pRequest,"param_list","数据结构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('tmall.inventory.query.forstore', {
'param_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})