> For the complete documentation index, see [llms.txt](https://kilavuz.cubicl.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kilavuz.cubicl.io/api-entegrasyonu/izin-gunleri.md).

# İzin Günleri

Kurum izin günlerini ve bekleyen izin taleplerini getirir.

## İzin günlerini getir

> Kurumdaki izin günlerini ve bekleyen izin taleplerini getirir. Bekleyen talepler sayfalamadan bağımsız olarak listenin başında döner.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"İzin günleri","description":"Kurum izin günlerini ve bekleyen izin taleplerini getirir."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"ObjectId":{"type":"string","description":"MongoDB ObjectId"},"TimeOffPage":{"type":"object","properties":{"timeOffs":{"type":"array","items":{"$ref":"#/components/schemas/TimeOff"}},"pagination":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"}}}}},"TimeOff":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string","nullable":true},"adminId":{"type":"string","nullable":true},"start":{"type":"number"},"end":{"type":"number"},"status":{"type":"string","enum":["pending","accepted","declined"]},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"ErrorCode":{"type":"object","required":["code"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"ForbiddenCode":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCode"}}}},"ValidationFailed":{"description":"Doğrulama başarısız","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/timeoffs":{"get":{"tags":["İzin günleri"],"summary":"İzin günlerini getir","operationId":"listTimeOffs","description":"Kurumdaki izin günlerini ve bekleyen izin taleplerini getirir. Bekleyen talepler sayfalamadan bağımsız olarak listenin başında döner.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1},"description":"Sayfa numarası. Varsayılan: 1"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"default":20},"description":"Sayfa boyutu. Varsayılan: 20"},{"name":"search","in":"query","schema":{"type":"string"},"description":"İzin günü adında arama"},{"name":"userId","in":"query","schema":{"$ref":"#/components/schemas/ObjectId"},"description":"Kullanıcı ID'sine göre süz"}],"responses":{"200":{"description":"İzin günleri sayfası","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeOffPage"}}}},"403":{"$ref":"#/components/responses/ForbiddenCode"},"422":{"$ref":"#/components/responses/ValidationFailed"}}}}}}
```
