编辑更新SPV
接口描述
通过该接口更新SPV模块信息,请注意更新时请求body中的所有字段必填做替换资源操作。
URL
/ark/open_api/v1/spv/{spv_id}
URL Parameter
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
spv_id | String | Yes | 已存在的SPV ID |
Method
PUT
Request Body (content-type:application/json;charset=utf8)
请务必按以下字段要求添加数据,以免系统报错。
{
"qty": 1,
"unit": "件",
"net_weight": 25,
"gross_weight": 45,
"barcode": "test01",
"barcode_type": "upc",
"country": "中国",
"shelf_life":270,
"non_desc_variants":[
{
"id": "56d84f9a805d891008705276",
"value": "S",
"value_id": "56d84f9a805d891008705666"
}
]
}
Request Body Parameters
名称 | 类型 | 说明 |
---|---|---|
barcode | String | 商品条形码,只能输入“字母 数字 / -” |
barcode_type | String | 条码类型 |
non_desc_variants | Array | SPV规格, 无SPV规格可不填 |
id | String | SPV规格id |
value | String | SPV规格值 |
net_weight | Float | 净重 |
gross_weight | Float | 毛重 |
country | String | 原产国 |
qty | Int | 件数,内含数量 |
unit | String | 单位 |
shelf_life | Int | 保质期(天) |
value_id | String | 属性值id,若传入该值则value不生效,以value_id为准;若不使用属性值id请不要传入该字段。 |
Response 200 (application/json;charset=utf-8)
{
"error_code": 0,
"data": {
"spvs": [
{
"spu_id": "58e5b5f5af0a672afacf4564",
"pending_changes": null,
"import_cost": 123,
"net_weight": 25,
"qty": 1,
"spl_id": "58e5b5f5af0a672afacf4565",
"id": "58e5b5f6af0a672afacf4568",
"unit": "件",
"barcode_type": "upc",
"non_desc_variants": [
{
"ename": "Shoes Size",
"id": "56d84f9a805d891008705276",
"value": "S",
"name": "尺码"
}
],
"state": 1,
"usage": "test modified",
"shelf_life": 270,
"ingredient": "test modified",
"status": 2,
"customs_photos_urls": [
"http://img.xiaohongshu.com/items/3135edc58855dcf047fc39161ee9f687@2o.jpg"
],
"barcode": "test01",
"gross_weight": 45,
"customs_photos": [
{
"path": "items/d84d018842bbff888a8a132fcf445769",
"link": "http://img.xiaohongshu.com/items/d84d018842bbff888a8a132fcf445769",
"name": "testv1all002-1490980823567",
"extension": ".jpg"
}
],
"manufacturer": "test modified",
"customs_specification": "test modified",
"country": "中国"
}
],
"items": [],
"spls": [],
"spus": [],
"spl_items": []
},
"error_msg": null,
"success": true
}
Response parameters
名称 | 类型 | 说明 |
---|---|---|
pending_changes | Array | 待审核的更改信息 |
spus | Array | SPU模块信息 |
spls | Array | SPL模块信息 |
spl_items | Array | SPL ITEM模块信息 |
spvs | Array | SPV模块信息 |
id | String | SPV ID |
items | Array | ITEM模块信息 |
补充说明
- state & status 具体状态码请参考商品状态码
Copyright © 2014-2018 行吟信息科技(上海)有限公司