[Solved] How to get survey stat and option stat in a single API call?


I know there is different REST API call to get survey stat and option stat with different API call.

$url =”https://restapi.surveygizmo.com/v4/survey/{$survey}/?user:pass={$user}:{$pass}{$status}{$datesubmmitted}”;
$survey_stats_url = “https://restapi.surveygizmo.com/v4/survey/{$survey}/surveystatistic?user:pass={$user}:{$pass}”;

But there is no any viable key like ‘option_id’ or something like that to relate them, like what if I want stat and property color of an option. Please suggest me how can I merge arrays with ‘option object’ and ‘option stat object’.

Richard Goodchild264162 asked

    Best answer

    Holly 2.17K Rep.

    Hey Richard!

    Thanks so much for using our new Community!

    It looks like Zach was able to help via a support ticket. If anyone else needs the answer for the future, here it is!

    “The [label] field for the options in the surveystatistic return matches the [title][English] field for the option in the survey return. That should be enough to match the different data they have on each option.”


    Holly White, Survey Fire Dancer

    Holly answered


      Question stats

      • Active
      • Views3446 times
      • Answers1 answer
      • Followers0 followers