Skip to content
API documentation
View as MarkdownOpen in Claude

Reference data

List the grades a student can be registered with

GET
/v1/grade

Every grade a student can have, in the order they were created, a page at a time (limit up to 100). Reference data: the same for every organization, and a grade has the same _id in each of them.

grade on the student operations takes either a grade’s _id or its name as listed here ("10"); any other value is refused with 400 bad_request. An exam accepts a set of grades, and a student is only offered the exams that accept theirs.

Parameters

Query parameters

NameTypeDescription
pageoptionalnumber

Page number. Defaults to 1.

Example 1

limitoptionalnumber

Items per page. Defaults to 20, max 100.

Example 20

Responses

200 OK

Success: message is "Grades fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleGrades fetched successfully.

  • paginationobject · PaginationMetarequired

    Where one page sits in the whole list.

    4 fields of pagination
    • pagenumberrequired

      The page returned, counting from 1.

      min1example1

    • limitnumberrequired

      Items per page: the limit you sent, 20 if you sent none, and never more than 100.

      min1max100example20

    • totalnumberrequired

      Items across every page.

      min0example57

    • totalPagesnumberrequired

      Pages at this limit: total / limit, rounded up.

      min0example3

  • dataarray of GradeResponserequired

    4 fields of each item
    • _idstringrequired

      The grade’s id: what grade takes when you register or update a student. A grade has the same id in every organization.

      example6650a1b2c3d4e5f6a7b8c9d4

    • namestring

      The grade, as a number in a string, 1 to 12. grade accepts this name as well as the id.

      example10

    • createdAtstring

      When the record was created. The grade list is in this order.

      formatdate-timeexample2026-09-01T09:30:00.000Z

    • updatedAtstring

      When the record last changed.

      formatdate-timeexample2026-09-02T14:05:00.000Z

Headers

X-RateLimit-Limit integer

Requests your account may make to this operation per window (100).

X-RateLimit-Remaining integer

Requests left in the current window.

X-RateLimit-Reset integer

Seconds until the current window ends.

Example

{
  "success": true,
  "message": "Grades fetched successfully.",
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 57,
    "totalPages": 3
  },
  "data": [
    {
      "_id": "6650a1b2c3d4e5f6a7b8c9d4",
      "name": "10",
      "createdAt": "2026-09-01T09:30:00.000Z",
      "updatedAt": "2026-09-02T14:05:00.000Z"
    }
  ]
}

Example request

# $TOKEN: a short-lived token you minted with your API key and secret
curl -sS 'https://api.main-team.org/v1/grade?page=1&limit=20' \
  -H "Authorization: Bearer $TOKEN"

Search the API documentation

Guides, endpoints by name, path or permission, and error codes such as not_found.