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

# Get a report

> Returns aggregated data for the specified report type:
- `overview` — workspace-level KPIs
- `affiliates` — per-affiliate breakdown
- `campaigns` — per-campaign breakdown (conversions, revenue, and
  non-reversed commission totals with the pending share broken out)

Use `since` / `until` (ISO 8601) to scope the time window.




## OpenAPI

````yaml /openapi.yaml get /v1/reports/{report}
openapi: 3.1.0
info:
  title: Affixo API
  version: 1.0.0
  description: |
    The Affixo REST API for affiliate program management and server-to-server
    conversion tracking.

    All requests authenticate with a workspace key (`sa_live_…`) as a Bearer
    token. Scopes: `read` / `write` / `track` / `*`.

    Rate limit: 600 req/min per key (enforced at the edge).
servers:
  - url: https://go.affixo.dev
    description: Production
security: []
tags:
  - name: Affiliates
    description: Manage affiliates (workspace key)
  - name: Campaigns
    description: Create and configure campaigns + commission rules (workspace key)
  - name: Links
    description: Manage referral links (workspace key)
  - name: Risk
    description: AI risk assessments for fraud triage (workspace key)
  - name: Commissions
    description: Approve, deny, and manage commissions (workspace key)
  - name: Conversions
    description: Re-attribute and manage conversions (workspace key)
  - name: Webhooks
    description: Manage webhook endpoint subscriptions (workspace key)
  - name: Reports
    description: Aggregated reporting data (workspace key)
  - name: Resources
    description: Read campaigns, commissions, conversions, payouts (workspace key)
  - name: Tracking
    description: >-
      Server-to-server click & conversion tracking (workspace key, scope
      "track")
paths:
  /v1/reports/{report}:
    get:
      tags:
        - Reports
      summary: Get a report
      description: |
        Returns aggregated data for the specified report type:
        - `overview` — workspace-level KPIs
        - `affiliates` — per-affiliate breakdown
        - `campaigns` — per-campaign breakdown (conversions, revenue, and
          non-reversed commission totals with the pending share broken out)

        Use `since` / `until` (ISO 8601) to scope the time window.
      parameters:
        - name: report
          in: path
          required: true
          schema:
            type: string
            enum:
              - overview
              - affiliates
              - campaigns
        - name: since
          in: query
          schema:
            type: string
            format: date-time
          description: Filter events on or after this timestamp.
        - name: until
          in: query
          schema:
            type: string
            format: date-time
          description: Filter events before or at this timestamp.
      responses:
        '200':
          description: Report data
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: report
                  report:
                    type: string
                    example: overview
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - WorkspaceKey: []
components:
  responses:
    Unauthorized:
      description: Missing or invalid bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    NotFound:
      description: Resource not found / not in workspace
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: link_not_found
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        need:
          type: string
          description: Present on insufficient_scope.
        detail:
          type: string
  securitySchemes:
    WorkspaceKey:
      type: http
      scheme: bearer
      description: 'Workspace API key, e.g. `sa_live_…`. Scopes: read / write / track / *.'

````