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

# Retrieve an affiliate

> Retrieve a single affiliate by ID, including referral link, click and conversion counts, and lifetime commission.



## OpenAPI

````yaml get /v1/affiliates/{id}
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/affiliates/{id}:
    get:
      tags:
        - Affiliates
      summary: Retrieve an affiliate
      description: >-
        Retrieve a single affiliate by ID, including referral link, click and
        conversion counts, and lifetime commission.
      operationId: retrieveAffiliate
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier of the affiliate
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved the affiliate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    AffiliateEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          example: affiliate
        email:
          type: string
          description: The email address the affiliate was invited with.
          example: partner@example.com
        name:
          type: string
          description: The display name of the affiliate, if set.
          example: Jane Partner
          nullable: true
        status:
          type: string
          description: >-
            The affiliate's status within your program, reflecting their
            membership standing: `active`, `pending` (awaiting approval),
            `rejected`, `suspended`, or `inactive` (left or removed).
            Invited-but-not-yet-joined affiliates are not returned by this
            endpoint.
          example: active
        referral_code:
          type: string
          description: The affiliate's unique referral code.
          example: a1b2c3d4
        referral_link:
          type: string
          description: >-
            The affiliate's shareable referral link. Traffic arriving through it
            is attributed to this affiliate.
          example: https://creem.io/affiliate?code=a1b2c3d4
        clicks:
          type: number
          description: Total number of clicks recorded on the affiliate’s links.
          example: 128
        conversions:
          type: number
          description: Total number of conversions attributed to the affiliate.
          example: 12
        earnings:
          type: number
          description: >-
            Lifetime commission earned by the affiliate, in cents (1000 =
            $10.00), reported in a single primary currency (see `currency`).
            Affiliates earning in multiple currencies show only their
            highest-earning currency here; use the affiliate's commissions
            endpoint for the full per-currency breakdown.
          example: 4200
        currency:
          type: string
          description: >-
            Three-letter ISO currency code, in uppercase, for the `earnings`
            amount. This is the affiliate's primary (highest-earning) currency;
            commissions in other currencies are listed individually on the
            commissions endpoint.
          example: USD
      required:
        - id
        - mode
        - object
        - email
        - status
        - referral_code
        - referral_link
        - clicks
        - conversions
        - earnings
        - currency
    EnvironmentMode:
      type: string
      description: String representing the environment.
      enum:
        - test
        - prod
        - sandbox
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````