1. 商品编辑

1.1.1. 基本信息

Path: /v1/spu/update

Method: POST

接口描述:

1.1.2. 请求参数

Headers

参数名称 参数值 是否必须 示例 备注
Content-Type application/json json传参

Body

名称类型是否必须默认值备注其他信息
spuIdstring必须商品spuId
typestring必须商品类型:1成本商品,2预付商品
namestring必须商品名称,最大长度不能超过40
albumstring []必须商品相册,数量最少一张,最多20张

item 类型: string

├─ 非必须
videostring非必须商品视频连接
posterTypestring必须海报样式,0用户上传,1默认样式
posterstring非必须海报样式是用户上传时,需传此参数 海报宽高为750*1174
descriptionstring必须图文描述
showPricestring必须展示价格,不能小于0
marketPricestring必须市场价格,不能小于0
sellSTimestring必须销售开始时间
sellETimestring必须销售结束时间
payerNumberBasestring非必须付款人数基数,不能小于0,对外展示为payerNumber+payerNumberBase
effectTimeTypestring非必须type=2时需传此参数,有效期类型,0长久有效,1购买后n天有效,2指定日期前有效
effectTimeParamstring非必须type=2时需传此参数,effectTimeType=1或2时需传此参数 ,effectTimeType=2时需传日期格式如:2021-9-30
limitStoresstring []非必须type=2时需传此参数,可用门店ID数组,不选择默认全部门店可用

item 类型: string

├─ 非必须
usageNoticestring非必须type=2时需传此参数,使用须知
spuGroupDatastring []非必须所属商品分组

item 类型: string

├─ 非必须
skuListobject必须商品sku售卖信息列表
├─ 0#0_1#0object非必须0#0_1#0 第一个规格的第一个属性值+第二个规格的第一个属性值,即颜色:星光色+版本:128G
├─ idstring非必须传0
├─ pricestring非必须商品sku价格,价格必须大于0
├─ deductstring非必须预付商品的抵扣金额 可不传
├─ stockstring非必须sku库存,库存必须为大于等于0
├─ commissionstring非必须sku佣金,佣金必须大于等于0
├─ marketPricestring非必须sku市场价,市场价格必须大于0
├─ buyLimitPerstring非必须sku购买限制 0表示不限制购买
├─ proxyStandPricestring非必须sku代理标准价
├─ 0#0_1#1object非必须0#0_1#0 第一个规格的第一个属性值+第二个规格的第二个属性值,即颜色:星光色+版本:256GG
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#0_1#2object非必须0#0_1#0 第一个规格的第一个属性值+第二个规格的第三个属性值,即颜色:星光色+版本:512GGG
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#1_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#1_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#1_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#2_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#2_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#2_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#3_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#3_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#3_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#4_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#4_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#4_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ deductstring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
spuAttributesobject []必须商品规格数据数组,商品至少存在一个规格,至多三个规格

item 类型: object

├─ idstring必须传0
├─ keyNamestring必须规格名称,规格名称长度不能大于8
├─ spuValListobject []必须规格取值数组,至少1个,最多20个

item 类型: object

├─ idstring必须传0
├─ valstring必须属性值,长度为1至30
├─ picstring必须属性展示图片,主规格每个值必须配置图片
├─ majorstring非必须是否主规格 0否1是

1.1.3. 返回数据

名称类型是否必须默认值备注其他信息
codenumber非必须状态码:1000成功,非1000数据异常
messagestring非必须success
contentobject非必须
├─ spuIdnumber非必须商品ID

请求参数示例

{
    "spuId": 7032,
    "type": "1",
    "name": "Apple iPhone 13 mini",
    "album": ["https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297528112_800x800.jpeg", "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297536000_800x800.jpeg", "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297544026_800x800.jpeg", "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297544989_800x800.jpeg", "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297557122_800x800.jpeg"],
    "video": "",
    "posterType": "1",
    "poster": "",
    "description": "<p>商品描述</p>",
    "showPrice": "5199.00",
    "marketPrice": "5199.00",
    "sellSTime": "2021-09-22 16:02:00",
    "sellETime": "2021-12-31 16:02:00",
    "payerNumberBase": "88",
    "effectTimeType": "0",
    "effectTimeParam": "",
    "limitStores": ["144", "142"],
    "usageNotice": "使用需知须知",
    "spuGroupData": ["79", "78"],
    "skuList": {
        "0#0_1#0": {
            "id": "8391",
            "price": "5199",
            "deduct": "0",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#0_1#1": {
            "id": "8392",
            "price": "5999",
            "deduct": "0",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#0_1#2": {
            "id": "8393",
            "price": "7599",
            "deduct": "0",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#0_1#3": {
            "id": "-163238789543126080",
            "price": "8999",
            "deduct": "",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#1_1#0": {
            "id": "8394",
            "price": "5199",
            "deduct": "0",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#1_1#1": {
            "id": "8395",
            "price": "5999",
            "deduct": "0",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#1_1#2": {
            "id": "8396",
            "price": "7599",
            "deduct": "0",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#1_1#3": {
            "id": "-163238791802357980",
            "price": "8999",
            "deduct": "",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#2_1#0": {
            "id": "8397",
            "price": "5199",
            "deduct": "0",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#2_1#1": {
            "id": "8398",
            "price": "5999",
            "deduct": "0",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#2_1#2": {
            "id": "8399",
            "price": "",
            "deduct": "0",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#2_1#3": {
            "id": "-163238792399388900",
            "price": "8999",
            "deduct": "",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#3_1#0": {
            "id": "8400",
            "price": "5199",
            "deduct": "0",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#3_1#1": {
            "id": "8401",
            "price": "5999",
            "deduct": "0",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#3_1#2": {
            "id": "8402",
            "price": "7599",
            "deduct": "0",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#3_1#3": {
            "id": "-16323879266669110",
            "price": "8999",
            "deduct": "",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#4_1#0": {
            "id": "8403",
            "price": "5199",
            "deduct": "0",
            "stock": "99",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#4_1#1": {
            "id": "8404",
            "price": "5999",
            "deduct": " 0",
            "stock": "99",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#4_1#2": {
            "id": "8405",
            "price": "7599",
            "deduct": "0",
            "stock": "99",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#4_1#3": {
            "id": "-163238792889215420",
            "price": "8999",
            "deduct": "",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        }
    },
    "spuAttributes": [{
        "id": "6425",
        "keyName": "颜色",
        "major": "1",
        "spuValList": [{
            "id": "7855",
            "val": "星光色",
            "pic": "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297590251_800x800.jpeg"
        }, {
            "id": "7856",
            "val": "午夜色",
            "pic": "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297592385_800x800.jpeg"
        }, {
            "id": "7857",
            "val": "粉色",
            "pic": "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297601859_800x800.jpeg"
        }, {
            "id": "7858",
            "val": "蓝色",
            "pic": "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297606423_800x800.jpeg"
        }, {
            "id": "7859",
            "val": "红色",
            "pic": "https:\/\/tfile.xiaozancloud.com\/public\/agent\/66\/page\/img\/1632297610428_800x800.jpeg"
        }]
    }, {
        "id": "6426",
        "keyName": "版本",
        "major": "0",
        "spuValList": [{
            "id": "7860",
            "val": "128G",
            "pic": ""
        }, {
            "id": "7861",
            "val": "256G",
            "pic": ""
        }, {
            "id": "7862",
            "val": "512G",
            "pic": ""
        }, {
            "id": "-163238788438494080",
            "val": "1T",
            "pic": ""
        }]
    }]
}

返回示例

{
    "code": 1000,
    "message": "保存成功",
    "content": {
        "spuId": 7032
    }
}

results matching ""

    No results matching ""