Returns period totals, a zero-filled time series, traffic, geography, and device breakdowns, and a paginated list of recent conversions for one affiliate. Requires the read:affiliates permission. Successful responses are cached for 60 seconds after the affiliate is authorized.Custom start_date and end_date take precedence over range. page and limit paginate recent_conversions only.
Path Parameters
string
required
The unique identifier of the affiliate
Query Parameters
string
default:"30d"
Preset reporting window. Valid values: 24h, 7d, 30d, 3m, 12m, alltime. Ignored when both start_date and end_date are set.
string
Custom range start date in YYYY-MM-DD (UTC). Must be sent together with end_date.
string
Custom range end date in YYYY-MM-DD (UTC), inclusive. Must be sent together with start_date. Must be on or after start_date.
integer
default:"1"
Page of recent_conversions. Must be a positive integer. Does not paginate summary, time series, or breakdowns.
integer
default:"20"
Number of recent_conversions per page. Minimum 1, maximum 100.
Response
boolean
Always true for successful responses
object
Analytics payload for the requested affiliate and period.
Show Data Object Properties
object
The resolved reporting window.
Show Period Properties
string
Preset used for the query, or "custom" when both custom dates are set. Valid values: "24h", "7d", "30d", "3m", "12m", "alltime", "custom"
string | null
ISO 8601 timestamp for the start of the window. null for alltime
string
ISO 8601 timestamp for the inclusive end of the window
string
Time-series granularity: "hour" (24h, or a custom range of about one day), "day" (7d, 30d, 3m, 12m, and most custom ranges), or "month" (alltime, or a custom range longer than 366 days)
object
Totals for the period. Monetary values are grouped by currency.
Show Summary Properties
integer
Number of referred clicks in the period
integer
Number of referrals that are no longer a click
integer
Number of referrals with status TRIALING, CUSTOMER, or ACTIVE
number
Conversions divided by clicks, as a percentage. 0 when there are no clicks
array
Gross sales grouped by currency from eligible transactions (OPEN, COMPLETE, PARTIAL_REFUNDED). Each item is { amount, currency }. Uses UNKNOWN when a legacy transaction has no stored currency
array
Direct commission earnings grouped by currency. Each item is { amount, currency }
array
Zero-filled points for every bucket in the period, ordered by date.
Show Time Series Point Properties
string
ISO 8601 timestamp for the start of the bucket
integer
Clicks in this bucket
integer
Sign-ups in this bucket
integer
Conversions in this bucket
array
Gross sales in this bucket, grouped by currency
array
Direct commissions in this bucket, grouped by currency
object
Click counts grouped by attribution, geography, and device, plus new versus recurring sales.
Show Breakdown Properties
object
Attribution dimensions. Each listed key is always present and may be an empty array. Each value is { value, clicks }. Empty referrer values are returned as Direct. Keys: referrer, sub1, sub2, sub3, sub4, sub5, utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, gbraid, wbraid, gad_source, utm_agid, gad_campaign_id, utm_adid, fbclid, fbadid, fbgid, igshid, msclkid, ttclid, li_fat_id, twclid, epik, sc_cid, rdt_cid
object
Location dimensions. Each key is an array of { value, clicks }. Empty values are returned as Unknown. Keys: country, city, region, continent
object
Device dimensions. Each key is an array of { value, clicks }. Empty values are returned as Unknown Browser, Unknown OS, or Unknown Device. Keys: browser, os, device_type
array
Sales split by type and currency. Subscription transactions are recurring. Repeat one-time purchases stay new.
Show New vs Recurring Sale Properties
string
"new" or "recurring"
integer
Number of eligible transactions in this group
number
Gross sales amount for this group
string
Currency code, or UNKNOWN for legacy data
object
Paginated recent conversions. Customer email and IP are never returned.
Show Recent Conversions Properties
array
Conversion rows for the current page.
Show Conversion Properties
string
Transaction identifier
string
ISO 8601 timestamp of the transaction
object
Sale amount and currency ({ amount, currency })
object | null
Direct commission amount and currency, or null when none exists
string
Lowercase transaction status (for example "open", "complete", "partial_refunded")
object
Pagination metadata for recent_conversions only.
Show Pagination Properties
integer
Current page
integer
Page size
integer
Total matching conversions
integer
Total number of pages
boolean
Whether a next page exists
boolean
Whether a previous page exists
Errors
Status
Description
400
Validation error. Common cases: invalid range, unpaired start_date / end_date, end_date before start_date, invalid date, or page / limit out of range
401
Missing or invalid API key
403
API key lacks read:affiliates
404
Affiliate not found
429
Rate limit exceeded
curl -X GET "https://api.affonso.io/v1/affiliates/cmj8pptm10002p3010z8mk9ak/analytics" \ -H "Authorization: Bearer sk_live_your_api_key"
curl -X GET "https://api.affonso.io/v1/affiliates/cmj8pptm10002p3010z8mk9ak/analytics?start_date=2026-06-01&end_date=2026-06-30&page=1&limit=20" \ -H "Authorization: Bearer sk_live_your_api_key"