Documentation Index
Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The referral tools allow you to track and manage the complete referral lifecycle from initial click to conversion. All tools support both Markdown and JSON response formats.Available Tools
| Tool | Description | Permission |
|---|---|---|
affonso_list_referrals | List referrals with filtering | read:referrals |
affonso_get_referral | Get a single referral by ID | read:referrals |
affonso_create_referral | Create a new referral/click | write:referrals |
affonso_update_referral | Update referral status | write:referrals |
affonso_delete_referral | Delete a referral | delete:referrals |
Referral Types
| Type | Description |
|---|---|
CLICK | Initial click on affiliate link |
LEAD | Signed up but not converted |
CONVERSION | Completed purchase/signup |
REJECTED | Referral was rejected |
CANCELLED | Referral was cancelled |
affonso_list_referrals
List and filter referrals across your program.Parameters
Page number for pagination
Results per page (max 100)
Filter by affiliate ID
Filter by type:
CLICK, LEAD, CONVERSION, REJECTED, CANCELLEDFilter from date (ISO 8601)
Filter to date (ISO 8601)
Response format:
markdown or jsonExample Prompts
Response
affonso_get_referral
Get detailed information about a specific referral.Parameters
The referral ID (starts with
ref_)Response format:
markdown or jsonExample Prompts
Response
affonso_create_referral
Create a new referral, typically representing a click or initial tracking event.Parameters
The affiliate ID for this referral
Referral type:
CLICK, LEAD, CONVERSIONCustomer’s email address
Transaction amount in cents (for conversions)
Your system’s reference ID
Additional custom data
Response format:
markdown or jsonExample Prompts
Response
affonso_update_referral
Update an existing referral’s status or information.Parameters
The referral ID to update
New referral type
Updated transaction amount in cents
Updated customer email
Response format:
markdown or jsonExample Prompts
Response
affonso_delete_referral
Parameters
The referral ID to delete
Response format:
markdown or jsonExample Prompts
Response
Common Workflows
Track a Complete Conversion
Analyze Affiliate Performance
Error Handling
| Error | Cause | Solution |
|---|---|---|
NOT_FOUND | Referral ID doesn’t exist | Verify the ID is correct |
INVALID_AFFILIATE | Affiliate ID not found | Check the affiliate exists |
INVALID_TRANSITION | Invalid status change | Check allowed type transitions |
PERMISSION_DENIED | Missing required scope | Check your API key permissions |
