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

# Preview moving a referral

> What moving a referral (a referred customer) to another affiliate would do, exactly as the dashboard's Move dialog shows it. Nothing changes. Name the customer by `referral_id`, or by any of their sales with `conversion_id` (for example an id from GET /v1/conversions). A new affiliate who can't take the referral is refused here as the move would refuse it. Requires `read` scope.



## OpenAPI

````yaml /openapi.yaml post /v1/referrals/move/preview
openapi: 3.1.0
info:
  title: Affixo API
  version: 1.0.0
  description: |
    The Affixo REST API for affiliate program management and server-to-server
    conversion tracking.

    All requests authenticate with a workspace key (`sa_live_…`) as a Bearer
    token. Scopes: `read` / `write` / `track` / `*`.
servers:
  - url: https://go.affixo.dev
    description: Production
security: []
tags:
  - name: Affiliates
    description: Manage affiliates (workspace key)
  - name: Campaigns
    description: Create and configure campaigns + commission rules (workspace key)
  - name: Links
    description: Manage referral links (workspace key)
  - name: Risk
    description: AI risk assessments for fraud triage (workspace key)
  - name: Commissions
    description: Approve, deny, and manage commissions (workspace key)
  - name: Conversions
    description: Re-attribute and manage conversions (workspace key)
  - name: Webhooks
    description: Manage webhook endpoint subscriptions (workspace key)
  - name: Reports
    description: Aggregated reporting data (workspace key)
  - name: Resources
    description: Read campaigns, commissions, conversions, payouts (workspace key)
  - name: Referrals
    description: >-
      Move a referred customer to another affiliate, and send test referrals
      (workspace key)
  - name: Tracking
    description: >-
      Server-to-server click & conversion tracking (workspace key, scope
      "track")
  - name: Products
    description: >-
      Your Stripe product catalog and which products earn commission (workspace
      key)
paths:
  /v1/referrals/move/preview:
    post:
      tags:
        - Referrals
      summary: Preview moving a referral
      description: >-
        What moving a referral (a referred customer) to another affiliate would
        do, exactly as the dashboard's Move dialog shows it. Nothing changes.
        Name the customer by `referral_id`, or by any of their sales with
        `conversion_id` (for example an id from GET /v1/conversions). A new
        affiliate who can't take the referral is refused here as the move would
        refuse it. Requires `read` scope.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReferralMoveTarget'
      responses:
        '200':
          description: The preview
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: referral_move_preview
                  data:
                    type: object
                    properties:
                      subject:
                        type: string
                        description: Who the customer is (their email or name).
                      from_affiliate_id:
                        type: string
                        format: uuid
                      from_name:
                        type: string
                      to_affiliate_id:
                        type: string
                        format: uuid
                      to_name:
                        type: string
                      conversions:
                        type: integer
                        description: The customer's sales with the current affiliate.
                      unpaid_count:
                        type: integer
                        description: Unpaid commissions that `history` would move.
                      unpaid_totals:
                        $ref: '#/components/schemas/MoneyTotals'
                      paid_count:
                        type: integer
                        description: >-
                          Paid commissions. These always stay with the affiliate
                          who was paid.
                      paid_totals:
                        $ref: '#/components/schemas/MoneyTotals'
                      kept_unpaid_count:
                        type: integer
                        description: >-
                          Unpaid, but on a sale with a paid part, so they stay
                          too.
                      in_run_count:
                        type: integer
                        description: >-
                          In a payout run that hasn't been paid. While above 0,
                          `history` is refused.
                      has_customer_identity:
                        type: boolean
                        description: >-
                          False means `forward` is refused: there is no email or
                          Stripe customer id to match future payments by.
                      credits_future_payments:
                        type: boolean
                        description: >-
                          The new affiliate would be credited for the customer's
                          future payments.
                      credit_campaign_name:
                        type:
                          - string
                          - 'null'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/DashboardLocked'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/MoveTargetIneligible'
      security:
        - WorkspaceKey: []
components:
  schemas:
    ReferralMoveTarget:
      type: object
      required:
        - to_affiliate_id
      description: >-
        Name the customer by `referral_id` or by one of their sales with
        `conversion_id`.
      properties:
        to_affiliate_id:
          type: string
          format: uuid
        conversion_id:
          type: string
          format: uuid
        referral_id:
          type: string
          format: uuid
    MoneyTotals:
      type: array
      description: One total per currency.
      items:
        type: object
        properties:
          currency:
            type: string
            example: usd
          amount:
            type: number
            example: 90
    Error:
      type: object
      properties:
        error:
          type: string
        need:
          type: string
          description: Present on insufficient_scope.
        detail:
          type: string
  responses:
    BadRequest:
      description: Invalid or missing parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid_json
    Unauthorized:
      description: Missing or invalid bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    DashboardLocked:
      description: >-
        Your plan's dashboard and management access is locked until you upgrade.
        Tracking keeps working.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: plan_restricted
    InsufficientScope:
      description: The key lacks the required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient_scope
            need: write
    NotFound:
      description: Resource not found / not in workspace
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: link_not_found
    MoveTargetIneligible:
      description: >-
        The new affiliate can't take this referral: not active (suspended,
        banned, archived or left), a test affiliate for a live customer (or the
        other way round), or the customer themself. Nothing changed.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: affiliate_not_eligible
              message:
                type: string
                example: >-
                  Ray isn't an active affiliate, so they can't take over a
                  referral. Approve or restore them first.
              hint:
                type: string
  securitySchemes:
    WorkspaceKey:
      type: http
      scheme: bearer
      description: 'Workspace API key, e.g. `sa_live_…`. Scopes: read / write / track / *.'

````

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