列出商品#
返回店铺商品的分页视图。不活跃和缺货商品仍会列出。带有 status: invalid 的商品(包括逻辑删除的商品)将被排除。
GET https://sdkapi.ideal.house/product-import/products?shopId=<SHOP_ID>&page=1&pageSize=20
查询参数#
| 字段 | 类型 | 必填 | 约束条件 | 说明 |
|---|---|---|---|---|
shopId | string | 是 | 最多 64 个字符 | 由 Ideal House 提供的 Shop ID。 |
page | number | 否 | 大于或等于 1 的整数 | 页码。默认为 1。 |
pageSize | number | 否 | 从 1 到 100 的整数 | 每页商品数。默认为 20。 |
cURL 示例#
curl --request GET \
'https://sdkapi.ideal.house/product-import/products?shopId=shop_123&page=1&pageSize=20' \
--header 'X-Client-Id: <YOUR_CLIENT_ID>' \
--header 'X-Client-Secret: <YOUR_CLIENT_SECRET>'
响应#
{
"items": [
{
"id": "product_123",
"shopId": "shop_123",
"sku": "SKU-10001",
"productCode": "SKU-10001",
"externalProductId": "SKU-10001",
"groupId": "mirror-series-01",
"collectionId": null,
"name": "Gold Wall Mirror",
"title": "Gold Wall Mirror",
"brand": "Example Brand",
"productType": "Wall Art",
"normalizedProductType": "wall_decors",
"category": "Mirror",
"style": null,
"color": "Gold",
"availability": "active",
"imageUrl": "https://cdn.ideal.house/products/product_123.png",
"previewImageUrl": "https://cdn.ideal.house/products/product_123-preview.png",
"productUrl": "https://www.example.com/products/SKU-10001",
"attributes": {
"size": {
"width": "24.0 in",
"height": "36.0 in",
"thickness": "2.0 in"
}
},
"status": "active",
"createdAt": "2026-07-21T06:30:00.000Z",
"updatedAt": "2026-07-21T06:30:08.000Z"
}
],
"total": 1,
"page": 1,
"pageSize": 20
}
始终使用 total、page 和 pageSize 进行分页,直到检索到所有商品。不要假设单个响应包含完整目录。