Update responses by API | XM Community

Update responses by API

  • 15 September 2022
  • 3 replies
  • 675 views

Userlevel 3
Badge +13

Hello
I am trying to update my responses via API, because after Qualtrics gets the response I need to add some embedded data from my data lake.
I saw this API call https://api.qualtrics.com/daed82306b1ea-update-response , but is not clear for me how do I get the response ID in the api call?
image.png


3 replies

Userlevel 3
Badge +13

luisagallegovoce

Badge

You can use 'piped text' as below.
https://ca1.qualtrics.com/API/v3/responses/${rm://Field/ResponseID}

Userlevel 7
Badge +33

I think it's too old Question to response. But I'm responding here for others' help too. See, there are two ways,
1) without API: if you have specific number of list to add in embedded field respective to captured responses. E.g. want to add 4 regions or 9 regions respective to captured states, or want to add age group respective to captured ages. Then you can under Data & Analysis tab >> Field Editor >> Create Field >> Bucketing, this will help you to create new field specific to fixed list of Age and Age group, state and region etc. https://www.qualtrics.com/support/survey-platform/data-and-analysis-module/data/add-new-fields/bucketing-variable-creation/
2) with the help of API:
you can create PHP or python file to run on web. Here is an example of PHP code.
$r_id=array("R_responseID1","R_responseID2","R_responseID3");
$arr_length=count($r_id);
for($i=0;$i<$arr_lenght;$i++)
{
$url="https://ca1.qualtrics.com/API/v3/responses/".$r_id[$i];
}
Now you can run the post man to get the curl code and put the values into another array to punch the data respective to response ID. Save your file as PHP and upload it in FTP folder to run it on browser.

Leave a Reply