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

# Get chart data



## OpenAPI

````yaml openapi-v2-affiliate-promoters get /promoters/chart_data
openapi: 3.0.1
info:
  title: FirstPromoter API
  version: '1.0'
  description: FirstPromoter API documentation
servers:
  - url: https://api.firstpromoter.com/api/v2/affiliate
security:
  - BearerAuth: []
paths:
  /promoters/chart_data:
    get:
      tags:
        - Promoters
      summary: Get chart data
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: promoter_campaign_id
          in: query
          description: >-
            If provided, the given promoter campaign will be used in chart.
            Otherwise all the current_promoter campaigns will be used.
          schema:
            type: integer
        - name: period_from
          in: query
          schema:
            type: string
            format: date
        - name: period_to
          in: query
          schema:
            type: string
            format: date
        - name: selection
          in: query
          schema:
            type: string
            enum:
              - revenue
              - commissions
              - clicks
              - referrals
              - customers
              - cancellations
      responses:
        '401':
          description: >-
            Unauthorized — the Bearer access token is missing, invalid, expired,
            or revoked. No JSON response body is returned.
          content:
            application/json:
              schema:
                type: object
              example: {}
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: Account identifier that specifies which account is making the request
      schema:
        type: string
        example: acc_123456
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Access token passed as a Bearer token in the Authorization header

````