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

# List Clicks

> List affiliate clicks for your account over a datetime window.

Defaults to the last 30 days ending now. Maximum window is 90 days. Pass an offset-aware ISO datetime to express local time (e.g. last 6 hours). Returns a summary plus a paginated list of click events (most recent first).



## OpenAPI

````yaml get /v1/reporting/clicks
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.trychannel3.com
    description: Production environment
security: []
paths:
  /v1/reporting/clicks:
    get:
      tags:
        - v1
      summary: List Clicks
      description: >-
        List affiliate clicks for your account over a datetime window.


        Defaults to the last 30 days ending now. Maximum window is 90 days. Pass
        an offset-aware ISO datetime to express local time (e.g. last 6 hours).
        Returns a summary plus a paginated list of click events (most recent
        first).
      operationId: list_clicks_v1_reporting_clicks_get
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Inclusive start of the window (ISO 8601 datetime with optional
              offset, e.g. 2026-08-01T00:00:00-04:00). Offset-aware values are
              converted to UTC; naive values are treated as UTC.
            title: Start Date
          description: >-
            Inclusive start of the window (ISO 8601 datetime with optional
            offset, e.g. 2026-08-01T00:00:00-04:00). Offset-aware values are
            converted to UTC; naive values are treated as UTC.
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Inclusive end of the window (ISO 8601 datetime with optional
              offset, e.g. 2026-08-01T23:59:59-04:00). Offset-aware values are
              converted to UTC; naive values are treated as UTC.
            title: End Date
          description: >-
            Inclusive end of the window (ISO 8601 datetime with optional offset,
            e.g. 2026-08-01T23:59:59-04:00). Offset-aware values are converted
            to UTC; naive values are treated as UTC.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number (1-indexed).
            default: 1
            title: Page
          description: Page number (1-indexed).
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page (max 100).
            default: 20
            title: Limit
          description: Items per page (max 100).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClicksResponse'
        '400':
          description: Invalid date range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Date range cannot exceed 90 days
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing_key:
                  summary: Missing API Key
                  value:
                    detail: >-
                      Unauthorized. Missing authentication key. Make sure to
                      attach an x-api-key with your request. Need help? Reach
                      out to support@trychannel3.com.
                invalid_key:
                  summary: Invalid API Key
                  value:
                    detail: >-
                      API key was provided but is invalid. Need help? Reach out
                      to support@trychannel3.com.
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: >-
                  You have used all of your free credits. Add a payment method
                  to continue.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail:
                  - loc:
                      - body
                      - query
                    msg: field required
                    type: value_error.missing
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Internal Server Error
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Channel3 from '@channel3/sdk';

            const client = new Channel3({
              apiKey: process.env['CHANNEL3_API_KEY'], // This is the default and can be omitted
            });

            const clicks = await client.reporting.clicks.list();

            console.log(clicks.summary.total_clicks);
            for (const click of clicks.items) {
              console.log(click.id, click.timestamp, click.product?.title);
            }
        - lang: Python
          source: |-
            import os
            from channel3_sdk import Channel3

            client = Channel3(
                api_key=os.environ.get("CHANNEL3_API_KEY"),  # This is the default and can be omitted
            )
            clicks = client.reporting.clicks.list()
            print(clicks.summary.total_clicks)
            for click in clicks.items:
                print(click.id, click.timestamp, click.product)
        - lang: cURL
          source: |-
            curl "https://api.trychannel3.com/v1/reporting/clicks" \
              -H "x-api-key: $CHANNEL3_API_KEY"
components:
  schemas:
    ClicksResponse:
      properties:
        summary:
          $ref: '#/components/schemas/ClicksSummary'
        items:
          items:
            $ref: '#/components/schemas/Click'
          type: array
          title: Items
        page:
          type: integer
          title: Page
          description: Current page (1-indexed).
        limit:
          type: integer
          title: Limit
          description: Page size.
        total_count:
          type: integer
          title: Total Count
          description: Total matching clicks in the date range.
        has_more:
          type: boolean
          title: Has More
          description: Whether more pages are available.
        start_date:
          type: string
          format: date-time
          title: Start Date
          description: Inclusive start of the resolved query window.
        end_date:
          type: string
          format: date-time
          title: End Date
          description: Inclusive end of the resolved query window.
      type: object
      required:
        - summary
        - items
        - page
        - limit
        - total_count
        - has_more
        - start_date
        - end_date
      title: ClicksResponse
      description: Paginated clicks for a vendor over a date range.
    ErrorResponse:
      properties:
        detail:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
    ClicksSummary:
      properties:
        total_clicks:
          type: integer
          title: Total Clicks
          description: Total clicks in the date range.
      type: object
      required:
        - total_clicks
      title: ClicksSummary
      description: Aggregate click stats for the requested date range.
    Click:
      properties:
        id:
          type: string
          title: Id
          description: Click event ID.
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: When the click occurred, returned with a UTC offset (Z).
        product:
          anyOf:
            - $ref: '#/components/schemas/AffiliateProduct'
            - type: 'null'
          description: Matched product, if known.
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: Click city, if available.
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Click country, if available.
      type: object
      required:
        - id
        - timestamp
      title: Click
      description: A single affiliate click event.
    AffiliateProduct:
      properties:
        id:
          type: string
          title: Id
          description: Canonical product ID.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Product title.
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
          description: Product image URL.
      type: object
      required:
        - id
      title: AffiliateProduct
      description: Compact product reference on click/transaction items.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````