The Guide Submissions API is the student-facing side of the guides workflow. Students browse the published guides assigned to their enrolled courses, upload photos of their handwritten answers to receive presigned S3 URLs, and poll asynchronous grading results once the AI pipeline has finished scoring each submission.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vruizz22/innova-backend-serverless/llms.txt
Use this file to discover all available pages before exploring further.
All endpoints in this module are mounted under
/student and require a valid JWT issued to a user with the STUDENT role. Requests that carry a TEACHER or ADMIN token will be rejected with 403 Forbidden.GET /student/guides
List every published guide that belongs to one of the authenticated student’s actively enrolled courses. Each entry includes real-time progress counters so the student can see how many questions they have already answered. Auth: JWT (STUDENT)Response
UUID of the guide.
Display title of the guide.
Optional description provided by the teacher.
ISO 8601 due-date, or
null if none is set.Number of approved questions in the guide.
Number of questions the student has at least one GRADED submission for.
Example request
GET /student/guides/:id
Returns the quiz view of a guide — question prompts and figure attachments are included, but solution steps are always hidden. The student’s own submission states for each question are nested under each question object. Auth: JWT (STUDENT)Path parameters
UUID of the guide to load.
Response
Top-level guide metadata.
Approved questions ordered by
sequence, each with the student’s submission history.Example request
POST /student/guides/:id/questions/:qid/submissions
Start a new submission for one guide question. The server creates a submission shell in the database and returns presigned S3PUT URLs — one per photo the student intends to upload.
Auth: JWT (STUDENT)
Path parameters
UUID of the guide.
UUID of the specific question being answered.
Request body
How many photos of the handwritten work to upload. Must be an integer between 1 and 3 (inclusive).
Response
UUID of the newly created submission. Use this ID with the
/complete and /status endpoints.Array of presigned S3
PUT URLs. Each URL corresponds to one photo slot. URLs expire after the configured TTL (default 600 s).The attempt index for this submission (starts at 1).
Example request
Example response
POST /student/submissions/:id/complete
Confirm that all photos have been uploaded and enqueue the submission for AI grading. The server verifies each photo is present in S3 before accepting the request. Auth: JWT (STUDENT) Returns 202 Accepted on success.Path parameters
UUID of the submission to complete (returned by the
createSubmission call).Example request
After calling this endpoint, poll
GET /student/submissions/:id/status to track grading progress. Calling /complete again on the same submission returns 400 Bad Request.GET /student/submissions/:id/status
Poll the grading status of a submission. Once the AI pipeline finishes,status transitions from GRADING to GRADED and the result fields are populated.
Auth: JWT (STUDENT)
Path parameters
UUID of the submission to check.
Response
Submission UUID.
Current lifecycle status. One of:
UPLOADED · GRADING · GRADED · FAILED.Numeric score awarded by the grader, or
null if not yet graded.true if the answer was marked correct, null while pending.Machine-readable error tag code (e.g.
"SIGN_ERROR"), or null.Human-readable error tag label, or
null.Diagnostic hint from the error tag, shown to the student after grading.
ISO 8601 timestamp when grading completed, or
null.Example request
Example response (graded)
GET /student/guides/:id/results
Retrieve the student’s per-question grading results for a completed guide. If the teacher has enabledshowSolutionAfterGrade, the current solution is also returned for questions that have been graded.
Auth: JWT (STUDENT)
Path parameters
UUID of the guide.
Response
UUID of the guide.
Whether solution steps are included in the response (teacher-controlled setting).
Per-question result summary, ordered by
sequence.Example request
GET /student/guides/:id/scan-page-url
Get a short-lived presigned S3PUT URL for uploading a full-page photo. Use this URL before calling POST /student/guides/:id/scan-page to let the server auto-detect and split individual exercises.
Auth: JWT (STUDENT)
Path parameters
UUID of the guide.
Response
The S3 object key that was pre-allocated. Pass this value to the
scan-page endpoint.Presigned S3
PUT URL. Upload the JPEG page photo directly to this URL from the client.Example request
POST /student/guides/:id/scan-page
Submit a full-page scan photo for OCR-based auto-detection. The server downloads the photo from S3, runs the multi-exercise OCR pipeline, then positionally aligns each detected exercise to a guide question (exercise at index 0 → question withsequence = 1, and so on). One GuideSubmission is created per matched pair and immediately enqueued for AI grading.
Auth: JWT (STUDENT)
Path parameters
UUID of the guide.
Request body
The S3 object key returned by
GET /student/guides/:id/scan-page-url. The photo must already be uploaded to S3 before calling this endpoint.Response
The S3 key of the page photo that was processed.
Number of exercises successfully matched to guide questions and enqueued for grading.
Per-question submission summary.
Example request
Example response
Submission workflow
Use this sequence for standard single-question photo submissions.Start the submission
Call
POST /student/guides/:id/questions/:qid/submissions with photoCount (1–3). Save the returned submissionId and presignedPutUrls.Upload photos directly to S3
PUT each photo binary directly to the corresponding presigned URL. No authentication header is needed — the signature is embedded in the URL.Confirm completion
Call
POST /student/submissions/:id/complete. The server verifies that every photo has landed in S3, then enqueues the submission for AI grading. Returns 202 Accepted.Poll for grading result
Call
GET /student/submissions/:id/status periodically until status is GRADED (or FAILED). A reasonable polling interval is every 5–10 seconds.