Have a Question?

Edit Student


Description

Edit student record.


Method

POST


Endpoint

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

Header

Content-Type: multipart/form-data

Body


Form Data

{{< notice note >}} At lease one key-value pair is present. {{< /notice >}}


Key Value
username String
password String
email String
mobile Integer
first_name String
last_name String
grade_level Integer
school_name Integer
preference String
progress Integer
file blob

Response

Success

{

result:"success"          //String

{


Fail

{

result:"fail"              //String

{



Example

Javascript

POST Request

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

method: 'POST',

body: formData,

headers: {

'Content-Type': 'multipart/form-data'

}

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