> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crazygoldfish.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST - Student Assignment Sheet

> 
The API allows clients to create a new assignment sheet for a specific student in an assignment. It associates the student's ID with an assignment sheet and returns the unique ID for the assignment sheet. The assignment sheet can later be updated with documents (e.g., scanned PDFs or images). 

**Scenarios:**

1. **Creating a New assignment Sheet for a Student:**
   - A teacher provides the student's ID to create a new assignment sheet.
   - **Outcome:**
     - The API generates a unique assignment sheet ID linked to the student.
     - This ID is used for future reference and document uploads.

2. **Associating Documents with the Created assignment Sheet:**
   - After scanning the student’s handwritten assignment sheet, the teacher uploads a PDF or JPEG images using the unique assignment sheet ID.
   - **Outcome:**
     - The scanned document is associated with the student’s assignment sheet, enabling it to be evaluated or graded in subsequent steps.





## OpenAPI

````yaml POST /assignment-evaluation/v1/assignment/{id}/answer-sheet/
openapi: 3.0.1
info:
  title: Evaluation Report API
  description: An API for retrieving evaluation reports.
  version: 1.0.0
servers:
  - url: https://api-staging.crazygoldfish.com
    description: SandBox endpoint
  - url: https://api.crazygoldfish.com
    description: Prod End Point
security: []
paths:
  /assignment-evaluation/v1/assignment/{id}/answer-sheet/:
    post:
      tags:
        - Assignments
      summary: Upload Assignment Answer Sheet
      operationId: uploadAssignmentAnswerSheet
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the assignment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                studentId:
                  type: string
                  example: '12345'
                  description: Unique identifier of the student.
                name:
                  type: string
                  example: John Doe
                  description: Name of the student.
                batchId:
                  type: string
                  example: batch_1
                  nullable: true
                  description: Unique identifier of the batch.
                sessionId:
                  type: string
                  example: session_1
                  nullable: true
                  description: Unique identifier of the session.
                teacherId:
                  type: string
                  example: teacher_1
                  nullable: true
                  description: Unique identifier of the teacher.
              required:
                - studentId
                - name
      responses:
        '200':
          description: Answer sheet uploaded successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 57387c68-0706-4a9d-834a-237b6b63cb5d
                    description: Unique identifier for the answer sheet.
                  status:
                    type: integer
                    example: 0
                    description: Status of the answer sheet.
                  studentId:
                    type: string
                    example: '12345'
                    description: Unique identifier of the student.
                  name:
                    type: string
                    example: John Doe
                    description: Name of the student.
                  batchId:
                    type: string
                    example: batch_1
                    nullable: true
                    description: Unique identifier of the batch.
                  sessionId:
                    type: string
                    example: session_1
                    nullable: true
                    description: Unique identifier of the session.
                  documents:
                    type: array
                    items:
                      type: object
                    example: []
                    description: List of documents associated with the answer sheet.
        '400':
          description: Bad request (validation error or business logic conflict).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 400
                      message:
                        type: object
                        properties:
                          non_field_errors:
                            type: array
                            items:
                              type: string
                              example: Assignment is not extracted yet
        '403':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Assignment not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 404
                      message:
                        type: object
                        properties:
                          non_field_errors:
                            type: array
                            items:
                              type: string
                              example: Assignment not found
      security:
        - bearerAuth: []
components:
  schemas:
    403Response:
      type: object
      properties:
        detail:
          type: string
          example: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````