MENU navbar-image

Introduction

This is the api collection for Samasoft School Management System

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Assessment Type Distribution

Store Assessment Type

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/assessment-type-distribution

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Display Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/quo" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/quo"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/assessment-type-distribution/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the assessment type distribution. Example: quo

Update Details

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/consectetur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/consectetur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/assessment-type-distribution/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the assessment type distribution. Example: consectetur

Remove Type

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/non" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type-distribution/non"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/assessment-type-distribution/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the assessment type distribution. Example: non

Assessment Type Management

All

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/assessment-type" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/assessment-type

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Assessment Store

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/assessment-type" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/assessment-type

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Assessment Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/assessment-type/consequuntur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type/consequuntur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/assessment-type/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the assessment type. Example: consequuntur

Update Assessment

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/assessment-type/ratione" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type/ratione"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/assessment-type/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the assessment type. Example: ratione

Delete

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/assessment-type/dolor" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/assessment-type/dolor"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/assessment-type/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the assessment type. Example: dolor

Authentication

Login

This API is for User Login

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"osammy820@gmail.com\",
    \"password\": \"123Password\"
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "osammy820@gmail.com",
    "password": "123Password"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Users Email Address Example: osammy820@gmail.com

password   string   

Users Password Example: 123Password

User Registration

requires authentication

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Samuel\",
    \"email\": \"osammy820@gmail.com\",
    \"password\": \"123XXX\",
    \"role_id\": \"1\"
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Samuel",
    "email": "osammy820@gmail.com",
    "password": "123XXX",
    "role_id": "1"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Full Name of User Example: Samuel

email   string   

Users Email Address Example: osammy820@gmail.com

password   string   

Users Password Example: 123XXX

role_id   integer   

The Role Assigned to the uset Example: 1

Class Management

Create Classroom

requires authentication

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/classroom" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"frbcfdpunglkznbjhm\",
    \"status\": \"active\",
    \"department_id\": 5
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/classroom"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "frbcfdpunglkznbjhm",
    "status": "active",
    "department_id": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/classroom

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 50 characters. Example: frbcfdpunglkznbjhm

status   string   

Example: active

Must be one of:
  • active
  • inactive
department_id   integer   

Example: 5

subject_ids   string[]  optional  

Show Class Details

requires authentication

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/classroom/incidunt" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/classroom/incidunt"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/classroom/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the classroom. Example: incidunt

Update Classroom

requires authentication

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/classroom/fugiat" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/classroom/fugiat"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/classroom/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the classroom. Example: fugiat

Delete Classroom

requires authentication

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/classroom/voluptas" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/classroom/voluptas"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/classroom/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the classroom. Example: voluptas

Department Management

Display a list of all departments.

requires authentication

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/department" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/department"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/department

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create New Department.

requires authentication

This api is for creating department

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/department" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"pariatur\",
    \"status\": [
        \"active\",
        \"inactive\"
    ]
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/department"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "pariatur",
    "status": [
        "active",
        "inactive"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/department

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Department name Example: pariatur

status   string   

Department name

Must be one of:
  • active
  • inactive

Display a specific department details.

requires authentication

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/department/adipisci" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/department/adipisci"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/department/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

id of the department you want to view it's details Example: adipisci

Update the specified resource in storage.

requires authentication

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/department/voluptas" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/department/voluptas"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/department/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the department. Example: voluptas

Remove the specified resource from storage.

requires authentication

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/department/qui" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/department/qui"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/department/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the department. Example: qui

Endpoints

GET api/v1/user

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v1/examination-entry/students

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/examination-entry/students" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"department_id\": \"est\",
    \"classroom_id\": \"ut\",
    \"subject_id\": \"fugiat\",
    \"session_id\": \"et\",
    \"examination_id\": \"accusantium\",
    \"assessment_type_distribution_id\": \"et\"
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/students"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "department_id": "est",
    "classroom_id": "ut",
    "subject_id": "fugiat",
    "session_id": "et",
    "examination_id": "accusantium",
    "assessment_type_distribution_id": "et"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/examination-entry/students

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

department_id   string   

Example: est

classroom_id   string   

Example: ut

subject_id   string   

Example: fugiat

session_id   string   

Example: et

examination_id   string   

Example: accusantium

assessment_type_distribution_id   string   

Example: et

Display a listing of the resource.

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/examination-entry/quis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/quis"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/examination-entry/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination entry. Example: quis

Store a newly created resource in storage.

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/examination-entry" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination-entry"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/examination-entry

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Display the specified resource.

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/examination-entry/et/show" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/et/show"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/examination-entry/{id}/show

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination entry. Example: et

Update the specified resource in storage.

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/rem" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/rem"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/examination-entry/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination entry. Example: rem

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/et" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination-entry/et"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/examination-entry/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination entry. Example: et

Examinations

All Examinations

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/examination" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/examination

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create Examination

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/examination" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/examination

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Display Examination Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/examination/velit" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination/velit"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/examination/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination. Example: velit

Update Examination Details

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/examination/animi" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination/animi"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/examination/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination. Example: animi

Delete Examination Details

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/examination/natus" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/examination/natus"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/examination/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the examination. Example: natus

Grade Scale

Store Grading Scale

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/grading-scale" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-scale"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/grading-scale

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Display Scale Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/grading-scale/reprehenderit" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-scale/reprehenderit"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/grading-scale/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the grading scale. Example: reprehenderit

Update Scale Details

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/grading-scale/ea" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-scale/ea"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/grading-scale/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the grading scale. Example: ea

Delete Scale

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/grading-scale/officia" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-scale/officia"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/grading-scale/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the grading scale. Example: officia

Grading System Types

Get All Grading Types

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/grading-type" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-type"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/grading-type

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create Grading System Type

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/grading-type" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-type"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/grading-type

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Show Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/grading-type/quia" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-type/quia"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/grading-type/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the grading type. Example: quia

Update the specified resource in storage.

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/grading-type/porro" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-type/porro"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/grading-type/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the grading type. Example: porro

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/grading-type/omnis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/grading-type/omnis"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/grading-type/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the grading type. Example: omnis

Roles Management

Display list of all roles within a school.

requires authentication

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/roles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

schoolId   string   

The id of the school you want to display it's roles Example: 1

Store a newly created resource in storage.

requires authentication

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"rerum\",
    \"status\": \"active\",
    \"permissions\": [
        \"et\"
    ]
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "rerum",
    "status": "active",
    "permissions": [
        "et"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/roles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: rerum

status   string  optional  

Example: active

Must be one of:
  • active
  • inactive
permissions   string[]   

Display Single Role Details.

requires authentication

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/roles/10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/roles/10"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/roles/{roleId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

roleId   integer   

The Id of the role you want to view it's details Example: 10

Update the specified resource in storage.

requires authentication

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/roles/ratione" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/roles/ratione"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/roles/{roleId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

roleId   string   

Example: ratione

Remove the specified resource from storage.

requires authentication

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/roles/molestiae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/roles/molestiae"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/roles/{roleId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

roleId   string   

Example: molestiae

School

Display list of all Schools

requires authentication

This endpoint can be used by only system developers to create new school

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/school" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/school"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/school

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create a new School

requires authentication

This api requires authentication. Only users with the permission to create school can use this endpoint

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/school/store" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=University of Education"\
    --form "email=info@uew.edu.gh"\
    --form "phone=+233558571228"\
    --form "address=Kumasi"\
    --form "logo=@/private/var/folders/rl/ybb9hrn920n4_gmzjwq93z1c0000gq/T/phpYpveJ1" \
    --form "signature=@/private/var/folders/rl/ybb9hrn920n4_gmzjwq93z1c0000gq/T/phpdN8kvU" 
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/school/store"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'University of Education');
body.append('email', 'info@uew.edu.gh');
body.append('phone', '+233558571228');
body.append('address', 'Kumasi');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
body.append('signature', document.querySelector('input[name="signature"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/school/store

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

The name of the school Example: University of Education

email   string   

School's email address Example: info@uew.edu.gh

phone   string   

Schools phone number Example: +233558571228

address   string   

Postal and Location of the the school Example: Kumasi

logo   file  optional  

The schools logo Example: /private/var/folders/rl/ybb9hrn920n4_gmzjwq93z1c0000gq/T/phpYpveJ1

signature   file  optional  

authorization signature for school head Example: /private/var/folders/rl/ybb9hrn920n4_gmzjwq93z1c0000gq/T/phpdN8kvU

Display the details of a school.

requires authentication

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/school/show" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/school/show"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/school/show

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update the specified resource in storage.

requires authentication

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/school/update" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/school/update"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/school/update

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Session Management

Session List Display all Sessions(i.e Academic Year and Term)

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/session" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/session"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/session

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create Session This api is for creating new academic session

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/session" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"ocejmtjbwcxotyrckfugyawy\",
    \"status\": \"active\"
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/session"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "ocejmtjbwcxotyrckfugyawy",
    "status": "active"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/session

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 150 characters. Example: ocejmtjbwcxotyrckfugyawy

status   string  optional  

Example: active

Must be one of:
  • active
  • inactive

Show Session Show Session Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/session/rerum" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/session/rerum"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/session/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the session. Example: rerum

Update Session Update the specified resource in storage.

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/session/aperiam" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/session/aperiam"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/session/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the session. Example: aperiam

Delete Session

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/session/beatae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/session/beatae"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/session/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the session. Example: beatae

Staff Management

Get Staff Filter

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/staff?department_id=11&staff_type=ipsum&subject_id=13&status=deserunt" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"department_id\": 14,
    \"staff_type\": \"teaching\",
    \"subject_id\": 10,
    \"status\": \"active\"
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/staff"
);

const params = {
    "department_id": "11",
    "staff_type": "ipsum",
    "subject_id": "13",
    "status": "deserunt",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "department_id": 14,
    "staff_type": "teaching",
    "subject_id": 10,
    "status": "active"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/staff

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

department_id   integer  optional  

Optional. Filter by department ID. Example: 11

staff_type   string  optional  

Optional. Filter by staff type (teaching or non-teaching). Example: ipsum

subject_id   integer  optional  

Optional. Filter by subject ID. Example: 13

status   string  optional  

Optional. Filter by staff status (active or inactive). Example: deserunt

Body Parameters

department_id   integer  optional  

Example: 14

staff_type   string  optional  

Example: teaching

Must be one of:
  • teaching
  • non-teaching
subject_id   integer  optional  

Example: 10

status   string  optional  

Example: active

Must be one of:
  • active
  • inactive

POST api/v1/staff

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/staff" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/staff"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/staff

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Staff Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/staff/qui?id=14" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/staff/qui"
);

const params = {
    "id": "14",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/staff/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the staff. Example: qui

Query Parameters

id   integer  optional  

required. Filter by staff ID. Example: 14

PUT api/v1/staff/{id}

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/staff/sed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/staff/sed"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/staff/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the staff. Example: sed

Delete Staff

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/staff/corporis?id=11" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/staff/corporis"
);

const params = {
    "id": "11",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/staff/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the staff. Example: corporis

Query Parameters

id   integer  optional  

required. staff ID. Example: 11

Student Management

Students List

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/students" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/students"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "gender": "male",
            "department": {
                "id": 1,
                "name": "Computer Science"
            },
            "classroom": {
                "id": 1,
                "name": "Class A"
            },
            // Other student attributes
        },
        // Other students
    ]
}
 

Request      

GET api/v1/students

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

classroom_id   integer  optional  

Nullable. The ID of the classroom. Example: 1

student_type_id   integer  optional  

Nullable. The ID of the student type. Example: 1

gender   string  optional  

Nullable. The gender of the student. Accepted values: male, female. Example: male

name   string  optional  

Nullable. The name of the student. Example: John

Store a newly created resource in storage.

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/students" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/students"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/students

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Display the specified resource.

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/students/qui" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/students/qui"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the student. Example: qui

Update the specified resource in storage.

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/students/nulla" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/students/nulla"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the student. Example: nulla

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/students/maiores" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/students/maiores"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the student. Example: maiores

Student Type Management

Student Type List

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/student_types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/student_types"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/student_types

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create Student Type

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/student_types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"regular\",
    \"status\": \"active\"
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/student_types"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "regular",
    "status": "active"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/student_types

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Student type name Example: regular

Must be one of:
  • regular
  • schorlaship
status   string   

status Example: active

Must be one of:
  • active
  • inactive

Student Types Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/student_types/officia" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/student_types/officia"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/student_types/{studentType}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

studentType   string   

Example: officia

Update the specified resource in storage.

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/student_types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/student_types/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/student_types/{studentType_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

studentType_id   integer   

The ID of the studentType. Example: 1

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "schoolapi-test.samasoftech.net/api/v1/student_types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/student_types/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/student_types/{studentType_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

studentType_id   integer   

The ID of the studentType. Example: 1

Subject Management

Get Subjects List

Subjects can be filtered by subject_types(core,elective),department_id,classroom_id

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/subjects" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/subjects"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/subjects

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

subject_type   string  optional  

Core/Elective Example: core

Must be one of:
  • core
  • elective
department_id   integer  optional  

department id to be filtered Example: 1

classroom_id   integer  optional  

classroom id to be filtered Example: 1

Create Classroom

Api to create new classroom

Example request:
curl --request POST \
    "schoolapi-test.samasoftech.net/api/v1/subjects" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"English Language\",
    \"subject_type\": \"core\",
    \"status\": \"active\",
    \"department_id\": 1,
    \"classroom_ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/subjects"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "English Language",
    "subject_type": "core",
    "status": "active",
    "department_id": 1,
    "classroom_ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/subjects

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

subject name Example: English Language

subject_type   string   

category the subject belongs to Example: core

Must be one of:
  • core
  • elective
status   string   

the status of the subject Example: active

Must be one of:
  • active
  • inactive
department_id   integer   

the department the subject belongs to Example: 1

classroom_ids   integer  optional  

ids of classrooms the subject belongs to, it's an array of classrooms ids

Single Subject Details

Example request:
curl --request GET \
    --get "schoolapi-test.samasoftech.net/api/v1/subjects/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/subjects/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/subjects/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

Subject id Example: 1

Must be one of:
  • 1
  • 2
  • 3
  • 4
  • 5

Update subject details

Example request:
curl --request PUT \
    "schoolapi-test.samasoftech.net/api/v1/subjects/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"English Language\",
    \"subject_type\": \"core\",
    \"status\": \"active\",
    \"department_id\": 1,
    \"classroom_ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "schoolapi-test.samasoftech.net/api/v1/subjects/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "English Language",
    "subject_type": "core",
    "status": "active",
    "department_id": 1,
    "classroom_ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/subjects/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

Subject id Example: 1

Must be one of:
  • 1
  • 2
  • 3
  • 4
  • 5

Body Parameters

name   string   

subject name Example: English Language

subject_type   string   

category the subject belongs to Example: core

Must be one of:
  • core
  • elective
status   string   

the status of the subject Example: active

Must be one of:
  • active
  • inactive
department_id   integer   

the department the subject belongs to Example: 1

classroom_ids   integer  optional  

ids of classrooms the subject belongs to