Revenue report
const url = 'https://digize.com/api/v1/analytics/revenue';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/analytics/revenue \ --header 'x-api-key: <x-api-key>'Gross and net revenue, refunds and average order for the last 30 days against the 30 before; 12 months by sales channel; sales by category and product; subscription orders.
Needs the analytics:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
object
object
Against the period before, in percent.
Weekly, the last 12 weeks, oldest first.
object
Against the period before, in percent.
Weekly, the last 12 weeks, oldest first.
object
Against the period before, in percent.
Weekly, the last 12 weeks, oldest first.
object
Against the period before, in percent.
Weekly, the last 12 weeks, oldest first.
object
object
object
object
object
Against the period before, in percent.
Weekly, the last 12 weeks, oldest first.
object
Example generated
{ "gross": { "value": 1, "change": 1, "trend": [ 1 ] }, "refunds": { "value": 1, "change": 1, "trend": [ 1 ] }, "net": { "value": 1, "change": 1, "trend": [ 1 ] }, "averageOrder": { "value": 1, "change": 1, "trend": [ 1 ] }, "months": [ { "month": "2026-04-15T12:00:00Z", "storefront": 1, "subscription": 1, "checkoutLink": 1, "refunds": 1, "orders": 1 } ], "categories": [ { "label": "example", "value": 1 } ], "products": [ { "id": "example", "name": "example", "category": "example", "units": 1, "orders": 1, "revenue": 1 } ], "subscriptions": { "mrr": { "value": 1, "change": 1, "trend": [ 1 ] }, "active": 1, "started": 1, "lapsed": 1, "churnRate": 1, "months": [ { "month": "2026-04-15T12:00:00Z", "mrr": 1 } ] }}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}