Data retrieval
This page covers the key data-retrieval endpoints on the truAPI (https://truapi-dev.truconsent.io). All examples assume X-Org-Id and X-API-Key headers are set.
Assets
Section titled “Assets”List assets
Section titled “List assets”GET /api/v1/external/public/assetsX-Org-Id: your-org-slugX-API-Key: your-api-keyOptional query parameters: asset_id, limit (1–100, default 50), offset, sort_by, order.
Get a single asset
Section titled “Get a single asset”GET /api/v1/external/assets/{asset_id}X-Org-Id: your-org-slugX-API-Key: your-api-keyCollection points
Section titled “Collection points”List collection points for an asset
Section titled “List collection points for an asset”GET /api/v1/external/public/collection-points?asset_id={asset_id}X-Org-Id: your-org-slugX-API-Key: your-api-keyOptional query parameters: collection_point_id, asset_id, status, version, limit, offset, sort_by, order.
Response
{ "data": [ { "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "asset_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "App Signup Flow", "display_id": "CP003", "status": "active", "version": "v1.0.0", "purposes": ["pppppppp-pppp-pppp-pppp-pppppppppppp"] } ], "count": 1}The display_id (e.g. CP003) is the bannerId passed to SDK components.
Consent queries
Section titled “Consent queries”Consent history for a data principal
Section titled “Consent history for a data principal”GET /api/v1/external/consents/history?user_id={userId}X-Org-Id: your-org-slugX-API-Key: your-api-keyReturns the full consent log history for the specified user across all collection points.
Data principal timeline
Section titled “Data principal timeline”GET /api/v1/external/consents/dp-timeline?user_id={userId}X-Org-Id: your-org-slugX-API-Key: your-api-keyWithdrawal events
Section titled “Withdrawal events”GET /api/v1/external/consents/withdrawX-Org-Id: your-org-slugX-API-Key: your-api-keyConsent links
Section titled “Consent links”List consent links
Section titled “List consent links”GET /api/v1/external/public/consent-linkX-Org-Id: your-org-slugX-API-Key: your-api-keyCreate a consent link
Section titled “Create a consent link”POST /api/v1/external/public/consent-linkX-Org-Id: your-org-slugX-API-Key: your-api-keyContent-Type: application/json
{ "collection_point_id": "CP003", "user_mobile": "+919876543210", "user_email": "user@example.com"}Reports
Section titled “Reports”Consent summary by collection point
Section titled “Consent summary by collection point”GET /api/v1/external/reports/consent/by-collection-pointX-Org-Id: your-org-slugX-API-Key: your-api-keyResponse envelope
Section titled “Response envelope”All list endpoints return:
{ "data": [...], "count": <number> }Single-resource endpoints return the object directly or in a data key. Error responses follow the shape in Error codes.