GET
/statistics/conversions/count
Get conversion counts by day
Statistics
Description
Retrieve daily conversion statistics for your affiliate business.
Returns a time series of conversion counts grouped by day, with zero values filled in for days with no data.
Authentication Required: User must be authenticated and have the 'affiliate' role.
Users can only query their own affiliate_id.
Parameters
affiliate_id
integer
query
required
The affiliate ID to get conversion statistics for
start_date
string
query
Start date for the statistics range (ISO 8601 format). Defaults to 30 days ago.
end_date
string
query
End date for the statistics range (ISO 8601 format). Defaults to current time.
reward_status
string
query
Filter conversions by reward status. When omitted, all reward statuses are included.
Responses
200
Successful response with daily conversion counts
application/jsonstatusstring
Example:
successdataarray
Array of daily conversion counts, including days with zero conversions
Example:
{
"status": "success",
"data": [
{
"date": "2024-01-01",
"count": 12
},
{
"date": "2024-01-02",
"count": 0
},
{
"date": "2024-01-03",
"count": 18
},
{
"date": "2024-01-04",
"count": 9
}
]
}
401
Authentication required
application/jsonExample:
{
"status": "error",
"message": "Not authenticated or insufficient permissions"
}
500
Internal server error
application/jsonstatusstring
Example:
errormessagestring
Example:
Failed to fetch conversion statisticserrorstring
Example:
Connection error