For the complete documentation index, see llms.txt. This page is also available as Markdown.

Earnings

Earnings

Cross-cutting earnings aggregation for a publication, across its recommendations and offers. Earnings combine paid recommendation-referral commission (confirmed plus a confirmation-rate-estimated pending amount) and confirmed offer-conversion commission. Every figure is in US dollars.

The report takes one of three shapes (it never mixes them), controlled by granularity and group_by:

  • granularity=total, no group_by — one overall figure.

  • granularity=total with group_by — one figure per group, ranked highest-first.

  • granularity=daily/weekly/monthly — one figure per time bucket.

Get earnings

GET https://api.sparkloop.app/v3/publications/:publication_uuid/earnings

Path Parameters

Name
Type
Description

publication_uuid*

String

The publication's UUID.

Query Parameters

Name
Type
Description

from

String

Start date (YYYY-MM-DD). Defaults to 30 days ago.

to

String

End date (YYYY-MM-DD). Defaults to today.

channel

String

Restrict to a single referral channel (e.g. signup_flow, recommendations_hub). Unsupported values return 400 with the list of valid channels.

group_by

String

utm_campaign, recommendation, or offer. Only valid with granularity=total.

granularity

String

total (default), daily, weekly, or monthly.

expand

String

Inline the promoted thing on each grouped row instead of a bare uuid: recommended_publication (with group_by=recommendation) or offer (with group_by=offer).