¥开放平台免费API必须用户授权
Schema体系发布一个产品
公共参数
请求地址:
HTTP地址
http://gw.api.taobao.com/router/rest
公共请求参数:
公共响应参数:
点击获取key和secret
请求示例
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallProductSchemaAddRequest req = new TmallProductSchemaAddRequest();
req.setCategoryId(1512L);
req.setBrandId(12345L);
req.setXmlData("<itemrule><field id=\"prop_14837340 \" name=\"体积 (含包装)\" type=\"input \"></field></itemrule>");
TmallProductSchemaAddResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
响应示例
<tmall_product_schema_add_response>
<add_product_result><itemrule> <field id="product_id" name="产品ID" type="input ">1221</field> <field id="create_time" name="创建时间" type="input ">2014-01-01 00:00:00</field> <itemrule></add_product_result>
</tmall_product_schema_add_response>
异常示例
<error_response>
<code>50</code>
<msg>Remote service error</msg>
<sub_code>isv.invalid-parameter</sub_code>
<sub_msg>非法参数</sub_msg>
</error_response>