Skip to content

Admin ImportStudents

Vaishakh GK edited this page Apr 24, 2023 · 3 revisions

Import Students

Route for importing students using csv file.

URL : /api/admin/import-students

Method : POST

Auth Required : YES

Data constraints

  • The file must be in CSV format.

Data example

  • The file should be included as part of a multipart/form-data request.

Sample CSV file

applicationNo,name,phone,gender,dob,category
1,Amit Kumar,9876543210,Male,15-05-2005,General
2,Priya Sharma,9876543211,Female,09-07-2007,General
3,Rahul Singh,9876543212,Male,22-01-2006,SC
4,Anjali Gupta,9876543213,Female,12-08-2004,ST
5,Arjun Mehta,9876543214,Male,04-11-2005,OBC

Success Response

Code : 200 OK

Content example

"Successfully added"

Note: The status of the student will be set to 'pending' on the server.

Error Response

Condition : Not Logged In as admin.

Code : 401 Unauthorized

Content :

"Not Logged In"

Condition : Server Error

Code : 500 Internal Server Error

Content :

"Request failed"

Clone this wiki locally