> ## 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 - Raise Feedback

>  The API allows students to raise queries in the feedback for a particular answer sheet ID. The **AI** will respond to these queries first. This includes: 

 - Feedback from the **AI**. 
 - Queries raised by students. 
 - AI responses to the queries. 
 - Responses to the queries from teachers. 
 

**Scenario 1:**

1. **Raising Queries by Students and AI Response:**
   - After reviewing their exam, a student may raise a query about specific marks or feedback on a particular question (identified by the answer sheet’s UUID).
   - **The API provides:**
     - **AI-Generated Feedback:** The AI analyzes the student’s response and provides feedback on it.
     - **Student Query:** The specific query the student raised about their performance or feedback on a question.
     - **AI Response:** The AI’s explanation or clarification on the marks awarded or the student’s question.
   - **Outcome:**
     - The student receives an immediate AI-driven response, and the teacher can review this feedback and take necessary actions, like adjusting marks or offering more details.

**Scenario 2:**

2. **Teacher Reviewing and Responding to Student Queries:**
   - After the AI has responded to a query, the teacher reviews the AI’s response and provides their own feedback.
   - **Outcome:**
     - The teacher can approve, modify, or clarify the AI’s response, ensuring that the grading process remains transparent and accurate.




## OpenAPI

````yaml POST /evaluation-platform/v1/exam/{examId}/answer-sheet/{ansSheetId}/answer/{ansId}/feedback/
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:
  /evaluation-platform/v1/exam/{examId}/answer-sheet/{ansSheetId}/answer/{ansId}/feedback/:
    post:
      summary: Submit Answer Sheet Feedback
      description: Submit Answer Sheet Feedback
      parameters:
        - name: examId
          in: path
          required: true
          schema:
            type: string
            example: edaf2e84-e911-4150-9628-6d182a05ed0d
          description: Unique identifier for the exam.
        - name: ansSheetId
          in: path
          required: true
          schema:
            type: string
            example: c6275794-10ea-4876-aa97-0f9b1a57f0f3
          description: Unique identifier for the answer sheet.
        - name: ansId
          in: path
          required: true
          schema:
            type: string
            example: 11637fca-dc77-4b63-88c0-ec74126d951c
          description: Unique identifier for the answer.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                feedbackId:
                  type: string
                  description: The unique identifier for the feedback entry.
                  example: def80534-8f59-49ea-b43e-553075b1db91
                queryType:
                  type: integer
                  description: >-
                    The type of query being submitted or you can refer to the
                    constant API docs
                  example: 1
                text:
                  type: string
                  description: The text of the query submitted by the student.
                  example: why my marks has been deducted
              required:
                - feedbackId
                - queryType
                - text
      responses:
        '201':
          description: Success - Feedback details retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Feedback details retrieved successfully.
                    properties:
                      id:
                        type: string
                        example: def80534-8f59-49ea-b43e-553075b1db91
                        description: Feedback unique identifier against the answers.
                      examId:
                        type: string
                        example: edaf2e84-e911-4150-9628-6d182a05ed0d
                        description: Unique identifier of the exam.
                      studentId:
                        type: string
                        description: Unique identifier of the student.
                        example: '10160091'
                      answerId:
                        type: string
                        description: Unique identifier of the answer.
                        example: 11637fca-dc77-4b63-88c0-ec74126d951c
                      feedback:
                        type: string
                        description: Feedback provided for the answer.
                        example: >-
                          The student selected an incorrect option. It is
                          important to carefully analyze the question and the
                          options provided. Understanding the characteristics of
                          a homologous series is crucial for answering such
                          questions correctly.
                      marks_deducted:
                        type: string
                        description: Marks deducted for the answer.
                        example: 1 - incorrect option selected
                      justification:
                        type: string
                        description: Justification for the feedback provided.
                        example: >-
                          The student's answer (c) gradation in Physical
                          Properties is incorrect as it does not address the
                          question of what is not observed in a homologous
                          series. The model answer correctly identifies (a)
                          Change in chemical properties as the correct response.
                      room_for_improvement:
                        type: string
                        description: Room for improvement for the student.
                        example: >-
                          To achieve full marks, the student should select the
                          correct option (a) Change in chemical properties,
                          which is the only option that is not observed in a
                          homologous series.
                      feedbackQuery:
                        type: array
                        description: Feedback query raise by the student
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Feedback query unique identifier.
                              example: e2b75a94-bc8a-4a2b-a23f-32abc1198f37
                            createdByRole:
                              type: string
                              description: Role of the user who created the feedback query.
                              example: Student
                            queryType:
                              type: integer
                              description: Type of query raised by the student.
                              example: 1
                            status:
                              type: integer
                              description: Status of the feedback query.
                              example: 2
                            text:
                              type: string
                              description: Text of the feedback query.
                              example: why my marks has been deducted
                            responses:
                              type: array
                              description: Responses to the feedback query.
                              items: {}
        '403':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Token has expired
              example:
                detail: Token has expired
        '404':
          description: Bad Request
          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: >-
                                Invalid Answer ID: The provided Answer ID does
                                not exist
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````