修改产品
1、功能名称:修改产品
2、功能描述:修改产品
3、请求地址:https://ssl.glitzcloud.com/agent/v1/skus/skus/editskus
测试地址:http://gztest.glitzcloud.com/agent/v1/skus/skus/editskus
4、请求方式:POST
5、请求参数
| 名称 | 类型 | 必填 | 示例值 | 更多限制 | 描述 |
|---|---|---|---|---|---|
| product_sn | String | 是 | HSS-725-L-Charcoa-[biB] | 产品的sku | |
| bar_code | String | Upc2022 | 20字符,1汉字2字符 | UPC条形码 | |
| product_type | Integer | 0 | 6位 | 产品类别(该功能正在升级) | |
| product_name | String | 产品中文名称 | 产品名称 | ||
| product_name_en | String | 是 | English_name | 产品英文名称 | |
| product_worth | Decimal | 是 | 98.99 | 保留两位小数且不大于100 | 申报价值 |
| declaration_weight | Decimal | 是 | 1000.32 | 保留两位小数 | 申报重量 |
| declaration_volume | String | 是 | 10*20*30 | 长度30个字符 | 申报体积 (长*宽*高) |
| description | Text | 这是一个产品描述 | 产品描述 | ||
| customs_code | String | BC987654321 | 长度30个字符 | 海关编码 | |
| exist_battery | Tinyint | 0 | 是否危险品 (0:否1:是) | ||
| description_url | String | http://www.xxx.com/description.html | 产品描述URL | ||
| is_available | Tinyint | 1 | 10位 | 是否启用该产品 (1:是,0:否) | |
| num_in_master | Integer | 30 | 10位 | 产品外包装数量 | |
| num_in_inner | Int | 40 | 10位 | 产品内包装数量 | |
| product_imgs | Text | http://www.xxx.com/images.jpg; http://www.xxx.com/images1.jpg | 产品图片url多个用分号隔开 | ||
| packing_type | Int | 是 | 1 | 1:自带物流包装 2:裸货 | |
| brand | String | 是 | 无 | Nike | |
| container_config | json | [ { "max_qty": 1,//外箱箱入数 "length": 1,//长 "width": "2",//宽 "height": "3",//高 "weight": "4",//重量 } ] | 容器配置如果存在只做更新操作,不存在新建 |
6、请求示例
array(
'format'=>'json',
'apikey'=>'85082f5f62a811e684f500163e06045f',
'randoms'=>1234,
'sign'=>'656d6fbe6b7dec6c2e77ffe27f04bd6d',
'store_name'=>'The Warehouse USA', //仓库名称
'product_sn'=>'api_test', //产品sku编号
'bar_code'=>'upc', //条形码
'product_name'=>'api_产品中文名', //产品中文名称
'product_name_en'=>'api-产品英文名', //产品英文名称
'product_worth'=>'10000', //申报价值
'declaration_weight'=>'100', //申报重量
'declaration_volume'=>'1*2*3', //申报体积(长*宽*高)
'description'=>'产品描述', //产品描述
'customs_code'=>'海关编码', //海关编码
'exist_battery'=>'1', //是否为危险品(0否 1是)
'description_url'=>'http://www.baidu.com', //产品介绍url
'is_available'=>'1', //是否启用(1:启用0:未启用)
'num_in_master'=>'30', //产品外包装数量
'num_in_inner'=>'40', //产品内包装数量
'product_imgs'=>'chanpintupian', //产品图片(多个用分号隔开)
'brand'=>'无', //产品品牌
'container_config'=> [
{
"max_qty": 1,//外箱箱入数
"length": 1,//长
"width": "2",//宽
"height": "3",//高
"weight": "4",//重量
}
]
);
7、返回格式:JSON
8、返回示例:
正确时的返回JSON数据包如下:
{"status":200,"reqMsg":"ok","result":{"product_id":"12358"}}
错误时的返回JSON数据包如下:
{"status":"1501","reqMsg":"SKU is compulsory","result":[]}
9、返回参数说明:
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| product_id | Integer | 12358 | 产品ID |
