curl --request POST \
--url http://localhost:5000/api/application/send \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25."
}'
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "PENDING",
"__v": 0
}
Submit a new application from a student to a teacher.
curl --request POST \
--url http://localhost:5000/api/application/send \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25."
}'
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "PENDING",
"__v": 0
}
Creates a new application record and saves it to the database. The application status is automatically set toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/praveenarya123/sps-backend/llms.txt
Use this file to discover all available pages before exploring further.
PENDING upon creation.
LEAVE, COMPLAINT, REQUEST.LEAVE, COMPLAINT, REQUEST).PENDING on creation.curl --request POST \
--url http://localhost:5000/api/application/send \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25."
}'
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "PENDING",
"__v": 0
}