Update Student Wallet
Adds credits to, or removes credits from, a learner's wallet (referral / loyalty credits).
POST
/users/{userId}/edcreditsUpdate Student Wallet
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/users/{userId}/edcredits' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"num_credits":10}'{
"code": 200,
"message": "Success"
}Access: Institute admins, plus custom roles that can manage learners or the loyalty program.
Request body: form-data with one field, JSONString, containing this JSON:
Path parameters
Learner's user ID. If the parent loyalty program is on, pass the parent's ID; the credits go to their first linked learner.
Body
JSONStringNumber of credits to add or remove.
is_addinteger
1 adds credits, 0 (default) removes them.commentsstring
Note stored with the transaction.
activityinteger
Credit activity code. Default
7 (admin adjustment); leave it out.Notes: Leaving out is_add removes credits. Errors: "Entered value more than total credits." (removing more than the balance) and "Max credits allowed for a student is N." (adding beyond your institute's limit). The change is recorded in the learner's credit history with your user as the one who made it. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.