Get Ambassador Stats
Retrieves aggregated statistics for campaign ambassadors, grouped by individual affiliate. This endpoint provides performance metrics including revenue, commission, order counts, and clicks for ambassadors within a specified date range.
Request Parameters
Request Examples
Basic Request
With Clicks
With Clicks
Response Example
Response Fields
Filter Examples
Search Filter
Thesearch parameter searches across email, first name, last name, and full name:
Email Filter (Single)
Filter by a specific ambassador email:Email Filter (Multiple - Comma Separated)
Filter by multiple ambassador emails using comma-separated values:First Name Filter
Filter by ambassador first name (case-insensitive, partial match):Last Name Filter
Filter by ambassador last name (case-insensitive, partial match):Combined Filters
You can combine multiple filters:Pagination
Important Notes
Time Periods
All metrics (revenue, commission, orders, clicks, refunds) are filtered by the specified date range. Thestart_date and end_date parameters filter tracking events by their occurred_at timestamp (when the sale or click happened), not by when the ambassador joined the campaign.
To analyze different time periods, make separate API calls with different date ranges:
- This Month:
start_date=12/01/2024&end_date=12/31/2024 - Last Month:
start_date=11/01/2024&end_date=11/30/2024 - Year to Date:
start_date=01/01/2024&end_date=12/31/2024 - Custom Range: Any range you specify
Pagination
- Default: 20 results per page
- Maximum: 100 results per page
- Performance: Always use pagination for campaigns with many ambassadors
- All ambassadors shown: Even ambassadors with 0 sales appear in results if they match filters
- Use
total_pagesin the meta response to iterate through all pages
Error Responses
400 Bad Request - Missing Required Parameters
401 Unauthorized - Invalid API Key
429 Too Many Requests - Rate Limit Exceeded
Rate Limiting
This endpoint is subject to the standard Public API rate limits:- Frequency Limit: 2-second minimum interval between requests
- Hourly Limit: 40 requests per hour (default, configurable per organization)
Performance Tips
To ensure fast response times:- Use Pagination: Always paginate for campaigns with many ambassadors
- Apply Filters: Use email/name filters to narrow results
- Clicks: Only add
include_clicks=truewhen you specifically need click data
Integration Examples
JavaScript/Node.js
Python
Ruby
Filtering Best Practices
Multiple Emails
When filtering by multiple emails, use comma-separated values without spaces (or with spaces - both work):- Split on commas
- Trim whitespace
- Convert to lowercase for case-insensitive matching
Search vs Specific Filters
- Use
searchfor broad queries across all name/email fields - Use
email,first_name, orlast_namefor precise filtering
Including Clicks
By default, clicks are not included to ensure fast response times. To include click data:Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Start date in MM/DD/YYYY format
End date in MM/DD/YYYY format
ID of the campaign to query
Page number for pagination. Default is 1.
Number of results per page. Default is 20. Maximum is 100.
x <= 100Search across email, first name, last name, or full name
Filter by ambassador email(s). Supports comma-separated values
Filter by ambassador first name (case-insensitive, partial match)
Filter by ambassador last name (case-insensitive, partial match)
Filter by tracking event status
all, paid, pending, canceled, due