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

# Validate Referrer Code

> Validate whether a provided referral code is valid and eligible for use during customer signup.

The API call validates whether a provided referral code is valid and eligible for use during customer signup. It optionally checks if the referral code belongs to a different customer to prevent self-referral. This allows clients to pre-validate referral codes before creating a customer record.

<Info>
  **Security**: Requires **apiKey** header.
</Info>


## OpenAPI

````yaml GET /api/v4.0/integrations/referrals/validate
openapi: 3.1.0
info:
  title: Gameball API
  description: >-
    Gameball REST API v4.0 - Complete API reference for integrating loyalty,
    gamification, and customer engagement features
  version: 4.0.0
servers:
  - url: https://api.gameball.co
security:
  - bearerAuth: []
paths:
  /api/v4.0/integrations/referrals/validate:
    get:
      summary: Validate Referrer Code
      description: >-
        Validate whether a provided referral code is valid and eligible for use
        during customer signup.
      operationId: validateReferrerCode
      parameters:
        - name: referrerCode
          in: query
          required: true
          schema:
            type: string
          description: The referral code to validate
        - name: forCustomerId
          in: query
          required: false
          schema:
            type: string
          description: Customer ID to prevent self-referral
      responses:
        '200':
          description: Referral code validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralValidationResponse'
      security:
        - apiKey: []
components:
  schemas:
    ReferralValidationResponse:
      type: object
      properties:
        isValid:
          type: boolean
          description: >-
            Indicates whether the provided referral code is valid and eligible
            for use
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: apikey

````