I want to call the Create a New Response API to create survey responses from my application (https://api.qualtrics.com/f1cad92018d2b-create-a-new-response). I don’t see a way to add embedded data to that request. Is there a way to create add embedded data with a survey response creation request, or am I required to send a subsequent Update Response request (https://api.qualtrics.com/daed82306b1ea-update-response)?
Solved
Create a New Response API and Embedded Data

Best answer by ppuente
I found a way to do it by inspecting the response from the Retrieve a Survey Response API. I am able to add additional keys to the values
object in my Create a Survey Response request.
For example, this request body creates a new response with answers to questions but no embedded data:
{
"values": {
"QID2": 2,
"QID22": "test",
"QID25": 3,
"QID26": 3,
"QID28": 1,
"QID29": 3,
"QID30": 2,
}
}
This request body also adds embedded data:
{
"values": {
"QID2": 2,
"QID22": "test",
"QID25": 3,
"QID26": 3,
"QID28": 1,
"QID29": 3,
"QID30": 2,
"Email": "example@example.com",
"Order Line Items": [
"Product Name"
],
"Order Value": 4.9
}
}
This request body answered the questions and provided the embedded data. The key names for the embedded data appear to match the name
of each object in the result.embeddedData
object in the response from the Get Survey CRUD API. No second request required :)
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.