> ## 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 - Add Additional Lesson Plan Enrichment Block

> 
This API allows authenticated users to add an additional enrichment block to a lesson plan.

**How to Use:**
 1. Call `POST /lesson-plan/v1/additional-enrichment-block/{lesson_plan_id}` with the additional block data and duration.
 2. The API validates the lesson plan ID and ensures content generation is finalized.
 3. If the additional block generation is not already in progress or completed, the system triggers the processing task asynchronously and returns a success message.

**Example Scenario:**
A teacher wants to add a 'Reflection Feedback' block to a lesson plan:
- They submit the block data and duration using this API.
- The system validates the lesson plan and content generation status.
- If valid, the system starts processing the additional block.
- The teacher receives a message confirming the additional block processing has started.




## OpenAPI

````yaml POST /lesson-plan/v1/additional-enrichment-block/{lesson_plan_id}
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:
  /lesson-plan/v1/additional-enrichment-block/{lesson_plan_id}:
    post:
      summary: Add one or more additional blocks to a lesson plan.
      operationId: addAdditionalBlocksToLessonPlan
      parameters:
        - name: lesson_plan_id
          in: path
          required: true
          description: >-
            UUID of the lesson plan to which the additional blocks will be
            added.
          schema:
            type: string
            format: uuid
      requestBody:
        description: >-
          List of additional block identifiers and the total duration to add to
          the lesson plan.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                additional_blocks:
                  type: array
                  description: >-
                    Array of block keys to generate (e.g.,
                    'reflection_feedback', 'emotional_social_development').
                  items:
                    type: string
                duration_minutes:
                  type: integer
                  description: >-
                    Total duration in minutes allocated for the additional
                    blocks.
              required:
                - additional_blocks
                - duration_minutes
            example:
              additional_blocks:
                - reflection_feedback
                - emotional_social_development
              duration_minutes: 20
      responses:
        '200':
          description: Lesson plan additional block processing started successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Job ID for the additional block generation process.
                        message:
                          type: string
                          description: >-
                            Confirmation message indicating the process has
                            started.
                      required:
                        - id
                        - message
              example:
                detail:
                  - id: 78f0974d-d2df-42f4-8c06-073ed43482f5
                    message: >-
                      Lesson plan additional block processing started
                      successfully.
        '400':
          description: Request invalid, or additional block already in progress/completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        msg:
                          type: string
                          description: Error message explaining why the request failed.
              examples:
                notFinalized:
                  summary: Content generation not finalized
                  value:
                    detail:
                      - msg: Lesson plan content generation is not finalized!
                alreadyInProgress:
                  summary: Additional block already in progress/completed
                  value:
                    detail:
                      - msg: >-
                          Lesson plan additional block generation is already
                          COMPLETED!
        '404':
          description: Lesson plan not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        msg:
                          type: string
                          description: >-
                            Error message indicating the lesson plan does not
                            exist.
              example:
                detail:
                  - msg: Lesson plan not found.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        msg:
                          type: string
                          description: Detailed server error message.
              example:
                detail:
                  - msg: Unexpected error occurred.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````