You can call OneTrust asynchronously from a published web form or external application to dynamically create a request that will appear in the Web Form Configuration screen.
Note
This documentation uses the Postman tool to test API integrations.
On the menu, select . The Web Forms Templates screen appears.
-
Click on a published web form. The Web Form Customization screen appears.
Note
This feature is compatible only with published web forms. For more information on creating new web forms, see Creating a Web Form.
-
Go to the Integrate tab, then click the API tab.
-
Click the Copy URL button in the Your API URL block.
In Postman, select POST
from the endpoint field.
-
Paste the Your API URL in the URL field.
-
On the API tab in OneTrust, then click the Copy Token button in the Your API Token block.
In Postman, click the Headers tab.
Enter accessToken in the Key field.
-
Paste the API token from OneTrust in the Value field.
To copy the Expected Payload
-
On the API tab in OneTrust, click the Copy Expected Payload button in the Expected Payload block.
Note
Any edits made to the web form fields will dynamically update in the expected payload.
In Postman, click the Body tab.
-
Enable raw as the preview type.
Note
Ensure JSON
is the selected file type.
-
Paste the expected payload in the body.
Tip
You can add the details of a request by editing the payload. Remove any additional parameters that you don't want to send to create the request or have null values (e.g. no attachments). The call won't send with null parameter values.
Click the Send button.
-
Verify the call was sent by checking the status code. If performed correctly, it should return a requestTraceId
value.
Copy the requestTraceId
.
To verify the request in OneTrust
Create another call in Postman using the GET request status by Trace ID endpoint: GET /api/datasubject/v2/requestqueues/status/{traceId}
-
Append the newly created requestTraceID
to the end of the endpoint.
In the Header tab, enter another API key.
Click the Send button.
-
If the call was successful, it will return a creationstatus:SUCCESS
and a new requestReId
.
Return to OneTrust to see if the newly created request appears in the Request Queue with the matching requestReId
.