NextSchoolNextSchool Data API

Teachers

Query staff and teacher records — list, search, and get by ID

Teachers

Access staff and teacher records for your school. All queries require authentication and return only teachers belonging to your assigned school.

List Teachers

query {
  teachers(limit: 20, offset: 0) {
    id
    username
    fullName
    empPosition
    status
    statusText
  }
}

Parameters

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

Search Teachers

query {
  teachers(search: "สมศรี", limit: 10) {
    id
    fullName
    empPosition
    teachGroup
  }
}

Get Teacher by ID

query {
  teacher(id: 42) {
    id
    username
    email
    fullName
    empNo
    empPosition
    teachGroup
    gender
    mobileNo
    status
    statusText
    takecare
    imageURI
  }
}

Teacher Fields

FieldTypeDescription
idIntUnique teacher ID
usernameStringUsername
emailStringEmail address
statusIntStatus code
statusTextStringStatus in Thai text (computed)
typeIntTeacher type
titleStringThai title
firstnameStringFirst name
lastnameStringLast name
fullNameStringFull name with title (computed)
mobileNoStringMobile phone number
empNoStringEmployee number
empPositionStringEmployee position
teachGroupStringTeaching group
genderStringGender
profilePicStringProfile picture filename
imageURIStringFull profile image URL (computed)
takecareStringHomeroom class for active semester (computed)
visitSummaryVisitStatsAggregate home-visit counts for the students in this teacher's classrooms. Takes an optional semesterId argument; defaults to the active semester.

Visit Summary for an Advisor Teacher

Fetch the home-visit coverage for all students in the classrooms this teacher is assigned to — useful for showing an advisor "how many of my kids have been visited".

query {
  teacher(id: 42) {
    id
    fullName
    takecare
    visitSummary {
      total
      visited
      notVisited
      problem
      normal
    }
  }
}

Pass semesterId explicitly to scope the summary to a different semester:

query {
  teacher(id: 42) {
    visitSummary(semesterId: 78) {
      total
      visited
      problem
    }
  }
}

Status Codes

CodeThaiEnglish
-2ย้ายออกTransferred out
-1เกษียณRetired
0ไม่ใช้งานInactive
1ลาออกResigned
2พักงานOn leave
10ปกติActive

Filter by Status

# Get only active teachers
query {
  teachers(status: 10, limit: 50) {
    id
    fullName
    empPosition
  }
}

# Get retired teachers
query {
  teachers(status: -1) {
    id
    fullName
  }
}

On this page