Server-Side Completion URL Responses

For help in testing, listed below are the possible messages that the system will give if the Server-Side Completion URL is loaded. For consistency, this feature is documented using the same format as the general documentation for the API interface. See Automating Tasks – API for information about how to locate the API documentation.

Input Parameters
Below are the following input parameters for use with the WebstudyCredit API function. These are included automatically when the system generates the Server-Side Completion URL. Note the parameters must be specified as part of the URL (an HTTP GET) and not via an HTTP POST request.

Error Codes
Below are the possible error messages encountered and their respective descriptions. If the request was successful, there will not be an Error object returned, only a Result object. See Sample Output for an example.

Sample Input
https://yourschool.sonasystems.com/services/SonaAPI.svc/WebstudyCredit?experiment_id=123&credit_token=9185d436e5f94b1581b0918162e8&survey_code=XXXX

Sample Output
The output is in XML format. Below is an example of a successful request. Most of the Result object will contain null or empty values, as it is part of an object used for other API calls. There are two options to check that the credit grant was successful:

  1. The Result object exists
  2. The Result object exists and the credit_status field has a value of G

If there was an error, then the Errors object will contain data instead of being null.

<WebstudyCreditResponse>
<WebstudyCreditResult>
<a:Errors i:nil="true"/>
<a:Result>

<a:anon_id_code i:nil="true"/> <a:credit_status>G</a:credit_status> <a:email i:nil="true"/> <a:first_name i:nil="true"/> <a:last_name i:nil="true"/> <a:phone i:nil="true"/> <a:signup_id>123</a:signup_id> <a:student_id_num i:nil="true"/> <a:survey_code>XXXX</a:survey_code> <a:user_id i:nil="true"/>

</a:Result> </WebstudyCreditResult> </WebstudyCreditResponse>

Related Docs

  • Client-Side Completion URL Responses

    Read More
  • Using the SURVEY CODE Feature

    Read More
  • Security Considerations

    Read More