商品运费模版接口
获取拼多多商家的物流运费模板信息
支持应用:OMS
一、请求参数
请求URL:
POST https://kf.fw199.com/gateway/pdd/goods/logistics/template/get
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| appid | String | 必填 | 合作伙伴AppId |
| timestamp | String | 必填 | 当前时间戳 |
| tb_seller_nick | String | 必填 | 拼多多账号, 非店铺名称 |
| sign | String | 必填 | 如何计算生成见示例代码 |
| page | INTEGER | 非必填 | 默认返回运费模板的页数为1,最高为100页,注意:page与page_size必须传一个 |
| page_size | INTEGER | 非必填 | 默认返回20条模板数据,最多100条数据 |
二、请求示例代码
Java
@Test public void PddGoodsLogisticsTemplateGet() 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); Long timestamp = System.currentTimeMillis() / 1000; data.put("timestamp", timestamp.toString()); data.put("page", "1"); data.put("page_size", "20"); // 参数签名 data.put("sign", Utils.Sign(data, Config.AppSecret)); doHttpRequest(Config.PddGoodsLogisticsTemplateGetUrl, data);
}三、返回结果
返回结果如下
{ "code": 0, "message": "ok", "data": { "logistics_template_list": [{ "cost_type": 0, "last_updated_time": 1631313177, "template_id": 163280639235619, "template_name": "包邮默认模板-20200801141948" }], "request_id": "16338780748163211", "total_count": 1 }, "trace_id": ""}说明: code为0表示成功,非0为失败,message会包含失败原因。
四、返回参数说明
| 参数接口 | 参数类型 | 例子 | 说明 |
|---|---|---|---|
| logistics_template_list | OBJECT[] | 商家运费模板对象列表 | |
| cost_type | INTEGER | 0 | 计费方式,0-按件计费,1-按重量计费 |
| last_updated_time | INTEGER | 1629646373 | 最近更新时间 |
| template_id | LONG | 268143398230164 | 模板id |
| template_name | STRING | 测试模板 | 运费模板名称 |
| total_count | INTEGER | 10 | 返回的运费模板总数 |