> ## 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).

``totals`` are in ``currency``, the store's base currency (what the
storefront formats); ``totals_by_currency`` has every currency, base
first. Amounts in different currencies are never summed (R5-5).



## OpenAPI

````yaml https://api.vellaro.io/openapi/storefront.json get /api/v1/account/affiliate
openapi: 3.1.0
info:
  title: Vellaro Storefront API
  description: >-
    The API of storefronts and mobile apps. The store comes from the publishable
    key in the `X-Vellaro-Key` header (or from the store's domain); the
    customer's endpoints also take the customer's token as `Authorization:
    Bearer <access_token>`.
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags:
  - name: Authentication
    description: >-
      Customer sign-up and login, tokens, password reset, email verification,
      Google and Apple login, two-factor authentication.
  - name: Catalog
    description: Products, categories and brands, with filters, sorting and pagination.
  - name: Search
    description: Full-text product search and suggestions as you type.
  - name: Cart
    description: >-
      The cart of a guest (`X-Cart-Token`) or of the logged-in customer, and the
      extra warranty offered on a product page.
  - name: Checkout & orders
    description: >-
      Checkout, the customer's orders and reorder, «Order on WhatsApp» (cart
      codes, clicks).
  - name: Payments
    description: >-
      The store's payment methods, paying an order again, and the confirmation
      steps of PayPal, PokPay and Iute.
  - name: Account
    description: >-
      The logged-in customer: profile, addresses, wishlist, digital downloads,
      subscriptions, affiliate account.
  - name: Reviews & questions
    description: Product reviews and product questions.
  - name: AI chat
    description: 'The store''s AI shopping assistant: conversations, messages, feedback.'
  - name: Content
    description: CMS pages, menus, banners, flipbooks and information pages.
  - name: Marketing & contact
    description: >-
      Newsletter sign-up and email links, the contact form, campaign click
      tracking.
  - name: Store
    description: >-
      The store for the storefront: brand, public settings, languages,
      translations, currencies, physical stores, theme.
  - name: Devices
    description: Push-notification devices of the mobile app.
paths:
  /api/v1/account/affiliate:
    get:
      tags:
        - Account
      summary: My Affiliate
      description: |-
        The logged-in user's own affiliate record + earnings (null if not one).

        ``totals`` are in ``currency``, the store's base currency (what the
        storefront formats); ``totals_by_currency`` has every currency, base
        first. Amounts in different currencies are never summed (R5-5).
      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
        currency:
          type: string
          title: Currency
          default: ''
        totals:
          $ref: '#/components/schemas/CommissionTotals'
        totals_by_currency:
          items:
            $ref: '#/components/schemas/CurrencyCommissionTotals'
          type: array
          title: Totals By Currency
          default: []
      type: object
      required:
        - tracking_code
        - commission
        - is_active
        - totals
      title: MyAffiliateOut
      description: >-
        Customer-facing: the logged-in user's own affiliate + earnings.


        ``totals`` holds only the amounts in ``currency`` (the store's base

        currency); every currency, base first, is in ``totals_by_currency``
        (R5-5).
    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
        rejected:
          type: number
          title: Rejected
          default: 0
        count:
          type: integer
          title: Count
          default: 0
      type: object
      title: CommissionTotals
    CurrencyCommissionTotals:
      properties:
        currency:
          type: string
          title: Currency
        totals:
          $ref: '#/components/schemas/CommissionTotals'
      type: object
      required:
        - currency
        - totals
      title: CurrencyCommissionTotals
      description: Totals by status in ONE currency (ISO code).
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.