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

# List stock awards

> Lists stock awards (newest first). Optionally filter by user or status.



## OpenAPI

````yaml /openapi.json get /v1/rewards
openapi: 3.1.0
info:
  title: Stockly Partner API
  description: >-
    Create users, give them stock, and read their portfolios. All requests and
    responses are JSON.
  version: 1.0.0
servers:
  - url: https://api.stockly.com
    description: Production (replace with your Stockly API base URL)
security:
  - apiKey: []
tags:
  - name: Users
    description: Your customers.
  - name: Stock awards
    description: Give users stock and read back award status.
  - name: Portfolio
    description: A user's live stock holdings.
  - name: Catalog
    description: Stocks available to give.
paths:
  /v1/rewards:
    get:
      tags:
        - Stock awards
      summary: List stock awards
      description: Lists stock awards (newest first). Optionally filter by user or status.
      parameters:
        - name: userId
          in: query
          schema:
            type: string
            format: uuid
          description: Only awards for this user.
        - name: status
          in: query
          schema:
            type: string
            enum:
              - recorded
              - executing
              - executed
              - failed
          description: Only awards in this state.
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
            maximum: 200
      responses:
        '200':
          description: List of stock awards
          content:
            application/json:
              schema:
                type: object
                properties:
                  rewards:
                    type: array
                    items:
                      $ref: '#/components/schemas/StockAward'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    StockAward:
      type: object
      description: A stock award. Moves from recorded to executed once fulfilled.
      properties:
        id:
          type: string
          format: uuid
        appId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        idempotencyKey:
          type: string
        amountUsd:
          type: number
        assetSymbol:
          type: string
        source:
          type:
            - string
            - 'null'
        metadata:
          type: object
          additionalProperties: true
        status:
          type: string
          enum:
            - recorded
            - executing
            - executed
            - failed
          description: >-
            Lifecycle. Starts at recorded; executed once the stock is in the
            user's portfolio.
        createdAt:
          type: string
          format: date-time
        executedAt:
          type:
            - string
            - 'null'
          format: date-time
        failureReason:
          type:
            - string
            - 'null'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unauthorized
                - forbidden
                - not_found
                - conflict
                - unprocessable_entity
                - internal_error
                - upstream_error
            message:
              type: string
            details:
              description: Optional structured detail (e.g. validation issues).
            requestId:
              type: string
              description: Correlation id, also returned in the x-request-id header.
      example:
        error:
          code: conflict
          message: idempotencyKey was already used with a different payload
          details:
            idempotencyKey: order-1001-reward
          requestId: f0e1d2c3-4b5a-6789-0abc-def012345678
  responses:
    Unauthorized:
      description: Missing or invalid x-api-key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Stockly API key. Identifies your app; you never pass an app id.

````