Get the survey ID included in the API call to get survey responses? | XM Community
Skip to main content
Solved

Get the survey ID included in the API call to get survey responses?

  • May 17, 2022
  • 2 replies
  • 698 views

Forum|alt.badge.img

Is there any setting or any way to have the survey ID included in each response props when using the "export-responses" API to get a survey's responses?
Yes, I can track and add it so when passing between two systems it's there, but, this seems like it should be a standard issue to include the parent survey ID the response is related to in the original export for the response.?

Best answer by bgooldfed

Hi The_Cleaner,
You are referring to this API workflow right? There is no survey ID in the response, so you'd have to set it manually. If you're exporting a JSON it shouldn't be too hard to add in a loop which appends it to each response.
Good luck!

2 replies

bgooldfed
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • Answer
  • May 18, 2022

Hi The_Cleaner,
You are referring to this API workflow right? There is no survey ID in the response, so you'd have to set it manually. If you're exporting a JSON it shouldn't be too hard to add in a loop which appends it to each response.
Good luck!


Forum|alt.badge.img

Yep. I have a worker queue that processes survey responses fetching and posts them to a reporting tool. I'm adding the survey ID prop to each response, just making sure there wasn't an automatic way I was missing to have it in there. Thanks for the confirmation.