SonaGetPrescreenDataByExperimentID
Description¶
Returns prescreen responses for participants with credit records for the specified experiment_id.
Input Parameters¶
Below are the following input parameters for use with the SonaGetPrescreenDataByExperimentID API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
experiment_id |
Numeric ID of the study whose participants' prescreen responses are requested. |
Output Parameters¶
Will return APIPrescreenSurveyData class and display data in an array.
Returns up to 299 participant records per request. Results may be incomplete for larger groups.
Error Codes¶
Below are the possible error messages encountered and their respective descriptions.
| Error Type | Error Code | Description |
|---|---|---|
| Authentication Failed | -1 through -7 | Standard authentication errors |
| Error Code | -8 | No prescreen is configured for the site. |
| Error Code | -10 | experiment_id is missing or non-numeric. |
| Error Code | -12 | No participant prescreen records were found for the study. |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetPrescreenDataByExperimentID?api_key=YOUR_API_KEY&experiment_id=1234URL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaGetPrescreenDataByExperimentID |
Query parameters
Sample Output¶
<SonaGetPrescreenDataByExperimentIDResponse
xmlns="https://www.sona-systems.com/"
xmlns:a="http://schemas.datacontract.org/2004/07/emsdotnet.sonasystems"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<SonaGetPrescreenDataByExperimentIDResult>
<a:Errors i:nil="true" />
<a:Result>
<a:APIPrescreenSurveyData>
<a:anon_id_code />
<a:data_status>S</a:data_status>
<a:end_time>2013-04-24T15:28:58</a:end_time>
<a:first_name>Frank</a:first_name>
<a:last_name>Bass</a:last_name>
<a:person_id>9394</a:person_id>
<a:pretest_id>10</a:pretest_id>
<a:responses>
<a:APIPrescreenSurveyResponseItem>
<a:choice_id>57</a:choice_id>
<a:opt_out_choice>0</a:opt_out_choice>
<a:question_id>17</a:question_id>
<a:response_id>1005</a:response_id>
<a:response_numeric>0</a:response_numeric>
<a:response_text>külm</a:response_text>
</a:APIPrescreenSurveyResponseItem>
<a:APIPrescreenSurveyResponseItem>
<a:choice_id>129</a:choice_id>
<a:opt_out_choice>1</a:opt_out_choice>
<a:question_id>27</a:question_id>
<a:response_id>1006</a:response_id>
<a:response_numeric>0</a:response_numeric>
<a:response_text>[Decline to Answer]</a:response_text>
</a:APIPrescreenSurveyResponseItem>
<a:APIPrescreenSurveyResponseItem>
<a:choice_id>145</a:choice_id>
<a:opt_out_choice>1</a:opt_out_choice>
<a:question_id>32</a:question_id>
<a:response_id>1007</a:response_id>
<a:response_numeric>0</a:response_numeric>
<a:response_text>[Decline to Answer]</a:response_text>
</a:APIPrescreenSurveyResponseItem>
</a:responses>
<a:start_time>2013-04-24T15:28:45</a:start_time>
<a:status>C</a:status>
<a:user_id>bass</a:user_id>
</a:APIPrescreenSurveyData>
<a:APIPrescreenSurveyData>
<a:anon_id_code />
<a:data_status>S</a:data_status>
<a:end_time>2013-04-29T23:31:55</a:end_time>
<a:first_name>Greg</a:first_name>
<a:last_name>Smith</a:last_name>
<a:person_id>9308</a:person_id>
<a:pretest_id>10</a:pretest_id>
<a:responses>
<a:APIPrescreenSurveyResponseItem>
<a:choice_id>57</a:choice_id>
<a:opt_out_choice>0</a:opt_out_choice>
<a:question_id>17</a:question_id>
<a:response_id>1010</a:response_id>
<a:response_numeric>0</a:response_numeric>
<a:response_text>külm</a:response_text>
</a:APIPrescreenSurveyResponseItem>
<a:APIPrescreenSurveyResponseItem>
<a:choice_id>130</a:choice_id>
<a:opt_out_choice>0</a:opt_out_choice>
<a:question_id>27</a:question_id>
<a:response_id>1011</a:response_id>
<a:response_numeric>1</a:response_numeric>
<a:response_text>Yes</a:response_text>
</a:APIPrescreenSurveyResponseItem>
<a:APIPrescreenSurveyResponseItem>
<a:choice_id>146</a:choice_id>
<a:opt_out_choice>0</a:opt_out_choice>
<a:question_id>32</a:question_id>
<a:response_id>1012</a:response_id>
<a:response_numeric>2</a:response_numeric>
<a:response_text>No</a:response_text>
</a:APIPrescreenSurveyResponseItem>
</a:responses>
<a:start_time>2013-04-29T23:31:38</a:start_time>
<a:status>C</a:status>
<a:user_id>smithg</a:user_id>
</a:APIPrescreenSurveyData>
</a:Result>
</SonaGetPrescreenDataByExperimentIDResult>
</SonaGetPrescreenDataByExperimentIDResponse>