全部
淘宝
拼多多
抖音
京东
快手
当当
1688
淘工厂
小红书
有赞
微店
在线测试

商品新增


接口地址: http://api.vv-tool.com/tool/erps/ks-item-new 点击查看详情


接口介绍: 商品新增接口


必须用户授权 : 需要用户的授权,才能拿到被授权的数据


请求方式: POST


返回格式: JSON


接口收费: 扣账户余额


频率限制: 10 次/秒


请求头参数

参数 类型 必选 示例
Authorization string 授权 access_token Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx

请求参数

参数名 类型 必须 示例值 详情描述
shop_id String 13211 店铺 id(可在快手小店获取)
title String 黑色 T 恤 商品名称
relItemId Long 16231231243212 外部商品 id,仅供记录外部商品和快手商品对应关系; 注意:外部商品 id 不可与历史新建商品重复
categoryId Long 1003 类目 id
categoryName String 男女装 类目名称
imageUrls String[] ["http://www.baidu.com/1.jpg", "http://www.baidu.com/2.jpg"] 商品主图,1. 最多上传 9 张图片 2. 单张图片大小不超过 2M,支持 png/jpeg/webp/bmp 格式
skuList OpenApiAddSkuDTO[] [{}] sku 信息列表。0 < 数量 <= 600
relSkuId Long 3703660508488 三方 skuId
skuStock Long 10 Sku 库存。0 <= 数值 <= 9999999
skuSalePrice Long 1200 Sku 价格,单位为分。1 <= 数值 <= 类目配置价格上限
skuNick String TS9988 sku 编码,分仓商品必传,SKU 编码仅支持中英文、数字以及特殊字符
skuProps OpenApiAddSkuPropDTO[] [{}] 商品规格多属性规格参数。目前支持三级属性,并且需要传三级属性的完整笛卡尔积。录入多规格商品时,需要包含所有规格的组合
propName String 颜色 规格名称
propValueName String 红色 规格值名称
imageUrl String http://kuaishou.com/file/a.jpeg 图片 url, 如果是主属性图片必传,图片 url。0 < 长度 <= 2000,图片大小不超过 2M,支持 png/jpeg/webp/bmp 格式
isMainProp Integer 1 1 是 0 否 ,是否是主属性,主属性标记为关联 sku 规格图片
propValueGroupId Long 0 规格值分组 id
propVersion Integer 1 销售属性版本 自定义 1,使用类目模板传 2
skuCertificate SkuCertificatePropParam { "condition": "9 成新", "purchasingChannels": "国行", "batteryEfficiency": "80-90%", "mainBoard": "无维修", "batteryCondition": "原装电池", "screenCondition": "第三方屏幕", "shellCollision": "明显", "reportUrl": "https://m.paipai.com/ppinspect/activeReport?", "qualityInspectionNo": "852180", "sn": "353************625", "shellScratch": "明显", "shellPaint": "明显", "deviceSystem": "无越狱/无 Root" } 质检参数,二手类型商品需要添加
condition String 9 成新 成色
purchasingChannels String 国行 购买渠道
batteryEfficiency String 80-90% 电池效率
mainBoard String 无维修 主板维修
batteryCondition String 原装电池 电池情况
screenCondition String 第三方屏幕 屏幕情况
shellCollision String 明显 外壳磕碰
reportUrl String https://m.paipai.com/ppinspect/activeReport 质检报告 url
qualityInspectionNo String 852180 质检编号
sn String 353************625 SN
shellScratch String 明显 外壳划痕
shellPaint String 明显 外壳掉漆
deviceSystem String 无越狱/无 Root 系统设备
skuMarketPrice Long 1299 商品划线价 注意:划线价必须大于当前商品的最高单价,并且 划线价不可超过单价的 10 倍
goodsId String M13213124 货品 Id,多仓商品支持字段
itemVideoId Long 1231212 商品关联的视频 id
purchaseLimit Boolean true 是否限购,默认不限购
limitCount Long 99 商品限购数量。purchaseLimit 为 true 时,限购数量必填
itemPropValues AddItemPropValue[] [{}] 商品类目属性,商品类目属性有必填项,必传。(注意:类目属性不允许重复)
propId Long 123213 属性 id(规格数量上限 200,规格值数量上限 500)
radioPropValue CategoryPropValueParam {} 单选属性 (根据 open.item.category.config 中 propInputType 和 required 判断是否必填)
propValueId Long 4718388 属性值 id
propValue String 海贼王 属性值
checkBoxPropValuesList CategoryPropValueParam[] [{}] 多选属性 (根据 open.item.category.config 中 propInputType 和 required 判断是否必填)
propValueId Long 4718388 属性值 id
propValue String 海贼王 属性值
textPropValue String 测试 文本属性值 (根据 open.item.category.config 中 propInputType 和 required 判断是否必填,不允许传空字符串)
datetimeTimestamp Long 1577808000000 时间戳属性 (根据 open.item.category.config 中 propInputType 和 required 判断是否必填)
dateRange DateRangeParam {} 时间范围属性 (根据 open.item.category.config 中 propInputType 和 required 判断是否必填)
startTimeTimestamp Long 1632423413 起始时间(毫秒)
endTimeTimestamp Long 1643243211 结束时间(毫秒)
sortNum Long 12 序号,open.item.category.config 返回
imagePropValues List ["http://kuaishou.com/a.jpg","http://kuaishou.com/b.jpg"] 图片属性列表 (根据 open.item.category.config 中 propInputType 和 required 判断是否必填)
propName String 男装风格 1 属性名称
propAlias String 男装 属性别名
inputType Integer 1 1-文本 2-checkbox 3-数字 4-邮箱 5-日期 6-url 地址 7-时间范围 8-单选框 9-图片
propType Integer 1 1-sku 属性 2-商品属性
unitPropValueId Long 1 单位属性值 Id,open.item.category.config 返回
unitPropValueName String ml 单位属性值名称
details String 商品详情。0 < 长度 <= 300 商品详情描述。0 < 长度 <= 300
stockPartner Boolean false 是否分仓,默认为 false
itemRemark String 商品备注 商品备注最多 8 个字符 备注支持中文、英文、数字
serviceRule ServiceRule {} 服务规则
refundRule String 1 退款规则,请求内容为枚举数值,非后面文案: 1:支持 7 天无理由退货 4:不支持 7 天无理由退货 5:支持 7 天无理由退货(拆封后不支持) 6:支持 7 天无理由退货(激活后不支持) 7:支持 7 天无理由退货(安装后不支持) 8:支持 7 天无理由退货(定制类不支持) 9:支持 7 天无理由退货(使用后不支持) ,由 open.item.category.config 获得(退款规则会根据类目变化而变化)
deliverGoodsInteralTime Long 345600 发货间隔时间,单位:秒,范围在[4,90 天] 需要转换为秒 345600 为 4 天,deliverGoodsInteralTime 和 promiseDeliveryTime 至少填一个且不能都填。填 deliverGoodsInteralTime 代码预售商品,填 promiseDeliveryTime 代表非预售商品。(如果需要取消请传 0 或 -1)
promiseDeliveryTime Long 172800 非预售商品承诺发货时间,单位:秒,取值 86400,172800,259200,分别代表 24、48、72 小时,deliverGoodsInteralTime 和 promiseDeliveryTime 至少填一个且不能都填。填 deliverGoodsInteralTime 代码预售商品,填 promiseDeliveryTime 代表非预售商品。(如果需要取消请传 0 或 -1)
immediatelyOnOfflineFlag Integer 0 是否立即上架 ,0 立即上架,1 不立即上架
deliveryMethod String logistics:物流配送(默认) 发货方式 logistics:物流配送(默认) certificate:电子凭证
expressTemplateId Long 0 运费模板 id
saleTimeFlag Boolean false 是否定点开售,默认为 false
timeOfSale Long 1631001896457 定点开售时间,如果开启定点开售必填
payWay Integer 2 支付方式:1 货到付款 2 在线支付 3 在线支付和货到付款;默认 2 目前 OpenAPI 端只支持「在线支付」方式
multipleStock Boolean false 是否是多仓库存模式,默认是 false
vvtype int 1 普通版 1,不传默认 1,增强版 2,增强版的需要传参 2

请求示例

{
  
}

请求代码示例

cURL请求代码示例
PHP请求代码示例
JAVA请求代码示例
Pyton请求代码示例

响应参数

名称 类型 示例值 描述
result Integer 1 返回码,1 成功
error_msg String success 错误信息
data AddItemResponseParam {} 新增商品返回数据
kwaiItemId Number 234225423 快手商品 id
relItemId Number 23322112 外部商品 id,仅供记录外部商品和快手商品对应关系
skuIdMapping List [] skuIdList
kwaiSkuId Number 1232141 快手商品 sku id
relSkuId Number 233233 外部商品 Sku id,仅供记录外部商品 sku 和快手商品 sku 对应关系
skuNick String 123422 skuNick,sku 编码必须 30 个字符以内
withholding_money Integer 该接口扣费金额(点券)

返回数据

{
    "code": 0,
    "msg": "操作成功",
    "msec": 1469,
    "time": 1617270403,
    "data": {
  "result": 1,
  "error_msg": "success",
  "data": {
    "kwaiItemId": 234225423,
    "relItemId": 23322112,
    "skuIdMapping": [
      {
        "kwaiSkuId": 1232141,
        "relSkuId": 233233,
        "skuNick": "123422"
      }
    ]
  }
},"withholding_money":4
}
  
  
  



响应代码

代码 代码描述 解决方案
0 成功
100 请求参数错误 检查您的请求参数是否正确
101 请求超时,请重试 检查您的网络情况或者联系客服解决
103 旺旺账号不存在 检查您输入的旺旺号是否正确
200 系统错误,请联系客服 检查您的接口地址填写是否正确,其他问题联系客服解决
203 暂不支持当前接口
204 请求异常:无该接口权限,请前往官网开通正式接口。 前往官网开通该接口权限
204 请求异常:API 调用次数不足,请前往网站兑换次数。 前往官网充值该接口调用次数
302 未授权店铺 根据返回链接进行扫码授权