Developer Documentation

School Results API

Integrate school academic data into your applications using the NERSAPP School Results API.

Base URL https://nersapp.africa/org/{sid}/

Overview

Learn how to retrieve academic sessions, terms, classes, and student results from a school portal.

JSON Responses

All endpoints return JSON responses with a valid flag indicating whether the request succeeded.

Student Data

Student results contain sensitive educational information. Store and process the data securely and only use it for authorized purposes.

Quick Start

Send an HTTP GET request to an endpoint using your school ID.

Example Request

HTTP · cURL
curl --get \
  'https://nersapp.africa/org/{sid}/api/year' \
  --header 'Accept: application/json'

Academic Years

Retrieve the academic sessions configured for the school.

GET

/api/year[?id=ID]

https://nersapp.africa/org/{sid}/api/year?id=ID
Parameter Required Description
id No Optional. Match a session by its ID or name.
Example Response
{
  "valid": true,
  "data": [
    { "id": 1, "name": "2024\/2025" },
    { "id": 2, "name": "My Custom Year" }
  ]
}

Terms

Retrieve school terms, including their start and end dates and associated academic session.

GET

/api/term[?id=ID]

https://nersapp.africa/org/{sid}/api/term?id=ID
Parameter Required Description
id No Optional. Match a term by its ID or name.
Example Response
{
  "valid": true,
  "data": [
    {
      "id": 1,
      "name": "Red",
      "start": "2024-01-08",
      "end": "2024-04-08",
      "year": { "id": 2, "name": "My Custom Year" }
    }
  ]
}

Classes

Retrieve the classes configured for the school.

GET

/api/class[?id=ID]

https://nersapp.africa/org/{sid}/api/class?id=ID
Parameter Required Description
id No Optional. Match a class by its ID or display name.
Example Response
{
  "valid": true,
  "data": [
    { "id": 1, "name": "Nursery 1 A" },
    { "id": 2, "name": "Nursery 1 B" }
  ]
}

Student Results

Retrieve student results for a class, term, and academic year. Supply all three required parameters.

GET

/api/results?class=CLASS&term=TERM&year=YEAR

https://nersapp.africa/org/{sid}/api/results?class=CLASS&term=TERM&year=YEAR
Parameter Required Description
class Yes The class ID or class name.
term Yes The term ID or term name. The term must belong to the selected academic year.
year Yes The academic session ID or session name.
Example Response
{
  "valid": true,
  "data": {
    "students": [
      {
        "id": 3,
        "name": "Naomi Chika",
        "sex": "F",
        "class": "Nursery 1 A",
        "term": "First",
        "year": "2024\/2025",
        "scores": [
          {
            "subject": "English Language",
            "total": [75, 100],
            "assess": [
              { "test 1": [30, 30] },
              { "exams": [45, 70] },
              { "total": [75, 100] }
            ]
          },
          {
            "subject": "Mathematics",
            "total": [86, 100],
            "assess": [
              { "test 1": [28, 30] },
              { "exams": [58, 70] },
              { "total": [86, 100] }
            ]
          },
          {
            "subject": "Ibibio",
            "total": [80, 100],
            "assess": [
              { "test 1": [30, 30] },
              { "exams": [50, 70] },
              { "total": [80, 100] }
            ]
          },
          {
            "subject": "Yoruba",
            "total": [70, 100],
            "assess": [
              { "test 1": [20, 30] },
              { "exams": [50, 70] },
              { "total": [70, 100] }
            ]
          },
          {
            "subject": "Integrated Science",
            "total": [63, 100],
            "assess": [
              { "test 1": [24, 30] },
              { "exams": [39, 70] },
              { "total": [63, 100] }
            ]
          },
          {
            "subject": "Fine Art",
            "total": [73, 100],
            "assess": [
              { "test 1": [18, 30] },
              { "exams": [55, 70] },
              { "total": [73, 100] }
            ]
          }
        ],
        "total": [447, 600],
        "subject_count": 6,
        "average": 74.5
      }
    ],
    "subjects": [
      "English Language",
      "Mathematics",
      "Integrated Science",
      "Fine Art",
      "Ibibio",
      "Yoruba"
    ]
  }
}

Response Format

Every response uses a consistent JSON structure to communicate success or failure.

Successful Response

{
  "valid": true,
  "data": { }
}

Error Response

{
  "valid": false,
  "msg": "Error message here"
}

Implementation Note

Treat student information as confidential. Validate request parameters, handle unsuccessful responses, and avoid exposing sensitive data in logs or client-side error messages.