Skip to main content
Affiliate endpoints sit under /api/brands/{brand}/affiliates/ with moduleAccess:affiliates middleware. Authenticate with EF-Access-Key.

List Affiliates

GET /api/brands/{brand}/affiliates
per_page
number
Results per page (1–100, default: 25)
type
string
Filter by type: external or affcenter
q
string
Search by name or merchant account ID
sort
string
newest, oldest, created_at, updated_at
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/affiliates \
  -H "EF-Access-Key: your_api_key_here"
{
  "current_page": 1,
  "data": [
    {
      "id": 5,
      "name": "John Smith",
      "email": "john@affiliate.com",
      "status": "active",
      "type": "external",
      "commission_rate": 30,
      "commission_type": "percent",
      "merchant": { "id": 1, "merchant": "NMI", "account_id": "123" },
      "commissionGroup": null,
      "brand_id": 42
    }
  ],
  "per_page": 25,
  "total": 18,
  "last_page": 1
}

List All Affiliates (Unpaginated)

GET /api/brands/{brand}/affiliates/all
Returns id, name, type, and merchant for all affiliates — useful for dropdowns.

Quick Access Stats

GET /api/brands/{brand}/affiliates/quick-access
{
  "all": 18,
  "external": 12,
  "affcenter": 6
}

Organization Affiliates Options

Search affiliates from the organization’s affiliate center — used for linking org affiliates to a brand.
GET /api/brands/{brand}/affiliates/organization-affiliates-options
q
string
Search by name, email, or nickname
selected_id
number
Ensure this affiliate is included even if outside the search results
[
  {
    "id": 3,
    "name": "Jane Affiliate",
    "email": "jane@example.com",
    "nickname": "jane_aff",
    "displayLabel": "Jane Affiliate (jane@example.com)"
  }
]

Get Affiliate

GET /api/brands/{brand}/affiliates/{affiliate}
{
  "id": 5,
  "name": "John Smith",
  "email": "john@affiliate.com",
  "phone": null,
  "status": "active",
  "type": "external",
  "commission_rate": 30,
  "commission_type": "percent",
  "is_whitelisted": false,
  "merchant_id": 1,
  "merchant": null
}

Create Affiliate

POST /api/brands/{brand}/affiliates
name
string
required
Affiliate display name (max 255)
status
string
required
active, disabled, blacklisted, pending, pending_email, or pending_approve
email
string
Affiliate email. Must be unique per brand.
phone
string
Phone number (max 255)
type
string
external (manually managed) or affcenter (linked to org affiliate center)
commission_rate
number
Commission percentage or fixed amount
commission_type
string
percent or fixed
merchant_id
number
Link to a brand merchant integration
is_whitelisted
boolean
Bypass approval requirements
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/affiliates \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Smith",
    "email": "john@affiliate.com",
    "status": "active",
    "type": "external",
    "commission_rate": 30,
    "commission_type": "percent"
  }'
{
  "affiliate": {
    "id": 5,
    "name": "John Smith",
    "email": "john@affiliate.com",
    "status": "active",
    "type": "external",
    "commission_rate": 30,
    "commission_type": "percent",
    "brand_id": 42,
    "created_at": "2024-12-11T10:00:00.000000Z"
  }
}

Update Affiliate

PUT /api/brands/{brand}/affiliates/{affiliate}
Same body as Create — all fields optional on update.

Delete Affiliate

DELETE /api/brands/{brand}/affiliates/{affiliate}
{ "success": true }

Export Affiliates

POST /api/brands/{brand}/affiliates/export
filters
array
Filter conditions (same as list query params)
selected_ids
array
Limit export to specific affiliate IDs
columns
array
Columns to include in the export
{
  "success": true,
  "message": "Export started. You will receive an email when it is ready."
}

Payouts

Payouts represent commission payments owed to affiliates for a billing period.

List Payouts

GET /api/brands/{brand}/affiliates/payouts
affiliate_id
number
Filter by affiliate ID
status
string
Filter by status: pending, approved, paid, rejected, cancelled
per_page
number
Results per page (1–100, default: 25)
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/affiliates/payouts?status=pending" \
  -H "EF-Access-Key: your_api_key_here"
{
  "current_page": 1,
  "data": [
    {
      "id": 3,
      "brand_affiliate_id": 5,
      "status": "pending",
      "amount": 450.00,
      "currency": "USD",
      "period_start": "2024-12-01",
      "period_end": "2024-12-31",
      "conversions_count": 15,
      "affiliate": { "id": 5, "name": "John Smith" },
      "created_at": "2025-01-01T00:00:00Z"
    }
  ],
  "per_page": 25,
  "total": 4
}

Create Payout

Generate a payout for an affiliate based on their conversions in a date range.
POST /api/brands/{brand}/affiliates/payouts
brand_affiliate_id
number
required
Affiliate ID to create the payout for
period_start
string
required
Start date (ISO 8601)
period_end
string
required
End date (ISO 8601, must be on or after period_start)
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/affiliates/payouts \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "brand_affiliate_id": 5,
    "period_start": "2024-12-01",
    "period_end": "2024-12-31"
  }'

Update Payout Status

PUT /api/brands/{brand}/affiliates/payouts/{payout}
status
string
required
approved, rejected, paid, or cancelled
rejection_reason
string
Required when status is rejected (max 1000 chars)
payment_method
string
Required when status is paid (e.g. bank_transfer, paypal)
payment_reference
string
Optional payment reference/transaction ID (max 255)
cURL — mark as paid
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/affiliates/payouts/3 \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"status": "paid", "payment_method": "bank_transfer", "payment_reference": "TXN-987654"}'

Upload Payout Invoice

POST /api/brands/{brand}/affiliates/payouts/{payout}/invoice
invoice
file
Invoice PDF file (multipart/form-data)

Notes

  • type: "affcenter" affiliates are linked to your organization’s affiliate center and require the viewOrganizationAffiliates permission
  • Some organization portals require an uploaded invoice before a payout can be marked as paid
  • Payout amounts are calculated from the affiliate’s commissions on approved conversions within the period