Documentation · API reference
GET/api/v1/sites/{site}/revenue

Revenue in one currency, and who gets the credit three ways

Revenue in one currency, and who gets the credit three ways.

Parameters

sitein the address
neededA site's id or name
periodin the query
30d when left out
currencyin the query
Three letters; the site's own when left out

The answer

Status 200

RevenueReport Revenue in one currency. Money keeps the currency it was charged in and is never converted (RV-04).

all_minor
integerneeded
all_orders
integerneededEvery order, counted the easy way: an easy figure.
buckets
list of BucketRowneeded
by_property
list of ProductRowneeded
coverage
Coverageneeded
credit
list of CreditRowneeded
currencies
list of stringneededEvery currency there are orders in.
currency
stringneeded
days_to_order
number or nullMedian days from a visitor's first visit to their order.
known_minor
integerneeded
known_orders
integerneededOrders by visitors who agreed: a hard figure, and a part of the first, never added to it.
period
PeriodViewneeded
property
string or nullOrders by one property of the event, when it has one.
says
stringneeded
site
stringneeded

Asking

With your token from Settings
curl https://tidekeeper.eu/api/v1/sites/example.org/revenue \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/revenue", {
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
  },
}).then((r) => r.json());