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

# Per-partner performance breakdown

> Returns one row of revenue, commissions, customers and clicks per partner over a date range, sorted and paged by offset.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/reports/partners
openapi: 3.1.0
info:
  title: Tolt Public API
  version: 2.0.0
servers:
  - url: https://platform.tolt.dev
    description: Development
security:
  - bearerAuth: []
paths:
  /v2/reports/partners:
    get:
      tags:
        - Reports
      summary: Per-partner performance breakdown
      description: >-
        Returns one row of revenue, commissions, customers and clicks per
        partner over a date range, sorted and paged by offset.
      operationId: reportsPartners
      parameters:
        - schema:
            type: string
            description: >-
              Limit to one program, by its id (prg_...) as returned when listing
              programs.
          required: false
          description: >-
            Limit to one program, by its id (prg_...) as returned when listing
            programs.
          name: program_id
          in: query
        - schema:
            type: string
            format: date
            description: >-
              Earliest day to include, by creation date (customers by the day
              they became active). Leave it out for no lower bound.
          required: false
          description: >-
            Earliest day to include, by creation date (customers by the day they
            became active). Leave it out for no lower bound.
          name: start_date
          in: query
        - schema:
            type: string
            format: date
            description: >-
              Latest day to include, by creation date (customers by the day they
              became active); the whole day counts. Leave it out for no upper
              bound.
          required: false
          description: >-
            Latest day to include, by creation date (customers by the day they
            became active); the whole day counts. Leave it out for no upper
            bound.
          name: end_date
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              Only include transactions and commissions in this currency, such
              as USD; matching ignores case. Rows without their own currency use
              their program's.
          required: false
          description: >-
            Only include transactions and commissions in this currency, such as
            USD; matching ignores case. Rows without their own currency use
            their program's.
          name: currency
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
            description: How many rows to return in one page.
          required: false
          description: How many rows to return in one page.
          name: limit
          in: query
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            maximum: 10000
            default: 0
            description: How many rows to skip before this page begins.
          required: false
          description: How many rows to skip before this page begins.
          name: offset
          in: query
        - schema:
            type: string
            enum:
              - revenue
              - commissions
              - clicks
              - customers
            default: revenue
            description: Metric to rank by, computed over the date window.
          required: false
          description: Metric to rank by, computed over the date window.
          name: sort
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: 'Ranking direction: desc puts the highest values first.'
          required: false
          description: 'Ranking direction: desc puts the highest values first.'
          name: order
          in: query
      responses:
        '200':
          description: A page of partner breakdown rows
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Request successful
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReportsPartnerRow'
                  has_more:
                    type: boolean
                    example: false
                required:
                  - success
                  - message
                  - data
                  - has_more
              example:
                success: true
                message: Successfully fetched partner breakdown
                data:
                  - partner_id: part_NLYzgNKuSuASvrvoxNtau6SY
                    first_name: Sam
                    last_name: Taylor
                    email: sam@example.com
                    clicks: 2000
                    customers: 84
                    revenue: '391891'
                    commissions: '391891'
                    conversion_rate: 4.2
                has_more: false
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: 'start_date: Invalid ISO date'
                code: validation_error
                doc_url: https://docs.tolt.com/errors#validation_error
                errors:
                  - field: start_date
                    message: Invalid ISO date
                  - field: start_date
                    message: must be a valid calendar date
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Unauthorized
                code: unauthorized
                doc_url: https://docs.tolt.com/errors#unauthorized
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    ReportsPartnerRow:
      type: object
      properties:
        partner_id:
          type: string
          example: part_NLYzgNKuSuASvrvoxNtau6SY
        first_name:
          type:
            - string
            - 'null'
          example: Sam
        last_name:
          type:
            - string
            - 'null'
          example: Taylor
        email:
          type:
            - string
            - 'null'
          example: sam@example.com
        clicks:
          type: number
          example: 2000
        customers:
          type: number
          description: Converted (non-lead) customers.
          example: 84
        revenue:
          type: string
          description: >-
            Integer amount in the smallest currency unit (cents), serialized as
            a string. Summed across the row's currencies; scope to a
            single-currency program with program_id, or use /reports/overview
            for the per-currency split.
          example: '391891'
        commissions:
          type: string
          description: >-
            Integer amount in the smallest currency unit (cents), serialized as
            a string. Summed across the row's currencies; scope to a
            single-currency program with program_id, or use /reports/overview
            for the per-currency split.
          example: '391891'
        conversion_rate:
          type: number
          description: Customers / clicks as a percentage.
          example: 4.2
      required:
        - partner_id
        - first_name
        - last_name
        - email
        - clicks
        - customers
        - revenue
        - commissions
        - conversion_rate
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: Human-readable explanation. May change; branch on code instead.
        code:
          type: string
          enum:
            - bad_request
            - validation_error
            - invalid_reference
            - invalid_cursor
            - unauthorized
            - forbidden
            - not_found
            - conflict
            - already_exists
            - commission_paid
            - commission_frozen
            - transaction_refunded
            - commission_exists
            - rate_limited
            - payload_too_large
            - internal_error
          description: Stable machine-readable error code.
          example: not_found
        doc_url:
          type: string
          example: https://docs.tolt.com/errors#not_found
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: >-
            One entry per offending field. Present on validation_error and
            invalid_reference.
      required:
        - success
        - message
        - code
        - doc_url
  headers:
    X-RateLimit-Limit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix time, in seconds, when the window resets.
      schema:
        type: integer
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    PayloadTooLarge:
      description: Request body exceeds 1 MB
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Request body exceeds 1 MB
            code: payload_too_large
            doc_url: https://docs.tolt.com/errors#payload_too_large
    RateLimited:
      description: The API key exceeded its rate limit
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Too many requests. Retry after the window resets.
            code: rate_limited
            doc_url: https://docs.tolt.com/errors#rate_limited
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Tolt API key sent as a bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.