1.1. 商品sku添加/修改/删除

1.1.1. 基本信息

Path: /v1/spu/skuSet

Method: POST

接口描述:

1.1.2. 请求参数

Headers

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

Body

名称类型是否必须默认值备注其他信息
spuIdstring必须商品spuId
showPricestring必须展示价格
marketPricestring必须市场价格
skuListobject必须商品sku列表
├─ 0#0_1#0object非必须0#0_1#0 第一个规格的第一个属性值+第二个规格的第一个属性值,即颜色:星光色+版本:128G
├─ idstring非必须传0
├─ pricestring非必须商品sku价格,价格必须大于0
├─ 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非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#0_1#2object非必须0#0_1#0 第一个规格的第一个属性值+第二个规格的第三个属性值,即颜色:星光色+版本:512GGG
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#1_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#1_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#1_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#2_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#2_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#2_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#3_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#3_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#3_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#4_1#0object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#4_1#1object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
├─ 0#4_1#2object非必须
├─ idstring非必须
├─ pricestring非必须
├─ stockstring非必须
├─ commissionstring非必须
├─ marketPricestring非必须
├─ buyLimitPerstring非必须
├─ proxyStandPricestring非必须
spuAttributesobject []必须商品规格数据数组,商品至少存在一个规格,至多三个规格

item 类型: object

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

item 类型: object

├─ idstring必须spuValId,存在则回传,不存在则传0或传负数
├─ valstring必须属性值,长度为1至30
├─ picstring必须属性展示图片,主规格每个值必须配置图片
├─ majorstring非必须是否主规格 0否1是

1.1.3. 返回数据

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

添加sku示例:

{
    "spuId": 7032,
    "showPrice": "5199",
    "marketPrice": "5199",
    "skuList": {
        "0#0_1#0": {
            "id": "8391",
            "price": "5199",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#0_1#1": {
            "id": "8392",
            "price": "5999",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#0_1#2": {
            "id": "8393",
            "price": "7599",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#0_1#3": {
            "id": "-163238789543126080",
            "price": "8999",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#1_1#0": {
            "id": "8394",
            "price": "5199",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#1_1#1": {
            "id": "8395",
            "price": "5999",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#1_1#2": {
            "id": "8396",
            "price": "7599",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#1_1#3": {
            "id": "-163238791802357980",
            "price": "8999",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#2_1#0": {
            "id": "8397",
            "price": "5199",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#2_1#1": {
            "id": "8398",
            "price": "5999",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#2_1#2": {
            "id": "8399",
            "price": "",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#2_1#3": {
            "id": "-163238792399388900",
            "price": "8999",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#3_1#0": {
            "id": "8400",
            "price": "5199",
            "stock": "100",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#3_1#1": {
            "id": "8401",
            "price": "5999",
            "stock": "100",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#3_1#2": {
            "id": "8402",
            "price": "7599",
            "stock": "100",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#3_1#3": {
            "id": "-16323879266669110",
            "price": "8999",
            "stock": "100",
            "commission": "30",
            "marketPrice": "8999",
            "buyLimitPer": "1",
            "proxyStandPrice": "8999"
        },
        "0#4_1#0": {
            "id": "8403",
            "price": "5199",
            "stock": "99",
            "commission": "10",
            "marketPrice": "5199",
            "buyLimitPer": "1",
            "proxyStandPrice": "5199"
        },
        "0#4_1#1": {
            "id": "8404",
            "price": "5999",
            "stock": "99",
            "commission": "15",
            "marketPrice": "5999",
            "buyLimitPer": "1",
            "proxyStandPrice": "5999"
        },
        "0#4_1#2": {
            "id": "8405",
            "price": "7599",
            "stock": "99",
            "commission": "20",
            "marketPrice": "7599",
            "buyLimitPer": "1",
            "proxyStandPrice": "7599"
        },
        "0#4_1#3": {
            "id": "-163238792889215420",
            "price": "8999",
            "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": ""
        }]
    }]
}

results matching ""

    No results matching ""