查询面单服务订购及面单使用情况
查询面单服务订购及面单使用情况
1.请求参数:
参数名 | 类型 | 说明 | 示例 |
---|---|---|---|
appid | String | 合作伙伴AppId | uwkahf@jfs92 |
timestamp | String | 当前时间戳 | |
seller_nick | String | 拼多多商家账号,非店铺名称 | kingdo |
sign | String | 接口签名 | 如何计算生成见示例代码 |
wp_code | String | 非必填 快递公司code |
2. 请求示例代码(Java)
@Test
public void PddWayBillSearchUrl() throws Exception {
String result ="";
String seller_nick = Config.PddSellerNick ; // 拼多多卖家账号
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost( Config.PddWayBillSearchUrl );
//业务参数
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());
// 非必填 快递公司code
// data.put("wp_code", "SF");
// 参数签名
data.put("sign", Utils.Sign(data,Config.AppSecret));
List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
for (Map.Entry<String, String> entry : data.entrySet()) {
params.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
}
//发起POST请求
try {
httpPost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
HttpResponse httpResponse = httpclient.execute(httpPost);
if (httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
result = EntityUtils.toString(httpResponse.getEntity());
} else {
result = ("doPost Error Response: " + httpResponse.getStatusLine().toString());
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(result);
}
3. 返回结果如下:
限于篇幅,以下json为部分数据
{
"code": 0,
"message": "ok",
"data": {
"request_id": "16117545393930423",
"waybill_apply_subscription_cols": [{
"branch_account_cols": [{
"allocated_quantity": 0,
"cancel_quantity": 0,
"quantity": 0,
"recycled_quantity": 0,
"service_info_cols": [{
"required": false,
"service_attributes": [{
"attribute_code": "value",
"attribute_name": "时效服务",
"attribute_type": "string",
"type_desc": "{\"1\":\"顺丰标快\",\"2\":\"顺丰标快(陆运)\",\"5\":\"顺丰次晨\",\"6\":\"顺丰即日\",\"11\":\"医药安心递\",\"12\":\"医药专递\",\"13\":\"物流普运\",\"15\":\"生鲜速配\",\"16\":\"大闸蟹专递\",\"18\":\"重货快运\",\"30\":\"三号便利箱/袋\",\"31\":\"便利封\",\"32\":\"二号便利箱/袋\",\"33\":\"岛内件(80CM)\",\"34\":\"即日2200\",\"36\":\"汇票专送\",\"110\":\"证照专递\",\"111\":\"顺丰干配\",\"112\":\"顺丰空配\",\"125\":\"专线普运\",\"153\":\"重货专运\",\"154\":\"重货包裹\",\"155\":\"小票零担\",\"195\":\"医药安心递(陆)\",\"199\":\"极速包裹\",\"200\":\"冷运速配\",\"201\":\"冷运特惠\",\"202\":\"顺丰微小件\",\"203\":\"医药快运\",\"204\":\"陆运微小件\",\"208\":\"特惠专配\",\"231\":\"陆运包裹\",\"234\":\"特惠件\",\"238\":\"纯重特配\",\"242\":\"丰网速运\",\"247\":\"电商标快\"}"
}],
"service_code": "TIMED-DELIVERY",
"service_desc": "时效服务",
"service_name": "顺丰快递时效服务"
}, {
"required": false,
"service_attributes": [{
"attribute_code": "value",
"attribute_name": "保鲜服务",
"attribute_type": "enum",
"type_desc": "{\"\":\"保鲜服务\"}"
}],
"service_code": "IN41",
"service_desc": "保鲜服务",
"service_name": "保鲜服务"
}, {
"required": false,
"service_attributes": [{
"attribute_code": "value",
"attribute_name": "保价金额",
"attribute_type": "number",
"type_desc": "{\"min\":0}"
}],
"service_code": "INSURE",
"service_desc": "保价服务",
"service_name": "顺丰保价服务"
}],
"shipp_address_cols": [{
"city": "上海市",
"country": "中国",
"detail": "世纪大道2000",
"district": "浦东新区",
"province": "上海市"
}]
}],
"wp_code": "SF",
"wp_type": 3
}, {
"branch_account_cols": [{
"allocated_quantity": 0,
"cancel_quantity": 0,
"quantity": 0,
"recycled_quantity": 0,
"service_info_cols": [{
"required": false,
"service_attributes": [{
"attribute_code": "value",
"attribute_name": "时效服务",
"attribute_type": "enum",
"type_desc": "{\"SE0100\":\"重货包裹\",\"SE0101\":\"小票零担\",\"SE0006\":\"物流普运\",\"SE0091\":\"专线普运\",\"SE0020\":\"重货专运\",\"SE0114\":\"大票零担\"}"
}],
"service_code": "TIMED-DELIVERY",
"service_desc": "时效服务",
"service_name": "顺丰快运时效服务"
}, {
"required": true,
"service_attributes": [{
"attribute_code": "value",
"attribute_name": "保价服务",
"attribute_type": "number",
"type_desc": "{\"min\":0}"
}],
"service_code": "INSURE",
"service_desc": "保价服务",
"service_name": "保价服务"
}],
"shipp_address_cols": [{
"city": "上海市",
"country": "中国",
"detail": "世纪大道2000",
"district": "浦东新区",
"province": "上海市"
}]
}],
"wp_code": "SFKY",
"wp_type": 3
}]
}
}
说明: code为0表示成功,非0为失败,message会包含失败原因。失败时一定要注意,可能商户授权过期,或是参数有误。
返回参数字段详细说明请移步: 返回字段详细说明
文档更新时间: 2023-03-14 17:01 作者:admin