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

# Get Affiliates

> Retrieves affiliates for the specified store using query-based filter options.
Supports filtering, sorting, and pagination via query parameters.
Requires the `stores.affiliates.view` permission.

## Filterable Fields

This endpoint supports filtering and sorting. See the [Filtering & Sorting Guide](/api-reference/filtering) for syntax details.

| Field                  | Type    | Description                                                 |
| ---------------------- | ------- | ----------------------------------------------------------- |
| `isEnabled`            | boolean | Filter by affiliate enabled status                          |
| `email`                | string  | Filter by email address (contains)                          |
| `link`                 | string  | Filter by affiliate link/code (contains)                    |
| `balanceFrom`          | number  | Minimum affiliate balance (inclusive)                       |
| `balanceTo`            | number  | Maximum affiliate balance (inclusive)                       |
| `returnPercentageFrom` | integer | Minimum return percentage (inclusive)                       |
| `returnPercentageTo`   | integer | Maximum return percentage (inclusive)                       |
| `percentageOffFrom`    | integer | Minimum discount percentage (inclusive)                     |
| `percentageOffTo`      | integer | Maximum discount percentage (inclusive)                     |
| `referredOrdersFrom`   | integer | Minimum referred delivered orders (inclusive)               |
| `referredOrdersTo`     | integer | Maximum referred delivered orders (inclusive)               |
| `allTimeEarnedFrom`    | number  | Minimum all-time earned amount (inclusive)                  |
| `allTimeEarnedTo`      | number  | Maximum all-time earned amount (inclusive)                  |
| `payoutCountFrom`      | integer | Minimum payout count (inclusive)                            |
| `payoutCountTo`        | integer | Maximum payout count (inclusive)                            |
| `dateFrom`             | string  | Filter affiliates created from this date/time (inclusive)   |
| `dateTo`               | string  | Filter affiliates created before this date/time (inclusive) |


## OpenAPI

````yaml GET /stores/{storeId}/affiliates
openapi: 3.0.4
info:
  title: Komerza API
  description: >-
    The base Komerza API for interfacing with the Komerza platform through a
    REST interface.
  termsOfService: https://komerza.com/terms
  contact:
    name: Support
    url: https://help.komerza.com
    email: support@komerza.com
  version: vUnknown-Development
servers:
  - url: https://api.komerza.com
    description: The production Komerza API
security:
  - bearer: []
tags:
  - name: Affiliate
    description: Manage store affiliates.
  - name: Analytics
    description: >-
      Analytics endpoints for a store: store dashboard, visitor dashboard and
      daily stats.
  - name: Application
    description: Manages OAuth2 applications owned by users for third-party integrations.
  - name: Billing
    description: Provides billing-related endpoints for user accounts.
  - name: Blacklist
    description: Manages blacklist rules and customer blocking for a store.
  - name: BlogCategory
    description: Manages blog categories for a store.
  - name: BlogPost
    description: Manages blog posts for a store.
  - name: Category
    description: >-
      Handles the management of categories, which are used to organize products
      within a store.
  - name: Coupon
    description: >-
      Handles the management of coupons, which are used to give customers a
      percentage discount off any products in your

      store
  - name: Customer
    description: Controller that handles customer-related actions.
  - name: CustomField
    description: Controller for managing custom fields on a product variant.
  - name: CustomPaymentMethod
    description: >-
      Manages custom payment methods for a store (Instructions and Redirect
      types).
  - name: Discord
    description: >-
      Manages Discord integration settings, variant roles, product overrides,
      and grants.
  - name: DiscountDialog
    description: >-
      Handles the management of discount dialogs, which are promotional popups
      displayed on storefronts

      to encourage customer engagement through discount offers.
  - name: Domain
    description: >-
      Controller that handles all store domain-related concerns, like URLs and
      custom domains.
  - name: EmailMarketing
    description: Manages email marketing setup and status for a store
  - name: EmailMarketingCampaign
    description: Manages email campaigns (create, schedule, send, cancel)
  - name: EmailMarketingCredit
    description: Manages email marketing credit packages and purchases
  - name: EmailMarketingDomain
    description: Manages email sending domains for a store (add, verify, delete)
  - name: EmailMarketingRecipient
    description: Manages email recipient lists and their entries
  - name: EmailMarketingSuppression
    description: Manages email suppressions (unsubscribes, bounces, complaints) for a store
  - name: EmailMarketingTemplate
    description: Manages email templates (GrapeJS editor JSON + compiled HTML)
  - name: EmailUnsubscribe
    description: Public endpoint for email unsubscribe (no authentication required)
  - name: FlaggedUsers
    description: Controller for managing flagged users in the administration panel.
  - name: LicenseKey
    description: >-
      Controller that handles license key/item operations including search and
      inventory management.
  - name: OAuth
    description: Controller responsible for handling OAuth2 operations.
  - name: Onboarding
    description: >-
      Manages the merchant onboarding setup guide, including progress tracking,
      step completion, and dismissal.
  - name: Order
    description: Controller that handles order-related concerns.
  - name: Passkey
    description: Manages FIDO2/WebAuthn passkeys for two-factor authentication.
  - name: Product
    description: >-
      Handles creation, retrieval, updating, and deletion of products within a
      store.
  - name: Review
    description: ''
  - name: Store
    description: >-
      Manages actions related to stores in the system, such as creating,
      updating, and retrieving store information.
  - name: StoreBranding
    description: >-
      Provides functionalities for managing store branding and related
      configurations.
  - name: Subscription
    description: Controller for merchant management of customer subscriptions.
  - name: Tax
    description: Manages tax/VAT settings and rules for a store.
  - name: Temp
  - name: Ticket
    description: Handles ticket replies and closure
  - name: User
    description: Manages user-related functionalities and actions for the platform.
  - name: Variant
    description: >-
      Controller which handles management of product variants, including
      creation, updates, deletion,

      file and image uploads, and delivery settings.
  - name: VolumeDiscount
    description: Controller for managing volume discount tiers on a product variant.
  - name: Webhook
    description: Controller for managing webhook operations within the system.
paths:
  /stores/{storeId}/affiliates:
    get:
      tags:
        - Affiliate
      summary: List store affiliates.
      description: >-
        Retrieves affiliates for the specified store using query-based filter
        options.

        Supports filtering, sorting, and pagination via query parameters.

        Requires the `stores.affiliates.view` permission.
      parameters:
        - name: storeId
          in: path
          description: The unique identifier of the store.
          required: true
          schema:
            type: string
            format: uuid
        - name: query
          in: query
          description: Free-text query used by the search endpoint.
          schema:
            type: string
        - name: isEnabled
          in: query
          description: Filter by affiliate enabled status.
          schema:
            type: boolean
        - name: email
          in: query
          description: Filter by affiliate email address (contains).
          schema:
            type: string
        - name: link
          in: query
          description: Filter by affiliate link/code (contains).
          schema:
            type: string
        - name: balanceFrom
          in: query
          description: Minimum affiliate balance (inclusive).
          schema:
            type: number
            format: double
        - name: balanceTo
          in: query
          description: Maximum affiliate balance (inclusive).
          schema:
            type: number
            format: double
        - name: returnPercentageFrom
          in: query
          description: Minimum return percentage (inclusive).
          schema:
            type: integer
            format: int32
        - name: returnPercentageTo
          in: query
          description: Maximum return percentage (inclusive).
          schema:
            type: integer
            format: int32
        - name: percentageOffFrom
          in: query
          description: Minimum discount percentage (inclusive).
          schema:
            type: integer
            format: int32
        - name: percentageOffTo
          in: query
          description: Maximum discount percentage (inclusive).
          schema:
            type: integer
            format: int32
        - name: referredOrdersFrom
          in: query
          description: Minimum referred delivered orders (inclusive).
          schema:
            type: integer
            format: int32
        - name: referredOrdersTo
          in: query
          description: Maximum referred delivered orders (inclusive).
          schema:
            type: integer
            format: int32
        - name: allTimeEarnedFrom
          in: query
          description: Minimum all-time earned amount (inclusive).
          schema:
            type: number
            format: double
        - name: allTimeEarnedTo
          in: query
          description: Maximum all-time earned amount (inclusive).
          schema:
            type: number
            format: double
        - name: payoutCountFrom
          in: query
          description: Minimum payout count (inclusive).
          schema:
            type: integer
            format: int32
        - name: payoutCountTo
          in: query
          description: Maximum payout count (inclusive).
          schema:
            type: integer
            format: int32
        - name: dateFrom
          in: query
          description: Filter affiliates created from this date/time (inclusive).
          schema:
            type: string
            format: date-time
        - name: dateTo
          in: query
          description: Filter affiliates created before this date/time (inclusive).
          schema:
            type: string
            format: date-time
        - name: Filters
          in: query
          schema:
            type: string
        - name: Sorts
          in: query
          schema:
            type: string
        - name: Page
          in: query
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
      responses:
        '200':
          description: The object was successfully returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisplayAffiliatePaginatedResponse'
components:
  schemas:
    DisplayAffiliatePaginatedResponse:
      required:
        - data
        - pages
        - success
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the operation was successful
          readOnly: true
        pages:
          type: integer
          description: The total number of pages available in the paginated response.
          format: int32
        data:
          type: array
          items:
            $ref: '#/components/schemas/DisplayAffiliate'
          description: Represents the collection of items within a paginated response
      additionalProperties: false
      description: |-
        Represents a paginated response returned from API endpoints,
        which contains the paginated data and metadata about the pagination.
    DisplayAffiliate:
      required:
        - allTimeEarned
        - balance
        - conversionRate
        - customerId
        - dateCreated
        - emailAddress
        - id
        - isEnabled
        - link
        - referredOrders
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity
          format: uuid
        dateCreated:
          type: string
          description: The date the entity was created
          format: date-time
        isEnabled:
          type: boolean
          description: Indicates whether the affiliate is enabled.
        customerId:
          type: string
          description: The ID of the customer associated with the affiliate.
          format: uuid
        emailAddress:
          type: string
          description: Represents the email address of the affiliate.
        link:
          type: string
          description: Represents the affiliate's unique referral link.
        returnPercentage:
          type: integer
          description: Represents the percentage of returns associated with the affiliate.
          format: int32
          nullable: true
        percentageOff:
          type: integer
          description: Represents the discount percentage offered.
          format: int32
          nullable: true
        balance:
          type: number
          description: Represents the current balance associated with the affiliate.
          format: double
        allTimeEarned:
          type: number
          description: Total amount earned by the affiliate over time.
          format: double
        referredOrders:
          type: integer
          description: Represents the number of orders referred by the affiliate.
          format: int32
        conversionRate:
          type: number
          description: >-
            Represents the ratio of delivered referred orders to incomplete
            orders.
          format: double
      additionalProperties: false
      description: Represents an affiliate's display information and related metrics.
  securitySchemes:
    bearer:
      type: http
      description: Your API key goes here
      scheme: bearer
      bearerFormat: JWT

````