Gorevler API
Gorevleri programatik olarak yonetin.
Endpoints
| Method | Endpoint | Aciklama |
|---|---|---|
| GET | /tasks | Gorev listesi |
| POST | /tasks | Yeni gorev |
| GET | /tasks/:id | Gorev detayi |
| PUT | /tasks/:id | Gorev guncelleme |
| DELETE | /tasks/:id | Gorev silme |
Gorev Listesi
http
GET /api/v1/tasksQuery Parameters
| Parametre | Tip | Aciklama |
|---|---|---|
| page | number | Sayfa numarasi |
| limit | number | Sayfa basi kayit |
| status | string | pending, in_progress, completed |
| assignedTo | string | Atanan kisi |
| priority | string | low, medium, high, urgent |
| dueDate | date | Son tarih filtresi |
| contactId | string | Ilgili kisi |
| dealId | string | Ilgili firsat |
Ornek Yanit
json
{
"success": true,
"data": [
{
"id": "task_abc123",
"title": "Musteri arama",
"description": "Teklif takibi icin arama yap",
"type": "call",
"status": "pending",
"priority": "high",
"dueDate": "2024-01-22T10:00:00Z",
"assignedTo": {
"id": "user_123",
"name": "Ahmet Yilmaz"
},
"contact": {
"id": "contact_xyz",
"name": "ABC Sirket"
},
"deal": {
"id": "deal_456",
"name": "Kurumsal Paket"
},
"createdAt": "2024-01-20T09:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 25
}
}Yeni Gorev
http
POST /api/v1/tasksRequest Body
json
{
"title": "Toplanti hazirligi",
"description": "Sunum dosyasini hazirla",
"type": "task",
"status": "pending",
"priority": "medium",
"dueDate": "2024-01-25T14:00:00Z",
"assignedTo": "user_123",
"contactId": "contact_xyz",
"dealId": "deal_456",
"reminder": {
"enabled": true,
"before": 60
}
}Gorev Turleri
| Tur | Aciklama |
|---|---|
| task | Genel gorev |
| call | Arama |
| meeting | Toplanti |
| E-posta | |
| followup | Takip |
Oncelik Seviyeleri
| Oncelik | Aciklama |
|---|---|
| low | Dusuk |
| medium | Orta |
| high | Yuksek |
| urgent | Acil |
Gorev Detayi
http
GET /api/v1/tasks/:idOrnek Yanit
json
{
"success": true,
"data": {
"id": "task_abc123",
"title": "Musteri arama",
"description": "Teklif takibi icin arama yap",
"type": "call",
"status": "pending",
"priority": "high",
"dueDate": "2024-01-22T10:00:00Z",
"assignedTo": {
"id": "user_123",
"name": "Ahmet Yilmaz",
"email": "[email protected]"
},
"contact": {
"id": "contact_xyz",
"firstName": "Ali",
"lastName": "Veli",
"phone": "+905551234567"
},
"deal": {
"id": "deal_456",
"name": "Kurumsal Paket",
"value": 50000
},
"reminder": {
"enabled": true,
"before": 60,
"sentAt": null
},
"notes": [
{
"content": "Musteri saat 10'da musait",
"createdBy": "user_789",
"createdAt": "2024-01-21T09:00:00Z"
}
],
"createdAt": "2024-01-20T09:00:00Z",
"updatedAt": "2024-01-21T09:00:00Z"
}
}Durum Guncelleme
http
PATCH /api/v1/tasks/:id/statusjson
{
"status": "completed",
"note": "Gorusme yapildi, olumlu"
}Mevcut Durumlar
| Durum | Aciklama |
|---|---|
| pending | Bekliyor |
| in_progress | Devam ediyor |
| completed | Tamamlandi |
| cancelled | Iptal edildi |
Atama
http
PATCH /api/v1/tasks/:id/assignjson
{
"assignedTo": "user_456"
}Not Ekleme
http
POST /api/v1/tasks/:id/notesjson
{
"content": "Musteri yarini tercih etti"
}Tekrarlayan Gorev
http
POST /api/v1/tasksjson
{
"title": "Haftalik rapor",
"type": "task",
"dueDate": "2024-01-22T09:00:00Z",
"assignedTo": "user_123",
"recurrence": {
"frequency": "weekly",
"interval": 1,
"daysOfWeek": ["monday"],
"endDate": "2024-12-31"
}
}Tekrarlama Frekanslari
| Frekans | Aciklama |
|---|---|
| daily | Gunluk |
| weekly | Haftalik |
| monthly | Aylik |
| yearly | Yillik |
Bugunku Gorevler
http
GET /api/v1/tasks/todayGeciken Gorevler
http
GET /api/v1/tasks/overdueWebhooks
Gorev olaylari:
task.created- Gorev olusturuldutask.updated- Gorev guncellenditask.completed- Gorev tamamlanditask.overdue- Gorev geciktitask.reminder- Hatirlatma zamani
Webhook Payload
json
{
"event": "task.completed",
"timestamp": "2024-01-22T10:15:00Z",
"data": {
"taskId": "task_abc123",
"completedBy": "user_123",
"completedAt": "2024-01-22T10:15:00Z"
}
}