Run a report
Clicks, leads, customers, sales, refunds, revenue and commissions, cut by dimension over an inclusive range. Rows keyed direct are money that arrived without a partner; filtering by partner, group or tag reports that slice of the partner programme and excludes direct money. The window of the same length immediately before from rides along as previous_period with a basis-point delta, so a chart never needs two round trips; pass compare=none to skip it. drill_down_config says how a row's key becomes a filter.
Scope: read
Request
- Base URL: https://api.affiliaterail.com
- URL: https://api.affiliaterail.com/v1/reports
- Auth: HTTP bearer
Query parameters
ISO date, inclusive. Defaults to twelve months back.
ISO date, inclusive. Defaults to now.
Bucket size for the period dimension
previous_period (the default) returns the preceding window and the delta in the same response
Response
The report
Example response
{
"currency": "USD",
"from": "2026-08-21T10:15:30.000Z",
"to": "2026-08-21T10:15:30.000Z",
"rows": [
{
"revenue_minor": 2500,
"commissions_minor": 2500
}
],
"totals": {
"revenue_minor": 2500,
"commissions_minor": 2500
},
"previous_period": {
"from": "2026-08-21T10:15:30.000Z",
"to": "2026-08-21T10:15:30.000Z",
"rows": [
{
"revenue_minor": 2500,
"commissions_minor": 2500
}
],
"totals": {
"revenue_minor": 2500,
"commissions_minor": 2500
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.