---
title: "GET /v2/consents/unified/{subjectRef}"
method: GET
path: "/v2/consents/unified/{subjectRef}"
---

# GET /v2/consents/unified/{subjectRef}

`GET /v2/consents/unified/{subjectRef}`

## Request

- Base URL: `https://uc.api.osano.com`
- URL: `https://uc.api.osano.com/v2/consents/unified/{subjectRef}`
- Auth: API key in header `x-uc-api-key`
- TypeScript: <https://skmtc.dev/osano/apis/unified-consent-core-api/docs/v2/consents/unified/:subjectRef/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the unified consent for a subject.

## Path parameters

- `subjectRef` string, required

## Query parameters

- `ref` 'subject' | 'session'

## Headers

- `x-country-code-override` string
- `x-region-code-override` string

## Response `200`

Valid unified consent.

- object: Valid unified consent.
  - `unifiedConsent` Def4
    - `subjectId` string, required
    - `brandId` string, required
    - `channelIds` string[]
    - `compliance` Def0
      - `privacyPolicy` object
        - `version` string
        - `url` string, required
      - `gpc` integer
    - `actions` object[], required
      - `target` string, required
      - `vendor` string, required
      - `action` string, required
    - `attributes` unknown, required
    - `lastUpdateDate` string
    - `lastConflictDate` string
  - `conflicts` Def3[]
    - `type` string
    - `resolution` string
    - `actionsInConflict` object[]
      - `target` string
      - `vendor` string
      - `action` string
      - `consentId` string, nullable
      - `channelId` string, nullable
      - `createdAt` string, nullable

## Other responses

- `400`: No consents found for the subject

## Changes

- **2024-12-26** `2fe8098661eb`: 1 breaking
  - removed the required property `unifiedConsent/region` from the response with the `200` status

[Operation history](https://skmtc.dev/osano/apis/unified-consent-core-api/changes/v2/consents/unified/:subjectRef/get.md)

---

[API](https://skmtc.dev/osano/apis/unified-consent-core-api.md) - [All operations](https://skmtc.dev/osano/apis/unified-consent-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/osano/apis/unified-consent-core-api/revisions/669b3b5b4d06?raw)
