HUHU API登录 / 我的账户
GET/api/v1/storefront/products?page=1&page_size=10

权限:公开读取

只显示已上架商品。价格保留字符串精度。policy 包含商品种类、交付格式、数量限制与售后说明,不包含库存内容。

参数类型 / 必填说明
page整数 · 可选页码,默认 1
page_size整数 · 可选5 / 10 / 20 / 30 / 40 / 50 / 100,默认 10
q字符串 · 可选商品名称或 SKU,最多 160 字符
product_idUUID · 可选指定商品

请求示例


查询参数:
{
  "page": 1,
  "page_size": 10
}

响应示例

HTTP 200
Content-Type: application/json

{
  "data": {
    "items": [
      {
        "id": "00000000-0000-4000-8000-000000000001",
        "sku": "DEMO",
        "title": "示例数字商品",
        "description": "示例说明",
        "asset": "USDT",
        "price": "10",
        "available": 3,
        "policy": {
          "schema_version": 1,
          "kind": "generic",
          "category": "",
          "platform": "",
          "region": "",
          "inventory_format": null,
          "min_quantity": 1,
          "max_quantity": 100,
          "after_sales": "",
          "after_sales_policy": {
            "replacement_enabled": false,
            "refund_after_reveal": false,
            "window_hours": 168
          }
        }
      }
    ],
    "total": 1,
    "page": 1,
    "page_size": 10
  },
  "meta": {
    "request_id": "example-request-id"
  }
}
通用响应与错误

成功响应包含 data 和 meta.request_id。金额字段均为十进制字符串。受保护商城接口使用 IAM OIDC 令牌、huhuapi.api scope 和对应业务授权。

401:登录无效;403:权限不足;409:版本或幂等请求冲突;422:参数或游标无效;429:请求限额;503:功能未开启。

{
  "error": {
    "code": "COMMERCE_DISABLED",
    "message": "This commerce feature is not enabled",
    "request_id": "example-request-id"
  }
}