---
title: "List a customer marketing-consent history"
method: GET
path: "/v1/loyalty/consent-logs/users/{userId}"
tags: ["Loyalty"]
---

# List a customer marketing-consent history

`GET /v1/loyalty/consent-logs/users/{userId}`

## Request

- Base URL: `https://api.prod.keyban.io`
- URL: `https://api.prod.keyban.io/v1/loyalty/consent-logs/users/{userId}`
- Auth: API key in header `X-Api-Key`

Append-only GDPR proof-of-consent trail (art. 7.1) of every marketing opt-in/opt-out decision of one loyalty customer, newest first. Each entry records the decision, when it happened, and the channel it came through. Scoped to the caller's organization: the customer must have a loyalty account under it, otherwise 404.

## Path parameters

- `userId` string, uuid, required

## Query parameters

- `filters` union[]
  - union
    - object
      - `operator` 'or' | 'and', required
      - `value` union[], required
        - union
          - object
            - `field` 'id', required
            - `operator` 'eq', required
            - `value` string, required
          - object
            - `field` 'createdAt', required
            - `operator` 'gt' | 'lt' | 'gte' | 'lte', required
            - `value` string, date-time, required
          - object
            - `field` 'updatedAt', required
            - `operator` 'gt' | 'lt' | 'gte' | 'lte', required
            - `value` string, date-time, required
    - object
      - `field` 'id', required
      - `operator` 'eq', required
      - `value` string, required
    - object
      - `field` 'createdAt', required
      - `operator` 'gt' | 'lt' | 'gte' | 'lte', required
      - `value` string, date-time, required
    - object
      - `field` 'updatedAt', required
      - `operator` 'gt' | 'lt' | 'gte' | 'lte', required
      - `value` string, date-time, required
- `sorters` object[]
  - `field` 'id' | 'createdAt' | 'updatedAt' | 'occurredAt', required
  - `order` 'asc' | 'desc', required
- `currentPage` integer
- `pageSize` integer

## Response `200`

Consent history retrieved successfully

- PaginatedConsentLogDto
  - `data` object[], required: Array of items for the current page
    - `id` string, uuid, required: Entity UUID
    - `createdAt` string, date-time, required: Creation date (ISO 8601)
    - `updatedAt` string, date-time, required: Last update date (ISO 8601)
    - `user` string, uuid, required: Customer (AuthUser) whose consent decision this entry records.
    - `application` string, uuid, required: Application (data controller / brand) the decision applies to. The same person holds independent decisions per application, so consent for one brand never extends to another (#4484).
    - `purpose` 'marketing', required: Processing purpose the decision applies to. `marketing` = wallet campaign notifications (the only purpose today).
    - `consent` boolean, nullable, required: Decision recorded by this entry: true = consented, false = explicitly refused, null = decision withdrawn/reset. false and null are distinct legal events (refusal vs withdrawal) even though both stop sends.
    - `source` 'loyalty_app' | 'admin' | 'service', required: Channel the change came through: loyalty_app (customer self-service), admin (back-office), or service (server-side write, e.g. bulk retro-collection).
    - `occurredAt` string, date-time, required: RFC 3339 instant the decision was recorded. The authoritative timestamp of the proof of consent.
    - `termsVersion` string, nullable, required: Version of the terms/privacy policy in force when consent was given (what the customer agreed to). Null when not resolvable at write time.
  - `total` integer, required: Total count of items matching the query

## Other responses

- `401`: Unauthenticated

---

[API](https://skmtc.dev/keyban/apis/keyban-rest-apis.md) · [All operations](https://skmtc.dev/keyban/apis/keyban-rest-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/keyban/apis/keyban-rest-apis/revisions/0bb79a1da961?raw)
