> ## Documentation Index
> Fetch the complete documentation index at: https://docs.droplinked.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream 6 — Attribution

> Affiliate attribution records — link token, agent, session — projected from AffiliateAttributionRecord.

<Note>**BETA.** The attribution stream projects affiliate attribution records from `AffiliateAttributionRecord` (joined to the merchant's products).</Note>

The **attribution stream** is the affiliate attribution record: the link token that drove the
visit, the affiliate agent, the product, the session, and the attribution-window expiry. Rows are
scoped to the products owned by the API key's merchant.

## Endpoint

```
GET /v1/api/inventory-os/streams/attribution
```

**Query parameters:**

| Param    | Type     | Notes                                                |
| -------- | -------- | ---------------------------------------------------- |
| `limit`  | int      | 1–200, default 50                                    |
| `cursor` | string   | Opaque pagination token                              |
| `since`  | ISO-8601 | Optional; records created on or after this timestamp |

## Row shape

```json theme={null}
{
  "id": "665fattr123…",
  "linkToken": "lnk_4xy…",
  "agentId": "665fagt123…",
  "productId": "665f8abc123…",
  "sessionId": "sess_a1b2c3…",
  "expiresAt": "2026-07-01T11:55:42.000Z",
  "createdAt": "2026-06-01T11:55:42.000Z"
}
```

| Field       | Meaning                                                                   |
| ----------- | ------------------------------------------------------------------------- |
| `id`        | `AffiliateAttributionRecord` id; pagination cursor advances on this field |
| `linkToken` | The affiliate link token that produced the attribution                    |
| `agentId`   | The affiliate agent credited                                              |
| `productId` | The attributed product (join key to the catalog stream)                   |
| `sessionId` | Visitor session                                                           |
| `expiresAt` | Attribution-window expiry                                                 |

## Response envelope

```json theme={null}
{
  "streamType": "attribution",
  "merchantId": "65df8abc123…",
  "data": [ /* rows */ ],
  "count": 50,
  "nextCursor": "NjY1ZmF0dHIxMjM..."
}
```

## curl

```bash theme={null}
curl "https://apiv3.droplinked.com/v1/api/inventory-os/streams/attribution?since=2026-05-31T00:00:00.000Z&limit=200" \
  -H "x-droplinked-api-key: REPLACE_ME"
```

## Affiliate-engine usage

The attribution stream pairs with the sell-through stream (3, commission events) and the
settlement stream (7, order payments) to reconcile which agent and link drove each settled sale.
Use `since` to pull only the new attributions since the last sync.

## Rate limits

Low-budget class — **250 reads/min/key**, up to **3 subscriptions/key**.

## Related

* [Sell-through stream](/developers/inventory-os-api/streams/sell-through) — commission events per merchant
* [Settlement stream](/developers/inventory-os-api/streams/settlement) — order payment + financial detail
* [Webhook subscriptions](/developers/inventory-os-api/subscriptions) — `attribution.changed` events
