Get Tracking Status

Returns integration step statuses and Stripe connection info for a program

Retrieves the integration health of a program: whether each of the three setup steps (pageview, referrals, payments) is complete, a summary of recent test events for each step, and the connected Stripe account details.


Endpoint

GET /api/tracking/status/:programId


Authentication

This endpoint is protected by the verify-program-access workspace policy. The caller must be an authenticated dashboard user with tracking:read permission on the program. No Bearer API key is used.


Path Parameters

ParameterTypeRequiredDescription
programIdintegerYesThe numeric ID of the affiliate program

Response

{
  "data": {
    "programId": "42",
    "stepStatuses": {
      "pageview": "complete",
      "referrals": "pending",
      "payments": "complete"
    },
    "statistics": {
      "pageview": {
        "testEventCount": 3,
        "hasTestEvents": true,
        "latestTestEvent": {
          "id": 101,
          "timestamp": "2026-06-07T10:23:45.000Z",
          "createdAt": "2026-06-07T10:23:45.000Z"
        }
      },
      "referrals": {
        "testEventCount": 0,
        "hasTestEvents": false,
        "latestTestEvent": null
      },
      "payments": {
        "stripeConnectionStatus": "connected",
        "isStripeConnected": true,
        "stripeAccountId": "acct_1AbCdEfGhIjKlMnO",
        "chargesEnabled": true,
        "payoutsEnabled": true,
        "detailsSubmitted": true,
        "connectionDate": "2026-05-01T08:00:00.000Z"
      }
    },
    "hasPartners": true,
    "lastUpdated": "2026-06-08T12:00:00.000Z"
  }
}

Response fields

FieldTypeDescription
data.programIdstringThe program ID from the URL path
data.stepStatusesobjectStatus of each integration step: "complete" or "pending"
data.stepStatuses.pageviewstring"complete" when at least one test click event exists for the program
data.stepStatuses.referralsstring"complete" when at least one test lead event exists for the program
data.stepStatuses.paymentsstring"complete" when the advertiser's Stripe account stripeConnectionStatus is "connected"
data.statistics.pageview.testEventCountintegerNumber of test click events found (up to 10)
data.statistics.pageview.hasTestEventsbooleantrue if at least one test click event exists
data.statistics.pageview.latestTestEventobject | nullID and timestamps of the most recent test click event
data.statistics.referrals.testEventCountintegerNumber of test lead events found (up to 10)
data.statistics.referrals.hasTestEventsbooleantrue if at least one test lead event exists
data.statistics.referrals.latestTestEventobject | nullID and timestamps of the most recent test lead event
data.statistics.payments.stripeConnectionStatusstringRaw Stripe connection status from the advertiser record
data.statistics.payments.isStripeConnectedbooleantrue when stripeConnectionStatus === "connected"
data.statistics.payments.stripeAccountIdstring | nullStripe connected account ID (acct_...), or null if not connected
data.statistics.payments.chargesEnabledbooleanWhether the Stripe account can accept charges
data.statistics.payments.payoutsEnabledbooleanWhether the Stripe account can receive payouts
data.statistics.payments.detailsSubmittedbooleanWhether Stripe onboarding details have been submitted
data.statistics.payments.connectionDatestring | nullISO timestamp of when Stripe was connected, or null
data.hasPartnersbooleantrue when at least one approved partner-program record exists for this program
data.lastUpdatedstringISO timestamp of when this response was generated

Errors

StatusWhen
404programId does not match any affiliate program
500Internal server error while querying step data
Edit on GitHub
© 2026 Affitor