Read top to bottom: what the student does in the app, the one call it triggers, and what comes back.
Dashed boxes are optional. All paths start with https://plan.class-quiz.com/api/v1.
subjects: the marks to ask fordurations: the period buttonsplans: name, label, difficulty /5latest_saved_plan: restore it if presentsubjects: [{subject, mark}]months: 1, 3, 6 or 9plan: {plan_id: "regular"}subjects: predicted marksrecommendation.best_plan_id: the "recommended" tagweek.cards: the trayweek.recommended: our suggested weekrecommended from step 2.{day, is_rest, subjects} (shape below).week.days: what's placed so farrecommended: the week completed around the student's cardsstarted_week_replaced: true → the board was invalid, this is a whole new weekweek.days: all 7 daysweek.layout: the saved weekdays: all 7 daysmissions daily: one per slot, programmed_at = its day (0 = Monday)missions weekly: one per subject, programmed_at = nulltoday_index: show the daily missions of this dayThe body of steps 2, 4 and 5. subjects must be exactly the ones from setup.
{
"subjects": [
{ "subject": "Arabic", "mark": 12 },
{ "subject": "Math", "mark": 16 }, …
],
"months": 3,
"plan": { "plan_id": "regular" }
}
The week, added as "week": { "days": [...] } in steps 4 and 5, and as "days" in step 6. day is the index (0 = Monday). subjects is {subject_id: minutes}, with the minutes from week.cards. In Unity, send it with Newtonsoft: JsonUtility drops dictionaries.
[
{ "day": 0, "is_rest": false, "subjects": { "10": 40, "15": 30 } },
{ "day": 1, "is_rest": false, "subjects": { "11": 30, "3": 30 } },
…
{ "day": 5, "is_rest": true, "subjects": {} },
{ "day": 6, "is_rest": true, "subjects": {} }
]
light نسق خفيف, regular نسق منتظم, strong نسق قوي, or custom with days_per_week and hours_per_day.name_ar, label, minutes_label). Show them as they are.{"error": {"code", "message", "details"}}. Check code.POST /students/{id}/recommend ranks all plans for the same marks.