# API Routes

All routes use `web/public/api.php?action=...`.

If `API_TOKEN` is configured, clients must send `X-API-Token`.

## Court Cases

- `POST elave_et` - create active court case
- `POST redakte` - update active court case
- `POST status_yenile` - update court case status
- `POST sil` - delete active court case
- `GET bir_is&id=...` - get one active court case
- `GET nomre_ile&nomre=...` - search active court cases by number
- `GET hamisi` - list active court cases
- `GET bugun` - list active court cases with today's `mehkeme_tarixi`
- `GET bu_hefte` - list active court cases for current week
- `GET axtar&q=...` - search active court cases
- `GET arxiv_nomre_ile&nomre=...` - search archived court cases by number

## Tasks

- `POST tapshiriq_elave` - create task
- `POST tapshiriq_yenile` - update task
- `POST tapshiriq_sil` - delete task
- `POST tapshiriq_veziyyet` - update task status
- `GET tapshiriqlar&is_id=...` - list tasks for a court case
- `GET aciq_tapshiriqlar` - list open tasks
- `GET bugun_tapshiriqlar` - list today's tasks
- `GET bir_tapshiriq&id=...` - get one task

## Hearings

- `POST iclas_elave` - create hearing
- `GET iclaslar_aralik&baslama=YYYY-MM-DD&bitis=YYYY-MM-DD` - list hearings in date range
- `GET konflikt_yoxla&tarix=YYYY-MM-DD&saat=HH:MM` - check task/hearing time conflicts
- `GET gcal_yoxla&event_id=...` - check whether a Google Calendar event exists

## Enforcement

- `GET icra_ishleri` - list active enforcement cases

## Comments

- `GET kommentler&entity_tip=...&entity_id=...` - list comments
- `POST komment_elave` - create comment
