Updates a submission (student can update draft; teacher can grade and return).
PUT
/submissions/{submissionId}
curl \
--request PUT 'http://localhost:8080/api/submissions/{submissionId}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"grade":85,"feedback":"Good work, but needs improvement on part 2","status":"graded"}'
Request examples
{
"grade": 85,
"feedback": "Good work, but needs improvement on part 2",
"status": "graded"
}
Response examples (200)
{
"success": true,
"code": 200,
"message": "string",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440007",
"lessonId": "550e8400-e29b-41d4-a716-446655440005",
"studentId": "550e8400-e29b-41d4-a716-446655440002",
"fileUrls": [
"https://example.com/submission1.pdf"
],
"grade": 85,
"feedback": "Good work, but needs improvement on part 2",
"status": "graded",
"submittedAt": "2024-09-25T10:30:00Z",
"returnedAt": "2024-09-27T14:00:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-09-27T14:00:00Z"
}
}
Response examples (400)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (401)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (404)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (500)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}