Skip to content

Fetch collection point details

A collection point is a named location where consent is requested (e.g. “App Signup Flow”). Its display_id is the bannerId you pass to TruConsentModal.

Use the assetId discovered in Step 2.

Terminal window
curl -X GET "https://truapi-dev.truconsent.io/api/v1/external/public/collection-points?asset_id=$ASSET_ID" \
-H "X-API-Key: $ADMIN_API_KEY" \
-H "X-Org-Id: $ORGANIZATION_ID"
{
"data": [
{
"asset_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"name": "App Signup Flow",
"display_id": "CP003",
"description": "Consent banner shown at app signup",
"status": "active",
"version": "v1.0.0",
"purposes": [
"pppppppp-pppp-pppp-pppp-pppppppppppp"
]
},
{
"asset_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"name": "In-App Purchase Flow",
"display_id": "CP007",
"description": "Consent for purchase-related data collection",
"status": "draft",
"version": "v1.0.0",
"purposes": [
"rrrrrrrr-rrrr-rrrr-rrrr-rrrrrrrrrrrr"
]
}
],
"count": 2
}

The display_id (e.g. CP003) is your bannerId. Use the collection point whose status is active and whose name matches the consent flow you are integrating.

BANNER_ID=CP003

You now have all values required to mount the SDK widgets.