Get Started

Post Revenue Attributions

API endpoint for retrieving revenue attribution history for a specific post. Shows why a post was attributed a certain revenue amount across multiple sync windows.

GET/posts/{postId}/revenue-attributions

Headers

x-api-keystringrequired

Your Track My Posts API key

Query Parameters

workspaceSlugstringrequired

Workspace slug identifier

Example: my-workspace

limitinteger

Maximum number of attribution records to return

Example: 5

Responses

200Successful response with attribution data
400Bad request - validation error
401Unauthorized - authentication required
404Not found - post not found or doesn't belong to workspace
500Internal server error
curl "https://api.trackmyposts.com/posts/%7BpostId%7D/revenue-attributions?workspaceSlug=my-workspace&limit=5" \
  -H "x-api-key: YOUR_API_KEY"
{
  "postId": "123e4567-e89b-12d3-a456-426614174000",
  "totalAttributedCents": 5210,
  "latestConfidence": 0.89,
  "attributions": [
    {
      "attributedAt": "2024-01-12T06:00:00.000Z",
      "windowStart": "2024-01-05T00:00:00.000Z",
      "windowEnd": "2024-01-12T00:00:00.000Z",
      "workspaceTotalRevenueCents": 82000,
      "workspaceAttributedRevenueCents": 69700,
      "postRevenueCents": 5210,
      "sharePercent": 6.3,
      "rank": 2,
      "totalPosts": 38,
      "postWeight": 1901.5,
      "totalWeight": 30142.8,
      "confidence": 0.89,
      "viewsDelta": 15200,
      "likesDelta": 800,
      "commentsDelta": 92,
      "sharesDelta": 45,
      "savesDelta": 120
    }
  ]
}

Data Structures

View all 2 data structuresPosts

Explore all data structures used in this API endpoint