SonaGetStudyCreditAssignmentMismatch
Description¶
This function returns study credit assignments where the participant assigned the credit to a course that is not included in the study's course restrictions. For example, a study may be restricted to courses A and B, while a participant enrolled in courses B and C assigns the study credit to course C.
This is a read-only function. It can be used to review the affected credit assignments before calling SonaFixStudyCreditAssignmentMismatch, which reassigns or unassigns the mismatched credits.
Input Parameters¶
Below are the following input parameters for use with the SonaGetStudyCreditAssignmentMismatch API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
Output Parameters¶
Returns an array of APICreditItem values, with one item for each mismatched credit assignment.
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 | -8 | No credit item record was found. This should not ordinarily occur. |
| Error | -9 | No course-restriction mismatches were found. |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaGetStudyCreditAssignmentMismatch?api_key=YOUR_API_KEYURL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaGetStudyCreditAssignmentMismatch |
Query parameters
Sample Output¶
<SonaGetStudyCreditAssignmentMismatchResponse
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">
<SonaGetStudyCreditAssignmentMismatchResult>
<a:Errors i:nil="true" />
<a:Result>
<a:APICreditItem>
<a:class_id>202</a:class_id>
<a:comments />
<a:credit_id>1369</a:credit_id>
<a:credit_type>G</a:credit_type>
<a:date_granted>2026-08-18T00:00:00</a:date_granted>
<a:email>[email protected]</a:email>
<a:experiment_id>159</a:experiment_id>
<a:first_name>Jamie</a:first_name>
<a:grantor_id>11818</a:grantor_id>
<a:last_name>Smith</a:last_name>
<a:manual_credit_flag>0</a:manual_credit_flag>
<a:payment_amount>0</a:payment_amount>
<a:payment_status>W</a:payment_status>
<a:payment_status_last_updated>0001-01-01T00:00:00</a:payment_status_last_updated>
<a:penalty_credit>0</a:penalty_credit>
<a:person_id>11498</a:person_id>
<a:show_credit>0.50</a:show_credit>
<a:signup_id>1369</a:signup_id>
<a:student_id_num />
<a:user_id>jsmith</a:user_id>
</a:APICreditItem>
</a:Result>
</SonaGetStudyCreditAssignmentMismatchResult>
</SonaGetStudyCreditAssignmentMismatchResponse>