Skip to content

List banners

GET /banners

Use this endpoint to retrieve every collection point configured for your organization, along with each collection point’s associated purposes, data elements, and legal entities. Each purpose includes a default consented value of "declined" — this represents no recorded user interaction.

To retrieve banners with a specific user’s consent status overlaid, use GET /banners/user/:user_id instead.

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour tenant API key

Response

200 OK — an array of BannerMeta objects, one per collection point.

FieldTypeDescription
banner_idstringUUID of the collection point
collection_pointstringUUID of the collection point. Identical to banner_id.
titlestringDisplay name of the collection point
assetobject or nullThe asset associated with this collection point, or null if none is configured
purposesarrayPurposes linked to this collection point
data_elementsarrayData elements linked across all purposes on this collection point
legal_entitiesarrayLegal entities linked across all purposes on this collection point

asset fields:

FieldTypeDescription
idstringUUID of the asset
namestringDisplay name
descriptionstring or nullDescription
asset_typestring or nullClassification (for example, "website" or "mobile_app")

purposes[] fields:

FieldTypeDescription
idstringUUID of the purpose
namestringDisplay name
is_mandatorybooleanWhether the purpose is mandatory
expiry_periodstring or nullHuman-readable expiry period (for example, "1 Year")
relationshipsobjectRaw relationship maps to data elements, legal entities, and other entities by UUID
consentedstringDefault consent status. Always "declined" on this endpoint.

Errors

StatusDescription
400Tenant context could not be resolved from the provided API key
500Unexpected server error

Example

Terminal window
curl --request GET \
--url https://api.truConsent.io/banners \
--header "X-API-Key: YOUR_API_KEY"
[
{
"banner_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"collection_point": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Website Sign-up Consent",
"asset": {
"id": "f1e2d3c4-b5a6-7890-abcd-123456789012",
"name": "Marketing Website",
"description": "Public-facing marketing site",
"asset_type": "website"
},
"purposes": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Marketing Communications",
"is_mandatory": false,
"expiry_period": "1 Year",
"consented": "declined",
"relationships": {
"data_elements": ["de-uuid-1"],
"legal_entities": ["le-uuid-1"]
}
}
],
"data_elements": [
{
"id": "de-uuid-1",
"name": "Email Address",
"description": "User's primary email"
}
],
"legal_entities": [
{
"id": "le-uuid-1",
"name": "Acme Corp Ltd",
"display_id": "LE-001"
}
]
}
]