RevenueHogdocs
API

Revenue export API

Download your workspace's revenue lines as a streamed CSV from GET /api/export/revenue, filtered by date range and app, with columns and error responses.

GET /api/export/revenue streams your workspace's daily revenue lines as CSV. It backs the dashboard export (see Exports) and works with a session cookie or a Bearer session token.

GET/api/export/revenueSession

Query parameters

Prop

Type

curl -H "Authorization: Bearer <session token>" \
  "https://revenuehog.dev/api/export/revenue?range=3m" -o revenue.csv

Response

content-type: text/csv; charset=utf-8, cache-control: no-store, and a download filename of revenuehog-<range>[-<app-slug>]-<YYYY-MM-DD>.csv. Rows are ordered newest date first and use CRLF line endings.

ColumnMeaning
dateDay, YYYY-MM-DD (UTC)
appApp display name
product_idStore product ID
product_nameProduct name
countryStorefront country
currencyLocal currency
unitsUnits sold
refundsRefunded units
gross_usdGross in USD
proceeds_usdProceeds in USD
proceeds_localProceeds in local currency
estimatedyes when the line is an estimate not yet replaced by a report

Errors

StatusBody
401{ "error": "unauthorized" }
404{ "error": "unknown app" }

Last updated on

On this page