The Export Consent Audit Archive API allows customers to retrieve a comprehensive archive of a consent record, including consent metadata, approved operations, associated data categories and data types, lifecycle events, modification history, revocation records, and related audit information. The exported archive serves as a complete audit trail of the consent throughout its lifecycle and can be used for regulatory compliance, internal governance, dispute resolution, audit reviews, and record-keeping purposes. This API helps organisations demonstrate transparency and accountability by providing a verifiable record of consent-related activities and decisions associated with a Data Principal's consent.
Request
| Type | URL | Version |
|---|
| POST | https://api.attestr.com/api/{version/public/consent/<_id>/export | Use "v3" for DPDA compliant version |
Request Url Parameters
| Type | Name | Description | Optional (default) | Min Version | Max Version |
|---|
| String | _id | Consent ID as generated in Register Consent API | Required | v3 | |
| 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.
Sample Request
Response
Http Status 200
| Type | Key | Description | Min Version | Max Version |
|---|
| String | _id | Unique AsyncRequest Id as assigned by Attestr Platform | v3 | |
| String | number | Unique human readable number for reference as assigned by Attestr platform | v3 | |
Upon successful submission of an export request, Attestr runs an automated job, which fetches all the associated consent metadata and prepares an excel document containing the relevant audit trail information. Once completed, the job status is appropriately updated with the media ID of the excel file.
Sample Response
| Type | URL |
|---|
| GET | https://api.attestr.com/api/v3/public/common/async/<asyncId> |
Request URL Parameters
| Name | Description | Min Version | Max Version |
|---|
| asyncId | Replace <asyncId> in the URL with the _id received in the export API response above | v3 | |
| Type | Name | Value / Description | Optional | Min Version | Max Version |
|---|
| String | Content-Type | application/json | Required | v3 | |
| String | Authorization | Basic {authToken} | Required | v3 | |
Response
Http Status 200
| Key | Description | Type | Min Version | Max Version |
|---|
| _id | Request Id as queried in the URL | String | v3 | |
| number | Request number as generated in the export API response | String | v3 | |
| requestId | Unique ID used by Attestr for request tracing purposes | String | v3 | |
| status | Status of the request. Possible values are -
COMPLETED, INITIATED, ERRORED | String | v3 | |
| input | The input details used for export | String | v3 | |
| output | Output object if the export is completed. It has the following structure.
{
"_id": "mediaId"
}
This mediaId corresponds to the excel file which can be downloaded using Get Media Stream API. | Object | v3 | |
| error | Error object if the operation ran into errors, null otherwise. Null if status is completed or initiated. | String | v3 | |
| created | Unix timestamp when the request was placed. | Number | v3 | |
| updated | Unix timestamp when the request was last updated. Null if status is initiated. | Number | v3 | |
| signature | Signature generated using the output and client secret. Used for validating the accuracy of data. Null if status is errored or initiated. | String | v3 | |
Sample Output
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
Get Free Trial
Create a free account Or “Talk to Us” for price information and other queries.