{"openapi":"3.0.3","info":{"title":"Tatilox Voyce API","version":"1.0.0","description":"Tatilox çağrı merkezi (Voyce) arşivine dış erişim. Tüm yanıtlar { success, data, message, error, timestamp, pagination } zarfındadır. Veri salt-okunurdur; Voyce'a yazma yoktur."},"servers":[{"url":"https://mly555au7hddga4r5n7d39dp.hecateq.cloud/tatiloxvoyceapi/v1"}],"tags":[{"name":"Genel"},{"name":"Yapay Zeka"},{"name":"Çağrı Defteri"},{"name":"Tüm Veri"},{"name":"Canlı (Voyce)"},{"name":"Güncelleme Yönetimi"},{"name":"Veri Güncelleme"},{"name":"Anahtar Yönetimi"}],"paths":{"/":{"get":{"tags":["Genel"],"summary":"API özeti","description":"Sürüm, temel adres ve uç nokta listesi. Anahtar gerekmez.","operationId":"index","security":[],"parameters":[],"x-auth":"none","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"name":"Tatilox Voyce API","version":"1.0.0","baseUrl":"https://SITENIZ/tatiloxvoyceapi/v1","docs":"https://SITENIZ/tatiloxvoyceapi/docs"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/health":{"get":{"tags":["Genel"],"summary":"Sağlık kontrolü","description":"Servis ve arşiv veritabanı durumu (anahtar gerekmez).","operationId":"health","security":[],"parameters":[],"x-auth":"none","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"status":"ok","database":"ok","readOnly":true},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/ai-guide":{"get":{"tags":["Yapay Zeka"],"summary":"Yapay zeka rehberi","description":"Başka bir yapay zekaya verilecek tek belge (Markdown): sistem ne, nasıl bağlanılır, kavramlar, sitede ne görünüyorsa hangi veri olduğu, soru→istek tarifleri, kurallar ve tüm tabloların/görünümlerin \"ne / ne değil\" sözlüğü. Anahtar gerekmez; veri veya anahtar içermez. format=json ile makine okunur sürüm; download=1 ile .md olarak indirilir.","operationId":"ai-guide","security":[],"parameters":[{"name":"format","in":"query","required":false,"description":"Çıktı biçimi.","schema":{"type":"string","enum":["md","json"],"default":"md"}},{"name":"download","in":"query","required":false,"description":"1 = dosya olarak indir (ai-rehber.md).","schema":{"type":"boolean","enum":["1"]}}],"x-auth":"none","responses":{"200":{"description":"Başarılı","content":{"text/markdown":{"example":"# Tatilox Voyce API — Yapay Zeka Bağlantı Rehberi\n\n> Bu belge SANA, bir yapay zekaya yazıldı…\n## 0. Üç cümlede özet …"}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/me":{"get":{"tags":["Genel"],"summary":"Anahtar bilgisi","description":"İstekte kullanılan API anahtarının adı ve yetkileri (anahtarın kendisi dönmez).","operationId":"me","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"id":"a1b2…","name":"BI aracı","scopes":["read","export"]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/overview":{"get":{"tags":["Çağrı Defteri"],"summary":"Genel bakış","description":"Aralık için çağrı, kaçan çağrı, müşteri sayıları, eşleşme oranları ve en sık sonuç kodları.","operationId":"overview","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Başlangıç günü (TRT, dahil). Varsayılan: bugünden 6 gün önce.","schema":{"type":"string"},"example":"2026-09-01"},{"name":"to","in":"query","required":false,"description":"Bitiş günü (TRT, dahil). Varsayılan: bugün.","schema":{"type":"string"},"example":"2026-09-30"}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"range":{"from":"2026-09-01","to":"2026-09-30","timezone":"Europe/Istanbul"},"calls":{"total":4535,"uniqueInteractions":4501,"inbound":3100,"outbound":1200,"dialer":235,"answeredSeconds":812345},"abandons":{"total":410,"calledBack":190,"calledBackRate":0.4634,"avgWaitSeconds":21.4},"customers":{"total":91199,"active":90000,"deleted":12,"newInRange":540},"matchRate":{"calls":0.2,"abandons":0.31},"results":[{"normalized":"Bilgi Aldı","category":null,"isTest":false,"count":800}]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/calls":{"get":{"tags":["Çağrı Defteri"],"summary":"Çağrılar","description":"Çağrı kayıtları (bacak bazlı), kişi eşleşmesi ve sonuç kodu ile. Yeni olandan eskiye sıralı.","operationId":"calls","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Başlangıç günü (TRT, dahil). Varsayılan: bugünden 6 gün önce.","schema":{"type":"string"},"example":"2026-09-01"},{"name":"to","in":"query","required":false,"description":"Bitiş günü (TRT, dahil). Varsayılan: bugün.","schema":{"type":"string"},"example":"2026-09-30"},{"name":"direction","in":"query","required":false,"description":"Yön.","schema":{"type":"string","enum":["inbound","outbound","dialer"]}},{"name":"queue","in":"query","required":false,"description":"Kuyruk adı (tam eşleşme).","schema":{"type":"string"}},{"name":"agent","in":"query","required":false,"description":"Temsilci (tam eşleşme).","schema":{"type":"string"}},{"name":"verdict","in":"query","required":false,"description":"Sonuç kodu (yazım farkından bağımsız).","schema":{"type":"string"}},{"name":"number","in":"query","required":false,"description":"Telefon numarası (en az 3 rakam; önek/içerik).","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Müşteri adı veya numara araması (en az 2 karakter).","schema":{"type":"string"}},{"name":"includeTests","in":"query","required":false,"description":"Test sonuç kodlarını dahil et.","schema":{"type":"boolean","enum":["true","false"],"default":"false"}},{"name":"page","in":"query","required":false,"description":"Sayfa numarası (1'den başlar).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","required":false,"description":"Sayfa başına kayıt (1-200).","schema":{"type":"integer","default":50},"example":50}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"callId":"66f1…","interactionId":"1727…","startUtc":"2026-09-09T08:00:00.000Z","startTrt":"2026-09-09 11:00:00","direction":"inbound","number":"05321112233","queue":"tatilox_queue","agent":"ag1","connectedSeconds":120,"queueWaitSeconds":5,"result":{"verdict":"Bilgi Aldı","normalized":"Bilgi Aldı","category":null,"isTest":false},"customer":{"id":"A","name":"Ayşe Yılmaz","matchCount":1,"method":"contact_id"},"legs":1}],"message":null,"error":null,"pagination":{"page":1,"limit":50,"total":4535,"totalPages":91,"hasMore":true},"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/customers":{"get":{"tags":["Çağrı Defteri"],"summary":"CRM müşterileri","description":"Müşteri listesi (arşiv). Ad, telefon, TCKN ham gelir; kart numarası maskelidir.","operationId":"customers","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"description":"Ad / müşteri no / telefon araması (en az 2 karakter).","schema":{"type":"string"}},{"name":"finishCode","in":"query","required":false,"description":"Sonuç kodu.","schema":{"type":"string"}},{"name":"queue","in":"query","required":false,"description":"Kuyruk.","schema":{"type":"string"}},{"name":"agent","in":"query","required":false,"description":"Temsilci.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Durum.","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"description":"Aktif mi.","schema":{"type":"boolean","enum":["true","false"]}},{"name":"deleted","in":"query","required":false,"description":"Voyce'ta silinenler.","schema":{"type":"string","enum":["true","false","only"],"default":"false"}},{"name":"sort","in":"query","required":false,"description":"Sıralama alanı.","schema":{"type":"string","enum":["name","customerNo","finishCode","lastCall","insertDate","attempts"],"default":"insertDate"}},{"name":"dir","in":"query","required":false,"description":"Yön.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"page","in":"query","required":false,"description":"Sayfa numarası (1'den başlar).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","required":false,"description":"Sayfa başına kayıt (1-200).","schema":{"type":"integer","default":50},"example":50}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"id":"A","customerNo":"M001","name":"Ayşe Yılmaz","finishCode":"Bilgi Aldı","queue":"qa","agent":"ag1"}],"message":null,"error":null,"pagination":{"page":1,"limit":50,"total":91199,"totalPages":1824,"hasMore":true},"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/customers/facets":{"get":{"tags":["Çağrı Defteri"],"summary":"Müşteri filtre değerleri","description":"Müşteri filtreleri için sonuç kodu / kuyruk / temsilci / durum dağılımları.","operationId":"customers-facets","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"finishCodes":[{"value":"Bilgi Aldı","count":800}],"queues":[{"value":"qa","count":1000}]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/contacts/by-phone":{"get":{"tags":["Çağrı Defteri"],"summary":"Kişi (telefondan)","description":"Bir telefon numarasının tüm çağrı/kaçan çağrı geçmişi ve eşleşen müşteri(ler). key veya number verin.","operationId":"contacts-by-phone","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"number","in":"query","required":false,"description":"Telefon numarası (her yazım).","schema":{"type":"string"},"example":"0532 111 11 11"},{"name":"key","in":"query","required":false,"description":"Normalize numara anahtarı (alternatif).","schema":{"type":"string"}},{"name":"timelinePage","in":"query","required":false,"description":"Zaman çizelgesi sayfası.","schema":{"type":"integer","default":1}},{"name":"timelineLimit","in":"query","required":false,"description":"Zaman çizelgesi sayfa boyutu.","schema":{"type":"integer"}}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"key":"5321112233","customers":[{"id":"A","name":"Ayşe Yılmaz"}],"timeline":[{"type":"call","at":"2026-09-09 11:00:00"}],"timelineTotal":4},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/contacts/by-customer":{"get":{"tags":["Çağrı Defteri"],"summary":"Kişi (müşteri kimliğinden)","description":"Bir müşterinin tüm çağrı/kaçan çağrı geçmişi.","operationId":"contacts-by-customer","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"id","in":"query","required":true,"description":"Müşteri kimliği.","schema":{"type":"string"},"example":"A"},{"name":"timelinePage","in":"query","required":false,"description":"Zaman çizelgesi sayfası.","schema":{"type":"integer","default":1}},{"name":"timelineLimit","in":"query","required":false,"description":"Zaman çizelgesi sayfa boyutu.","schema":{"type":"integer"}}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"customer":{"id":"A","name":"Ayşe Yılmaz"},"timeline":[],"timelineTotal":0},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/abandons":{"get":{"tags":["Çağrı Defteri"],"summary":"Kaçan çağrılar","description":"Kaçan çağrılar (canlı havuz + gece raporu birleşik), geri dönüş bilgisi ile.","operationId":"abandons","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Başlangıç günü (TRT, dahil). Varsayılan: bugünden 6 gün önce.","schema":{"type":"string"},"example":"2026-09-01"},{"name":"to","in":"query","required":false,"description":"Bitiş günü (TRT, dahil). Varsayılan: bugün.","schema":{"type":"string"},"example":"2026-09-30"},{"name":"queue","in":"query","required":false,"description":"Kuyruk.","schema":{"type":"string"}},{"name":"calledBack","in":"query","required":false,"description":"Geri dönülmüş mü.","schema":{"type":"boolean","enum":["true","false"]}},{"name":"q","in":"query","required":false,"description":"Numara/ad araması (en az 2 karakter).","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Sayfa numarası (1'den başlar).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","required":false,"description":"Sayfa başına kayıt (1-200).","schema":{"type":"integer","default":50},"example":50}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"id":"ab1","caller":"05321112233","queue":"qa","waitSeconds":20,"isCalledBack":true}],"message":null,"error":null,"pagination":{"page":1,"limit":50,"total":410,"totalPages":9,"hasMore":true},"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/abandons/daily":{"get":{"tags":["Çağrı Defteri"],"summary":"Kaçan çağrılar (günlük)","description":"Gün gün kaçan çağrı ve geri dönüş sayıları.","operationId":"abandons-daily","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Başlangıç günü (TRT, dahil). Varsayılan: bugünden 6 gün önce.","schema":{"type":"string"},"example":"2026-09-01"},{"name":"to","in":"query","required":false,"description":"Bitiş günü (TRT, dahil). Varsayılan: bugün.","schema":{"type":"string"},"example":"2026-09-30"}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"days":[{"date":"2026-09-09","total":14,"calledBack":6}]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/abandons/hourly":{"get":{"tags":["Çağrı Defteri"],"summary":"Kaçan çağrılar (saatlik)","description":"Saat dilimine göre (TRT) kaçan çağrı dağılımı.","operationId":"abandons-hourly","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Başlangıç günü (TRT, dahil). Varsayılan: bugünden 6 gün önce.","schema":{"type":"string"},"example":"2026-09-01"},{"name":"to","in":"query","required":false,"description":"Bitiş günü (TRT, dahil). Varsayılan: bugün.","schema":{"type":"string"},"example":"2026-09-30"}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"hours":[{"hour":9,"total":3}]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/verdicts":{"get":{"tags":["Çağrı Defteri"],"summary":"Sonuç kodu dağılımı","description":"Çağrıların sonuç kodu dağılımı; gün/hafta/ay/saat/temsilci/kuyruk/yön kırılımı.","operationId":"verdicts","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"Başlangıç günü (TRT, dahil). Varsayılan: bugünden 6 gün önce.","schema":{"type":"string"},"example":"2026-09-01"},{"name":"to","in":"query","required":false,"description":"Bitiş günü (TRT, dahil). Varsayılan: bugün.","schema":{"type":"string"},"example":"2026-09-30"},{"name":"groupBy","in":"query","required":false,"description":"Kırılım.","schema":{"type":"string","enum":["day","week","month","hour","agent","queue","direction"],"default":"day"}},{"name":"direction","in":"query","required":false,"description":"Yön süzgeci.","schema":{"type":"string","enum":["inbound","outbound","dialer"]}},{"name":"queue","in":"query","required":false,"description":"Kuyruk.","schema":{"type":"string"}},{"name":"agent","in":"query","required":false,"description":"Temsilci.","schema":{"type":"string"}},{"name":"includeTests","in":"query","required":false,"description":"Test kodlarını dahil et.","schema":{"type":"boolean","enum":["true","false"]}}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"groupBy":"day","categories":[{"normalized":"Bilgi Aldı","total":800}],"groups":[{"key":"2026-09-09","total":150,"byResult":{"Bilgi Aldı":40}}]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/search":{"get":{"tags":["Çağrı Defteri"],"summary":"Hızlı arama","description":"Ad veya numaradan kişi araması (en az 3 karakter).","operationId":"search","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"q","in":"query","required":true,"description":"Aranan ad/numara.","schema":{"type":"string"},"example":"Ayşe"}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"results":[{"type":"customer","id":"A","name":"Ayşe Yılmaz"}]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/tables":{"get":{"tags":["Tüm Veri"],"summary":"Tablo ve görünüm listesi","description":"Arşivdeki tüm tablo/görünümler: sütunlar, tipler, birincil anahtar, tahmini satır sayısı. (Kimlik/anahtar tabloları hariç.)","operationId":"tables","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"name":"calls","kind":"table","description":"QualityRecords çağrı kayıtları…","primaryKey":["call_id"],"estimatedRows":182153,"columns":[{"name":"call_id","type":"text"},{"name":"start_time","type":"timestamp with time zone"}]}],"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/tables/{table}":{"get":{"tags":["Tüm Veri"],"summary":"Tablo sorgula","description":"Herhangi bir tablo/görünümü süz, sırala, sayfala. Zaman değerleri UTC ISO8601'dir; yalnız tarih verilirse UTC gün başı sayılır. Ham JSON (raw) sütunları dahildir.","operationId":"tables-query","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"table","in":"path","required":true,"description":"Tablo veya görünüm adı (liste için GET /tables).","schema":{"type":"string"},"example":"calls"},{"name":"page","in":"query","required":false,"description":"Sayfa numarası.","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","required":false,"description":"Sayfa başına kayıt (1-1000).","schema":{"type":"integer","default":100}},{"name":"sort","in":"query","required":false,"description":"Sıralama: virgüllü sütunlar, azalan için \"-\" öneki (en çok 3). Örn. -start_time,call_id.","schema":{"type":"string"},"example":"-start_time"},{"name":"fields","in":"query","required":false,"description":"Yalnız bu sütunlar (virgüllü). Varsayılan: tüm sütunlar.","schema":{"type":"string"},"example":"call_id,start_time,queue"},{"name":"search","in":"query","required":false,"description":"Tablonun tüm metin sütunlarında içerir araması (2-100 karakter).","schema":{"type":"string"}},{"name":"filter[sütun]","in":"query","required":false,"description":"Eşitlik süzgeci. Operatör için filter[sütun][op]: eq ne gt gte lt lte like (içerir) starts in (virgüllü) null (true|false).","schema":{"type":"string"},"example":"filter[queue]=tatilox_queue"}],"x-auth":"key","x-scope":"read","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"call_id":"66f1…","start_time":"2026-09-09T08:00:00Z","queue":"tatilox_queue"}],"message":null,"error":null,"pagination":{"page":1,"limit":50,"total":182153,"totalPages":3644,"hasMore":true},"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/export/{table}":{"get":{"tags":["Tüm Veri"],"summary":"Toplu çıktı (export)","description":"Süzgeçle eşleşen satırları akıtarak indirir: CSV (UTF-8 BOM), JSON veya NDJSON. Sayfalama yoktur; limit ile üst sınır (varsayılan 100.000, en çok 2.000.000).","operationId":"export","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"table","in":"path","required":true,"description":"Tablo veya görünüm adı.","schema":{"type":"string"},"example":"calls"},{"name":"format","in":"query","required":false,"description":"Çıktı biçimi.","schema":{"type":"string","enum":["csv","json","ndjson"],"default":"csv"}},{"name":"limit","in":"query","required":false,"description":"En çok satır.","schema":{"type":"integer","default":100000}},{"name":"sort","in":"query","required":false,"description":"Sıralama.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sütun seçimi.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Metin araması.","schema":{"type":"string"}},{"name":"filter[sütun]","in":"query","required":false,"description":"Süzgeç (bkz. /tables/{table}).","schema":{"type":"string"},"example":"filter[start_date_trt][gte]=2026-09-01"}],"x-auth":"key","x-scope":"export","responses":{"200":{"description":"Başarılı","content":{"text/csv":{"example":"call_id,start_time,queue\r\n66f1…,2026-09-09T08:00:00Z,tatilox_queue\r\n"}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/live/agents":{"get":{"tags":["Canlı (Voyce)"],"summary":"Canlı temsilci durumu","description":"Voyce'tan anlık temsilci durumları (arşivden değil, Voyce'a salt-okuma istek; 5 sn önbellek).","operationId":"live-agents","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"live","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"Agent":"ag1","Status":"Available"}],"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/live/queues":{"get":{"tags":["Canlı (Voyce)"],"summary":"Canlı kuyruk durumu","description":"Voyce'tan anlık kuyruk durumları.","operationId":"live-queues","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"live","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"Queue":"qa","Waiting":0}],"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/live/queue-statistics":{"get":{"tags":["Canlı (Voyce)"],"summary":"Canlı kuyruk istatistikleri","description":"Voyce canlı kuyruk istatistikleri.","operationId":"live-queue-statistics","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"live","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"verified":true,"data":[]},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/live/abandons":{"get":{"tags":["Canlı (Voyce)"],"summary":"Canlı kaçan çağrı havuzu","description":"Voyce'un anlık kaçan çağrı havuzu. enrich=1 ile arşivdeki kişi eşleşmesi eklenir.","operationId":"live-abandons","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[{"name":"enrich","in":"query","required":false,"description":"Arşiv kişi eşleşmesi ekle.","schema":{"type":"boolean","enum":["1","true"]}}],"x-auth":"key","x-scope":"live","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"shape":"queue_map","counts":{"total":0,"byQueue":{}},"data":{}},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/admin/sync":{"get":{"tags":["Güncelleme Yönetimi"],"summary":"Güncelleme durumu ve ayarları","description":"Voyce verisinin ne sıklıkla çekildiği: canlı kaçan çağrı havuzu aralığı, gün içi çağrı yenileme, gece işleri (saat, son başarı, sonraki koşu), toplayıcı durumu ve süren iş. Yönetici belirteci gerekir.","operationId":"admin-sync-get","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"state":{"state":"running"},"poll":{"enabled":true,"seconds":120},"intraday":{"minutes":0},"jobs":[{"name":"calls_sync","at":"04:00","enabled":true,"lastOkAt":"2026-10-03T01:00:10Z","nextRunAt":"2026-10-04T01:00:00Z"}],"active":null},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/admin/sync/settings":{"post":{"tags":["Güncelleme Yönetimi"],"summary":"Güncelleme ayarlarını değiştir","description":"Kısmi güncelleme (yalnız gönderilen alanlar değişir); kaydedilir ve yeniden başlatma gerekmeden hemen uygulanır. Saatler İstanbul saatidir.","operationId":"admin-sync-settings","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"settings":{"pollSeconds":120}},"message":"Ayarlar kaydedildi ve hemen uygulandı.","error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"pollEnabled":{"type":"boolean","description":"Canlı kaçan çağrı havuzu okuma açık mı.","example":true},"pollSeconds":{"type":"integer","description":"Havuz okuma aralığı, saniye (30-3600).","example":120},"intradayMinutes":{"type":"integer","description":"Gün içi çağrı yenileme aralığı, dakika (5-1440); 0 = kapalı. Dünün ve bugünün çağrılarını yeniden çeker (varsayılan 10).","example":10},"callsRefetchDays":{"type":"integer","description":"Gece çağrı yenilemesinde geriye kaç gün (1-60).","example":14},"abandonRefetchDays":{"type":"integer","description":"Gece kaçan çağrı raporunda geriye kaç gün (1-60).","example":14},"reconcileDays":{"type":"integer","description":"Uzlaştırmada geriye kaç gün (1-60).","example":14},"jobs":{"type":"object","description":"Gece işleri: { \"calls_sync\": { \"enabled\": true, \"at\": \"04:00\" }, … } (abandon_refetch, reports_sync, calls_sync, transcripts_sync, customers_sync, appointments_sync, reconcile).","example":{"calls_sync":{"at":"04:00","enabled":true}}}}}}}}}},"/admin/sync/settings/reset":{"post":{"tags":["Güncelleme Yönetimi"],"summary":"Ayarları varsayılana döndür","description":"Siteden yapılan tüm değişiklikleri siler; ortam değişkenlerindeki varsayılanlar geri gelir.","operationId":"admin-sync-reset","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"settings":{"pollSeconds":120}},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/admin/sync/compare":{"post":{"tags":["Güncelleme Yönetimi"],"summary":"Voyce ile arşivi karşılaştır (tanı)","description":"Son N saatin çağrılarını Voyce'tan (salt-okuma, 1-3 istek) çeker ve arşivle kimlik bazında karşılaştırır; Voyce'ta olup arşivde olmayan çağrıları listeler.","operationId":"admin-sync-compare","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"window":{"hours":24},"voyce":{"totalItems":75,"fetched":75},"archive":{"inWindow":75},"missingCount":0,"status":"in_sync"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"hours":{"type":"integer","description":"Kaç saat geriye (1-72).","example":24}}}}}}}},"/admin/sync/run":{"post":{"tags":["Güncelleme Yönetimi"],"summary":"Bir güncellemeyi şimdi çalıştır","description":"İşi elle başlatır (Voyce'tan yalnız OKUR). poll = tek havuz turu (bitince sonuç döner); diğerleri arka planda sürer (dakikalar alabilir) ve 202 döner. Aynı anda tek iş: sürerken 409 job_running.","operationId":"admin-sync-run","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"202":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"job":"calls_sync","started":true,"startedAt":"2026-10-03T09:15:00.000Z"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"type":"string","description":"poll | abandon_refetch | calls_intraday | transcripts_intraday | calls_sync | transcripts_sync | customers_sync | appointments_sync | reconcile | reports_sync","example":"calls_sync"}}}}}}}},"/sync/status":{"get":{"tags":["Veri Güncelleme"],"summary":"Güncelleme durumu","description":"Voyce verisinin ne kadar taze olduğu: toplayıcı durumu, canlı havuz, gün içi çağrı yenileme ve gece işlerinin son başarı/sonraki koşu zamanları, arşivdeki en yeni çağrı/kaçan çağrı (freshness), süren iş. Ayarlar da görünür ama bu uçtan DEĞİŞTİRİLEMEZ (ayar yönetimi yalnız yönetici belirteciyle).","operationId":"sync-status","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"sync","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"state":{"state":"running"},"poll":{"enabled":true,"seconds":120,"lastPollOkAt":"2026-10-05T09:00:00Z"},"intraday":{"minutes":10,"lastOkAt":"2026-10-05T09:00:03Z"},"jobs":[{"name":"calls_sync","at":"04:00","lastOkAt":"2026-10-05T01:00:41Z","nextRunAt":"2026-10-06T01:00:00Z"}],"freshness":{"callsNewestAt":"2026-10-05T08:58:35Z"},"active":null},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/sync/run":{"post":{"tags":["Veri Güncelleme"],"summary":"Verileri şimdi güncelle (Voyce → arşiv)","description":"Bir güncellemeyi hemen başlatır (Voyce'tan yalnız OKUR; Voyce'ta hiçbir şey değişmez). job: poll (tek canlı kaçan çağrı turu, sonucu hemen döner), calls_intraday (dün+bugünün çağrıları, hızlı: birkaç saniye), calls_sync (son 14 gün), abandon_refetch, reconcile, customers_sync (≈10 dk, ağır). Diğerleri arka planda sürer ve 202 döner; ilerleme GET /sync/status ile izlenir. Aynı anda tek iş: sürerken 409 job_running. Toplayıcı kapalı/duraklamışsa 409/503.","operationId":"sync-run","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"sync","responses":{"202":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"job":"calls_intraday","started":true,"startedAt":"2026-10-05T09:00:00.000Z"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"type":"string","description":"poll | calls_intraday | transcripts_intraday | calls_sync | transcripts_sync | abandon_refetch | reconcile | customers_sync | appointments_sync | reports_sync","example":"calls_intraday"}}}}}}}},"/sync/compare":{"post":{"tags":["Veri Güncelleme"],"summary":"Voyce ile arşivi karşılaştır (tanı)","description":"Son N saatin çağrılarını Voyce'tan (salt-okuma, 1-3 istek) çekip arşivle kimlik bazında karşılaştırır; Voyce'ta olup arşivde olmayan çağrıları listeler. Eksik varsa POST /sync/run {job:\"calls_intraday\"} ile tamamlanır.","operationId":"sync-compare","security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"parameters":[],"x-auth":"key","x-scope":"sync","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"window":{"hours":24},"voyce":{"totalItems":75,"fetched":75},"archive":{"inWindow":75},"missingCount":0,"status":"in_sync"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"hours":{"type":"integer","description":"Kaç saat geriye (1-72).","example":24}}}}}}}},"/admin/keys":{"get":{"tags":["Anahtar Yönetimi"],"summary":"Anahtarları listele","description":"Tüm API anahtarları: ad, önek, yetkiler, durum, oluşturulma/son kullanım. Anahtarın kendisi dönmez. Yönetici belirteci (BACKEND_API_TOKEN) gerekir.","operationId":"admin-keys-list","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":[{"id":"a1b2…","name":"BI aracı","keyPrefix":"tvk_Ab12Cd34","scopes":["read","export"],"status":"active","createdAt":"2026-10-03T09:00:00Z","lastUsedAt":null,"requestCount":0}],"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}},"post":{"tags":["Anahtar Yönetimi"],"summary":"Anahtar oluştur","description":"Yeni API anahtarı üretir. Tam anahtar (`key`) YALNIZCA bu yanıtta görünür; saklanmaz, kaybolursa yenisini üretin.","operationId":"admin-keys-create","security":[{"AdminBearer":[]}],"parameters":[],"x-auth":"admin","responses":{"201":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"id":"a1b2…","name":"BI aracı","keyPrefix":"tvk_Ab12Cd34","key":"tvk_Ab12Cd34…(43 karakter)","scopes":["read","export"],"status":"active"},"message":"API anahtarı oluşturuldu. Tam anahtar yalnızca şimdi görünür; güvenli bir yere kaydedin.","error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Anahtar adı (1-80 karakter).","example":"BI aracı"},"scopes":{"type":"array","description":"Yetkiler: read (arşiv verisi), export (toplu çıktı), live (Voyce canlı uçları). Varsayılan: [\"read\",\"export\"].","items":{"type":"string"},"example":["read","export"]},"expiresInDays":{"type":"integer","description":"Geçerlilik günü (1-3650). Boş = süresiz.","example":90}}}}}}}},"/admin/keys/{id}/revoke":{"post":{"tags":["Anahtar Yönetimi"],"summary":"Anahtarı iptal et (pasif yap)","description":"Anahtarı anında geçersiz kılar (sonraki istekler 403 api_key_revoked). Geri alınabilir (activate).","operationId":"admin-keys-revoke","security":[{"AdminBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Anahtar kimliği.","schema":{"type":"string"},"example":"a1b2…"}],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"id":"a1b2…","status":"revoked"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/admin/keys/{id}/activate":{"post":{"tags":["Anahtar Yönetimi"],"summary":"Anahtarı yeniden etkinleştir","description":"İptal edilmiş anahtarı tekrar aktif yapar (süresi dolmadıysa).","operationId":"admin-keys-activate","security":[{"AdminBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Anahtar kimliği.","schema":{"type":"string"},"example":"a1b2…"}],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"id":"a1b2…","status":"active"},"message":null,"error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}},"/admin/keys/{id}":{"delete":{"tags":["Anahtar Yönetimi"],"summary":"Anahtarı sil","description":"Anahtarı kalıcı olarak siler.","operationId":"admin-keys-delete","security":[{"AdminBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Anahtar kimliği.","schema":{"type":"string"},"example":"a1b2…"}],"x-auth":"admin","responses":{"200":{"description":"Başarılı","content":{"application/json":{"example":{"success":true,"data":{"id":"a1b2…"},"message":"API anahtarı silindi.","error":null,"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"400":{"description":"Geçersiz parametre","content":{"application/json":{"example":{"success":false,"data":null,"message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı.","error":{"code":"invalid_parameter","message":"from YYYY-MM-DD biçiminde geçerli bir tarih olmalı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"401":{"description":"Anahtar yok/geçersiz","content":{"application/json":{"example":{"success":false,"data":null,"message":"Geçersiz API anahtarı.","error":{"code":"invalid_api_key","message":"Geçersiz API anahtarı."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"403":{"description":"İptal/süresi dolmuş/yetki yok","content":{"application/json":{"example":{"success":false,"data":null,"message":"Bu anahtarın \"export\" yetkisi yok.","error":{"code":"insufficient_scope","message":"Bu anahtarın \"export\" yetkisi yok."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"example":{"success":false,"data":null,"message":"Beklenmeyen bir hata oluştu.","error":{"code":"internal_error","message":"Beklenmeyen bir hata oluştu."},"pagination":null,"timestamp":"2026-10-03T09:15:00.000Z"}}}}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Anahtar yönetim sayfasından üretilen API anahtarı."},"BearerKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer <API anahtarı>"},"AdminBearer":{"type":"http","scheme":"bearer","description":"Yalnız anahtar yönetimi için: BACKEND_API_TOKEN değeri."}}},"x-errors":[{"status":400,"code":"invalid_parameter","description":"Parametre eksik/geçersiz."},{"status":401,"code":"invalid_api_key","description":"API anahtarı yok veya geçersiz (ya da yönetici belirteci yanlış: unauthorized)."},{"status":403,"code":"api_key_revoked","description":"Anahtar iptal edilmiş / süresi dolmuş (api_key_expired) / bu uç için yetkisi yok (insufficient_scope)."},{"status":404,"code":"not_found","description":"Uç nokta, tablo (table_not_found) veya anahtar (key_not_found) bulunamadı."},{"status":405,"code":"method_not_allowed","description":"Bu uçta bu HTTP metodu desteklenmiyor."},{"status":500,"code":"internal_error","description":"Beklenmeyen sunucu hatası."},{"status":409,"code":"job_running","description":"Güncelleme yönetimi: iş zaten sürüyor / toplayıcı durmuş (collector_stopped, collector_paused)."},{"status":503,"code":"archive_unavailable","description":"Arşiv veritabanı bağlı değil / erişilemiyor (veya toplayıcı kapalı: collector_unavailable)."}],"x-scopes":{"read":"Arşiv verisini okuma (çağrılar, müşteriler, kaçan çağrılar, tablolar)","export":"Toplu çıktı (CSV/JSON/NDJSON)","live":"Voyce canlı uçları (anlık temsilci/kuyruk)","sync":"Veri güncellemeyi tetikleme ve durumu görme (Voyce → arşiv; ayar değiştirme YOK)"}}