> ## 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 reports for promoter traffic sources

> With this endpoint you can get the traffic sources report for a single promoter, broken down by source and grouped over time. 
 <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/promoters/{id}/traffic_sources_report`</Tip>



## OpenAPI

````yaml openapi-v2-promoters get /promoters/{id}/traffic_sources_report
openapi: 3.0.1
info:
  title: FirstPromoter API
  version: '1.0'
  description: API documentation for FirstPromoter promoters management
servers:
  - url: https://api.firstpromoter.com/api/v2/company
security:
  - BearerAuth: []
paths:
  /promoters/{id}/traffic_sources_report:
    get:
      tags:
        - Promoters
      summary: Get reports for promoter traffic sources
      description: >-
        With this endpoint you can get the traffic sources report for a single
        promoter, broken down by source and grouped over time. 
         <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/promoters/{id}/traffic_sources_report`</Tip>
      operationId: getPromoterTrafficSourcesReport
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: id
          in: path
          description: Id of the promoter
          required: true
          schema:
            type: integer
        - name: columns
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
              enum:
                - clicks_count
                - revenue_amount
                - promoter_earnings_amount
                - referrals_count
                - customers_count
                - sales_count
                - refunds_count
                - cancelled_customers_count
                - referrals_to_customers_cr
                - clicks_to_customers_cr
                - clicks_to_referrals_cr
          description: Fields to be included in the report
        - name: q
          in: query
          required: false
          schema:
            type: string
          description: Search query string, matched against the traffic source name
        - name: group_by
          in: query
          required: true
          schema:
            type: string
            enum:
              - day
              - week
              - month
              - year
          description: Time period grouping
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date-time
          description: Start date for the report period
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date-time
          description: End date for the report period
        - name: sorting
          in: query
          required: false
          schema:
            type: object
            additionalProperties:
              type: string
              enum:
                - asc
                - desc
          description: Sorting parameters
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
          description: Maximum number of traffic sources to return
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    source:
                      type: string
                    id:
                      type: string
                    data:
                      type: object
                      properties:
                        clicks_count:
                          type: integer
                        revenue_amount:
                          type: number
                        promoter_earnings_amount:
                          type: number
                        referrals_count:
                          type: integer
                        customers_count:
                          type: integer
                        sales_count:
                          type: integer
                        refunds_count:
                          type: integer
                        cancelled_customers_count:
                          type: integer
                        referrals_to_customers_cr:
                          type: number
                        clicks_to_customers_cr:
                          type: number
                        clicks_to_referrals_cr:
                          type: number
                    sub_data:
                      type: array
                      items:
                        type: object
                        properties:
                          period:
                            type: string
                          id:
                            type: string
                          data:
                            type: object
                            properties:
                              clicks_count:
                                type: integer
                              revenue_amount:
                                type: number
                              promoter_earnings_amount:
                                type: number
                              referrals_count:
                                type: integer
                              customers_count:
                                type: integer
                              sales_count:
                                type: integer
                              refunds_count:
                                type: integer
                              cancelled_customers_count:
                                type: integer
                              referrals_to_customers_cr:
                                type: number
                              clicks_to_customers_cr:
                                type: number
                              clicks_to_referrals_cr:
                                type: number
        '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: {}
        '403':
          description: >-
            Forbidden — the authenticated user does not have permission to
            perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: You don't have enough rights to perform this action
                code: forbidden
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Record not found
                code: not_found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 'param is missing or the value is empty: columns'
                  code:
                    type: string
                    example: invalid_params
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: >-
        Account id. You can find your Account ID on Your FirstPromoter
        Dashboard. Navigate to Settings → Integrations
      schema:
        type: string
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as a Bearer token in the Authorization header. You can
        find your API Key on Your FirstPromoter Dashboard. Navigate to Settings
        → Integrations section → Manage API Keys

````