FirstPromoter Referrals API

The Referrals API from FirstPromoter — 8 operation(s) for referrals.

GitHub OpenAPI

Operations 12

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /referrals List referrals · Get available referrals #
Ask an LLM
“Which referrals have I sent out to a campaign?”
“Can I filter referrals by state or by campaign?”
Tell an agent
List my referrals.
Find referrals matching {q}.
POST /referrals Add a referral · Create referral #
Ask an LLM
“How do I add a new referral to a promoter campaign?”
“Can I give a new referral a unique ID when I create it?”
Tell an agent
Create a referral for {email} in campaign {promoter_campaign_id}.
Add a new referral {email} with uid {uid} to campaign {promoter_campaign_id}.
DELETE /referrals Delete several referrals at once · Delete referrals #
Ask an LLM
“Can I delete many referrals in one request?”
“What happens if I delete more than five referrals at once?”
Tell an agent destructive · confirm first
Delete referrals {ids}.
Bulk remove the referrals {ids} from my account.
PUT /referrals/{id} Update a referral · Update referral #
Ask an LLM
“Can I change the email on an existing referral?”
“Is it possible to update a referral's unique ID?”
Tell an agent
Update referral {id} to email {email}.
Change the uid of referral {id} to {uid}.
DELETE /referrals/{id} Delete one referral · Delete referral #
Ask an LLM
“How do I delete a single referral?”
“Can I remove one referral from a campaign?”
Tell an agent destructive · confirm first
Delete referral {id}.
Remove the single referral {id} from my account.
GET /referrals/{id} Get a referral · Get referral #
Ask an LLM
“What is the state of one referral?”
“Can I look up a referral by its unique ID?”
Tell an agent
Get referral {id}.
Show referral {id} found by {find_by}.
GET /referrals/export Export referrals · Export referrals #
Ask an LLM
“Can I export all my referrals to a file?”
“Is there a way to export only the leads or only the customers?”
Tell an agent
Export all my referrals.
Export referrals with state {state}.
POST /referrals/approve Approve referrals · Approve referrals #
Ask an LLM
“How do I approve referrals so they start earning commissions?”
“Can I approve several referrals in one request?”
Tell an agent
Approve referrals {ids}.
Mark referrals {ids} as approved.
POST /referrals/disable Disable referrals · Disable referrals #
Ask an LLM
“How do I stop a referral from earning commissions?”
“Can I disable several referrals at once?”
Tell an agent
Disable referrals {ids}.
Stop the referrals {ids} from earning commissions.
POST /referrals/enable Enable referrals · Enable referrals #
Ask an LLM
“How do I reactivate referrals that were disabled?”
“Can I turn several referrals back on at once?”
Tell an agent
Enable referrals {ids}.
Reactivate the disabled referrals {ids}.
POST /referrals/move_to_promoter Move referrals to another promoter · Move referrals to promoter #
Ask an LLM
“Can I move referrals from one promoter campaign to another?”
“Will the commissions move with the referrals when I reassign them?”
Tell an agent
Move referrals {ids} to promoter campaign {promoter_campaign_id}.
Reassign referrals {ids} to promoter {promoter_campaign_id} with commissions {move_associated_commissions}.
POST /referrals/{id}/import_events Import past Stripe sales for a referral · Import previous sales from stripe #
Ask an LLM
“How do I bring a referral's previous Stripe sales into FirstPromoter?”
“Can I import past events for one referral?”
Tell an agent
Import previous Stripe sales for referral {id}.
Import past events for referral {id} found by {find_by}.

Documentation

📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/payout-methods-api
📖
APIReference
https://docs.firstpromoter.com/api-reference-v2/api-admin/introduction
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/products-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/assets
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/campaigns
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/commissions
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/contract-documents
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/email-settings
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/payout-methods
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/payouts
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/promo-codes
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/promoter-campaigns
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/promoters
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/referral-links
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/referrals
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-affiliate/reports
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/asset-categories-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/assets
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/batches
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/campaigns-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/contract-documents-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/contracts-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/custom-referral-statuses
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/dashboard-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/invoices
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/payments-batches
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/payouts
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/promoter-campaigns
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/reports
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-advanced/rewards
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api
📖
Documentation
https://docs.firstpromoter.com/api-reference-v2/api-admin/webhooks

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/firstpromoter:firstpromoter-referrals-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

firstpromoter-referrals-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Firstpromoter Referrals API
  version: '1.0'
  description: 'Operations tagged Referrals across 2 of this provider''s published API definitions: firstpromoter-v2-affiliate-referrals-openapi.yml, firstpromoter-v2-referrals-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.firstpromoter.com/api/v2/affiliate
- url: https://api.firstpromoter.com/api/v2/company
  description: Production server
security:
- BearerAuth: []
tags:
- name: Referrals
paths:
  /referrals:
    get:
      summary: Get available referrals
      operationId: getReferrals
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: q
        in: query
        description: Search params. Searches by email, uid, username, website
        required: false
        schema:
          type: string
      - name: filters[type]
        in: query
        description: Type (lead or customer)
        required: false
        schema:
          type: string
          enum:
          - lead
          - customer
      - name: filters[state]
        in: query
        description: State
        required: false
        schema:
          type: string
          enum:
          - subscribed
          - signup
          - active
          - cancelled
          - refunded
          - denied
          - pending
          - moved
      - name: filters[created_at][from]
        in: query
        description: created_at start date
        required: false
        schema:
          type: string
          format: date
      - name: filters[created_at][to]
        in: query
        description: created_at end date
        required: false
        schema:
          type: string
          format: date
      - name: filters[customer_since][from]
        in: query
        description: customer_since start date
        required: false
        schema:
          type: string
          format: date
      - name: filters[customer_since][to]
        in: query
        description: customer_since end date
        required: false
        schema:
          type: string
          format: date
      - name: filters[campaign_id]
        in: query
        description: Campaign ids. Can be Integer or an Array of Integers
        required: false
        schema:
          oneOf:
          - type: integer
          - type: array
            items:
              type: integer
      - name: sorting[state]
        in: query
        description: Sort by state direction
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: sorting[email]
        in: query
        description: Sort by email direction
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Referral'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Referrals
    post:
      summary: Create referral
      operationId: createReferral
      parameters:
      - $ref: '#/components/parameters/AccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - promoter_campaign_id
              properties:
                email:
                  type: string
                  format: email
                  description: Email of the referral
                promoter_campaign_id:
                  type: integer
                  description: The ID of the promoter campaign
                uid:
                  type: string
                  description: Unique ID of the referral
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Referral'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Referrals
    delete:
      summary: Delete referrals
      description: 'With this endpoint you can delete referrals.

        If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`

        **HTTP Request**

        `DELETE https://api.firstpromoter.com/api/v2/company/referrals`'
      tags:
      - Referrals
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSelectionRequest'
      responses:
        '200':
          description: Batch operation completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '202':
          description: Batch operation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      operationId: deleteReferrals
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/affiliate
  /referrals/{id}:
    put:
      summary: Update referral
      operationId: updateReferral
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  description: Email of the referral
                uid:
                  type: string
                  description: Unique ID of the referral
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Referral'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Referrals
    delete:
      summary: Delete referral
      operationId: deleteReferral
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successfully deleted
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Referrals
    get:
      summary: Get referral
      tags:
      - Referrals
      description: 'Get a specific referral

        **HTTP Request**

        `GET https://api.firstpromoter.com/api/v2/company/referrals/{id}`'
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      - in: path
        name: id
        required: true
        schema:
          type: string
        description: ID of the referral
      - in: query
        name: find_by
        schema:
          type: string
          enum:
          - email
          - uid
          - username
        description: Find by attribute
      responses:
        '200':
          description: Referral details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Referral_2'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      operationId: getReferralsById
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/affiliate
  /referrals/export:
    get:
      summary: Export referrals
      operationId: exportReferrals
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: filters[type]
        in: query
        description: Type (lead or customer)
        required: false
        schema:
          type: string
          enum:
          - lead
          - customer
      - name: filters[state]
        in: query
        description: State
        required: false
        schema:
          type: string
          enum:
          - subscribed
          - signup
          - active
          - cancelled
          - refunded
          - denied
          - pending
          - moved
      responses:
        '200':
          description: Successful response
          content:
            text/csv:
              schema:
                type: string
        '202':
          description: Export is being processed
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Referrals
    servers:
    - url: https://api.firstpromoter.com/api/v2/affiliate
  /referrals/approve:
    post:
      summary: Approve referrals
      description: 'With this endpoint you can approve referrals.

        If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`

        **HTTP Request**

        `POST https://api.firstpromoter.com/api/v2/company/referrals/approve`'
      tags:
      - Referrals
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSelectionRequest'
      responses:
        '200':
          description: Batch operation completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '202':
          description: Batch operation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      operationId: postReferralsApprove
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/company
      description: Production server
  /referrals/disable:
    post:
      summary: Disable referrals
      description: 'With this endpoint you can disable referrals.

        If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`

        **HTTP Request**

        `POST https://api.firstpromoter.com/api/v2/company/referrals/disable`'
      tags:
      - Referrals
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSelectionRequest'
      responses:
        '200':
          description: Batch operation completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '202':
          description: Batch operation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      operationId: postReferralsDisable
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/company
      description: Production server
  /referrals/enable:
    post:
      summary: Enable referrals
      description: 'With this endpoint you can enable referrals.

        If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`

        **HTTP Request**

        `POST https://api.firstpromoter.com/api/v2/company/referrals/enable`'
      tags:
      - Referrals
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSelectionRequest'
      responses:
        '200':
          description: Batch operation completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '202':
          description: Batch operation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      operationId: postReferralsEnable
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/company
      description: Production server
  /referrals/move_to_promoter:
    post:
      summary: Move referrals to promoter
      description: 'With this endpoint you can move referrals to another promoter.

        If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`

        **HTTP Request**

        `POST https://api.firstpromoter.com/api/v2/company/referrals/move_to_promoter`'
      tags:
      - Referrals
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - promoter_campaign_id
              - selection
              properties:
                promoter_campaign_id:
                  type: integer
                  description: Destination promoter campaign ID
                move_associated_commissions:
                  type: boolean
                  description: Move associated commissions
                  enum:
                  - true
                  - false
                ids:
                  type: array
                  description: Array of selected referral ids. If there are more than __5__ ids on this param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`
                  items:
                    type: integer
      responses:
        '200':
          description: Batch operation completed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  status:
                    type: string
                    enum:
                    - completed
                  total:
                    type: integer
                  selected_total:
                    type: integer
                  processed_count:
                    type: integer
                  failed_count:
                    type: integer
                  action_label:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                  progress:
                    type: integer
                  processing_errors:
                    type: array
                    items:
                      type: string
        '202':
          description: Batch operation accepted for processing
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  status:
                    type: string
                  total:
                    type: integer
                  selected_total:
                    type: integer
                  processed_count:
                    type: integer
                  failed_count:
                    type: integer
                  action_label:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                  progress:
                    type: integer
                    minimum: 0
                  processing_errors:
                    type: array
                    items:
                      type: string
                required:
                - id
                - status
                - total
                - selected_total
                - processed_count
                - failed_count
                - action_label
                - created_at
                - updated_at
                - progress
                - processing_errors
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: You don't have enough rights to perform this action
                  code:
                    type: string
                required:
                - message
                - code
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                    - invalid_params
                    - operation_failed
                required:
                - message
                - code
      operationId: postReferralsMoveToPromoter
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/company
      description: Production server
  /referrals/{id}/import_events:
    post:
      summary: Import previous sales from stripe
      description: 'With this endpoint you can import previous sales from Stripe.

        **HTTP Request**

        `POST https://api.firstpromoter.com/api/v2/company/referrals/{id}/import_events`'
      tags:
      - Referrals
      parameters:
      - $ref: '#/components/parameters/AccountId_2'
      - in: path
        name: id
        required: true
        schema:
          type: string
        description: ID of the referral
      - in: query
        name: find_by
        schema:
          type: string
          enum:
          - email
          - uid
          - username
        description: Find by attribute
      responses:
        '202':
          description: Import task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchOperationResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_2'
      operationId: postReferralsByIdImportEvents
      x-operation-id-source: derived
    servers:
    - url: https://api.firstpromoter.com/api/v2/company
      description: Production server
components:
  schemas:
    Referral:
      type: object
      properties:
        id:
          type: integer
        uid:
          type: string
        state:
          type: string
          enum:
          - subscribed
          - signup
          - active
          - cancelled
          - refunded
          - denied
          - pending
          - moved
        metadata:
          type: object
        created_at:
          type: string
          format: date-time
        customer_since:
          type: string
          format: date-time
        email:
          type: string
          format: email
        promoter_campaign:
          $ref: '#/components/schemas/PromoterCampaign'
    Campaign:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        color:
          type: string
    Error:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
      - message
      - code
    PromoterCampaign:
      type: object
      properties:
        id:
          type: integer
        campaign_id:
          type: integer
        created_at:
          type: string
          format: date-time
        campaign:
          $ref: '#/components/schemas/Campaign'
    Promoter:
      type: object
      properties:
        id:
          type: integer
          description: Id of the promoter
        email:
          type: string
          format: email
          description: Email address of the promoter
        name:
          type: string
          description: Name of the promoter
    BatchSelectionRequest:
      type: object
      properties:
        ids:
          type: array
          description: Array of selected referral ids. If there are more than __5__ ids on this param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`
          items:
            type: integer
    Referral_2:
      type: object
      properties:
        id:
          type: integer
          description: Id of the referral
        email:
          type: string
          format: email
          description: Email address of the referral
        uid:
          type: string
          description: uid of the referral
        state:
          type: string
          enum:
          - subscribed
          - signup
          - active
          - cancelled
          - refunded
          - denied
          - pending
          - moved
          description: State of the referral
        metadata:
          type: object
          description: Additional metadata of the referral
        entry_source:
          type: string
          enum:
          - api
          - coupon
          - cookie
          - manual_admin
          - manual_affiliate
          description: "Entry source of the referral. This shows where the referral was captured from. \n **Cookie** is set if the referral was captured using the tid cookie, \n **Coupon** is for when the referral is captured via a coupon code. \n**Manual admin** is for when the referral is added manually by an admin. \n**Manual affiliate** is for when the referral is added manually by an affiliate."
        created_at:
          type: string
          format: date-time
          description: Date and time when the referral was created
        customer_since:
          type:
          - string
          - 'null'
          format: date-time
          description: Date and time when the referral became a customer
        promoter_campaign:
          $ref: '#/components/schemas/PromoterCampaign_2'
        fraud_check:
          type: string
          enum:
          - no_suspicion
          - same_ip_suspicion
          - same_promoter_email
          - ad_source
          description: Fraud check (suspicion) status of the referral. `no_suspicion` means the referral is clean or was manually cleared. `same_ip_suspicion` means the referral shares an IP with the promoter. `same_promoter_email` means the referral email matches the promoter email. `ad_source` means the referral arrived via a paid ad click.
        created_by_user_email:
          type:
          - string
          - 'null'
          format: email
          description: Email address of the user who created the referral
        username:
          type:
          - string
          - 'null'
          description: Username chosen by the referral
        split_details:
          type:
          - array
          - 'null'
          description: The commission split configuration for this referral. Each entry represents a split partner. The primary promoter (the referral owner) receives the remainder of the commission after all split percentages are applied.
          items:
            type: object
            properties:
              promoter_campaign_id:
                type: integer
                description: The ID of the split partner's campaign enrollment
              promoter_id:
                type: integer
                description: The ID of the split partner (promoter)
              percentage:
                type: integer
                description: The percentage of each commission this promoter receives
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        website:
          type:
          - string
          - 'null'
        comment:
          type:
          - string
          - 'null'
          description: Internal note or comment on this referral
        is_expired:
          type: boolean
          description: Whether the referral has expired
    Campaign_2:
      type: object
      properties:
        id:
          type: integer
          description: Id of the campaign
        name:
          type: string
          description: Name of the campaign
        color:
          type:
          - string
          - 'null'
          description: Color assigned to the campaign
    Error_2:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    BatchOperationResponse:
      type: object
      properties:
        id:
          type: integer
          description: Id of the batch operation
        status:
          type: string
          enum:
          - pending
          - completed
          description: Status of the batch operation
        total:
          type: integer
          description: Total number of items
        selected_total:
          type: integer
          description: Number of selected items
        processed_count:
          type: integer
          description: Number of processed items
        failed_count:
          type: integer
          description: Number of failed operations
        action_label:
          type: string
          description: Action identifier/ label assigned to the action
        created_at:
          type: string
          format: date-time
          description: Date and time when the batch operation was created
        updated_at:
          type: string
          format: date-time
          description: Date and time when the batch operation was updated
        meta:
          type: object
          description: Meta data of the batch operation
        progress:
          type: integer
          description: Progress of the action (0-100)
        processing_errors:
          type: array
          items:
            type: string
            description: List of processing errors
    PromoterCampaign_2:
      type: object
      properties:
        id:
          type: integer
          description: Id of the promoter campaign
        campaign_id:
          type: integer
          description: Id of the campaign
        promoter_id:
          type: integer
          description: Id of the promoter
        created_at:
          type: string
          format: date-time
          description: Date and time when the promoter campaign was created
        promoter:
          $ref: '#/components/schemas/Promoter'
        campaign:
          $ref: '#/components/schemas/Campaign_2'
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: Account identifier that specifies which account is making the request
      schema:
        type: string
        example: acc_123456
    AccountId_2:
      name: Account-ID
      in: header
      required: true
      description: Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Access token passed as a Bearer token in the Authorization header
    accountId:
      type: apiKey
      in: header
      name: ACCOUNT-ID
      description: Your FirstPromoter Account ID. You can find this in the  Settings → Integrations section of your dashboard.
x-refined-from:
- firstpromoter-v2-affiliate-referrals-openapi.yml
- firstpromoter-v2-referrals-openapi.yml