Skip to content

Get collection point ID

GET /api/v1/external/public/collection-points

A collection point is a named location where consent is requested (e.g. “Signup Form” or “In-App Purchase Flow”). Its display_id is the bannerId you pass to the SDK.

Use the assetId you discovered in the previous step.


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": "Signup Form Banner",
"display_id": "CP010",
"description": "Consent banner shown at user signup",
"status": "active",
"version": "v1.0.0",
"purposes": [
"pppppppp-pppp-pppp-pppp-pppppppppppp",
"qqqqqqqq-qqqq-qqqq-qqqq-qqqqqqqqqqqq"
]
},
{
"asset_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"name": "In-App Purchase Flow",
"display_id": "CP011",
"description": "Consent for purchase-related data collection",
"status": "draft",
"version": "v1.0.1",
"purposes": [
"rrrrrrrr-rrrr-rrrr-rrrr-rrrrrrrrrrrr"
]
}
],
"count": 2
}

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


Returns all collection points for the specified asset.

{
"data": [
{
"asset_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"name": "Signup Form Banner",
"display_id": "CP010",
"description": "Consent banner shown at user signup",
"status": "active",
"version": "v1.0.0",
"purposes": [
"pppppppp-pppp-pppp-pppp-pppppppppppp",
"qqqqqqqq-qqqq-qqqq-qqqq-qqqqqqqqqqqq"
]
},
{
"asset_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"name": "In-App Purchase Flow",
"display_id": "CP011",
"description": "Consent for purchase-related data collection",
"status": "draft",
"version": "v1.0.1",
"purposes": [
"rrrrrrrr-rrrr-rrrr-rrrr-rrrrrrrrrrrr"
]
}
],
"count": 2
}
FieldDescription
idCollection point UUID.
display_idShort identifier used as bannerId in the SDK (e.g. CP010).
nameHuman-readable name set in the dashboard.
statusactive, draft, or archived. Only active collection points accept consent submissions.
versionVersion string of the collection point configuration.
purposesArray of purpose UUIDs associated with this collection point.
asset_idUUID of the parent asset.

BANNER_ID=CP010

You now have everything required to mount the consent banner. Choose your platform: