删除商品
一、删除商品
请求URL:
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| appid | String | 是 | 合作伙伴AppId | |
| timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
| seller_nick | String | 是 | 38173182 | 抖店的账号,对应蜂巢授权返回doudianseller字段 |
| sign | String | 是 |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| product_id | - | 否 | 356545645645454 | 商品ID |
| out_product_id | Number | 否 | 4156451 | 外部商品ID |
| delete_forever | Bool | 否 | false | 是否彻底删除 |
| store_id | - | 否 | 1111420330 | 门店ID,不建议小时达一期用,即时零售单店版,无需使用 |
二、请求示例代码
Java
请求示例代码
@Test public void DDProductDel() 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","3684948714578903255" );// data.put("out_product_id","4156451" ); data.put("delete_forever","false" );// data.put("store_id","1111420330" ); data.put("sign", Sign(data,Config.AppSecret)); // 调用服务API String resp = doHttpRequest(Config.DDProductDel, data); System.out.println(resp); }三、返回结果
{"code":0,"message":"ok","data":"success"}说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档 https://op.jinritemai.com/docs/api-docs/14/61