Docs home

Search Student

Looks up a learner by mobile number or email and tells you whether they exist. Use it before enrolling someone to check if they already have an account, and optionally whether they are already in a course or batch.

GET/student/search
Search Student
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/student/search?institution_id=<institutionId>&student_email=hemal@edmingle.com&student_mobile_number=9878987898' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>'
{
  "code": 200,
  "message": "Success",
  "user_details": [
    {
      "role": "student",
      "student_email": "hemal@edmingle.com"
    }
  ]
}

Access: Public, no API key needed. If you send an API key for an institute admin (or an admin or custom role who shares an organization with the learner), the response also includes the learner's ID, name, phone, email and username.

Query parameters
student_mobile_numberstringOne of the two
Mobile number to look up. If you send it, student_email is ignored.
student_emailstringOne of the two
Email to look up. Used only when no mobile number is sent.
Institute to search in. Defaults to the institute of the host you call, or of your ORGID organization.
bundle_idinteger
Course ID. If the learner is already enrolled in this course, an error is returned (see Notes).
batch_idarray of integers
Batch IDs. If the learner is already enrolled in one of these batches of the course, an error is returned (see Notes).
isSdkinteger
1 matches users of any role, not only learners. Default 0 (learners only).
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success
user_detailsobject[]
Show child attributesHide child attributes
Example: student
Example: hemal@edmingle.com

Notes: Returns "No such user." when nothing matches. When you pass bundle_id or batch_id and the learner is already enrolled in the course: if they are in one of the batches you named you get "Already enrolled in this course package."; otherwise you get an error that carries student_name and batch_names (the batches they are already in), so you can ask whether to add them to another batch.

Updated yesterday

Ask AI