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
| Parameter | Type | Description | Required |
|---|---|---|---|
start_date | String | Start date in MM/DD/YYYY format | Yes |
end_date | String | End date in MM/DD/YYYY format | Yes |
campaign_id | Integer | ID of the campaign to query | Yes |
page | Integer | Page number for pagination. Default is 1. | No |
per_page | Integer | Number of results per page. Default is 20. Maximum is 100. | No |
include_clicks | String | Set to true to include click data. Default is false. | No |
search | String | Search across email, first name, last name, or full name | No |
email | String | Filter by ambassador email(s). Supports comma-separated values | No |
first_name | String | Filter by ambassador first name (case-insensitive, partial match) | No |
last_name | String | Filter by ambassador last name (case-insensitive, partial match) | No |
Request Examples
Basic Request
With Clicks
With Clicks
Response Example
Response Fields
| Field | Type | Description |
|---|---|---|
data | Array | Array of ambassador statistics objects |
data[].campaign_affiliate_id | Integer | Unique identifier for the campaign affiliate relationship |
data[].user_id | Integer | Unique identifier for the user/ambassador |
data[].email | String | Ambassador’s email address |
data[].first_name | String | Ambassador’s first name |
data[].last_name | String | Ambassador’s last name |
data[].creator_name | String | Full name of the ambassador (first + last) |
data[].revenue | Number | Total revenue generated in dollars (for the specified date range) |
data[].commission | Number | Total commission earned in dollars |
data[].orders_count | Integer | Total number of completed orders |
data[].clicks | Integer | Total number of unique link clicks. Default is 0 unless include_clicks=true |
data[].refund_amount | Number | Total refunded/canceled order amount in dollars |
data[].joined_campaign_date | String | Date the ambassador joined the campaign (MM/DD/YYYY format) |
meta | Object | Pagination and query metadata |
meta.total_ambassadors | Integer | Total number of ambassadors matching the query (across all pages) |
meta.current_page | Integer | Current page number |
meta.per_page | Integer | Number of results per page |
meta.total_pages | Integer | Total number of pages available |
meta.start_date | String | Query start date |
meta.end_date | String | Query end date |
meta.campaign_id | String | Campaign ID queried |
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