---
updatedAt: 2026-04-22T18:44:05.000Z
agentTools:
  projectIndex: https://fuul.readme.io/llms.txt
---

# Get project-global affiliate breakdown

Returns aggregated affiliate statistics for an entire project, grouped by a selected dimension (audience, region, or status).

This endpoint is designed for the Affiliate Management Breakdown page and provides project-wide totals along with per-group breakdowns.

**Grouping:**
- `groupBy=region` — Groups affiliates by their geographic region (CN, JP, KR, SEA, EN, LATAM, Other)
- `groupBy=audience` — Groups affiliates by the audience they belong to
- `groupBy=status` — Groups affiliates by their status (active, flagged, etc.)

**Date Filtering Options:**
- **All-time (default):** Omit date parameters
- **Preset ranges:** Use `dateRange=7d`, `30d`, `MTD`, or `QTD`
- **Custom range:** Use `dateRange=custom` together with `dateFrom` and `dateTo`

**Sorting:**
- Use `sortBy` to sort groups by a metric: `totalReferralVolume`, `revenueFromReferrals`, `earnings`, or `pointsPaid`
- Use `sortOrder` to control direction: `asc` or `desc` (default: `desc`)

**Required API Key Scope:** `service_role`


# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Fuul API",
    "version": "1.0.0",
    "description": "# Fuul API\n\nFuul is a Web3 growth and affiliate marketing platform that enables projects\nto track referrals, manage affiliate programs, and distribute rewards across\nmultiple blockchain networks (EVM, Solana, XRPL, Sui).\n\n## Core Concepts\n\n### Events\nEvents track user actions (conversions) that trigger rewards. Send events\nwhen users complete valuable actions like trades, deposits, or purchases.\n\n### Affiliates\nAffiliates are partners who promote your project. They receive unique codes\nand earn commissions on referred user activity.\n\n### Referral Codes\nEnd-users can generate referral codes to share with friends. Both referrer\nand referee can earn rewards.\n\n### Payouts\nRewards earned through the affiliate/referral program. Can be claimed\non-chain or tracked as points.\n\n## Authentication\n\n### API Keys\nAPI keys are bound to a single project. Include in the Authorization header:\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n## Multi-Chain Support\n\nFuul supports multiple blockchain networks. When identifying users, specify:\n- `user_identifier`: The wallet address, email, or opaque UUID\n- `user_identifier_type`: `evm_address` | `solana_address` | `sui_address` | `xrpl_address` | `stellar_address` | `email` | `uuid`\n\n## Smart Contracts\n\nFuul is an on-chain affiliate protocol. The API works in conjunction with\nsmart contracts deployed across multiple EVM networks.\n\n### Contract Architecture\n\n- **FuulManager**: Central contract that handles attributions and claims.\n  Deployed once per network.\n\n- **FuulFactory**: Creates new FuulProject contracts for each project.\n\n- **FuulProject**: Per-project contracts that hold deposited funds and\n  execute payouts. Address returned when creating a project.\n\nFor contract addresses per network, see:\nhttps://docs.fuul.xyz/protocol/smart-contracts\n\n### Claim Flow\n\n1. User earns rewards through referral/affiliate activity\n2. Call `GET /v1/claim-checks/totals` to see claimable amounts\n3. Call `POST /v1/claim-checks/claim` to get a signed claim message\n4. User submits the signature to `FuulManager.claim()` on-chain\n5. Funds are transferred from FuulProject to user's wallet\n\n### Resources\n\n- [Smart Contract Addresses](https://docs.fuul.xyz/protocol/smart-contracts)\n- [Protocol Contracts Source Code](https://github.com/fuul-protocol/protocol-contracts)\n- [Subgraphs](https://docs.fuul.xyz/protocol/subgraphs)\n\n## Rate Limits\n\n- Standard endpoints: 100 requests/minute\n- Batch endpoints: 10 requests/minute\n- Leaderboard endpoints: 60 requests/minute (cached for 1 minute)\n"
  },
  "servers": [
    {
      "url": "https://api.fuul.xyz/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/affiliate-portal/global-breakdown": {
      "get": {
        "summary": "Get project-global affiliate breakdown",
        "description": "Returns aggregated affiliate statistics for an entire project, grouped by a selected dimension (audience, region, or status).\n\nThis endpoint is designed for the Affiliate Management Breakdown page and provides project-wide totals along with per-group breakdowns.\n\n**Grouping:**\n- `groupBy=region` — Groups affiliates by their geographic region (CN, JP, KR, SEA, EN, LATAM, Other)\n- `groupBy=audience` — Groups affiliates by the audience they belong to\n- `groupBy=status` — Groups affiliates by their status (active, flagged, etc.)\n\n**Date Filtering Options:**\n- **All-time (default):** Omit date parameters\n- **Preset ranges:** Use `dateRange=7d`, `30d`, `MTD`, or `QTD`\n- **Custom range:** Use `dateRange=custom` together with `dateFrom` and `dateTo`\n\n**Sorting:**\n- Use `sortBy` to sort groups by a metric: `totalReferralVolume`, `revenueFromReferrals`, `earnings`, or `pointsPaid`\n- Use `sortOrder` to control direction: `asc` or `desc` (default: `desc`)\n\n**Required API Key Scope:** `service_role`\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupBy",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "audience",
                "region",
                "status"
              ]
            },
            "example": "region",
            "description": "The dimension to group affiliates by"
          },
          {
            "name": "dateRange",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "MTD",
                "QTD",
                "custom"
              ]
            },
            "example": "30d",
            "description": "Preset date range. Use `custom` together with `dateFrom` and `dateTo` for a custom range.\n"
          },
          {
            "name": "dateFrom",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2024-01-01",
            "description": "Start date for custom date range (ISO 8601). Required when `dateRange=custom`."
          },
          {
            "name": "dateTo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2024-01-31",
            "description": "End date for custom date range (ISO 8601). Required when `dateRange=custom`."
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "totalReferralVolume",
                "revenueFromReferrals",
                "earnings",
                "pointsPaid"
              ]
            },
            "example": "totalReferralVolume",
            "description": "Metric to sort the groups by. Defaults to `totalReferralVolume`."
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "example": "desc",
            "description": "Sort direction. Defaults to `desc`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groupBy": {
                      "type": "string",
                      "example": "region",
                      "description": "The dimension used for grouping"
                    },
                    "totalGroups": {
                      "type": "number",
                      "example": 5,
                      "description": "Number of groups returned"
                    },
                    "totalVolume": {
                      "type": "number",
                      "example": 243700,
                      "description": "Total referral volume across all groups (in USD)"
                    },
                    "totalRevenue": {
                      "type": "number",
                      "example": 1462.2,
                      "description": "Total revenue from referrals across all groups (in USD)"
                    },
                    "totalEarnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "example": "USDC"
                          },
                          "amount": {
                            "type": "number",
                            "example": 2500
                          }
                        }
                      },
                      "description": "Total earnings across all groups, broken down by currency"
                    },
                    "totalPointsPaid": {
                      "type": "number",
                      "example": 7800,
                      "description": "Total points paid across all groups"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "groupKey": {
                            "type": "string",
                            "example": "SEA",
                            "description": "The value of the grouping dimension for this group"
                          },
                          "affiliates": {
                            "type": "number",
                            "example": 42,
                            "description": "Number of affiliates in this group"
                          },
                          "r1Volume": {
                            "type": "number",
                            "example": 180100,
                            "description": "Direct referral (R1) volume for this group (in USD)"
                          },
                          "r2Volume": {
                            "type": "number",
                            "example": 21200,
                            "description": "Level-2 referral volume for this group (in USD)"
                          },
                          "r3Volume": {
                            "type": "number",
                            "example": 21200,
                            "description": "Level-3 referral volume for this group (in USD)"
                          },
                          "r4Volume": {
                            "type": "number",
                            "example": 21200,
                            "description": "Level-4 referral volume for this group (in USD)"
                          },
                          "indirectVolume": {
                            "type": "number",
                            "example": 63600,
                            "description": "Indirect referral volume (R2 + R3 + R4) for this group (in USD)"
                          },
                          "totalReferralVolume": {
                            "type": "number",
                            "example": 243700,
                            "description": "Total referral volume for this group (R1 + R2 + R3 + R4, in USD)"
                          },
                          "revenueFromReferrals": {
                            "type": "number",
                            "example": 731,
                            "description": "Revenue from referrals for this group (in USD)"
                          },
                          "earnings": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "currency": {
                                  "type": "string",
                                  "example": "USDC"
                                },
                                "amount": {
                                  "type": "number",
                                  "example": 1250.5
                                }
                              }
                            },
                            "description": "Earnings for this group, broken down by currency"
                          },
                          "pointsPaid": {
                            "type": "number",
                            "example": 3900,
                            "description": "Total points paid to affiliates in this group"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "by_region": {
                    "summary": "Breakdown grouped by region",
                    "value": {
                      "groupBy": "region",
                      "totalGroups": 2,
                      "totalVolume": 243700,
                      "totalRevenue": 1462.2,
                      "totalEarnings": [
                        {
                          "currency": "USDC",
                          "amount": 2500
                        }
                      ],
                      "totalPointsPaid": 7800,
                      "results": [
                        {
                          "groupKey": "SEA",
                          "affiliates": 42,
                          "r1Volume": 180100,
                          "r2Volume": 21200,
                          "r3Volume": 21200,
                          "r4Volume": 21200,
                          "indirectVolume": 63600,
                          "totalReferralVolume": 243700,
                          "revenueFromReferrals": 731,
                          "earnings": [
                            {
                              "currency": "USDC",
                              "amount": 1250.5
                            },
                            {
                              "currency": "ETH",
                              "amount": 0.85
                            }
                          ],
                          "pointsPaid": 3900
                        },
                        {
                          "groupKey": "EN",
                          "affiliates": 18,
                          "r1Volume": 95000,
                          "r2Volume": 10667,
                          "r3Volume": 10667,
                          "r4Volume": 10666,
                          "indirectVolume": 32000,
                          "totalReferralVolume": 127000,
                          "revenueFromReferrals": 381,
                          "earnings": [
                            {
                              "currency": "USDC",
                              "amount": 650
                            }
                          ],
                          "pointsPaid": 2100
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Missing required `groupBy` parameter or invalid date parameters"
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key, or insufficient scope"
          }
        },
        "tags": [
          "Affiliate Portal"
        ]
      }
    }
  }
}
````