Request Form Controller

getRequestForm

Method GET
Prod URL https://irm.trustarc.com/server/api/v1/external/requests
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
formId string($uuid) The formId (UUID) is the ID of the intake form. Form ID can be retrieved from the intake form Publish page as shown in the image below.
locale  string The locale can be any of the configured locales of the intake form (from the portal). This parameter is optional.
Sample Request N/A
Sample Success Response
{
  "fields": [
    {
      "id": "00000000-0000-0000-0000-000000001001",
      "display": "I am",
      "type": "string",
      "required": false,
      "values": [
        {
          "id": "00000000-0000-0000-0000-000000003001",
          "display": "Customer"
        }
      ]
    },
    {
      "id": "00000000-0000-0000-0000-000000001002",
      "display": "Name",
      "type": "string",
      "required": true,
      "values": null
    },
    {
      "id": "00000000-0000-0000-0000-000000001003",
      "display": "Email",
      "type": "string",
      "required": true,
      "values": null
    },
    {
      "id": "00000000-0000-0000-0000-000000001004",
      "display": "Resident of",
      "type": "string",
      "required": true,
      "values": [
        {
          "id": "AS_CN",
          "display": "China"
        }
      ]
    },
    {
      "id": "00000000-0000-0000-0000-000000001005",
      "display": "Type of Request",
      "type": "string",
      "required": true,
      "values": [
        {
          "id": "00000000-0000-0000-0000-000000004001",
          "display": "Access My Information"
        },
        {
          "id": "00000000-0000-0000-0000-000000004002",
          "display": "Correct or Update My Information"
        },
        {
          "id": "00000000-0000-0000-0000-000000004003",
          "display": "Delete My Information"
        },
        {
          "id": "00000000-0000-0000-0000-000000004004",
          "display": "Restrict Use of My Information"
        },
        {
          "id": "00000000-0000-0000-0000-000000004005",
          "display": "Opt-out or Unsubscribe"
        },
        {
          "id": "00000000-0000-0000-0000-000000004006",
          "display": "Transfer My Information"
        },
        {
          "id": "00000000-0000-0000-0000-000000004007",
          "display": "Who Has Received My Information"
        }
      ]
    },
    {
      "id": "00000000-0000-0000-0000-000000001006",
      "display": "Comment (max 550 characters)",
      "type": "string",
      "required": false,
      "values": null
    },
    {
      "id": "c4ba3edc-0a08-4103-ae9d-a1d231f8a90c",
      "display": "New Text",
      "type": "string",
      "required": false,
      "values": null
    }
  ]
}

Where:

  • fields – array containing the list of fields
  • fieldID – the ID of the field
  • fieldDisplay – label of the field
  • required – true or false, it will fail if not provided
  • type – "string" or "boolean" or "number"
  • values – can be null if field doesn't provide options(e.g. radio/select fields)
  • valueID – the ID of the value
  • valueDisplay – display of the value
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

Locating the Intake form FormID

IRM_Locating the Intake form FormID .png

createRequest

Method POST
Prod URL https://irm.trustarc.com/server/api/v1/external/requests
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
formId string($uuid) The formId (UUID) is the ID of the intake form.
locale string The locale can be any of the configured locales of the intake form (from the portal). This parameter is optional. This parameter is optional.
params (body) is a JSON Map of fieldId to values, like the response
Sample Request
{
    "00000000-0000-0000-0000-000000001001": "00000000-0000-0000-0000-000000003001",
    "00000000-0000-0000-0000-000000001002": "Name",
    "00000000-0000-0000-0000-000000001003": "email@example.com",
    "00000000-0000-0000-0000-000000001004": "AS_CN",
    "00000000-0000-0000-0000-000000001005": "00000000-0000-0000-0000-000000004001",
    "00000000-0000-0000-0000-000000001006": "Comment Here",
    "c4ba3edc-0a08-4103-ae9d-a1d231f8a90c": "New Text"
}
Sample Success Response
{
  "additionalProp1": "string",
  "additionalProp2": "string",
  "additionalProp3": "string"
}
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

closeRequest

Method POST
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/{id}/close
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 request.
closeRequestDto (body) is a DTO of data needed when closing a request
Sample Request
{
    "emailTemplate": {
         "id": "ebabb553-45e8-478e-a8bf-6fc683fea12b"
         "attachmentIds": [
             "2ee52122-103c-4ef4-840f-8ff2ea2bd062",
             "873e0c95-be6f-43dd-a025-38f4fb2b0a14"
          ],
          "override": {
             "customFrom": "email from field",
             "message": "email message field",
             "replyTo": "email reply to field",
             "subject": "email subject field",
          }
     },
    "noEmailReason": "no email reason",
    "rejectReason": "reject reason",
    "sendEmail": true, 
    "status": "ACCEPT"
}

Where:

  • emailTemplate.id – id of email template to be used if sendEmail = true; when null, will use TrustArc’s default template
  • attachmentIds – list of attachment ids; attachments will be sent if sendEmail = true
  • emailTemplate.override – overrides the email template’s values; can be left alone if email template’s values will be used
  • status – possible values: ACCEPT / REJECT
Sample Success Response
{
 "id": "9023a7aa-cc33-481e-ba16-7cb30256ff98",
 "email": "john.doe@email.com",
  ...
}

Where:

  • response – the request object
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

getRequest

Method GET
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/{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 request
Sample Request N/A
Sample Success Response
{
 "id": "9023a7aa-cc33-481e-ba16-7cb30256ff98",
 "email": "john.doe@email.com",
  ...
}

Where:

  • response – the request object
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

searchRequests

Method POST
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/search
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
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 Request
{
 "ids": ["9023a7aa-cc33-481e-ba16-7cb30256ff98"],
 "fromCreatedDate": "1595824012.298",
 "toCreatedDate":"00000000-0000-0000-0000-000000004001",
 "requestTypeIds": ["00000000-0000-0000-0000-000000004001"],
 "locations": ["NA_US"],
 "formIds": ["1ca8bbff-3c8f-46aa-8a3a-83f119ebf79b"],
 "sourceWebsite": "http://acme.com",
 "statuses": ["UNVERIFIED"],
 "dataSubjectTypeIds": "[00000000-0000-0000-0000-000000003001]",
 "email": "john.doe@email.com",
 "fromVerifiedDate": "1595824012.298",
 "toVerifiedDate": "1595824012.298",
 "fromDueDate": "1595824012.298",
 "toDueDate": "1595824012.298",
 "brandName": "Some Brand Name",
}
Sample Success Response
{
 "content": [{"id": "9023a7aa-cc33-481e-ba16-7cb30256ff98", ...}],
 "numberOfElements": "10",
 "totalElements": "99",
 "number": "0",
 "size": "10",
}

Where:

  • content – list of request objects
  • numberOfElements – number of elements in content
  • totalElements – number of total elements in the database
  • number – page number
  • size –size from url parameter
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

manualVerifyRequest

Method POST
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/{id}/manual-verify
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters N/A
Sample Request
{
 "keepRequestAsUnverified": true,
}
Sample Success Response
{
 "id": "9023a7aa-cc33-481e-ba16-7cb30256ff98",
 "email": "john.doe@email.com",
  ...
}

Where:

  • response – the request object
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

failManualVerifyRequest

Method POST
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/{id}/fail-manual-verify
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters N/A
Sample Request N/A
Sample Success Response
{
 "id": "9023a7aa-cc33-481e-ba16-7cb30256ff98",
 "email": "john.doe@email.com",
  ...
}

Where:

  • response - the request object
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

getRequestAttachments

Method GET
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/{id}/attachments
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters Required Query Parameters
Name Value Description
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 Request N/A
Sample Success Response
{
 "content": [{"id": "9023a7aa-cc33-481e-ba16-7cb30256ff98", ...}],
 "numberOfElements": "10",
 "totalElements": "99",
 "number": "0",
 "size": "10",
}

Where:

  • content – list of attachment objects
  • numberOfElements – number of elements in content
  • totalElements – number of total elements in the database
  • number – page number
  • size –size from url parameter
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

uploadRequestAttachments

Method POST
Prod URL https://irm.trustarc.com/server/api/v1/external/requests/{id}/attachments
Headers Authorization: Bearer <access_token from 'Token Access' section>
URL Parameters N/A
Sample Request file (formData)
Sample Success Response
{
 "id": "9023a7aa-cc33-481e-ba16-7cb30256ff98",
 "fileName": "Sample.txt"
}

Where:

  • id – auto-generated attachment identifier
  • fileName – filename of uploaded file
Success Response Code: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found