Skip to main content
This endpoint records a student’s earned grade and the total possible grade for a specific PDF quiz submission. Once saved, the submission’s is_marked flag is set to 1 and the awarded grade becomes visible to the student.

Endpoint

POST /api/v3/quiz/pdf-quizzes/grade/{grade_id}

Required Role

Admin — you must authenticate with an admin-scoped Bearer token.

Required Headers

HeaderValue
AuthorizationBearer <admin-token>
Acceptapplication/json
Content-Typeapplication/json
grade_id is the submission ID — it corresponds to the id field within the submissions array returned by the List Quizzes and Get Quiz endpoints. It is not the quiz’s own id.

Path Parameters

grade_id
integer
required
The unique ID of the student submission you want to grade. Retrieve this value from the id field inside the submissions array of any quiz response.

Request Body

grade
numeric
required
The grade you are awarding to the student for this submission. Must not exceed total_grade.
total_grade
numeric
required
The maximum possible grade for this submission. This value is recorded alongside the awarded grade so students can see their score in context.

Example Request

curl -X POST https://app.example.com/api/v3/quiz/pdf-quizzes/grade/15 \
  -H "Authorization: Bearer your-admin-token" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"grade": 85, "total_grade": 100}'

Response

200 OK

{
  "status": true,
  "message": "Grade Saved Successfully"
}

422 Validation Error

{
  "message": "Invalid Data",
  "errors": {
    "grade": ["The grade field is required."]
  }
}

Error Responses

StatusMessageCause
403Unauthorized AccessThe token provided does not belong to an admin account.
404Not FoundNo submission exists with the specified grade_id.
422Invalid DataThe grade or total_grade field is missing from the request body.