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

# Get Referral Data



## OpenAPI

````yaml /openapi.yaml get /user/referrals
openapi: 3.0.0
info:
  title: claimr API
  version: 1.0.0
  description: >-
    Advanced features of claimr for business partners. This API provides a
    seamless integration with claimr services
  termsOfService: https://claimr.io/terms-of-service/
  contact:
    name: claimr support team
    email: support@claimr.io
servers:
  - url: https://prod.claimr.io/api/v1
    description: Production server
  - url: https://prod.claimr.io/api/v1
    description: Development server
security: []
tags: []
paths:
  /user/referrals:
    get:
      tags:
        - User
      summary: Get Referral Data
      parameters:
        - in: query
          name: account
          description: Account identifier of the user
          required: true
          schema:
            type: string
        - in: query
          name: platform
          description: Platform where the account exists
          required: true
          schema:
            type: string
        - in: query
          name: pid
          description: Campaign ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            User's referral data including referred users list and referrer's
            campaign statistics.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Campaign entry ID of the referrer
                      name:
                        type: string
                        description: Display name of the referrer
                      referrals:
                        type: array
                        description: List of users referred by this user
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Campaign entry ID of the referred user
                            name:
                              type: string
                              description: Display name of the referred user
                            valid:
                              type: boolean
                              description: >-
                                Whether this referral is valid/counts toward
                                rewards
                            ref_xp:
                              type: number
                              description: XP shared with the referrer from this referral
                            xp:
                              type: number
                              description: Total XP earned by the referred user
                            cts:
                              type: number
                              description: >-
                                Creation timestamp in seconds (when the referral
                                was made)
                          required:
                            - id
                            - name
                            - valid
                            - ref_xp
                            - xp
                            - cts
                      total_xp:
                        type: number
                        description: Total XP accumulated by the referrer
                      ref_xp:
                        type: number
                        description: Total XP earned by the referrer through referrals
                      ugc_xp:
                        type: number
                        description: XP earned by the referrer from user-generated content
                      xp_mul:
                        type: number
                        description: XP multiplier applied to the referrer
                      rank:
                        type: number
                        description: Referrer's rank in the campaign
                      team:
                        type: string
                        description: Referrer's team assignment (empty string if no team)
                    required:
                      - id
                      - name
                      - referrals
                      - total_xp
                      - ref_xp
                      - ugc_xp
                      - xp_mul
                      - rank
                      - team
                required:
                  - success
                  - data
        '400':
          $ref: '#/components/responses/bad_request'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/access_denied'
        '500':
          $ref: '#/components/responses/internal_error'
      security:
        - bearer: []
components:
  responses:
    bad_request:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
              error:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                    default: 400
                  message:
                    type: string
                    default: bad request
    unauthorized:
      description: Unauthorized request
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
              error:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                    default: 401
                  message:
                    type: string
                    default: unauthorized
    access_denied:
      description: Access denied
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
              error:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                    default: 403
                  message:
                    type: string
                    default: access denied
    internal_error:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
              error:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                    default: 500
                  message:
                    type: string
                    default: internal error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````