通过商品编号新增/修改商品信息 公开
支持场景
已支持:操作商品的品牌、品类、名称、编号、包装比例、附件……
API描述
API描述:操作商品的详细信息
请求流程
- 在超8平台中申请第三方系统的应用Access Key和密钥(线下)。
- 第三方系统根据应用Access Key和密钥向系统发起Access Token申请【如何获取token】。
- 三方系统调用防伪领域服务的开放接口进行数据对接。
具体请求请参阅:
请参阅 请求流程
请求信息
协议 |
HTTPS |
请求方法 |
POST |
请求路径 |
/ps/v1/open/product/add-upd-product |
请参阅 通用请求头
请求参数
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
attachments | object [] | 非必须 | | 商品附件 | |
attachmentPath | string | 非必须 | | 附件地址 | |
|
brandId | string | 非必须 | | 商品品牌编号 | |
brandName | string | 非必须 | | 商品品牌名称 | |
f1 | string | 非必须 | | f1 | |
f2 | string | 非必须 | | f2 | |
f3 | string | 非必须 | | f3 | |
f4 | string | 非必须 | | f4 | |
f5 | string | 非必须 | | f5 | |
f6 | string | 非必须 | | f6 | |
f7 | string | 非必须 | | f7 | |
f8 | string | 非必须 | | f8 | |
f9 | string | 非必须 | | f9 | |
f10 | string | 非必须 | | f10 | |
packScaleStr | string | 非必须 | | 包装比例 | 1(箱):2(盒):2(个) |
productCategory | string | 非必须 | | 商品类别编号 | |
productId | string | 非必须 | | 商品id | |
productModel | string | 非必须 | | 商品型号 | |
productName | string | 必须 | | 商品名称 | |
productNo | string | 必须 | | 商品编号 | |
productStandard | string | 非必须 | | 商品规格 | |
remark | string | 非必须 | | 备注 | |
shelfLife | string | 非必须 | | 保质期 | 填写数字,如果需要控制商品的质保期
请和【质保期单位】联合传输 |
shelfLifeUnit | string | 非必须 | | 保质期单位 | 1:年,2:月;3:天 |
flag | int | 非必须 | | 启用禁用 | 1:启用 0:禁用 |
返回消息体
名称 |
类型 |
是否必须 |
默认值 |
备注 |
其他信息 |
code |
integer |
非必须 |
|
错误码 |
format: int32 |
data |
string |
非必须 |
|
数据 |
|
message |
string |
非必须 |
|
消息内容 |
|
timestamp |
integer |
非必须 |
|
时间戳 |
format: int64 |
traceId |
string |
非必须 |
|
链路追踪ID |
|
请求示例
响应示例
异常示例
返回码
返回码 |
描述 |
解决方案 |
21040120 |
商品规格长度应为2到50 |
|
21040121 |
商品型号长度应为2到30 |
|
21040127 |
packScale与包装比例不符 |
|
21040062 |
生码标记号已达到最大量,请联系管理员! |
|
21040063 |
保质期单位不正确 |
|
21040122 |
保质期请输入长度9位内的正整数 |
|
21040065 |
包装比例不正确 |
|
21040055 |
商品编号重复 |
|
21040053 |
商品分类不存在 |
|
21040054 |
品牌不存在 |
|