api.ayat.com/v1/programs
Post
{
"JWT": "fg5562ase84c4",
"program_name": "<Name example>",
"prerequisite": [
{
"name": "name example"
},
{
"name": "name example"
}
],
"program_level": "<Difficulty>",
"program_category": [
{
"type": "example"
},
{
"type": "example"
}
],
"price": "$$$",
"program_pic": "<Local Pic>",
"FAQ": [
{
"question": "Text",
"answer": "Text"
},
{
"question": "Text",
"answer": "Text"
}
],
"program_cover": "<Local pic>",
"Program_description": "text example",
"available": "<true as a default boolean value>"
}
{
"status": "created"
}
{
"status": "Forbidden"
}
api.ayat.com/v1/programs/{id}
PUT
{
"JWT": "adfgv5erw85s3",
"program_name": "name example",
"prerequisite": [
{
"type": "example"
},
{
"type": "example"
}
],
"program_level": "<Difficulty>",
"program_category": [
{
"type": "example"
},
{
"type": "example"
}
],
"price": "$$$",
"program_pic": "<Local Pic>",
"FAQ": [
{
"question": "Text",
"answer": "Text"
},
{
"question": "Text",
"answer": "Text"
}
],
"program_cover": "<Local pic>",
"Program_description": "text example",
"available": "<true as a default boolean value>"
}
code: 200
{
"status": "edited"
}
{
"status": "Forbidden"
}
api.ayat.com/v1/programs/{id}
GET
{}
{
"program_name": "name example",
"prerequisite": [
{
"type": "example"
},
{
"type": "example"
}
],
"program_level": "<Difficulty>",
"program_category": [
{
"type": "example"
},
{
"type": "example"
}
],
"price": "$$$",
"program_pic": "<Local Pic>",
"FAQ": [
{
"question": "Text",
"answer": "Text"
},
{
"question": "Text",
"answer": "Text"
}
],
"program_cover": "<Local pic>",
"Program_description": "text example",
"available": "<true as a default boolean value>"
}
{
"status": "Content not found"
}
api.ayat.com/v1/programs/{id}
DELETE
{
"JWT": "adfgv5erw85s3",
}
{
"status": "Deleted"
}
{
"status": "Forbidden"
}
api.ayat.com/v1/programs/{id}/enrollments
POST
{
"JWT": "adfgv5erw85s3",
"public_program_id": "{id}"
}
{
"status": "enrolled"
}
{
"error": "<Duplicate resource codes: 5>"
}
or
{
"error": "user is unauthorized"
}
api.ayat.com/v1/programs/{id}/enrollments
DELETE
{
"JWT": "adfgv5erw85s3",
}
{
"status": "success"
}
{
"error": "<Duplicate resource codes: 6>"
}
or
{
"error": "user is unauthorized"
}