快麦通商品中心-导入多平台资料
请求地址
| 环境 | 服务地址(HTTP/HTTPS) |
|---|---|
| V2正式环境(推荐) | https://gw.superboss.cc/router |
| V2测试环境 | https://gw3.superboss.cc/router |
2022年4月1日以后申请的APP Key,统一使用V2正式环境的请求地址:https://gw.superboss.cc/router
公共参数
调用任何一个API都必须传入的参数,目前支持的公共参数有:
| 参数名称 | 参数类型 | 是否必须 | 参数描述 |
|---|---|---|---|
| method | string | 是 | API接口名称 |
| appKey | string | 是 | 分配给应用的AppKey |
| timestamp | string | 是 | 时间戳,时区为GMT+8,例如:2020-09-21 16:58:00。API服务端允许客户端请求最大时间误 差为10分钟 |
| format | string | 否 | 响应格式。默认为json格式,可选值:json |
| version | string | 是 | API协议版本 可选值:1.0 |
| sign_method | string | 否 | 签名的摘要算法(默认 hmac),可选值为:hmac,md5,hmac-sha256。 |
| sign | string | 是 | 签名 |
| session | string | 是 | 授权会话信息 (即access_token,由系统分配) |
请求头
全部展开
参数名
类型
描述
必填
Content-Type
string
application/x-www-form-urlencoded;charset=UTF-8
必填
API接口地址
全部展开
参数名
类型
描述
必填
method
string
kmt.api.scm.import.platform.item.list
必填
请求参数
全部展开
参数名
类型
描述
必填
companyId
long
公司ID
必填
userId
long
店铺编号
必填
fastModels
string
中间模型JSON数组字符串,结构参见 fastModels 子表
必填
platformItemId
string
来源平台商品ID
mainImages
array
主图URL列表
detailImages
array
详情图URL列表
packageLabelImages
array
包装标签图URL列表
baseItemLabelList
array
商品标签列表
description
string
商品描述
outerId
string
商品款式编码
title
string
商品名称
salesPrice
double
销售价
marketPrice
double
市场价
purchasePrice
double
成本价
weight
double
重量,单位:kg
stock
integer
库存
easySpecifications
object
规格信息值,key为规格名称,value结构参见 easySpecifications 子表
attributeName
string
SKU属性名
realValue
string
SKU属性真实值
value
string
SKU属性值
pic
string
属性附带图片URL
note
string
SKU备注
catList
array
目标平台类目列表,结构参见 catList 子表
fromCid
long
目标平台叶子类目ID
catPropAttr
array
来源平台类目属性列表,结构参见 catPropAttr 子表
attributeID
string
属性ID
attributeName
string
属性名
valueId
array
属性值ID列表,兼容多选
value
array
属性值列表,兼容多选
isCustom
boolean
属性值是否自定义
pic
string
属性附带图片URL
skuList
array
SKU列表,结构参见 skuList 子表
baseSkuId
long
基础SKU ID
skuOuterId
string
SKU商品编码
salesPrice
double
销售价
marketPrice
double
市场价
purchasePrice
double
成本价
stock
integer
库存
weight
double
重量,单位:kg
skuAttrUk
string
SKU规格信息唯一键
skuAttr
array
SKU规格信息,结构参见 skuAttr 子表
attributeName
string
SKU属性名
realValue
string
SKU属性真实值
value
string
SKU属性值
pic
string
属性附带图片URL
note
string
SKU备注
extraAttr
array
SKU其他属性,结构同 catPropAttr 子表
请求示例
示例一:
{
"companyId": 123456,
"userId": 78910,
"fastModels": "[{\"mainImages\":[\"https://img.example.com/main1.jpg\"],\"detailImages\":[\"https://img.example.com/detail1.jpg\"],\"packageLabelImages\":[\"https://img.example.com/pack1.jpg\"],\"description\":\"测试商品描述\",\"outerId\":\"GOODS001\",\"title\":\"测试商品\",\"salesPrice\":19.99,\"marketPrice\":29.99,\"purchasePrice\":10.00,\"weight\":0.5,\"stock\":100,\"easySpecifications\":{\"颜色\":[{\"attributeName\":\"颜色\",\"realValue\":\"红色\",\"value\":\"红色\",\"pic\":\"https://img.example.com/red.jpg\",\"note\":\"\"}],\"尺码\":[{\"attributeName\":\"尺码\",\"realValue\":\"L\",\"value\":\"L\",\"note\":\"\"}]},\"catList\":[{\"fromCid\":20036}],\"catPropAttr\":[{\"attributeID\":\"310\",\"attributeName\":\"品牌\",\"valueId\":[\"1001\"],\"value\":[\"自有品牌\"],\"isCustom\":false}],\"skuList\":[{\"skuOuterId\":\"SKU001\",\"salesPrice\":19.99,\"marketPrice\":29.99,\"purchasePrice\":10.00,\"stock\":50,\"weight\":0.5,\"skuAttrUk\":\"颜色红色尺码L\",\"skuAttr\":[{\"attributeName\":\"颜色\",\"realValue\":\"红色\",\"value\":\"红色\"},{\"attributeName\":\"尺码\",\"realValue\":\"L\",\"value\":\"L\"}],\"extraAttr\":[{\"attributeID\":\"skuProp1\",\"attributeName\":\"SKU属性\",\"value\":[\"属性值\"]}]}]}]"
}
响应参数
全部展开
参数名
类型
描述
必填
success
boolean
true-成功,false-失败
必填
trace_id
string
流水id
必填
响应示例
{
"success": true,
"trace_id": "3533394037472595"
}
异常示例
{
"code": "25",
"msg": "服务方法(kmt.api.scm.import.platform.item.list:1.0)的签名无效",
"success": false,
"trace_id": "3553483395423660"
}
错误码解释
| 错误码 | 错误信息 | 解决方案 |
|---|---|---|
| content1 | content2 | content3 |