Reminder API
Eslatmalar (Reminders) yaratish va boshqarish.
Asosiy URL: /api/client/remindersHeaderlar: Barcha so'rovlarda Authorization: Bearer <token> bo'lishi shart. Agar ma'lum bir bolaga bog'langan bo'lsa x-child-id: <child_id> kerak bo'ladi.
1. Yangi eslatma yaratish
- URL:
/ - Metod:
POST
So'rov tanasi (Request Body):
{
"type": "checkup",
"title": "Pediatr ko'rigi",
"notes": "1 yoshli chuqurlashtirilgan ko'rik uchun tahlillarni unutmang",
"dueAt": "2026-03-28T14:00:00Z",
"repeatPattern": "none"
}
Eslatma:
typemaydonida eslatma turini bildiruvchi ReminderType qiymatlari (vac,med,checkup,other) kelishi kutiladi.repeatPatternmaydonida esa takrorlanish turini bildiruvchi RepeatPattern qiymatlari (none,daily,weekly).
Javob (Response):
{
"id": "reminder-uuid-abc",
"userId": "user-uuid",
"childId": "child-uuid",
"type": "checkup",
"title": "Pediatr ko'rigi",
"notes": "1 yoshli chuqurlashtirilgan ko'rik uchun tahlillarni unutmang",
"dueAt": "2026-03-28T14:00:00.000Z",
"repeatPattern": "none",
"isCompleted": false,
"createdAt": "2026-03-25T10:00:00.000Z",
"updatedAt": "2026-03-25T10:00:00.000Z"
}
2. Foydalanuvchi eslatmalarini olish
- URL:
/ - Metod:
GET
Javob (Response): (Array qaytadi)
[
{
"id": "reminder-uuid-abc",
"type": "checkup",
"title": "Pediatr ko'rigi",
"notes": "...",
"dueAt": "2026-03-28T14:00:00.000Z",
"repeatPattern": "none",
"isCompleted": false
}
]
3. Bitta eslatmani olish
- URL:
/:id - Metod:
GET
Javob (Response): Eslatma obyekti xuddi yuqoridagidek.
4. Eslatmani yangilash
- URL:
/:id - Metod:
PATCH
So'rov tanasi (Request Body):Barcha maydonlar ixtiyoriy, qaysi birini o'zgartirmoqchi bo'lsangiz shuni yuborasiz.
{
"title": "Stomatolog ko'rigi",
"notes": "Tish shifokori",
"dueAt": "2026-04-05T10:00:00Z",
"repeatPattern": "none",
"isCompleted": true
}
Javob (Response): Yangilangan qismi bilanoq eslatma obyekti to'liq qaytadi.
5. Eslatmani o'chirish
- URL:
/:id - Metod:
DELETE
Javob (Response):
{
"message": "Reminder successfully deleted"
}
