添加产品
1、功能名称:添加sku
2、功能描述:添加一个SKU产品
3、请求地址:https://ssl.glitzcloud.com/agent/v1/skus/skus/addskus
测试地址:http://gztest.glitzcloud.com/agent/v1/skus/skus/addskus
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 | Float | 是 | 98.99 | 保留两位小数且不大于100 | 申报价值 |
| declaration_weight | Float | 是 | 1000.3232 | 保留四位小数 | 申报重量(镑lbs) |
| declaration_volume | String | 是 | 10.0000*20.0000*30.0000 | 长度30个字符 | 申报体积(英寸inch) (长*宽*高) |
| description | String | 这是一个产品描述 | 产品描述 | ||
| customs_code | String | BC987654321 | 长度30个字符 | 海关编码 | |
| exist_battery | Integer | 0 | 是否危险品 (0:否1:是) | ||
| description_url | String | http://www.xxx.com/description.html | 产品描述URL | ||
| is_available | Integer | 1 | 10位 | 是否启用该产品 (1:是,0:否) | |
| num_in_master | Integer | 30 | 10位 | 产品外包装数量 | |
| num_in_inner | Integer | 40 | 10位 | 产品内包装数量 | |
| product_imgs | String | http://www.xxx.com/images.jpg; http://www.xxx.com/images1.jpg | 产品图片url多个用分号隔开 | ||
| packing_type | Integer | 是 | 1 | 1:自带物流包装 2:裸货 | |
| brand | String | 是 | 无 | Nike | |
| container_config | Array | [ { "max_qty": 1, "length": 1, "width": "2", "height": "3", "weight": "4" } ] | 容器配置。max_qty:外箱箱入数;length:长;width:宽;height:高;weight:重量 |
6、请求示例
{
"format": "json",
"apikey": "85082f5f62a811e684f500163e06045f",
"randoms": 1234,
"sign": "656d6fbe6b7dec6c2e77ffe27f04bd6d",
"store_name": "The Warehouse USA",
"product_sn": "api_test",
"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",
"description_url": "http://www.baidu.com",
"is_available": "1",
"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 |