> ## 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.

# 列出报表

> 查询当前创作者 Token 可见的报表数据

使用该接口查询当前创作者 Token owner 可见的报表行。每行按日期、商品、归因链接和 Amazon 站点聚合，可用于接入方展示链接表现、核对订单和佣金。

必须传入 `start` 和 `end`，日期格式为 `YYYY-MM-DD`。可使用 `brand_id`、`product_id`、`asin`、`link_id`、`marketplace` 进一步筛选；`marketplace` 使用 Amazon 国家/地区码，例如 `US`、`UK`、`DE`。

分页使用 `limit` 和 `cursor`：`limit` 默认 `100`，最大 `500`；当响应里的 `next_cursor` 不为 `null` 时，把它作为下一次请求的 `cursor` 继续读取。

响应字段：

* `date`：报表日期。
* `brand_id`：品牌 ID。
* `product_id`：商品 ID。
* `asin`：Amazon ASIN。
* `marketplace`：Amazon 国家/地区码，例如 `US`、`UK`、`DE`。
* `currency`：销售额和佣金的币种。
* `sales_cents`：销售额，单位为最小货币单位。
* `commission_cents`：佣金金额，单位为最小货币单位。
* `commission_status`：佣金结算状态。
* `orders`：订单数。
* `units_sold`：售出件数。
* `clicks`：点击数。
* `detail_page_views`：商品详情页浏览数。
* `add_to_carts`：加购数。
* `link.id`：归因链接 ID。
* `link.tracking_id`：创建链接时传入的客户侧追踪标识；未传入时为空字符串。
* `link.short_url`：可分发的归因短链接 URL。
* `link.destination_url`：归因链接跳转的 Amazon 落地页 URL。


## OpenAPI

````yaml GET /api/creator/v1/reports
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/reports:
    get:
      tags:
        - Creator Reports
      summary: List creator report rows
      description: >
        Returns report rows visible to the current creator token owner. Rows are
        grouped by date, product, attribution link, and Amazon marketplace so
        integrations can track link performance and reconcile commissions.
      operationId: listCreatorReports
      parameters:
        - name: start
          in: query
          required: true
          description: 开始日期，格式为 YYYY-MM-DD。Start date in YYYY-MM-DD format.
          schema:
            type: string
            format: date
        - name: end
          in: query
          required: true
          description: 结束日期，格式为 YYYY-MM-DD。End date in YYYY-MM-DD format.
          schema:
            type: string
            format: date
        - name: limit
          in: query
          required: false
          description: >-
            每页返回报表行数，默认 100，最大 500。Number of report rows per page; defaults to
            100 and maxes out at 500.
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 500
        - name: cursor
          in: query
          required: false
          description: 上一页响应返回的下一页游标。Cursor returned as `next_cursor` by the previous page.
          schema:
            type: string
        - name: brand_id
          in: query
          required: false
          description: 按品牌 ID 筛选。Filter by brand ID.
          schema:
            type: string
        - name: product_id
          in: query
          required: false
          description: 按商品 ID 筛选。Filter by product ID.
          schema:
            type: string
        - name: asin
          in: query
          required: false
          description: 按 Amazon ASIN 筛选。Filter by Amazon ASIN.
          schema:
            type: string
        - name: link_id
          in: query
          required: false
          description: 按归因链接 ID 筛选。Filter by attribution link ID.
          schema:
            type: string
        - name: marketplace
          in: query
          required: false
          description: >-
            按 Amazon 国家/地区码筛选，例如 US、UK、DE。Filter by Amazon marketplace country
            or region code, such as US, UK, or DE.
          schema:
            type: string
      responses:
        '200':
          description: Creator report rows
          content:
            application/json:
              schema:
                type: object
                required:
                  - reports
                  - next_cursor
                properties:
                  reports:
                    type: array
                    description: 报表行列表。List of report rows.
                    items:
                      $ref: '#/components/schemas/PublicCreatorReport'
                  next_cursor:
                    $ref: '#/components/schemas/NextCursor'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    PublicCreatorReport:
      type: object
      required:
        - date
        - brand_id
        - product_id
        - asin
        - marketplace
        - currency
        - sales_cents
        - commission_cents
        - commission_status
        - orders
        - units_sold
        - clicks
        - detail_page_views
        - add_to_carts
        - link
      properties:
        date:
          type: string
          format: date
          description: 报表日期。Report date.
        brand_id:
          type: string
          description: 品牌 ID。Brand ID.
        product_id:
          type: string
          description: 商品 ID。Product ID.
        asin:
          type: string
          description: Amazon ASIN。Amazon ASIN.
        marketplace:
          type: string
          description: >-
            Amazon 国家/地区码，例如 US、UK、DE。Amazon country/region code, such as US,
            UK, or DE.
        currency:
          type: string
          description: 销售额和佣金金额币种。Currency for sales and commission amounts.
        sales_cents:
          type: integer
          description: 销售额的最小货币单位金额。Sales amount in minor currency units.
        commission_cents:
          type: integer
          description: 佣金的最小货币单位金额。Commission amount in minor currency units.
        commission_status:
          type: string
          description: 佣金结算状态。Commission settlement status.
        orders:
          type: integer
          description: 订单数。Number of orders.
        units_sold:
          type: integer
          description: 售出件数。Number of units sold.
        clicks:
          type: integer
          description: 点击数。Number of clicks.
        detail_page_views:
          type: integer
          description: 商品详情页浏览数。Number of detail page views.
        add_to_carts:
          type: integer
          description: 加购数。Number of add-to-cart events.
        link:
          $ref: '#/components/schemas/PublicCreatorReportLink'
    NextCursor:
      type:
        - string
        - 'null'
      description: >-
        下一页游标；为 null 表示没有更多结果。Cursor for the next page; null means there are no
        more results.
    PublicCreatorReportLink:
      type: object
      required:
        - id
        - tracking_id
        - short_url
        - destination_url
      properties:
        id:
          type: string
          description: 归因链接 ID。Attribution link ID.
        tracking_id:
          type: string
          description: >-
            创建链接时传入的客户侧追踪标识；未传入时为空字符串。Client-side tracking tag supplied at link
            creation; empty string when omitted.
        short_url:
          type: string
          description: 可分发的归因短链接 URL。Shareable attribution short URL.
        destination_url:
          type: string
          description: >-
            归因链接跳转的 Amazon 落地页 URL。Amazon landing page URL for the attribution
            link.
    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

````