SonaSignUpUserToATimeslot
Description¶
This API function signs users up for a specific timeslot. The timeslot is specified as a timeslot_id. The user is specified using their person_id. Note: This function only works for lab studies and external web studies. It does not work for internal online survey studies.
Input Parameters¶
Below are the following input parameters for use with the SonaSignUpUserToATimeslot API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
person_id |
The person_id of the person to sign up. |
timeslot_id |
The timeslot_id of the timeslot to sign the person up for. |
Output Parameters¶
Returns a single APISignup result for the new signup.
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 | Invalid or no timeslot_id supplied |
| Error Code | -11 | Invalid or no person_id supplied |
| Error Code | 9 | No participant found |
| Error Code | 10 | No supported timeslot found |
| Error Code | 11 | The timeslot is full |
Other sign-up restrictions may be returned as descriptive error messages without a numeric code.
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaSignUpUserToATimeslot?api_key=YOUR_API_KEY&person_id=11498×lot_id=75URL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaSignUpUserToATimeslot |
Query parameters
Sample Output¶
<SonaSignUpUserToATimeslotResponse
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">
<SonaSignUpUserToATimeslotResult>
<a:Errors i:nil="true" />
<a:Result>
<a:anon_id_code>1234</a:anon_id_code>
<a:credit_status>W</a:credit_status>
<a:email>[email protected]</a:email>
<a:first_name>Mike</a:first_name>
<a:last_name>Lee</a:last_name>
<a:link_click_date>0001-01-01T00:00:00</a:link_click_date>
<a:occur_date>2019-08-14T16:00:00</a:occur_date>
<a:phone>8509886</a:phone>
<a:signup_date>2019-08-13T15:00:00</a:signup_date>
<a:signup_id>258</a:signup_id>
<a:student_id_num>09341404</a:student_id_num>
<a:survey_code>222</a:survey_code>
<a:user_id>mikel</a:user_id>
</a:Result>
</SonaSignUpUserToATimeslotResult>
</SonaSignUpUserToATimeslotResponse>