PATCH /api/profile.
Read the student
GET /api/me returns the identity and the profile. The first call creates the student row.
Write the profile
PATCH /api/profile is a partial update. The server writes only the fields that are present in
the body. A field that you omit keeps its value. A field that you send as null becomes null,
where the schema permits null.
Fields
A value outside these limits fails schema validation, and the request returns
400.
The server trims each subject string and converts it to lower case.
"Matematik " is stored as
"matematik". Compare in lower case when you highlight a chip in the user interface.The onboarding rule
onboardingComplete becomes true when the profile holds all of these:
- a non-empty
grade, and - an
examType, and - a
field, whenexamTypeisYKS.
field stays null and is not required. The flag never returns to false.
Show the onboarding screen while onboardingComplete is false. The chat works before onboarding
is complete. Lala then collects the same facts in conversation instead.
Lala also writes the profile
Lala can update the profile itself during a conversation, with an internal tool. If the student says “aslında sayısaldayım”, the profile changes without any client request. Because of this, the profile is not client-owned state:- Read
GET /api/mewhen the application starts and when it returns to the foreground. - Do not cache the profile across sessions as the source of truth.
- Do not write back a whole profile object that you read earlier. Send only the fields that the student just changed.