NextSchoolNextSchool Data API

Students

Query student records — list, search, and get by ID

Students

Access student records for your school. All queries require authentication and return only students belonging to your assigned school.

List Students

query {
  students(limit: 20, offset: 0) {
    id
    code
    fullName
    classroomName
    status
    statusText
  }
}

Parameters

ParameterTypeDefaultDescription
limitInt20Maximum number of results
offsetInt0Number of results to skip (for pagination)
searchStringSearch across code, firstname, lastname, mobileNo, citizenId
codeStringFilter by student code (partial match)
firstnameStringFilter by first name (partial match)
lastnameStringFilter by last name (partial match)
mobileNoStringFilter by mobile number
citizenIdStringFilter by citizen ID

Search Students

The search parameter searches across multiple fields simultaneously:

query {
  students(search: "สมชาย", limit: 10) {
    id
    fullName
    code
    classroomName
  }
}

Get Student by ID

query {
  student(id: 123) {
    id
    code
    title
    firstname
    lastname
    fullName
    classroomName
    orderNumber
    gender
    dob
    mobileNo
    citizenId
    status
    statusText
    imageURI
  }
}

Student Fields

FieldTypeDescription
idIntUnique student ID
codeStringStudent code
titleStringThai title (เด็กชาย, เด็กหญิง, นาย, นางสาว)
firstnameStringFirst name
lastnameStringLast name
fullNameStringFull name with title (computed)
firstnameEnStringFirst name in English
lastnameEnStringLast name in English
citizenIdStringCitizen ID number
genderStringGender
bloodStringBlood type
dobStringDate of birth
addressStringAddress
telephoneStringTelephone number
mobileNoStringMobile phone number
statusIntStatus code
statusTextStringStatus in Thai text (computed)
imageStringProfile image filename
imageURIStringFull profile image URL (computed)
orderNumberIntOrder number in current classroom (computed)
classroomNameStringCurrent classroom name, e.g. "ม.1/1" (computed)
createdAtStringCreation timestamp
updatedAtStringLast update timestamp

Status Codes

CodeThaiEnglish
-1ไม่ใช้งานInactive
0สำเร็จการศึกษาGraduated
5เรียนต่อต่างประเทศStudy abroad
6ลาออกResigned
7แขวนลอยSuspended
8พ้นสภาพนักศึกษาExpelled
9พักการศึกษาStudy leave
10กำลังศึกษาCurrently studying
11ยังไม่จบNot graduated
12ย้ายสถานศึกษาTransferred
query {
  students(limit: 20, offset: 0, search: "ม.6") {
    id
    fullName
    classroomName
    mobileNo
    statusText
  }
}

On this page