Get Started

Post Revenue Attributions Data Structures

All data structures used in the Post Revenue Attributions API endpoint.

Revenue Attribution

A single revenue attribution event showing how much was attributed in one sync window

Revenue Attribution

object

A single revenue attribution event showing how much was attributed in one sync window

attributedAtstring (date-time)required

When this attribution was calculated

windowStartstring (date-time)required

Start of the attribution window

windowEndstring (date-time)required

End of the attribution window

workspaceTotalRevenueCentsintegerrequired

Total revenue earned by the workspace in this window (cents)

workspaceAttributedRevenueCentsintegerrequired

Revenue attributed to posts after baseline deduction (cents)

postRevenueCentsintegerrequired

Revenue attributed to this post (cents)

sharePercentnumberrequired

This post's share of attributed revenue as a percentage

rankintegerrequired

This post's rank by weight among all attributed posts

totalPostsintegerrequired

Total number of posts that received attribution

postWeightnumberrequired

This post's attribution weight score

totalWeightnumberrequired

Sum of all post weights in this window

confidencenumberrequired

Confidence in this attribution (0-1), based on signal strength

viewsDeltaintegerrequired

Views gained during this window

likesDeltaintegerrequired

Likes gained during this window

commentsDeltaintegerrequired

Comments gained during this window

sharesDeltainteger | null

Shares gained during this window (null if not available)

savesDeltainteger | null

Saves gained during this window (null if not available)

Revenue Attributions Response

Response containing post revenue attribution history

Revenue Attributions Response

object

Response containing post revenue attribution history

postIdstring (uuid)required

The post identifier

totalAttributedCentsintegerrequired

Sum of all attributed revenue for this post in cents

latestConfidencenumberrequired

Confidence score from the most recent attribution (0-1)

interface RevenueAttribution {
  /** When this attribution was calculated */
  attributedAt: string;
  /** Start of the attribution window */
  windowStart: string;
  /** End of the attribution window */
  windowEnd: string;
  /** Total revenue earned by the workspace in this window (cents) */
  workspaceTotalRevenueCents: number;
  /** Revenue attributed to posts after baseline deduction (cents) */
  workspaceAttributedRevenueCents: number;
  /** Revenue attributed to this post (cents) */
  postRevenueCents: number;
  /** This post's share of attributed revenue as a percentage */
  sharePercent: number;
  /** This post's rank by weight among all attributed posts */
  rank: number;
  /** Total number of posts that received attribution */
  totalPosts: number;
  /** This post's attribution weight score */
  postWeight: number;
  /** Sum of all post weights in this window */
  totalWeight: number;
  /** Confidence in this attribution (0-1), based on signal strength */
  confidence: number;
  /** Views gained during this window */
  viewsDelta: number;
  /** Likes gained during this window */
  likesDelta: number;
  /** Comments gained during this window */
  commentsDelta: number;
  /** Shares gained during this window (null if not available) */
  sharesDelta?: number;
  /** Saves gained during this window (null if not available) */
  savesDelta?: number;
}

interface RevenueAttributionsResponse {
  /** The post identifier */
  postId: string;
  /** Sum of all attributed revenue for this post in cents */
  totalAttributedCents: number;
  /** Confidence score from the most recent attribution (0-1) */
  latestConfidence: number;
  /** List of attribution events, newest first */
  attributions: RevenueAttribution[];
}