> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lala.ist/llms.txt
> Use this file to discover all available pages before exploring further.

# Check-ins

> The daily reflection routines: the morning Sabah Özeti and the evening Akşam Z-Raporu.

A check-in is a short guided reflection. There are two each day: the morning **Sabah Özeti** and
the evening **Akşam Z-Raporu**. Each one asks the same small set of questions: a mood, some
feeling chips, a free-text summary with optional photos, and a closing yes/no.

A check-in belongs to a day, not to an instant. The key of an entry is the local Istanbul date
plus the type (`morning` or `evening`). One day has at most one entry per type.

The journal read links each day to what the student actually did on it. The API derives that
activity from the [planner](/guides/planner) and the [journey](/guides/journey) on every read. It
never stores a second copy, so a corrected study block corrects the journal too.

## The entry

Every field of an entry is optional — each step of the flow is skippable:

* `mood` — "Bugün nasıl geçti?", 1 (worst) to 5 (best).
* `feelings` — "Bugün nasıl hissettin?", the chips. Keys are English (`proud`, `calm`); each key
  has a Turkish label (`Gururlu`, `Sakin`). On write, the API accepts the key or the label. An
  unknown feeling is a 400.
* `summary` — the free-text summary, with up to 5 photos.
* `ready` — the closing yes/no. Evening: "Yatmaya hazır hissediyor musun?". Morning: "Güne hazır
  hissediyor musun?". "Atla ve kaydet" is a body without `ready`, and it reads back as `null`.

An empty entry is valid. It records that the student showed up that day, and it counts for the
streak.

## Save an entry

`PUT /api/checkins/:date/:type` creates or replaces the entry. There is no create-then-patch
dance: submit the whole flow at the end, and resubmit the same way after an edit. Fields left out
of the body read back as unanswered.

```bash theme={null}
curl -X PUT "$BASE_URL/api/checkins/2026-08-20/evening" \
  -H "Authorization: Bearer $LALA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mood": 4,
    "feelings": ["Gururlu", "Sakin"],
    "summary": "Trigonometri testi bitti, 20 paragraf kaldı.",
    "ready": true,
    "mediaIds": ["<media-id>"]
  }'
```

The response is the full entry, with the feelings normalized to keys and the photos carrying
fresh signed URLs.

To attach photos, upload them through `POST /api/media` first (see [Media](/guides/media)), then
send the ids in `mediaIds`. Media that is not ready is dropped, the chat rule.

`DELETE /api/checkins/:date/:type` removes the entry. `GET /api/checkins/:date/:type` reads one
entry, and answers 404 when the day has no entry of that type.

## The home screen

`GET /api/checkins/today` returns everything the home screen opens on:

```json theme={null}
{
  "date": "2026-08-20",
  "dayNumber": 44,
  "streak": { "current": 4 },
  "week": [
    { "date": "2026-08-14", "done": true, "isToday": false },
    { "date": "2026-08-20", "done": true, "isToday": true }
  ],
  "agenda": [
    { "type": "morning", "time": "08:30", "done": true, "checkIn": { "...": "..." } },
    { "type": "evening", "time": "20:30", "done": false, "checkIn": null }
  ],
  "next": "evening"
}
```

`dayNumber` counts from sign-up, first day inclusive — "Gün 44". `week` is the checkbox strip:
the last seven days ending today, where `done` means the day has any completed entry. `next` is
the first routine still open today, null once both are done.

The agenda times are the expected times of each routine. They are advisory — an entry saved at
any hour still lands on its day and type.

`streak.current` counts consecutive check-in days. A streak that last touched yesterday is still
alive; it reads 0 once a day has been missed. This streak is check-in-specific. The journey's
streak is wider — it counts any meaningful activity — and a saved check-in counts toward it too.

## The journal

`GET /api/checkins?from=2026-08-01&to=2026-08-31` reads a date range. The response carries every
date in the range, empty days included, so the journal renders straight off it:

```json theme={null}
{
  "from": "2026-08-19",
  "to": "2026-08-20",
  "days": [
    {
      "date": "2026-08-20",
      "morning": { "...": "..." },
      "evening": null,
      "activity": { "studyMin": 90, "blocksDone": 1, "blocksTotal": 2, "denemeCount": 1 }
    }
  ]
}
```

`activity` is what the day actually held: completed planner minutes and blocks, and denemeler
taken that day. The API computes it on every read from the planner and the journey.

The default window is the last seven days ending today. The range is capped at 62 days — read a
month at a time. There is no cursor, because a date range is already a bounded read. Both dates
are local Istanbul dates, the planner convention.

## Provenance

Each entry carries `source` and `createdBy`. Entries from the guided flow are
`source: "manual"`, `createdBy: "student"`. The values `call` and `chat` are reserved for
entries that Lala fills from a conversation — the "LALA'yı ara" path of the design.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.