列出本目录商品,包含草稿,默认不含已软删除
GET/api/v1/catalogs/{id}/products
| 认证 | 请求头 Authorization: Bearer <访问令牌>,访问令牌用设备码换取,不要向用户要密码、短信验证码或 API Key |
|---|---|
| 权限 | 商家,需要 product:read 才能查看目录和商品 |
路径参数
path
idstring必填目录 ID
路径示例
/api/v1/catalogs/cat_example/products查询参数
application/json
查询参数都可省略
statusenum<string>按上下架过滤
可选值: onoff
deletedenum<string>要看已软删除商品时传 true
可选值: true
limitinteger每页数量
cursorstring上一页返回的 next_cursor
查询示例
status=on&deleted=true&limit=1&cursor=string响应
200
application/json
成功时 code 为 200,资源在 data
itemsobject[]必填商家商品,含草稿
items[].idstring必填商品 ID,以 prd_ 开头
items[].catalog_idstring必填目录 ID
items[].titlestring必填商品名称
items[].statusenum<string>必填上架状态
可选值: onoff
items[].coverstring | null必填封面地址
items[].fieldsobject必填目录字段值
items[].schema_revisioninteger必填字段定义版本
items[].created_atstring必填创建时间,ISO-8601
items[].updated_atstring必填更新时间,ISO-8601
items[].deleted_atstring | null必填软删除时间,未删除时为 null
items[].axes[].idstring必填规格轴 ID
items[].axes[].keystring必填规格轴 key
items[].axes[].labelstring必填规格轴名称
items[].axes[].positioninteger必填规格轴顺序
items[].variants[].idstring必填规格 ID
items[].variants[].skustring | null必填SKU
items[].variants[].option_valuesobject必填规格轴取值
items[].variants[].priceinteger必填整数分
items[].variants[].stockinteger | null必填库存,null 表示不限
items[].variants[].statusenum<string>必填是否可售
可选值: onoff
items[].variants[].coverstring | null必填规格封面
items[].variants[].deletedboolean必填是否已软删除
next_cursorstring | null必填没有下一页时为 null
响应示例
{
"items": [
{
"id": "prd_example",
"catalog_id": "cat_example",
"title": "示例",
"status": "on",
"cover": "string",
"fields": {},
"schema_revision": 1,
"created_at": "2026-05-16T00:00:00.000Z",
"updated_at": "2026-05-16T00:00:00.000Z",
"deleted_at": "2026-05-16T00:00:00.000Z",
"axes": [
{
"id": "id_example",
"key": "weight_g",
"label": "示例",
"position": 1
}
],
"variants": [
{
"id": "var_example",
"sku": "string",
"option_values": {},
"price": 159900,
"stock": null,
"status": "on",
"cover": "string",
"deleted": true
}
]
}
],
"next_cursor": "string"
}