商品搜索接口,提供按不同条件搜索合适商品的分页接口。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
linkedmall:SearchProducts | list | *全部资源 * |
| 无 |
请求语法
POST /opensaas-s2b/opensaas-s2b-biz-trade/v2/selectionPool/selection-group/product/command/searchProduct HTTP/1.1
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
body | object | 否 | 请求 Body | |
purchaserId | string | 是 | 采购方 id | PIDxxxx |
categoryIds | array | 否 | 类目 id 集合 | |
string | 否 | 类目 id | xxx | |
productStatus | string | 否 | 商品状态 枚举值:
| Sellable |
productName | string | 否 | 商品名称 | 绿植 |
productId | string | 否 | 商品 Id | xxxxxxx |
lmItemId | string | 否 | LM 商品 id | xxx-xxxxx |
inGroup | boolean | 否 | 是否入库 枚举值:
| true |
inventoryRiskLevel | string | 否 | 库存风险等级 枚举值:
| Low |
distributionLowPrice | long | 否 | 经销采购价下限 | 100(单位:分) |
distributionHighPrice | long | 否 | 经销采购价上限 | 100(单位:分) |
distributionLowPriceRatio | long | 否 | 经销溢价率下限 | 133(1.33%) |
distributionHighPriceRatio | long | 否 | 经销溢价率上限 | 244(2.44%) |
lowMarkPrice | long | 否 | 划线价下限 | 100(单位:分) |
highMarkPrice | long | 否 | 划线价上限 | 100(单位:分) |
lowPrice | long | 否 | 建议零售价下限 | 100(单位:分) |
highPrice | long | 否 | 建议零售价上限 | 100(单位:分) |
platform | string | 否 | 来源平台 枚举值:
| Taobao(来源淘宝) Tmall(来源天猫) Cbu(来源1688分销货盘) |
brandName | string | 否 | 品牌名称 | 绿植 |
inGroupStartTime | string | 否 | 入库起始时间 | 2025-01-02 12:23:34 (yyyy-MM-dd HH:mm:ss) |
inGroupEndTime | string | 否 | 入库结束时间 | 2025-01-02 12:23:34 (yyyy-MM-dd HH:mm:ss) |
modifyStartTime | string | 否 | 修改起始时间 | 2025-01-02 12:23:34 (yyyy-MM-dd HH:mm:ss) |
modifyEndTime | string | 否 | 修改结束时间 | 2025-01-02 12:23:34 (yyyy-MM-dd HH:mm:ss) |
createStartTime | string | 否 | 创建起始时间 | 2025-01-02 12:23:34 (yyyy-MM-dd HH:mm:ss) |
createEndTime | string | 否 | 创建结束时间 | 2025-01-02 12:23:34 (yyyy-MM-dd HH:mm:ss) |
tradeModeAndCredit | string | 否 | 销售模式 枚举值:
| JingXiao |
taxRate | string | 否 | 税率 说明
枚举值:
| Rate0 |
pageSize | integer | 是 | 分页大小 说明
| 10 |
pageNumber | integer | 是 | 页码 | 1 |
orderBy | string | 否 | 排序字段 说明
枚举值:
| soldQuantity(按销量排序,不填默认创建时间倒序) |
orderDirection | string | 否 | 排序方向 说明
枚举值:
| ASC |
返回参数
{
"requestId": null,
"total": 1,
"products": [
{
"picUrl": "//img.alicdn.com/imgextra/i4/xxx.jpg",
"productName": "xxx",
"productId": "xxxx",
"lmItemId": "xxx-xxx",
"distributionPrice": "¥0.01 ~ ¥0.02",
"diffPrice": "¥0.00 ~ ¥0.00",
"distributionPriceRatio": "0.00% ~ 0.00%",
"platformPrice": "¥0.01 ~ ¥0.02",
"platformReservePrice": "¥0.01 ~ ¥0.02",
"soldQuantity": "1",
"inventoryRiskLevel": "Low",
"externalPlatformType": "Tmall",
"shopName": "xxxx",
"categoryChain": [
{
"categoryId": 50050359,
"name": "水产肉类/新鲜蔬果/熟食",
"parentId": 0,
"level": 1,
"isLeaf": false
},
{
"categoryId": 50050372,
"name": "生肉/肉制品",
"parentId": 50050359,
"level": 2,
"isLeaf": false
},
{
"categoryId": 50050667,
"name": "鸡肉类",
"parentId": 50050372,
"level": 3,
"isLeaf": false
},
{
"categoryId": 124222016,
"name": "整鸡/整鸡制品",
"parentId": 50050667,
"level": 4,
"isLeaf": true
}
],
"bandName": "xxx",
"canSell": true,
"canNotSellReason": null,
"tradeMode": "JingXiao",
"credit": [
"Credit90"
],
"invoiceType": "HasInvoice",
"taxRate": 0,
"taxCode": "xxx",
"gmtCreate": "2025-01-21 17:11:04",
"inGroupTime": "2025-01-21 17:12:09",
"gmtModified": "2025-01-21 17:11:04",
"inGroup": true
}
]
}
示例
正常返回示例
JSON
格式
{
"total": 3,
"products": [
{
"picUrl": "https://img.alicdn.com/xxx.jpg",
"productName": "绿植",
"productId": "xxxxx",
"lmItemId": "xxx-xxxxx",
"distributionPrice": "¥0.05 ~ ¥21.10",
"diffPrice": "¥-9998.95 ~ ¥-9977.90",
"distributionPriceRatio": "-100.00% ~ -99.79%",
"platformPrice": "¥9999.00 ~ ¥9999.00",
"platformReservePrice": "¥9999.00 ~ ¥9999.00",
"soldQuantity": 100,
"inventoryRiskLevel": "Low",
"externalPlatformType": "Taobao(来源淘宝)\nTmall(来源天猫)\nCbu(来源1688分销货盘)",
"shopName": "xxx",
"categoryChain": [
{
"categoryId": 201792301,
"name": "名称测试",
"parentId": 0,
"isLeaf": false,
"level": 1
}
],
"bandName": "绿植",
"canSell": true,
"canNotSellReason": "库存不足",
"tradeMode": "JingXiao",
"credit": [
"Credit90"
],
"invoiceType": "HasInvoice",
"taxRate": 0,
"taxCode": 3040203000000000000,
"gmtCreate": "2025-01-02 12:23:34\n(yyyy-MM-dd HH:mm:ss)\n",
"inGroupTime": "2025-01-02 12:23:34\n(yyyy-MM-dd HH:mm:ss)\n",
"gmtModified": "2025-01-02 12:23:34\n(yyyy-MM-dd HH:mm:ss)\n",
"inGroup": true
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2025-02-19 | API 内部配置变更,不影响调用 | 查看变更详情 |