
Title
Create new category
Edit page index title
Edit category
Edit link
Track Consent Lifecycle API
Introduction
The Track Consent Lifecycle API, also referred to as the Get Consent Details API, allows clients to retrieve the latest status, metadata, lifecycle events, validity information, and operational details associated with a registered consent on the Attestr Platform. Read about Register Consent API for more details.
This API enables clients to monitor and audit the complete lifecycle of a consent, including its registration, activation, usage, expiry, revocation, and associated processing activities. Using the unique consent id, clients can fetch detailed consent information required for compliance monitoring, workflow orchestration, audit logging, customer support, and regulatory reporting.
API Details
Request
| Type | URL | Version |
|---|---|---|
| GET | https://api.attestr.com/api/{version/public/consent/{consentId} | Use "v3" for DPDA compliant version |
Request URL Parameters
| Type | Name | Description | Optional (default) | Min Version | Max Version |
|---|---|---|---|---|---|
| String | consentId | Consent ID as generated by the Attestr platform during register consent step | Required | v3 |
Sample Request URL
xxxxxxxxxxhttps://api.attestr.com/api/v3/public/consent/CX3oM_bNstq9xWxgRdRequest Header Parameters
| Type | Name | Value / Description | Optional | Min Version | Max Version |
|---|---|---|---|---|---|
| String | Content-Type | application/json | Required | v3 | |
| String | Authorization | Basic {authToken} | Required | v3 |
If you do not have the authentication token, please refer to Register App to generate one.
Response
Http Status 200
| Type | Key | Description | Min Version | Max Version |
|---|---|---|---|---|
| String | _id | Unique consent Id as assigned by Attestr Platform | v3 | |
| String | number | Unique human readable consent number for reference as assigned by Attestr platform | v3 | |
| String | requestId | Unique internal request Id assigned by Attestr for debugging and logging purposes. | v3 | |
| String | status | Status of the consent. Refer to Consent Status to read more about status values. | v3 | |
| Object | data | Consent data object details as provided while registering the consent | v3 | |
| Object | metadata | Used to record browser metadata, IP address etc of the Data Principal. Populated only for hosted pages feature ie. when consent is collected on Attestr provided UI. | v3 | |
| Array<Object> | lifecycle | Sequence of lifecycle updates recorded on the consent Refer to Consent Lifecycle Events | v3 | |
| Number | created | Unix timestamp when the consent was registered | v3 | |
| String | client | If consent is registered using API, then this field is populated with the APP Id (ie. API client Id) | v3 | |
| String | createdBy | Member Id of the org member who registered the consent on the platform | v3 | |
| String | createdByOrg | Client Account ID / Organization ID in which the said consent is registered | v3 | |
| Number | updated | Unix timestamp when the consent was last modified | v3 | |
| String | updatedBy | Member Id of the org member who performed the last update on the consent object. | v3 |
Sample Response
Sample response for valid input
xxxxxxxxxx{ "_id": "CX3S-m5YMohWXqt7b-", "number": "3991-752664-8625", "requestId": "068de46f-6a39-403a-bcde-60997c3d396a", "status": "EXPIRED", "data": {...}, "metadata": null, "lifecycle": [...], "created": 1779538004575, "client": null, "createdBy": null, "createdByOrg": "OX02zfeuvt8akkilm7kpt", "updated": 1779538249986, "updatedBy": null}Error Response
| Parameter | Type | Description |
|---|---|---|
| code | Number | Unique error codes for different errors. Always available. |
| httpStatusCode | String | Standard HTTP status code for the error |
| message | String | Error message describing the error. Always Available. |
| details | String | Detail error message. Available only for certain types of errors. |
Error Codes
| HTTP Status | Error Code | Error Message |
|---|---|---|
| 400 | 4001 | Malformed data or missing required parameter values |
| 400 | 4005 | Operation could not be performed due to low credits balance |
| 401 | 4016 | Invalid client authorization |
| 403 | 4031 | Unauthorized access |
| 403 | 4035 | Requested service is not provisioned for your account |
| 403 | 4039 | Client's IP address is not whitelisted |
| 403 | 4035 | Requested service is not provisioned for your account |
| 429 | 4291 | Maximum account rate limit exceeded |
| 429 | 4292 | Maximum API rate limit exceeded |
| 429 | 4293 | Maximum account daily limit exceeded |
| 429 | 4294 | Maximum API daily limit exceeded |
| 500 | 5001 | Request could not be processed |
Sample Error Response
xxxxxxxxxx{ "httpStatusCode": 400, "code": 4001, "message": "Malformed data or missing required parameter values", "appError": true}Copyright © Attestr