POST - Lesson Plan Feedback
This API allows authenticated users to create feedback entries for a lesson plan.
How to Use:
- Call
POST /lesson-plan/v1/feedback/{lesson_plan_id}with the feedback details including rating, comment, feedback type, and optional fields. - The API validates that the lesson plan exists and creates a new feedback entry.
Request Body Parameters:
- rating (optional): Integer between 1 and 5, representing the rating for the lesson plan.
- comment (required): Text feedback or comment about the lesson plan.
- feedback_type (required): Type of feedback ( May be one of them:
general,content,quality,suggestion). - feedback_data (optional): Structured feedback data as a JSON object for additional context.
- step_name (optional): Specific step name if the feedback is for a particular step in the lesson plan.
- component_name (optional): Specific component name if the feedback is for a particular component.
curl --request POST \
--url https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rating": 4,
"comment": "The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.",
"feedback_type": "suggestion",
"feedback_data": {
"strengths": [
"Clear objectives",
"Good pacing"
],
"improvements": [
"Add more examples",
"Include assessment rubric"
]
},
"step_name": "Introduction",
"component_name": "Learning Objectives"
}
'import requests
url = "https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}"
payload = {
"rating": 4,
"comment": "The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.",
"feedback_type": "suggestion",
"feedback_data": {
"strengths": ["Clear objectives", "Good pacing"],
"improvements": ["Add more examples", "Include assessment rubric"]
},
"step_name": "Introduction",
"component_name": "Learning Objectives"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rating: 4,
comment: 'The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.',
feedback_type: 'suggestion',
feedback_data: {
strengths: ['Clear objectives', 'Good pacing'],
improvements: ['Add more examples', 'Include assessment rubric']
},
step_name: 'Introduction',
component_name: 'Learning Objectives'
})
};
fetch('https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rating' => 4,
'comment' => 'The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.',
'feedback_type' => 'suggestion',
'feedback_data' => [
'strengths' => [
'Clear objectives',
'Good pacing'
],
'improvements' => [
'Add more examples',
'Include assessment rubric'
]
],
'step_name' => 'Introduction',
'component_name' => 'Learning Objectives'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}"
payload := strings.NewReader("{\n \"rating\": 4,\n \"comment\": \"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.\",\n \"feedback_type\": \"suggestion\",\n \"feedback_data\": {\n \"strengths\": [\n \"Clear objectives\",\n \"Good pacing\"\n ],\n \"improvements\": [\n \"Add more examples\",\n \"Include assessment rubric\"\n ]\n },\n \"step_name\": \"Introduction\",\n \"component_name\": \"Learning Objectives\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rating\": 4,\n \"comment\": \"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.\",\n \"feedback_type\": \"suggestion\",\n \"feedback_data\": {\n \"strengths\": [\n \"Clear objectives\",\n \"Good pacing\"\n ],\n \"improvements\": [\n \"Add more examples\",\n \"Include assessment rubric\"\n ]\n },\n \"step_name\": \"Introduction\",\n \"component_name\": \"Learning Objectives\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rating\": 4,\n \"comment\": \"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.\",\n \"feedback_type\": \"suggestion\",\n \"feedback_data\": {\n \"strengths\": [\n \"Clear objectives\",\n \"Good pacing\"\n ],\n \"improvements\": [\n \"Add more examples\",\n \"Include assessment rubric\"\n ]\n },\n \"step_name\": \"Introduction\",\n \"component_name\": \"Learning Objectives\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"msg": "Feedback created successfully."
}
]
}{
"detail": [
{
"msg": "feedback_type must be one of ['general', 'content', 'quality', 'suggestion']"
}
]
}{
"detail": [
{
"msg": "Authentication credentials were not provided."
}
]
}{
"detail": [
{
"msg": "Lesson plan with id 550e8400-e29b-41d4-a716-446655440000 not found."
}
]
}{
"detail": [
{
"msg": "Internal Server Error"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the lesson plan
Body
Text feedback/comment about the lesson plan
"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities."
Type of feedback. Must be one of: general (general feedback), content (content-specific feedback), quality (quality feedback), suggestion (suggestions for improvement)
general, content, quality, suggestion "suggestion"
Rating from 1 to 5
1 <= x <= 54
Structured feedback data as a JSON object for additional context
{
"strengths": ["Clear objectives", "Good pacing"],
"improvements": [
"Add more examples",
"Include assessment rubric"
]
}
Specific step name if feedback is for a particular step in the lesson plan
"Introduction"
Specific component name if feedback is for a particular component
"Learning Objectives"
Response
Feedback created successfully.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rating": 4,
"comment": "The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.",
"feedback_type": "suggestion",
"feedback_data": {
"strengths": [
"Clear objectives",
"Good pacing"
],
"improvements": [
"Add more examples",
"Include assessment rubric"
]
},
"step_name": "Introduction",
"component_name": "Learning Objectives"
}
'import requests
url = "https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}"
payload = {
"rating": 4,
"comment": "The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.",
"feedback_type": "suggestion",
"feedback_data": {
"strengths": ["Clear objectives", "Good pacing"],
"improvements": ["Add more examples", "Include assessment rubric"]
},
"step_name": "Introduction",
"component_name": "Learning Objectives"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rating: 4,
comment: 'The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.',
feedback_type: 'suggestion',
feedback_data: {
strengths: ['Clear objectives', 'Good pacing'],
improvements: ['Add more examples', 'Include assessment rubric']
},
step_name: 'Introduction',
component_name: 'Learning Objectives'
})
};
fetch('https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rating' => 4,
'comment' => 'The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.',
'feedback_type' => 'suggestion',
'feedback_data' => [
'strengths' => [
'Clear objectives',
'Good pacing'
],
'improvements' => [
'Add more examples',
'Include assessment rubric'
]
],
'step_name' => 'Introduction',
'component_name' => 'Learning Objectives'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}"
payload := strings.NewReader("{\n \"rating\": 4,\n \"comment\": \"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.\",\n \"feedback_type\": \"suggestion\",\n \"feedback_data\": {\n \"strengths\": [\n \"Clear objectives\",\n \"Good pacing\"\n ],\n \"improvements\": [\n \"Add more examples\",\n \"Include assessment rubric\"\n ]\n },\n \"step_name\": \"Introduction\",\n \"component_name\": \"Learning Objectives\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rating\": 4,\n \"comment\": \"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.\",\n \"feedback_type\": \"suggestion\",\n \"feedback_data\": {\n \"strengths\": [\n \"Clear objectives\",\n \"Good pacing\"\n ],\n \"improvements\": [\n \"Add more examples\",\n \"Include assessment rubric\"\n ]\n },\n \"step_name\": \"Introduction\",\n \"component_name\": \"Learning Objectives\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.crazygoldfish.com/lesson-plan/v1/feedback/{lesson_plan_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rating\": 4,\n \"comment\": \"The lesson plan is well-structured and covers all key concepts. However, I suggest adding more interactive activities.\",\n \"feedback_type\": \"suggestion\",\n \"feedback_data\": {\n \"strengths\": [\n \"Clear objectives\",\n \"Good pacing\"\n ],\n \"improvements\": [\n \"Add more examples\",\n \"Include assessment rubric\"\n ]\n },\n \"step_name\": \"Introduction\",\n \"component_name\": \"Learning Objectives\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"msg": "Feedback created successfully."
}
]
}{
"detail": [
{
"msg": "feedback_type must be one of ['general', 'content', 'quality', 'suggestion']"
}
]
}{
"detail": [
{
"msg": "Authentication credentials were not provided."
}
]
}{
"detail": [
{
"msg": "Lesson plan with id 550e8400-e29b-41d4-a716-446655440000 not found."
}
]
}{
"detail": [
{
"msg": "Internal Server Error"
}
]
}