---
title: "Marketing attribution for services-model companies"
method: GET
path: "/companies/{companyId}/attribution"
tags: ["Attribution"]
---

# Marketing attribution for services-model companies

`GET /companies/{companyId}/attribution`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/attribution`
- Auth: HTTP bearer

Services-model marketing attribution: per-channel spend joined to matched clients and booked revenue (CAC, ROAS, LTV:CAC, payback) plus a budget-reallocation insight. Gated on businessModel === 'services' and a connected marketing source; returns an empty state (hasConnectedSource false, empty channels) otherwise. NOTE payback/LTV are estimates pending a Finance-confirmed gross-margin basis (see economicsBasis).

## Query parameters

- `period` 'mtd' | 't90'

## Response `200`

Attribution channels, totals, reallocation, and sources

- object
  - `success` boolean
  - `data` AttributionResult
    - `period` 'mtd' | 't90', required
    - `channels` AttributionChannel[], required
      - `id` string, required
      - `channel` string, required
      - `source` string, nullable
      - `medium` string, nullable
      - `paid` boolean, required
      - `spendCents` integer, required
      - `leads` integer
      - `clients` integer, required
      - `firstYearValueCents` integer
      - `cacCents` integer, nullable
      - `roas` number, nullable
      - `matched` AttributionMatchedClient[], required
        - `client` string, required
        - `campaign` string, nullable
        - `gclid` string, nullable
        - `gaClientId` string, required
        - `signedOn` string, nullable
        - `firstValueCents` integer, required
        - `ltvCents` integer, required
    - `totals` AttributionTotals, required: KPI-strip totals. paybackMonths and avgClientLtvCents are estimates (see economicsBasis).
      - `spendCents` integer, required
      - `clients` integer, required
      - `blendedCacCents` integer, nullable
      - `ltvCac` number, nullable
      - `paidRoas` number, nullable
      - `paybackMonths` number, nullable
      - `avgClientLtvCents` integer, required
      - `economicsBasis` string, required
    - `reallocation` AttributionReallocation: Budget-reallocation insight; present only when best and worst paid channels differ.
      - `fromChannel` string, required
      - `toChannel` string, required
      - `fromRoas` number
      - `toRoas` number
      - `suggestedShiftCents` integer, required
      - `projectedBlendedRoasDelta` number
    - `sources` AttributionMarketingSource[], required
      - `provider` string, required
      - `status` string, required
      - `connectedAt` string, nullable
      - `lastSyncedAt` string, nullable
    - `hasConnectedSource` boolean, required

## Other responses

- `422`: Invalid period

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
