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

# Get reward recipients

> Get list of users who received a specific reward with their quantities and dates



## OpenAPI

````yaml /openapi/analytics.json get /rewards/stats/recipients
openapi: 3.1.0
info:
  title: Nudj Analytics API
  version: 1.0.0
servers:
  - url: https://{subdomain}.nudj.cx/api/v2/analytics
    description: Organization API Server
    variables:
      subdomain:
        description: Your organization's subdomain (required)
        default: your-org
security: []
paths:
  /rewards/stats/recipients:
    get:
      tags:
        - Reward
      summary: Get reward recipients
      description: >-
        Get list of users who received a specific reward with their quantities
        and dates
      operationId: getRewardRecipients
      parameters:
        - in: query
          name: rewardId
          description: The reward ID to get recipients for (MongoDB ObjectId)
          schema:
            type: string
            description: The reward ID to get recipients for (MongoDB ObjectId)
          required: true
        - in: query
          name: startDate
          schema:
            type: string
        - in: query
          name: endDate
          schema:
            type: string
        - in: query
          name: skip
          description: Number of records to skip
          schema:
            type: integer
            minimum: 0
            default: 0
          required: false
        - in: query
          name: limit
          description: Number of records to return (max 50)
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          required: false
        - in: query
          name: sortBy
          description: Field to sort by
          schema:
            type: string
            enum:
              - name
              - quantity
              - lastReceived
            default: lastReceived
            description: Field to sort by
        - in: query
          name: sortOrder
          description: Sort order
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: Sort order
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        userId:
                          type: string
                        name:
                          type:
                            - string
                            - 'null'
                        email:
                          type:
                            - string
                            - 'null'
                        profilePictureUrl:
                          type:
                            - string
                            - 'null'
                        quantity:
                          type: number
                        lastReceived:
                          type:
                            - string
                            - 'null'
                        winningTickets:
                          type: number
                        losingTickets:
                          type: number
                        pendingTickets:
                          type: number
                        entryStatus:
                          type: string
                          enum:
                            - pending
                            - winner
                            - loser
                      required:
                        - userId
                        - name
                        - email
                        - profilePictureUrl
                        - quantity
                        - lastReceived
                  totalCount:
                    type: number
                  rewardType:
                    type:
                      - string
                      - 'null'
                  drawDate:
                    type:
                      - string
                      - 'null'
                  isDrawn:
                    type: boolean
                  distributionType:
                    type:
                      - string
                      - 'null'
                  winningStats:
                    type:
                      - object
                      - 'null'
                    properties:
                      totalWinners:
                        type: number
                      winnersDistributed:
                        type: number
                      winnersClaimed:
                        type: number
                    required:
                      - totalWinners
                      - winnersDistributed
                      - winnersClaimed
                required:
                  - data
                  - totalCount
                  - rewardType
                  - drawDate
                  - isDrawn
                  - distributionType
                  - winningStats
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []

````