> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlight.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出产品

> 列出创作者可访问的商品

该接口返回当前创作者已批准合作品牌下的商品。请求必须传入 `brand_id`，并支持游标分页：`limit` 默认 `25`、最大 `100`，传入上一页返回的 `next_cursor` 作为 `cursor` 可继续读取下一页；没有更多结果时 `next_cursor` 为 `null`。

如果品牌的 `partnership_status` 不是 `approved`，接口会返回 `403 forbidden_resource`。

响应字段：

* `id`：商品 ID。
* `brand_id`：品牌 ID。
* `asin`：Amazon ASIN。
* `title`：商品标题。
* `image_url`：商品图片 URL，可能缺省。
* `detail_page_url`：Amazon 商品详情页 URL，可能缺省。
* `marketplace_id`：Amazon marketplace ID，可能缺省。
* `country_code`：Amazon 国家/地区码，可能缺省。
* `price_cents`：商品价格的最小货币单位金额，可能缺省。
* `currency`：价格币种，可能缺省。
* `status`：商品自身状态。
* `commission`：商品佣金配置，可能为 `null`。非 `null` 时包含 `type`、`rate`、`rate_bps`、`flat_cents`、`currency_code`。


## OpenAPI

````yaml GET /api/creator/v1/products
openapi: 3.1.0
info:
  title: OpenLight Public API
  version: 1.0.0
  summary: OpenLight seller and creator public API
  description: |
    Public API for external seller and creator integrations.
    Console/internal APIs remain documented separately in docs/openapi.yaml.
servers:
  - url: https://app.openlight.tech
    description: Production
  - url: http://localhost:8080
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Creator Brands
  - name: Creator Products
  - name: Creator Links
  - name: Creator Reports
  - name: Seller Brands
  - name: Seller Products
paths:
  /api/creator/v1/products:
    get:
      tags:
        - Creator Products
      summary: List products visible to the creator
      description: >
        Returns active products for a brand only when the creator token owner
        has an approved partnership with that brand. Requests for brands without
        an approved partnership return 403 `forbidden_resource`.
      operationId: listCreatorProducts
      parameters:
        - $ref: '#/components/parameters/BrandIDQuery'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Products visible to the creator
          content:
            application/json:
              schema:
                type: object
                required:
                  - products
                  - next_cursor
                properties:
                  products:
                    type: array
                    description: 商品列表。List of products.
                    items:
                      $ref: '#/components/schemas/PublicProduct'
                  next_cursor:
                    $ref: '#/components/schemas/NextCursor'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    BrandIDQuery:
      name: brand_id
      in: query
      required: true
      description: 品牌 ID。Brand ID.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      required: false
      description: >-
        每页返回数量，默认 25，最大 100。Number of items per page; defaults to 25 and maxes
        out at 100.
      schema:
        type: integer
        default: 25
        maximum: 100
    Cursor:
      name: cursor
      in: query
      required: false
      description: 上一页响应返回的下一页游标。Cursor returned as `next_cursor` by the previous page.
      schema:
        type: string
  schemas:
    PublicProduct:
      type: object
      required:
        - id
        - brand_id
        - asin
        - title
        - status
        - commission
      properties:
        id:
          type: string
          description: 商品 ID。Product ID.
        brand_id:
          type: string
          description: 品牌 ID。Brand ID.
        asin:
          type: string
          description: Amazon ASIN。Amazon ASIN.
        title:
          type: string
          description: 商品标题。Product title.
        image_url:
          type: string
          description: 商品图片 URL；可能缺省。Product image URL; may be omitted.
        detail_page_url:
          type: string
          description: >-
            Amazon 商品详情页 URL；可能缺省。Amazon product detail page URL; may be
            omitted.
        marketplace_id:
          type: string
          description: Amazon marketplace ID；可能缺省。Amazon marketplace ID; may be omitted.
        country_code:
          type: string
          description: Amazon 国家/地区码；可能缺省。Amazon country/region code; may be omitted.
        price_cents:
          type: integer
          description: >-
            商品价格的最小货币单位金额；可能缺省。Product price in minor currency units; may be
            omitted.
        currency:
          type: string
          description: 价格币种；可能缺省。Price currency; may be omitted.
        status:
          type: string
          description: 商品自身状态。Product status.
        commission:
          $ref: '#/components/schemas/PublicProductCommission'
    NextCursor:
      type:
        - string
        - 'null'
      description: >-
        下一页游标；为 null 表示没有更多结果。Cursor for the next page; null means there are no
        more results.
    PublicProductCommission:
      type:
        - object
        - 'null'
      description: >-
        商品佣金配置；没有可用佣金时为 null。Product commission configuration; null when no
        commission is available.
      required:
        - type
        - rate
        - rate_bps
        - flat_cents
        - currency_code
      properties:
        type:
          type: string
          description: 佣金类型。Commission type.
        rate:
          type: number
          description: 佣金比例。Commission rate.
        rate_bps:
          type: integer
          description: >-
            佣金比例的基点值；10000 表示 100%。Commission rate in basis points; 10000 means
            100%.
        flat_cents:
          type: integer
          description: 固定佣金的最小货币单位金额。Flat commission amount in minor currency units.
        currency_code:
          type: string
          description: 固定佣金币种。Currency code for flat commission.
    PublicErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          description: 错误详情。Error detail.
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: 机器可读错误码。Machine-readable error code.
              examples:
                - invalid_api_token
                - forbidden_resource
            message:
              type: string
              description: 面向开发者的错误说明。Developer-facing error message.
  responses:
    BadRequest:
      description: Invalid request or pagination parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicErrorResponse'
          examples:
            invalid_request:
              summary: Invalid request
              value:
                error:
                  code: invalid_request
                  message: invalid_request
            invalid_pagination:
              summary: Invalid pagination
              value:
                error:
                  code: invalid_pagination
                  message: invalid_pagination
    Unauthorized:
      description: Missing or invalid API token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicErrorResponse'
    Forbidden:
      description: Token cannot access the requested role or resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicErrorResponse'
          examples:
            forbidden_resource:
              summary: Forbidden resource
              value:
                error:
                  code: forbidden_resource
                  message: forbidden_resource
            ads_not_connected:
              summary: Ads not connected
              value:
                error:
                  code: ads_not_connected
                  message: ads_not_connected
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````