> This page is for version 2024-10-01 (default).
> For other versions, use one of these documentation indexes:
> - 2024-10-01 (default): https://docs.getkard.com/2024-10-01/llms.txt
> - Legacy: https://docs.getkard.com/legacy/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getkard.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getkard.com/_mcp/server.

# List Attribution Events

GET https://rewards-api.getkard.com/v2/issuers/{organizationId}/attributions

Retrieve the attribution events Kard stores for transaction matching, newest `eventDate` first.
These are the activations and impressions that count toward matching, plus every activate and boost
sent through the CTA endpoints. It is not a log of every impression, view or click.

`filter[startDate]` and `filter[endDate]` are required when `filter[userId]` is not provided, with a window of 31 days at most.

Required scopes: `rewards/attributions.read`

Reference: https://docs.getkard.com/api/attributions/list-attributions

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://rewards-api.getkard.com` (Production, default)
- `https://test-rewards-api.getkard.com` (Sandbox)

## Request

### Path parameters

- `organizationId` (string, required) — Your issuer organization ID, provided by Kard

### Query parameters

- `filter[userId]` (string, optional) — Return events for this user only
- `filter[type]` (enum, optional) — Return events of this attribution type only
  - Allowed values: `offerAttribution`, `notificationAttribution`, `placementSlotAttribution`
- `filter[entityId]` (string, optional) — The offer, notification or slot ID, depending on `filter[type]`. To look up an offer, use it with `filter[type]=offerAttribution`.
- `filter[eventCode]` (enum, optional) — Return events with any of these event codes
  - Allowed values: `IMPRESSION`, `VIEW`, `ACTIVATE`, `BOOST`
- `filter[medium]` (enum, optional) — Return events with any of these mediums
  - Allowed values: `BROWSE`, `EMAIL`, `MAP`, `SEARCH`, `CTA`, `PUSH`
- `filter[rank]` (integer, optional) — Match `state.rank`, the offer's position in the list when the event happened. Only events recorded after this endpoint launched carry `state`.
- `filter[placementId]` (string, optional) — Match `state.placementId`. Only events recorded after this endpoint launched carry `state`.
- `filter[startDate]` (datetime, optional) — Return events with `eventDate` at or after this time (ISO 8601, inclusive)
- `filter[endDate]` (datetime, optional) — Return events with `eventDate` before this time (ISO 8601, exclusive)
- `page[after]` (string, optional) — Cursor for forward pagination (next page), taken from `links.next`.
- `page[before]` (string, optional) — Cursor for backward pagination (previous page), taken from `links.prev`.
- `page[size]` (integer, optional) — Number of items per page. Defaults to 10 if not specified and maximum value allowed 100 items per page.

## Response

### 200

- `data` (list of IssuerAttribution, required)
- `links` (Links, required) — Related links to the API call

## Errors

### 401 Unauthorized Error

- `errors` (list of ErrorObject, required)

### 500 Internal Server Error

- `errors` (list of ErrorObject, required)

### 400 Invalid Request

- `errors` (list of ErrorObject, required)

### 429 Too Many Requests Error

The issuer's traffic grew faster than its allowed rate, or the endpoint's own limit was reached. If the response includes a `Retry-After` header, wait that many seconds before retrying. See [Rate Limits](/2024-10-01/api/integration-guides/rate-limits).

- `errors` (list of ErrorObject, required)

## Types

### IssuerAttribution

- `type`: `offerAttribution`
  - `attributes` (IssuerOfferAttributionAttributes, required)
  - `id` (string, required) — Kard's attribution ID
  - `relationships` (IssuerOfferAttributionRelationships, required)
- `type`: `notificationAttribution`
  - `attributes` (IssuerNotificationAttributionAttributes, required)
  - `id` (string, required) — Kard's attribution ID
  - `relationships` (IssuerNotificationAttributionRelationships, required)
- `type`: `placementSlotAttribution`
  - `attributes` (IssuerPlacementSlotAttributionAttributes, required)
  - `id` (string, required) — Kard's attribution ID
  - `relationships` (IssuerPlacementSlotAttributionRelationships, required)

### Links

Related links to the API call

- `self` (string, required)
- `prev` (string, optional)
- `next` (string, optional)

### ErrorObject

- `status` (string, required) — Status code returned from the request
- `title` (string, required) — Name of error
- `detail` (string, required) — Description of the specific occurance of the error
- `source` (ErrorSource, optional) — An object containing a reference to the primary source of the error
- `id` (string, optional) — The id of the resource which caused the error. Always returned for multi-status errors.

### IssuerOfferAttributionAttributes

- `userId` (string, required) — The ID of the user as defined on the issuers system
- `entityId` (string, required) — The offer ID
- `eventCode` (enum, required) — The event code of attribution event.
  - Allowed values: `IMPRESSION`, `VIEW`, `ACTIVATE`, `BOOST`
- `medium` (enum, required) — Where the offer attribution event is taking place in your rewards experience.
  - Allowed values: `BROWSE`, `EMAIL`, `MAP`, `SEARCH`, `CTA`, `PUSH`
- `eventDate` (datetime, required) — The event time you sent
- `createdAt` (datetime, required) — When Kard recorded the event
- `state` (AttributionState, optional) — Placement context, present only when you sent it

### IssuerOfferAttributionRelationships

- `user` (RelationshipSingle, required)
- `offer` (RelationshipSingle, required)

### IssuerNotificationAttributionAttributes

- `userId` (string, required) — The ID of the user as defined on the issuers system
- `entityId` (string, required) — The notification ID
- `eventCode` (enum, required) — The event code of attribution event.
  - Allowed values: `IMPRESSION`, `VIEW`, `ACTIVATE`, `BOOST`
- `medium` (enum, required) — Where the notification attribution event is taking place in your rewards experience.
  - Allowed values: `PUSH`, `EMAIL`
- `eventDate` (datetime, required) — The event time you sent
- `createdAt` (datetime, required) — When Kard recorded the event
- `state` (AttributionState, optional) — Placement context, present only when you sent it

### IssuerNotificationAttributionRelationships

- `user` (RelationshipSingle, required)
- `notification` (RelationshipSingle, required)

### IssuerPlacementSlotAttributionAttributes

- `userId` (string, required) — The ID of the user as defined on the issuers system
- `entityId` (string, required) — The slot ID (matches `state.slotId`)
- `eventCode` (enum, required) — The event code of attribution event.
  - Allowed values: `IMPRESSION`, `VIEW`, `ACTIVATE`, `BOOST`
- `medium` (enum, required) — Where the placement-slot attribution event is taking place in your rewards experience.
  - Allowed values: `CTA`
- `eventDate` (datetime, required) — The event time you sent
- `createdAt` (datetime, required) — When Kard recorded the event
- `state` (AttributionState, optional) — Placement context, present only when you sent it

### IssuerPlacementSlotAttributionRelationships

- `user` (RelationshipSingle, required)
- `slot` (RelationshipSingle, required)

### ErrorSource

- `pointer` (string, optional) — A JSON pointer to the value in the request document that caused the error
- `parameter` (string, optional) — A string indicating which URI query parameter caused the error
- `header` (string, optional) — A string indicating the name of a single request header which caused the error

### AttributionState

- `rank` (integer, optional) — The position of the offer in the list shown to the user (1-indexed)
- `filters` (list of AttributionFilter, optional) — The active filters when the user saw the offer
- `placementId` (string, optional) — Unique identifier of the placement the attribution event originated from
- `slotId` (string, optional) — Stable identifier for the slot within the placement

### RelationshipSingle

- `data` (RelationshipData, required)

### AttributionFilter

- `name` (string, required)
- `value` (string, required)

### RelationshipData

- `type` (string, required) — Type of document returned
- `id` (string, required) — The ID of the related resource

## Examples

**Response**

```json
{
  "data": [
    {
      "type": "offerAttribution",
      "attributes": {
        "userId": "user-123",
        "entityId": "offer-456",
        "eventCode": "ACTIVATE",
        "medium": "CTA",
        "eventDate": "2026-09-30T14:02:11Z",
        "createdAt": "2026-09-30T14:02:13Z",
        "state": {
          "rank": 3,
          "filters": [
            {
              "name": "category",
              "value": "DINING"
            }
          ],
          "placementId": "placement-789",
          "slotId": "slot-1"
        }
      },
      "id": "0b9a7e1c-6f1e-4c43-9a1e-3c0f2b7d9a11",
      "relationships": {
        "user": {
          "data": {
            "type": "user",
            "id": "user-123"
          }
        },
        "offer": {
          "data": {
            "type": "offer",
            "id": "offer-456"
          }
        }
      }
    }
  ],
  "links": {
    "self": "/v2/issuers/organization-123/attributions?filter[userId]=user-123&page[size]=10",
    "next": "/v2/issuers/organization-123/attributions?filter[userId]=user-123&page[size]=10&page[after]=eyJ..."
  }
}
```

**SDK Code**

```python
import requests

url = "https://rewards-api.getkard.com/v2/issuers/organization-123/attributions"

querystring = {"filter[userId]":"user-123","filter[type]":"offerAttribution","filter[entityId]":"offer-456","filter[eventCode]":"ACTIVATE"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://rewards-api.getkard.com/v2/issuers/organization-123/attributions?filter%5BuserId%5D=user-123&filter%5Btype%5D=offerAttribution&filter%5BentityId%5D=offer-456&filter%5BeventCode%5D=ACTIVATE")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```