External Data Subject Controller

findById

Method GET
Prod URL https://cpm.trustarc.com/server/api/v1/external/data-subjects/{id}
EU URL https://cpm.trustarc.eu/server/api/v1/external/data-subjects/{id}
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
id string($uuid) The id (UUID) is the ID of the data subject
Sample Request
{
  "createdDate": long(unix date time),
  "dataFieldValues": [
    {
      "consent": {
        "consentForm": {
          "customConsentValidityDays": 0,
          "id":"3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "name": "string"
        },
        "createdDate": "string",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string",
        "websiteSource": "string"
      },
      "dataField": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string"
      },
      "dataFieldGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string"
      },
      "formFieldId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "formValues": [
        {
          "display": "string",
          "value": "string"
        }
      ]
    }
  ],
  "dataSubjectIdentifiers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "identifierGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string"
      },
      "identifierValues": [
        {
          "formValues": [
            {
              "display": "string",
              "value": "string"
            }
          ],
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "identifier": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "string"
          }
        }
      ]
    }
  ],
  "dataSubjectType": {
    "baseDataSubjectType": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string"
    },
    "name": "string"
  },
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "manuallyCreated": true,
  "modifiedDate": long(unix date time)
}
Sample Success Response
{
  "id": "91474866-798f-4e84-b39b-48a9d4554639",
  "dataSubjectType": {
    "name": "Email DS",
    "baseDataSubjectType": {
      "id": "00000000-0000-0000-0000-000000003001",
      "name": "Customer"
    }
  },
  "createdDate": 1748576950,
  "modifiedDate": 1748576950.641839,
  "dataSubjectIdentifiers": [
    {
      "id": "c6578500-15aa-4af1-b2db-b598581156a3",
      "identifierGroup": {
        "id": "92039436-cee7-4ffd-b0e5-9292a19ac75f",
        "name": "Group 0"
      },
      "identifierValues": [
        {
          "id": "ac343283-f13d-446a-8c77-5d7f67072882",
          "identifier": {
            "id": "00000000-0000-0000-0000-000000000031",
            "name": "Email Address"
          },
          "formValues": [
            {
              "value": "test@email.com",
              "display": "test@email.com"
            }
          ]
        }
      ]
    }
  ],
  "dataFieldValues": [
    {
      "formFieldId": "4da0bbfa-40dd-4b1f-a1f9-e343a474a39c",
      "dataField": {
        "id": "8ce41276-f3f7-4c8b-9da2-fb35d093914f",
        "name": "test"
      },
      "dataFieldGroup": null,
      "consent": {
        "id": "5d2974e0-623c-43fd-8e93-ac4f0e41f965",
        "name": null,
        "consentForm": {
          "id": "9ad2a02d-638c-4d0a-bc1e-d020d57fd56b",
          "name": "Test Name",
          "customConsentValidityDays": 395
        },
        "websiteSource": "https://test.com",
        "createdDate": 1748576950
      },
      "formValues": [
        {
          "value": "test string",
          "display": "test string"
        }
      ]
    }
  ],
  "manuallyCreated": false
}
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

delete

Method DELETE
Prod URL https://cpm.trustarc.com/server/api/v1/external/data-subjects/{id}
EU URL https://cpm.trustarc.eu/server/api/v1/external/data-subjects/{id}
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
id string($uuid) The id (UUID) of the data subject
Sample Request N/A
Sample Success Response N/A
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

findAll

Method GET
Prod URL https://cpm.trustarc.com/server/api/v1/external/data-subjects
EU URL https://cpm.trustarc.eu/server/api/v1/external/data-subjects
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
consentFormIds string($uuid) Array of Consent Form UUIDs
dataSubjectTypeIds string($uuid) Array of Data Subject Type UUIDs
isFetchFullDetails boolean Displays a simplified/comprehensive data subject information
modifiedDateFrom string($epoch seconds) Modified Date start filter
modifiedDateTo string($epoch seconds) Modified Date end filter
identifierMap [object] This is used to filter consents by Identifier ID and value, like email identifier ID = sample@email.com

NOTE: This parameter will not work using swagger. Can only be used using curl or postman. To pass an identifier as a parameter, you will have to add it as identifierId=identifierValue
page integer($int32) Results page you want to retrieve (0…N).
size integer($int32) Number of records per page.
sort array[string] Sorting criteria in the format: property(,asc|desc)

Example: createdDate,asc
Sample Parameter 00000000-0000-0000-0000-000000000031=test@email.com&isFetchFullDetails=true&dataSubjectTypeIds=ca5950c3-02c3-4d21-ac5f-a24d1294edae
Sample Request
{
  "content": [
    {
      "createdDate": "string",
      "dataFieldValues": [
        {
          "consent": {
            "consentForm": {
              "customConsentValidityDays": 0,
              "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "name": "string"
            },
            "createdDate": "string",
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "string",
            "websiteSource": "string"
          },
          "dataField": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "string"
          },
          "dataFieldGroup": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "string"
          },
          "formFieldId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "formValues": [
            {
              "display": "string",
              "value": "string"
            }
          ]
        }
      ],
      "dataSubjectIdentifiers": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "identifierGroup": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "string"
          },
          "identifierValues": [
            {
              "formValues": [
                {
                  "display": "string",
                  "value": "string"
                }
              ],
              "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "identifier": {
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "name": "string"
              }
            }
          ]
        }
      ],
      "dataSubjectType": {
        "baseDataSubjectType": {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "name": "string"
        },
        "name": "string"
      },
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "manuallyCreated": true,
      "modifiedDate": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  }
}
Sample Success Response
{
    "content": [
        {
            "id": "1d7afaa3-335f-4ca2-9883-9188b33c16d3",
            "dataSubjectType": {
                "name": "Email DS",
                "baseDataSubjectType": {
                    "id": "00000000-0000-0000-0000-000000003001",
                    "name": "Customer"
                }
            },
            "createdDate": 1747270456.000000000,
            "modifiedDate": 1747270456.371473000,
            "dataSubjectIdentifiers": [
                {
                    "id": "ffba072a-b16e-4a65-939a-4180fbc54900",
                    "identifierGroup": {
                        "id": "92039436-cee7-4ffd-b0e5-9292a19ac75f",
                        "name": "Group 0"
                    },
                    "identifierValues": [
                        {
                            "id": "c058f81e-d306-468a-b624-c9c0f32ee21a",
                            "identifier": {
                                "id": "00000000-0000-0000-0000-000000000031",
                                "name": "Email Address"
                            },
                            "formValues": [
                                {
                                    "value": "test@email.com",
                                    "display": "test@email.com"
                                }
                            ]
                        }
                    ]
                }
            ],
            "dataFieldValues": [
                {
                    "formFieldId": "18d15e23-0ff1-4d8b-8533-11cca7e62a03",
                    "dataField": {
                        "id": "8ce41276-f3f7-4c8b-9da2-fb35d093914f",
                        "name": "test"
                    },
                    "dataFieldGroup": null,
                    "consent": {
                        "id": "5fe0a076-3e3e-4ef1-946e-ad104518fb27",
                        "consentForm": {
                            "id": "cc7fbcdf-fe6d-460b-bef8-d3a9c8e82999",
                            "name": "Simple Double Opt in",
                            "customConsentValidityDays": 3
                        },
                        "websiteSource": "http://google.com",
                        "createdDate": 1747270199.000000000
                    },
                    "formValues": [
                        {
                            "value": "FROM EXTERNAL API VIA POSTMAN",
                            "display": "FROM EXTERNAL API VIA POSTMAN"
                        }
                    ]
                }
            ],
            "manuallyCreated": false
        }
    ],
    "pageable": {
        "sort": {
            "sorted": false,
            "unsorted": true,
            "empty": true
        },
        "offset": 0,
        "pageNumber": 0,
        "pageSize": 10,
        "unpaged": false,
        "paged": true
    },
    "sort": {
        "sorted": false,
        "unsorted": true,
        "empty": true
    },
    "size": 10,
    "number": 0,
    "numberOfElements": 10,
    "first": true,
    "last": false,
    "empty": false
}
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

createDataSubject

Method POST
Prod URL https://cpm.trustarc.com/server/api/v1/external/data-subjects
EU URL https://cpm.trustarc.eu/server/api/v1/external/data-subjects
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters N/A
Request Payload
{
  "dataSubjectIdentifiers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "identifierGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "identifierValues": [
        {
          "formValues": [
            {
              "value": "string"
            }
          ],
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "identifier": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        }
      ]
    }
  ],
  "dataSubjectType": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}
Payload Sample
{
   "dataSubjectType":{
      "id":"ca5950c3-02c3-4d21-ac5f-a24d1294edae"
   },
   "dataSubjectIdentifiers":[
      {
         "identifierGroup":{
            "id":"92039436-cee7-4ffd-b0e5-9292a19ac75f"
         },
         "identifierValues":[
            {
               "formValues":[
                  {
                     "value":"test@email.com"
                  }
               ],
               "identifier":{
                  "id":"00000000-0000-0000-0000-000000000031"
               }
            }
         ]
      }
   ]
}
Sample Request
{
  "dataSubjectIdentifiers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "identifierGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "identifierValues": [
        {
          "formValues": [
            {
              "display": "string",
              "value": "string"
            }
          ],
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "identifier": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        }
      ]
    }
  ],
  "dataSubjectType": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}
Sample Success Response
{
    "id": "fad11eed-7180-44cc-8af1-fe5bb23d4bb2",
    "dataSubjectType": {
        "id": "ca5950c3-02c3-4d21-ac5f-a24d1294edae",
        "name": "Email DS",
        "baseDataSubjectType": {
            "id": "00000000-0000-0000-0000-000000003001",
            "name": "Customer"
        }
    },
    "createdDate": 1748584238.000000000,
    "modifiedDate": 1748584238.000000000,
    "dataSubjectIdentifiers": [
        {
            "id": "c68e3320-f799-4629-8790-0697590ffafd",
            "identifierGroup": {
                "id": "92039436-cee7-4ffd-b0e5-9292a19ac75f",
                "name": "Group 0"
            },
            "identifierValues": [
                {
                    "id": "7f05da46-78c7-4574-ac84-abd2c5567542",
                    "identifier": {
                        "id": "00000000-0000-0000-0000-000000000031",
                        "name": "Email Address"
                    },
                    "formValues": [
                        {
                            "value": "test@email.com",
                            "display": "test@email.com"
                        }
                    ]
                }
            ]
        }
    ],
    "dataFieldValues": [],
    "manuallyCreated": true
}
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

updateDataSubject

Method PUT
Prod URL https://cpm.trustarc.com/server/api/v1/external/data-subjects
EU URL https://cpm.trustarc.eu/server/api/v1/external/data-subjects
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters N/A
Request Payload
{
  "dataSubjectIdentifiers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "identifierGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "identifierValues": [
        {
          "formValues": [
            {
              "value": "string"
            }
          ],
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "identifier": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        }
      ]
    }
  ],
  "dataSubjectType": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Payload Sample
{
    "id": "fad11eed-7180-44cc-8af1-fe5bb23d4bb2",
   "dataSubjectType":{
      "id":"ca5950c3-02c3-4d21-ac5f-a24d1294edae"
   },
   "dataSubjectIdentifiers":[
      {
         "identifierGroup":{
            "id":"92039436-cee7-4ffd-b0e5-9292a19ac75f"
         },
         "identifierValues":[
            {
               "formValues":[
                  {
                     "value":"test2@email.com"
                  }
               ],
               "identifier":{
                  "id":"00000000-0000-0000-0000-000000000031"
               }
            }
         ]
      }
   ]
}
Sample Request
{
  "dataSubjectIdentifiers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "identifierGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "identifierValues": [
        {
          "formValues": [
            {
              "display": "string",
              "value": "string"
            }
          ],
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "identifier": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        }
      ]
    }
  ],
  "dataSubjectType": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Sample Success Response
{
    "id": "fad11eed-7180-44cc-8af1-fe5bb23d4bb2",
    "dataSubjectType": {
        "id": "ca5950c3-02c3-4d21-ac5f-a24d1294edae",
        "name": "Email DS",
        "baseDataSubjectType": {
            "id": "00000000-0000-0000-0000-000000003001",
            "name": "Customer"
        }
    },
    "createdDate": 1748584238.000000000,
    "modifiedDate": 1748584417.113716000,
    "dataSubjectIdentifiers": [
        {
            "id": "c68e3320-f799-4629-8790-0697590ffafd",
            "identifierGroup": {
                "id": "92039436-cee7-4ffd-b0e5-9292a19ac75f",
                "name": "Group 0"
            },
            "identifierValues": [
                {
                    "id": "7f05da46-78c7-4574-ac84-abd2c5567542",
                    "identifier": {
                        "id": "00000000-0000-0000-0000-000000000031",
                        "name": "Email Address"
                    },
                    "formValues": [
                        {
                            "value": "test2@email.com",
                            "display": "test2@email.com"
                        }
                    ]
                }
            ]
        }
    ],
    "dataFieldValues": [],
    "manuallyCreated": true
}
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found