API Backend Build With NodeJS
/register/student
This Endpoint is used to Register a Student.
POST
Content-Type: 'application/x-www-form-urlencoded'
password: Password entered during Registration
_apikey: A secret APIKEY that has to be provided for a successfull request
_deviceid: Unique Device ID
_apikey will be set by the server admin and all the requests sent to server have to provide this APIKEY to do anything at all_deviceid stored on the device then send it and if you don’t have a _deviceid then send it anyway, Because you’ll get a new one_id: The 8 digit ID of Student
phoneno: Student's Phone Number
fatherno: Student's Fathers Number
location: Place where student lives
_dob: Date of Birth of Student
user_type: Type of User, Can be either student or warden
location can either be hostel or dayscholar. All other values are invalid.{
"error": "E101",
"invalidKeys": [
"_id"
]
}
invalidKeys field contains an Array of all the invalid values
{
"error": "E102",
"_deviceid": "ad5fd714096e2746f94307d5cf04",
"message": "Invalid ID"
}
{
"error": "E103",
"message":"Student ID already exists in Database"
}
{
"_deviceid": "ad5fd714096e2746f94307d5cf04",
"error": "E500",
"errorDetail": "<Error Message in Detail>",
"message": "Internal Server Error"
}
{
"error": "E104",
"message": "Errored in Storing Record to Database"
}
{
"error": 0,
"message": "Successfully Created Record",
"_deviceid": "ad5fd714096e2746f94307d5cf04",
"data": {
"_id": "97465234",
"name": "Ishan Jain"
}
}