跳转到内容
返回官网

批量判断订单是否可分批出库

1、接口实现的功能和注意事项 批量判断订单是否可分批出库,用于订单调用分批出库接口前置校验。 订单可以分批出库则可以调用分批出库接口出库,否则不可调用。 注意事项:https://joyspace.jd.com/h/personal/pages/gWQnacbmwquVOLF7UXTu 2、开放目的或场景: 用于分批出库场景批量判断订单是否可分批出库 3、接口提供使用的商家类型: 目前仅支持pop商家

一、请求参数

请求URL:

POST https://kf.fw199.com/gateway/jd/order/partialship/judge

公共参数

参数名称参数类型是否必须示例值参数描述
appidString合作伙伴AppId
timestampString1657525936当前Unix时间戳,秒
seller_nickString38173182京东的账号,对应蜂巢授权返回jdseller字段
signString

业务参数

参数名类型是否必须示例值说明
request_datajson要判断的订单号等, 出库数据 一次最多传入100个 ,注意是外层集合100个,不是内层的orderList中的订单号100个

request_data的示例

[
{
"objectId": "obj100",
"belongType": 200,
"data": {
"orderList": [
308906255328
]
}
}
]
名称类型必须示例值描述
objectIdString标识本次请求,原样返回
belongTypeNumber200商家类型 POP200 VC300 目前仅支持200
orderListNumber集合308906255328订单号列表

二、请求示例代码

Java

请求示例代码

@Test
public void JDOrderPartialShipJudgey() throws Exception {
String reqData =
"[{\"objectId\":\"obj100\"," + "\"belongType\": 200," + "\"data\": {\"orderList\":[308906255328]" + "}}]";
String sellerNick = Config.JDSellerNick ;
//业务参数
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("seller_nick", sellerNick);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("request_data",reqData );
// 参数签名
data.put("sign", Utils.Sign(data, Config.AppSecret));
doHttpRequest(Config.JDOrderPartialShipJudgeyUrl, data);
}

三、返回结果

三(一)、返回成功的情况

{
"code": 0,
"message": "ok",
"data": [
{
"objectId": "obj100",
"msg": "",
"code": 0,
"data": {
"partialShipmentItemList": [
{
"supportPartialShipment": true,
"orderId": 308906255328,
"notSupportSendPay": "",
"notSupportType": 0,
"notSupportMsg": ""
}
]
}
}
]
}

三(一)、返回失败结果示例1

{
"code": 0,
"message": "ok",
"data": [
{
"objectId": "obj100",
"msg": "",
"code": 0,
"data": {
"partialShipmentItemList": [
{
"supportPartialShipment": false,
"orderId": 308906255329,
"notSupportSendPay": "",
"notSupportType": -1,
"notSupportMsg": "订单不存在或订单非可出库状态"
}
]
}
}
]
}

三(二)、返回失败结果示例2

{
"code": 0,
"message": "ok",
"data": [
{
"objectId": "obj100",
"msg": "商家身份为空或非POP商家",
"code": 1,
"data": {
"partialShipmentItemList": null
}
}
]
}

说明: 1. 最外层code为0表示系统层面成功,非0为失败,message会包含失败原因。

  1. 再是判断内层的code,如果不为0,也是失败,msg会有消息。此时partialShipmentItemList为null

  2. 判断订单是否可以分批出库,以内层的supportPartialShipment为准. true可以分批发,false不可以分批发。不能分批发的话,notSupportMsg会有原因。