View as Markdown

Metrics

The same profit numbers the dashboard shows, for any date range. One request, one JSON object, money as decimal strings.


GET /v1/metrics

Auth: any key with read (pk_plp_ or sk_plp_).

Query parameters, both optional:

ParamMeaning
fromYYYY-MM-DD, inclusive
toYYYY-MM-DD, inclusive

Defaults to the last 30 days ending today (UTC). Maximum range is 366 days; an inverted or malformed range is rejected.

Response fields, all money in the shop currency:

FieldMeaning
revenueOrder revenue before refunds, at the order date
refundsMoney returned to customers, at the refund date
net_revenuerevenue minus refunds
ordersOrder count (JSON number; it is a count, not money)
cogsProduct costs, minus restocked-refund credits
gateway_feesPayment gateway fees
ad_spendAd spend in the shop currency
net_profitnet_revenue minus cogs, gateway_fees, and ad_spend
aovAverage order value; null when there are no orders
merad_spend / revenue; null when revenue is zero
blended_roasrevenue / ad_spend; null when spend is zero

Ad accounts running a different currency than the shop are excluded until currency conversion lands; when that happens the response carries a currency_note explaining what was left out.

Request
curl "https://api.plutoprofit.com/v1/metrics?from=2026-06-15&to=2026-07-14" \
  -H "Authorization: Bearer pk_plp_your_key"
Response
{
  "from": "2026-06-15",
  "to": "2026-07-14",
  "currency": "DKK",
  "revenue": "184230.00",
  "refunds": "9120.50",
  "net_revenue": "175109.50",
  "orders": 412,
  "cogs": "61480.25",
  "gateway_fees": "4972.10",
  "ad_spend": "38400.00",
  "net_profit": "70257.15",
  "aov": "447.16",
  "mer": "0.2084",
  "blended_roas": "4.7977"
}

GET /v1/metrics/definitions

Auth: any key with read.

The metric catalog: what every field above means and the formula behind it. Static per API version, so it is safe to cache. Useful for building tooltips or letting an AI agent explain the numbers.

Response
{
  "metrics": [
    {
      "key": "net_profit",
      "label": "Net profit",
      "formula": "net_revenue - cogs - gateway_fees - ad_spend",
      "description": "What is left after product costs, gateway fees, and ad spend."
    }
  ]
}