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

# Get program stats



## OpenAPI

````yaml /openapi.json get /programs/{id}/stats
openapi: 3.1.0
info:
  title: AgentRef REST API
  version: 1.0.0
  description: >-
    REST API v1 for merchants and affiliates. Authentication via API keys
    (Authorization: Bearer ak_...).
servers:
  - url: /api/v1
    description: Current API version
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
  - name: Onboarding
  - name: Programs
  - name: Merchant
  - name: Applications
  - name: Affiliates
  - name: Me
  - name: Coupons
  - name: Invites
  - name: Conversions
  - name: Payouts
  - name: Flags
  - name: Billing
  - name: Marketplace
  - name: Marketing Resources
  - name: Notifications
  - name: Webhooks
  - name: Docs
  - name: Meta
paths:
  /programs/{id}/stats:
    get:
      tags:
        - Programs
      summary: Get program stats
      operationId: getProgramStats
      parameters:
        - $ref: '#/components/parameters/UuidPathId'
      responses:
        '200':
          description: Program stats
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProgramStats'
                  meta:
                    $ref: '#/components/schemas/RequestMeta'
                required:
                  - data
                  - meta
components:
  parameters:
    UuidPathId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ProgramStats:
      type: object
      properties:
        programId:
          type: string
          format: uuid
        programName:
          type: string
        status:
          type: string
          enum:
            - active
            - paused
            - archived
        totalRevenue:
          type: integer
        totalConversions:
          type: integer
        totalCommissions:
          type: integer
        pendingCommissions:
          type: integer
        activeAffiliates:
          type: integer
        conversionsByStatus:
          type: object
          properties:
            pending:
              type: integer
            approved:
              type: integer
            partially_refunded:
              type: integer
            rejected:
              type: integer
            refunded:
              type: integer
          required:
            - pending
            - approved
            - partially_refunded
            - rejected
            - refunded
      required:
        - programId
        - programName
        - status
        - totalRevenue
        - totalConversions
        - totalCommissions
        - pendingCommissions
        - activeAffiliates
        - conversionsByStatus
    RequestMeta:
      type: object
      properties:
        requestId:
          type: string
      required:
        - requestId
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use API key as Bearer token, for example: Bearer ak_live_xxx'

````