> ## 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 all payouts grouped by promoters

> This endpoint returns all payouts but grouped by promoters. 
 <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters`</Tip>



## OpenAPI

````yaml openapi-v2-payouts get /payouts/group_by_promoters
openapi: 3.0.3
info:
  title: FirstPromoter Admin Payouts API
  description: API documentation for admin payouts endpoints
  version: 1.0.0
servers:
  - url: https://api.firstpromoter.com/api/v2/company
    description: Production server
security:
  - BearerAuth: []
paths:
  /payouts/group_by_promoters:
    get:
      summary: Get all payouts grouped by promoters
      description: |-
        This endpoint returns all payouts but grouped by promoters. 
         <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters`</Tip>
      operationId: getAdminPayoutsGroupedByPromoters
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: q
          in: query
          description: >-
            Search params. Searches by 'promoter.profile.first_name`,
            `promoter.profile.last_name`, `promoter.user.email`
          required: false
          schema:
            type: string
        - name: filters[status]
          in: query
          description: Filter by status
          required: false
          schema:
            type: string
            enum:
              - pending
              - completed
              - failed
              - processing
              - cancelled
        - name: filters[campaign_id]
          in: query
          description: Campaign ids. Can be Integer or Array of Integers
          required: false
          schema:
            oneOf:
              - type: integer
              - type: array
                items:
                  type: integer
        - name: include_payout_method_details
          in: query
          description: Set it true to include the payout_method_details
          required: false
          schema:
            type: boolean
        - name: filters[min_payment]
          in: query
          description: Filters payouts by the minimum payment amount possible
          required: false
          schema:
            type: integer
        - name: filters[invoiceable]
          in: query
          description: Filters payouts by invoiceable
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - not_set
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutsGroupedByPromoters'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
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
  schemas:
    PayoutsGroupedByPromoters:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              promoter:
                type: object
                properties:
                  id:
                    type: integer
                    description: ID of the promoter
                  email:
                    type: string
                    description: Email of the promoter
                  name:
                    type: string
                    description: Name of the promoter
                  invoice_details_status:
                    type: string
                    description: Status of invoice details
                  fraud_suspicions:
                    type: array
                    items:
                      type: string
                    description: List of fraud suspicions
                  profile:
                    type: object
                    properties:
                      invoice_details_validation_errors:
                        type: object
                        description: Validation errors for invoice details
              payout_method:
                type: object
                properties:
                  id:
                    type: integer
                    description: ID of the payout method
                  method:
                    type: string
                    description: Payout method name
                  date_added:
                    type: string
                    format: date-time
                    description: Date when the payout method was added
                  is_disabled:
                    type: boolean
                    description: Whether the payout method is disabled
                  meta:
                    type: object
                    description: Additional meta information
                  is_selected:
                    type: boolean
                    description: Whether the payout method is selected
                  details:
                    type: object
                    description: Details about the payout method
                  managed_payouts:
                    type: boolean
                    description: Whether payouts are managed by us (auto-payouts)
              payouts:
                type: array
                items:
                  $ref: '#/components/schemas/Payout'
              is_amount_payable:
                type: boolean
                description: Whether the amount is payable
              payout_ids:
                type: array
                items:
                  type: integer
                description: List of payout IDs
              amount:
                type: number
                description: Total amount
              total_incl_tax:
                type: number
                description: Total amount including tax
        meta:
          type: object
          properties:
            total:
              type: number
              description: Total amount
            promoters_count:
              type: integer
              description: Count of promoters
            total_incl_tax:
              type: number
              description: Total amount including tax
            due_date:
              type: string
              format: date
              description: Due date
            period_end:
              type: string
              format: date
              description: End date of the period
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
      required:
        - message
        - code
    Payout:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the payout
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
            - processing
            - cancelled
          description: Status of the payout
        amount:
          type: number
          format: float
          description: Amount of the payout
        payments_batch_id:
          type: integer
          description: ID of the payments batch
        tax_rate:
          type: number
          format: float
          description: Tax rate applied to the payout
        unit:
          type: string
          description: Unit of the payout (e.g., cash)
        period_start:
          type: string
          format: date-time
          description: Start date of the period
        period_end:
          type: string
          format: date-time
          description: End date of the period
        paid_at:
          type: string
          format: date-time
          description: Date when the payout was paid
        processing_started_at:
          type: string
          format: date-time
          description: Date when the payout processing started
        failed_at:
          type: string
          format: date-time
          description: Date when the payout failed
        error:
          type: string
          description: Error message if the payout failed
        total_incl_tax:
          type: number
          format: float
          description: Total amount including tax
        created_at:
          type: string
          format: date-time
          description: Date when the payout was created
        payout_method:
          type: object
          properties:
            id:
              type: integer
              description: ID of the payout method
            method:
              type: string
              description: Payout method name
            date_added:
              type: string
              format: date-time
              description: Date when the payout method was added
            is_disabled:
              type: boolean
              description: Whether the payout method is disabled
            meta:
              type: object
              description: Additional meta information
            is_selected:
              type: boolean
              description: Whether the payout method is selected
            details:
              type: object
              description: Details about the payout method
            managed_payouts:
              type: boolean
              description: Whether payouts are managed by us (auto-payouts)
        promoter:
          type: object
          properties:
            id:
              type: integer
              description: ID of the promoter
            email:
              type: string
              description: Email of the promoter
            name:
              type: string
              description: Name of the promoter
        campaign:
          type: object
          properties:
            id:
              type: integer
              description: ID of the campaign
            name:
              type: string
              description: Name of the campaign
            color:
              type: string
              description: Color of the campaign
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Access token passed as a Bearer token in the Authorization header

````