---
title: "Retrieves all collections for a given configId based on jurisdiction"
method: GET
path: "/v2/collections"
---

# Retrieves all collections for a given configId based on jurisdiction

`GET /v2/collections`

## Request

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

Uses the configId embedded in the Unified Consent API key to retrieve an aggregate of all applicable collections of privacy protocols for a given jurisdiction. The type can either be 'draft' or 'published'. If the type is not provided, the default is 'published'. If the jurisdiction is not provided, IP geolocation is used to determine the jurisdiction. The response merges the configuration's default collection, the collections of the jurisdiction's parents and the jurisdiction's own collection, so 'us-ca' also returns the 'us' protocols. When nothing matches, the response has no `collection`.

## Query parameters

- `jurisdiction` string
- `type` 'published' | 'draft'

## Response `200`

The collection for the jurisdiction and every jurisdiction available for the configuration

- Def6
  - `jurisdictions` string[]: Every jurisdiction that has a collection in this configuration, whichever one was requested.
  - `collection` Def5
    - `collectionId` string
    - `name` string
    - `frameworks` string[]
    - `configIds` string[]
    - `jurisdiction` string
    - `created` string
    - `updated` string
    - `type` string
    - `consents` object[]
      - `privacyProtocolId` string, nullable: Privacy protocol id. Send it as the `target` of a consent action.
      - `name` string, nullable
      - `trigger` string, nullable
      - `type` 'consent' | 'preference' | 'null', nullable
      - `title` string, nullable
      - `description` string, nullable
      - `defaultAction` 'ACCEPT' | 'REJECT' | 'UNSELECTED' | 'null', nullable
      - `acceptWording` string, nullable
      - `rejectWording` string, nullable
      - `enabled` boolean, nullable
      - `collectionId` string, nullable
      - `frameworks` string[], nullable
      - `frameworkDefaults` object, nullable
        - `gpc` boolean: Whether GPC resolves this protocol to ACCEPT.
      - `integrations` object[], nullable
    - `preferences` object[]
      - `privacyProtocolId` string, nullable: Privacy protocol id. Send it as the `target` of a consent action.
      - `name` string, nullable
      - `trigger` string, nullable
      - `type` 'consent' | 'preference' | 'null', nullable
      - `title` string, nullable
      - `description` string, nullable
      - `defaultAction` 'ACCEPT' | 'REJECT' | 'UNSELECTED' | 'null', nullable
      - `acceptWording` string, nullable
      - `rejectWording` string, nullable
      - `enabled` boolean, nullable
      - `collectionId` string, nullable
      - `frameworks` string[], nullable
      - `frameworkDefaults` object, nullable
        - `gpc` boolean: Whether GPC resolves this protocol to ACCEPT.
      - `integrations` object[], nullable

## Changes

- **2026-11-06** `669b3b5b4d06`: 28 info
  - added the optional property `collection/consents/items/acceptWording` to the response with the `200` status
  - added the optional property `collection/consents/items/collectionId` to the response with the `200` status
  - added the optional property `collection/consents/items/defaultAction` to the response with the `200` status
  - added the optional property `collection/consents/items/description` to the response with the `200` status
  - …24 more
- **2026-06-14** `dedbbc618db6`: 2 breaking, 2 info
  - the `query` request parameter `type` was restricted to a list of enum values
  - for the `query` request parameter `type`, default value `published` was added
  - added the new enum value `draft` to the `query` request parameter `type`
  - added the new enum value `published` to the `query` request parameter `type`
- **2024-12-26** `2fe8098661eb`: 2 warning
  - deleted the `query` request parameter `configId`
  - deleted the `query` request parameter `customerId`

[Operation history](https://skmtc.dev/osano/apis/unified-consent-core-api/changes/v2/collections/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)
