TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallProductSchemaMatchRequest req = new TmallProductSchemaMatchRequest();
req.setCategoryId(1512L);
req.setPropvalues("<itemRule> <field id=\"prop_13021751\" name=\"货号\" type=\"input\"><value>123</value> </field> <field id=\"prop_20000\" name=\"品牌\" type=\"singleCheck\"><value>30111</value> </field> </itemRule>");
TmallProductSchemaMatchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallProductSchemaMatchRequest req = new TmallProductSchemaMatchRequest();
req.CategoryId = 1512L;
req.Propvalues = "<itemRule> <field id=\"prop_13021751\" name=\"货号\" type=\"input\"><value>123</value> </field> <field id=\"prop_20000\" name=\"品牌\" type=\"singleCheck\"><value>30111</value> </field> </itemRule>";
TmallProductSchemaMatchResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallProductSchemaMatchRequest;
$req->setCategoryId("1512");
$req->setPropvalues("<itemRule> <field id=\"prop_13021751\" name=\"货号\" type=\"input\"><value>123</value> </field> <field id=\"prop_20000\" name=\"品牌\" type=\"singleCheck\"><value>30111</value> </field> </itemRule>");
$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.product.schema.match' \
-d 'partner_id=apidoc' \
-d 'session=657f738a-c917-4eb2-ab3c-bf0004e72863' \
-d 'sign=AB02424291E3D2B934D9930043C67699' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+15%3A39%3A56' \
-d 'v=2.0' \
-d 'category_id=1512' \
-d 'propvalues=%3CitemRule%3E+%09%3Cfield+id%3D%5C%22prop_13021751%5C%22+name%3D%5C%22%E8%B4%A7%E5%8F%B7%5C%22+type%3D%5C%22input%5C%22%3E%3Cvalue%3E123%3C%2Fvalue%3E+%09%3C%2Ffield%3E+%09%3Cfield+id%3D%5C%22prop_20000%5C%22+name%3D%5C%22%E5%93%81%E7%89%8C%5C%22+type%3D%5C%22singleCheck%5C%22%3E%3Cvalue%3E30111%3C%2Fvalue%3E+%09%3C%2Ffield%3E+%3C%2FitemRule%3E'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallProductSchemaMatchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.category_id=1512
req.propvalues="<itemRule> <field id=\"prop_13021751\" name=\"货号\" type=\"input\"><value>123</value> </field> <field id=\"prop_20000\" name=\"品牌\" type=\"singleCheck\"><value>30111</value> </field> </itemRule>"
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.product.schema.match");
add_param(pRequest,"category_id","1512");
add_param(pRequest,"propvalues","<itemRule> <field id=\"prop_13021751\" name=\"货号\" type=\"input\"><value>123</value> </field> <field id=\"prop_20000\" name=\"品牌\" type=\"singleCheck\"><value>30111</value> </field> </itemRule>");
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.product.schema.match', {
'category_id':'1512',
'propvalues':'<itemRule> <field id=\"prop_13021751\" name=\"货号\" type=\"input\"><value>123</value> </field> <field id=\"prop_20000\" name=\"品牌\" type=\"singleCheck\"><value>30111</value> </field> </itemRule>'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})