Have a Question?

Get Student


Description

Return student record


Method

Get


Endpoint

/admin/api.php?f=getStudent&id={student id}

Header

Content-Type: application/x-www-form-urlencoded

Body


Not Applicable

Response

Success

{
result: "success",         //string
content: {

userid: int,

username: string,,

email: string,,

mobile: int,

firstname: string,

lastname: string,

gradelevel: int,

schoolname: string,

preferences: string,

points: int

}

}

Fail

{

result:"fail"              //String

{



Example

Javascript

POST Request

const students = async () => {
const response = await fetch('http://stockknowledge.org/admin/api.php?f=getStudent&id=2',{
return await response.json();

method: 'POST',

body: 'id=4',

headers: {

'Content-Type': 'application/x-www-form-urlencoded'

}

});
return await response.json();
}