API Call - Delete Answers
General Description:
The Delete Answers API endpoint offers a method to efficiently remove survey responses from the platform. This functionality is particularly useful in managing data accuracy and adhering to privacy regulations. Deleting answers ensures that all responses to all questions by the same participant within a specific survey are removed comprehensively.
It is important to note that while updates are processed immediately, they will only be visible in the platform the next day due to our data integration cycle. This ensures that all updates are fully integrated and accurately reflected in your platform by the following day.
API Endpoint Overview:
- Type: POST
- URL:
https://api-v4.hellocustomer.com/tenant/{{tenantUniqueId}}/Answer/RemoveAnswerBatch
This endpoint facilitates the batch removal of answer entries associated with specific participant transactions within a touchpoint.
JSON Request Body Format:
{ "touchpointUniqueId": "{{touchpointUniqueId}}", "answers": [ { "participantTransactionUniqueId": "{{YourParticipantTransactionIDHere}}" }, { "participantTransactionUniqueId": "{{YourParticipantTransactionIDHere}}" } ] }
Fields Explanation:
- touchpointUniqueId: The unique identifier of the touchpoint from which answers are to be deleted.
- answers: An array of objects, each representing an answer entry to be deleted. Each object includes:
- participantTransactionUniqueId: The unique identifier of the participant transaction linked to the answer.
Step-by-Step Instructions:
- Prepare the Required Information:
- Identify Your Tenant and Touchpoint IDs: These identifiers are essential for directing the API call correctly and can be found in the touchpoint settings on your platform.
- Gather Participant Transaction IDs: These IDs can be obtained by exporting data from the Conversation Manager; locate the necessary ID in the 'ID' column.
- Request a Bearer Token:
- Set Up Your API Client: An API client such as Postman is recommended for making API calls.
- Configure the Token Request: Use the following details:
- Type: POST
- URL:
https://api-v4.hellocustomer.com/token
- Body (x-www-form-urlencoded):
- grant_type: client_credentials
- client_id: (Client ID from your API connector)
- client_secret: (Client secret from your API connector)
- Send the Request and Retrieve Your Token: Upon successful authentication, copy the bearer token provided as it will be necessary for the answer deletion request.
- Construct the JSON Request Body:
- Use a simple text editor (like Notepad) to create a JSON object as shown in the example above. Replace placeholders with actual IDs from your setup.
- Send the Request:
- Use an API Client: Such as Postman.
- Enter the Endpoint URL: Ensure the correct tenant ID is included.
- Set to POST: This specifies the action type.
- Add Authorization: Include the bearer token in the header as 'Authorization: Bearer {token}'.
- Add the JSON Body: Paste your prepared JSON into the body section of your API client.
- Send the Request: Initiate the command and observe the outcome.
- Handle the Response:
- Success: Receive confirmation that the answers have been deleted.
- Error Handling: If issues occur, the system will provide error messages. Address any concerns as indicated.
- Verify the Deletion with a Batch Progress Call:
- To ensure your deletion requests have been processed, construct a URL to check the batch's progress:
- URL:
https://api-v4.hellocustomer.com/tenant/{{tenantUniqueId}}/Answer/batch/{{batchId}}/progress
- Replace placeholders with appropriate values obtained during the deletion process.
- URL:
- Set Request to GET: To retrieve information.
- Add Authorization: Include the bearer token.
- Send the Request: Check the status and confirm all targeted answers have been removed.
- To ensure your deletion requests have been processed, construct a URL to check the batch's progress:
Interpret the Response: The API will provide details on the completion of the deletion process, including the number of entries processed and any errors encountered.