External Report Controller

create

MethodPOST
Prod URLhttps://cpm.trustarc.com/server/api/v1/external/reports
EU URLhttps://cpm.trustarc.eu/server/api/v1/external/reports
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersN/A
Request Payload
{
  "details": "{consentStatus: PENDING, timeFrame:{createdDateFrom:2024-08-09T00:00:00Z, createdDateTo:2024-08-10T23:59:59Z}, columnHeaders: [Consent ID,Data Subject ID], jurisdictions:[AF_DZ,AF_AO,XX], preferenceList:[ALL_OPT_IN,OTHERS], byForm: false, formFilter: null, byBrandPreference: false, fetchLatest: false}",
  "fileName": "string",
  "name": "string"
}
Payload Sample
{
    "name": "test external",
    "fileName": "Test report.csv",
    "details": {
        "columnHeaders": [
            "Consent ID",
            "Data Subject ID",
            "DS Type Name",
            "Consent Form Name",
            "Status",
            "Country",
            "Brand Name",
            "Program Name",
            "Channel",
            "Consent Expiry Date",
            "Date Received",
            "Date Modified"
        ],
        "fetchLatest": true,
        "byBrandPreference": false,
        "byForm": true,
        "formFilter": {
            "consentFormId": "964bdadf-2aa4-4e78-9c46-97f06f3ab5b9",
            "fieldIds": [
                "d6877c64-9eb9-446c-9d23-bebf7ade4bd0",
                "43fcabad-30d5-4f94-a341-d96a6480bb13"
            ]
        },
        "consentStatus": "ACTIVE",
        "preferenceList": [
            "ALL_OPT_IN",
            "PARTIAL_OPT_IN",
            "ALL_OPT_OUT",
            "OTHERS"
        ],
        "timeFrame": {
            "createdDateFrom": "2025-07-30T00:00:00Z",
            "createdDateTo": "2025-07-31T23:59:59Z"
        },
        "jurisdictions": [
            "AF_DZ",
            "AF_AO"
        ]
    }
}
Sample Request
{
  "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "completedDate": "string",
  "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdDate": "string",
  "details": "{consentStatus: PENDING, timeFrame:{createdDateFrom:2024-08-09T00:00:00Z, createdDateTo:2024-08-10T23:59:59Z}, columnHeaders: [Consent ID,Data Subject ID], jurisdictions:[AF_DZ,AF_AO,XX], preferenceList:[ALL_OPT_IN,OTHERS], byForm: false, formFilter: null, zoneOffset: 480, byBrandPreference: false, fetchLatest: false}",
  "fileName": "string",
  "fileType": "csv",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "modifiedDate": "string",
  "name": "string",
  "status": "COMPLETED",
  "storageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "type": "CONSENTS"
}
Sample Success Response
{
  "id": "175eaa53-a512-48b9-8e46-fc9d5eeb3d91",
  "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "test external",
  "status": null,
  "type": "CONSENTS",
  "fileName": "Test report.csv",
  "fileType": "csv",
  "storageId": null,
  "details": {
    "columnHeaders": [
      "Consent ID",
      "Data Subject ID",
      "DS Type Name",
      "Consent Form Name",
      "Status",
      "Country",
      "Brand Name",
      "Program Name",
      "Channel",
      "Consent Expiry Date",
      "Date Received",
      "Date Modified"
    ],
    "fetchLatest": true,
    "formFilter": {
      "consentFormId": "964bdadf-2aa4-4e78-9c46-97f06f3ab5b9",
      "fieldIds": [
        "d6877c64-9eb9-446c-9d23-bebf7ade4bd0",
        "43fcabad-30d5-4f94-a341-d96a6480bb13"
      ]
    },
    "byBrandPreference": false,
    "consentStatus": "ACTIVE",
    "preferenceList": [
      "ALL_OPT_IN",
      "PARTIAL_OPT_IN",
      "ALL_OPT_OUT",
      "OTHERS"
    ],
    "byForm": true,
    "timeFrame": {
      "createdDateFrom": "2025-07-30T00:00:00Z",
      "createdDateTo": "2025-07-31T23:59:59Z"
    },
    "jurisdictions": [
      "AF_DZ",
      "AF_AO"
    ]
  },
  "createdDate": 1748846693.813787,
  "completedDate": null,
  "modifiedDate": 1748846693.813803,
  "createdById": "313d67f2-4cca-4522-89c1-21ec09d293ba"
}
Success ResponseCode: 201 Created
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

reDownload

MethodGET
Prod URLhttps://cpm.trustarc.com/server/api/v1/external/reports/{id}/re-download
EU URLhttps://cpm.trustarc.eu/server/api/v1/external/reports/{id}/re-download
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersRequired Query Parameters
NameValueDescription
idstring($uuid)The id (UUID) is the ID of the report
Sample RequestN/A
Sample Success ResponseN/A
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

findAll

MethodGET
Prod URLhttps://cpm.trustarc.com/server/api/v1/external/reports
EU URLhttps://cpm.trustarc.eu/server/api/v1/external/reports
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersRequired Query Parameters
NameValueDescription
namestring($uuid) 
statusEnum stringAvailable values : ONGOING, COMPLETED, FAILED, SCHEDULED, RECURRING
createdDateFromstring($epoch seconds)Created Date start filter
createdDateTostring($epoch seconds)Created Date end filter
completedDateFromstring($epoch seconds)Completed Date start filter
completedDateTostring($epoch seconds)Completed Date end filter
pageinteger($int32)Results page you want to retrieve (0…N).
sizeinteger($int32)Number of records per page.
sortarray[string]Sorting criteria in the format: property(,asc|desc)Example: createdDate,asc
Sample Request
{
  "content": [
    {
      "account": {
        "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "completedDate": "string",
      "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "createdDate": "string",
      "details": {},
      "fileName": "string",
      "fileType": "csv",
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "modifiedDate": "string",
      "name": "string",
      "reportUserInitiatorDetails": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string",
        "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "userRole": "cpm_admin",
        "username": "string"
      },
      "retries": 0,
      "status": "COMPLETED",
      "storageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "type": "CONSENTS"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
Sample Success Response
{
  "content": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "account": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "createdDate": 1748826252.218746,
      "modifiedDate": 1748826254.033703,
      "name": "test report",
      "status": "COMPLETED",
      "type": "CONSENTS",
      "fileName": "test report_2025-06-02T09_04_13.98844+08_00.csv",
      "fileType": "csv",
      "storageId": "41bd9303-ee24-4923-badd-95bc439e2951",
      "details": {
        "zoneOffset": "480",
        "schedule": {},
        "columnHeaders": [
          "Consent ID",
          "Data Subject ID"
        ],
        "fetchLatest": true,
        "formFilter": null,
        "consentStatus": "ACTIVE",
        "byBrandPreference": false,
        "preferenceList": [
          "ALL_OPT_IN"
        ],
        "timeFrame": {
          "createdDateFrom": "2025-07-30T00:00:00Z",
          "createdDateTo": "2025-07-31T23:59:59Z"
        },
        "byForm": false,
        "jurisdictions": [
          "AF_DZ"
        ]
      },
      "completedDate": 1748826254.026401,
      "reportUserInitiatorDetails": {
        "id": "6db6992e-b5ed-4a5c-9a2a-a2e867ea2c1c",
        "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "userRole": "cpm_admin",
        "name": "TestUser",
        "username": "test@user.com"
      },
      "retries": 0,
      "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ],
  "pageable": {
    "sort": {
      "unsorted": true,
      "sorted": false,
      "empty": true
    },
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 10,
    "unpaged": false,
    "paged": true
  },
  "totalElements": 1,
  "totalPages": 1,
  "last": true,
  "number": 0,
  "size": 10,
  "sort": {
    "unsorted": true,
    "sorted": false,
    "empty": true
  },
  "numberOfElements": 1,
  "first": true,
  "empty": false
}
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found