Перейти к содержимому

Get revenue, cost and ROI across the whole workspace

GET
/api/v1/analytics/overview/economics
curl --request GET \
--url 'https://example.com/api/v1/analytics/overview/economics?from=2026-02-22T00%3A00%3A00Z&to=2026-03-01T23%3A59%3A59Z&granularity=hour' \
--header 'Authorization: Bearer <token>'
from
string

Example

2026-02-22T00:00:00Z

Start date (ISO 8601). Default: 7 days ago

to
string

Example

2026-03-01T23:59:59Z

End date (ISO 8601). Default: now

granularity
string
default: day
Allowed values: hour day week month
Media typeapplication/json
object
from
required
string
to
required
string
clicks
required
number
uniqueClicks
required
number
conversions
required
number
revenue
required

Confirmed income only (sale / rebill / upsell); leads and rejected are excluded. A conversion without payout uses its offer payout (fixed-payout offers).

number
cost
required
number
profit
required

Revenue - cost

number
roi

(revenue - cost) / cost * 100. Null when cost is 0.

object
cr

(leads + sales) / clicks * 100 — rejected conversions, rebills and upsells are not counted. Null when clicks is 0.

object
epc

Earnings per click: revenue / clicks. Null when clicks is 0.

object
cpc

Cost per click: cost / clicks. Null when clicks is 0.

object
cpm

Cost per 1000 CLICKS (not impressions — impressions are not tracked). Null when clicks is 0.

object
mixedCurrencies
required

True when some revenue/cost could not be converted into the base currency (no FX rate on that date) and so ended up in a different currency than the rest. Everything else is converted by the rate of its own date; treat the totals as informational when this is set.

boolean
workspaceId
required
string

Example generated

{
"from": "example",
"to": "example",
"clicks": 1,
"uniqueClicks": 1,
"conversions": 1,
"revenue": 1,
"cost": 1,
"profit": 1,
"roi": {},
"cr": {},
"epc": {},
"cpc": {},
"cpm": {},
"mixedCurrencies": true,
"workspaceId": "example"
}