跳转到内容
返回官网

商品下架接口

一、请求参数

1、支持所有类型商品下架 2、接口调用成功,商品会放到仓库中。 3、商品上架请使用【product/editV2】商品更新接口,请求参数传值commit=true即表示提交上架。

请求URL:

POST https://kf.fw199.com/gateway/dd/product/setoffline

公共参数

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

业务参数

参数名称参数类型是否必须示例值参数描述
product_id-356654869456454商品ID
outer_product_idString2333424推荐使用,外部商家编码,支持字符串。
store_id-12345小时达二期店铺场景才可以传,小时达二期场景可以通过传入主品id+门店id对该门店下的子品进行操作
sysid-12345咨询客服

二、请求示例代码

Java

请求示例代码

@Test
public void DDProductSetoffline() throws Exception {
Map<String, Object> data = new HashMap<String, Object>();
data.put("appid", Config.AppId);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("seller_nick", Config.DDSellerNick);
data.put("product_id","3684948274437030273" );
data.put("outer_product_id","2333424" );
data.put("store_id","12345" );
data.put("sysid","xx" );
data.put("sign", Sign(data,Config.AppSecret));
// 调用服务API
String resp = doHttpRequest(Config.DDProductSetOffline, data);
System.out.println(resp);
}

三、返回结果

{"code":0,"message":"ok","data":null}

说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档 https://op.jinritemai.com/docs/api-docs/14/252