Skip to main content
POST
/
grade-elementary
Python (SDK)
from datetime import date
from meitner import Meitner, models
import os


with Meitner(
    security=models.Security(
        option1=models.SecurityOption1(
            client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
            client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
        ),
    ),
) as m_client:

    res = m_client.grade_elementaries.create(student_id="123e4567-e89b-12d3-a456-426614174000", school_id="123e4567-e89b-12d3-a456-426614174000", subject_code="MA", academic_year="2024/2025", term="HT", school_year="9", final_grade=True, is_ended=True, external={
        "source_id": "12345678",
    }, language_code="SV", teacher1_employee_id="123e4567-e89b-12d3-a456-426614174000", teacher2_employee_id="123e4567-e89b-12d3-a456-426614174000", grade="A", grade_date=date.fromisoformat("2025-01-15"), school_comment="Utmärkt arbete under hela terminen.")

    # Handle response
    print(res)
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "meta": {
    "createdAt": "2024-01-15T10:30:00Z",
    "createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
    "updatedAt": "2024-01-15T14:45:00Z",
    "updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
  },
  "external": {
    "sourceID": "12345678",
    "source": "ExternalIntegrationAPI"
  },
  "studentID": "123e4567-e89b-12d3-a456-426614174000",
  "schoolID": "123e4567-e89b-12d3-a456-426614174000",
  "subjectCode": "MA",
  "languageCode": "SV",
  "academicYear": "2024/2025",
  "term": "HT",
  "schoolYear": "9",
  "teacher1EmployeeID": "123e4567-e89b-12d3-a456-426614174000",
  "teacher2EmployeeID": "123e4567-e89b-12d3-a456-426614174000",
  "grade": "A",
  "gradeDate": "2025-01-15",
  "finalGrade": true,
  "isEnded": true,
  "schoolComment": "Utmärkt arbete under hela terminen."
}

Documentation Index

Fetch the complete documentation index at: https://docs.meitner.se/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Client-ID
string
header
required
Client-Secret
string
header
required

Body

application/json

Request body

studentID
string<uuid>
required

The ID of the student the grade belongs to. Must reference a student within the organization who has an active placement at the school referenced by SchoolID.

Example:

"123e4567-e89b-12d3-a456-426614174000"

schoolID
string<uuid>
required

The ID of the school where the student received the grade. Must reference a school within the organization.

Example:

"123e4567-e89b-12d3-a456-426614174000"

subjectCode
string
required

The subject code as defined by the Swedish school authorities (e.g. "MA" for Mathematics, "SV" for Swedish).

Example:

"MA"

academicYear
string
required

The academic year in which the grade was awarded, in the format YYYY/YYYY (e.g. "2024/2025").

Example:

"2024/2025"

term
enum<string>
required

The school term in which the grade was awarded.

Available options:
HT,
VT
Example:

"HT"

schoolYear
enum<string>
required

The school year of the student at the time the grade was awarded.

Available options:
6,
7,
8,
9
Example:

"9"

finalGrade
boolean
required

Whether this is the final grade for the student in this subject. A final grade is the official grade used on the student's grade certificate.

Example:

true

isEnded
boolean
required

Whether the grading period has ended for this student in this subject.

Example:

true

external
object

ExternalRequest is the External-object used on Create and Update operations. Only SourceID can be set — the Source field is derived from the API key.

Example:
{ "sourceID": "12345678" }
languageCode
string | null

The language code for the grade, used when the subject is taught in a specific language (e.g. mother tongue instruction).

Examples:

"SV"

null

teacher1EmployeeID
string<uuid> | null

The ID of the primary teacher responsible for the grade. Must reference an Employee who has an active placement at the school referenced by SchoolID.

Examples:

"123e4567-e89b-12d3-a456-426614174000"

null

teacher2EmployeeID
string<uuid> | null

The ID of the secondary teacher responsible for the grade. Must reference an Employee who has an active placement at the school referenced by SchoolID.

Examples:

"123e4567-e89b-12d3-a456-426614174000"

null

grade
enum<string>

The grade awarded to the student.

Available options:
A,
B,
C,
D,
E,
F,
MISSING
Example:

"A"

gradeDate
string<date> | null

The date the grade was awarded.

Examples:

"2025-01-15"

null

schoolComment
string | null

A comment from the school about the grade, visible to the student and guardians.

Examples:

"Utmärkt arbete under hela terminen."

null

Response

Response for GradeElementary Create operation - returns the created GradeElementary

GradeElementary represents a grade awarded to a student in elementary school (Swedish: grundskola). Grades are scoped to the organization of the API key used. The SubjectCode field uses the subject code as defined by the Swedish school authorities (e.g. "MA" for Mathematics).

id
string<uuid>
required

Unique identifier for the GradeElementary

Example:

"123e4567-e89b-12d3-a456-426614174000"

studentID
string<uuid>
required

The ID of the student the grade belongs to. Must reference a student within the organization who has an active placement at the school referenced by SchoolID.

Example:

"123e4567-e89b-12d3-a456-426614174000"

schoolID
string<uuid>
required

The ID of the school where the student received the grade. Must reference a school within the organization.

Example:

"123e4567-e89b-12d3-a456-426614174000"

subjectCode
string
required

The subject code as defined by the Swedish school authorities (e.g. "MA" for Mathematics, "SV" for Swedish).

Example:

"MA"

academicYear
string
required

The academic year in which the grade was awarded, in the format YYYY/YYYY (e.g. "2024/2025").

Example:

"2024/2025"

term
enum<string>
required

The school term in which the grade was awarded.

Available options:
HT,
VT
Example:

"HT"

schoolYear
enum<string>
required

The school year of the student at the time the grade was awarded.

Available options:
6,
7,
8,
9
Example:

"9"

finalGrade
boolean
required

Whether this is the final grade for the student in this subject. A final grade is the official grade used on the student's grade certificate.

Example:

true

isEnded
boolean
required

Whether the grading period has ended for this student in this subject.

Example:

true

meta
object

Metadata information for the GradeElementary

Example:
{
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
  "updatedAt": "2024-01-15T14:45:00Z",
  "updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
}
external
object

External is a reusable object that can be used to store external information about the grade from another system, used for third-party integration tracking.

Example:
{
  "sourceID": "12345678",
  "source": "ExternalIntegrationAPI"
}
languageCode
string | null

The language code for the grade, used when the subject is taught in a specific language (e.g. mother tongue instruction).

Examples:

"SV"

null

teacher1EmployeeID
string<uuid> | null

The ID of the primary teacher responsible for the grade. Must reference an Employee who has an active placement at the school referenced by SchoolID.

Examples:

"123e4567-e89b-12d3-a456-426614174000"

null

teacher2EmployeeID
string<uuid> | null

The ID of the secondary teacher responsible for the grade. Must reference an Employee who has an active placement at the school referenced by SchoolID.

Examples:

"123e4567-e89b-12d3-a456-426614174000"

null

grade
enum<string>

The grade awarded to the student.

Available options:
A,
B,
C,
D,
E,
F,
MISSING
Example:

"A"

gradeDate
string<date> | null

The date the grade was awarded.

Examples:

"2025-01-15"

null

schoolComment
string | null

A comment from the school about the grade, visible to the student and guardians.

Examples:

"Utmärkt arbete under hela terminen."

null