类目商品发布规则查询接口
通过叶子类目id获取该类目的发布规则,目前返回标品、商品服务、属性等规则。
一、请求参数
请求URL:
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| appid | String | 必填 | 合作伙伴AppId |
| timestamp | String | 必填 | 当前时间戳 |
| tb_seller_nick | String | 必填 | 拼多多账号, 非店铺名称 |
| sign | String | 必填 | 如何计算生成见示例代码 |
| cat_id | LONG | 必填 | 类目id |
| goods_id | LONG | 必填 | 商品id,编辑的时候需要传被编辑的商品id,发布商品时如果已有商品id也需要传。如果没有,则传0 |
二、请求示例代码
Java
@Test public void PddGoodsCatRuleGetRequest() throws Exception {
String seller_nick = Config.PddSellerNick ; //业务参数 Map<String, String> data = new HashMap<String, String>(); data.put("appid", Config.AppId); data.put("seller_nick", seller_nick); data.put("cat_id", "18056"); // data.put("goods_id", "0"); Long timestamp = System.currentTimeMillis() / 1000; data.put("timestamp", timestamp.toString()); // 参数签名 data.put("sign", Utils.Sign(data,Config.AppSecret)); doHttpRequest(Config.PddGoodsCatRuleGetRequestUrl,data); }三、返回结果
说明: code为0表示成功,非0为失败,message会包含失败原因。
返回结果及字段说明见: https://open.pinduoduo.com/application/document/api?id=pdd.goods.cat.rule.get