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

# My Affiliate

> The logged-in user's own affiliate record + earnings (null if not one).



## OpenAPI

````yaml https://api.vellaro.io/openapi.json get /api/v1/account/affiliate
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/account/affiliate:
    get:
      tags:
        - account:affiliate
      summary: My Affiliate
      description: The logged-in user's own affiliate record + earnings (null if not one).
      operationId: my_affiliate_api_v1_account_affiliate_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponse_Union_MyAffiliateOut__NoneType__
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_Union_MyAffiliateOut__NoneType__:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/MyAffiliateOut'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[Union[MyAffiliateOut, NoneType]]
    MyAffiliateOut:
      properties:
        tracking_code:
          type: string
          title: Tracking Code
        commission:
          type: number
          title: Commission
        is_active:
          type: boolean
          title: Is Active
        totals:
          $ref: '#/components/schemas/CommissionTotals'
      type: object
      required:
        - tracking_code
        - commission
        - is_active
        - totals
      title: MyAffiliateOut
      description: 'Customer-facing: the logged-in user''s own affiliate + earnings.'
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    CommissionTotals:
      properties:
        pending:
          type: number
          title: Pending
          default: 0
        approved:
          type: number
          title: Approved
          default: 0
        paid:
          type: number
          title: Paid
          default: 0
        reversed:
          type: number
          title: Reversed
          default: 0
        count:
          type: integer
          title: Count
          default: 0
      type: object
      title: CommissionTotals
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````