# Report file

`GET https://ulawk.com/api/v1/raporlar/{rapor_id}/{tur}/`

Report file: `rapor` (PDF), `sermaye` (PDF), `rapor-word` (DOCX), `sermaye-excel` (XLSX), `ek-excel` (XLSX).

## Authentication

Two headers on every request: `X-API-Key` and `X-API-Secret`.

## Path parameters

- `rapor_id` (integer, required) — Report id.
- `tur` (string, required) — File type.

## Response

### 200 — File.

`application/pdf` — Returns the file itself.

### 404 — Not found or no access (`bulunamadi`).


```json
{
  "hata": "bulunamadi",
  "detay": "Şirket bulunamadı ya da erişim yetkiniz yok.",
  "hata_ayrinti": {
    "kod": "bulunamadi",
    "mesaj": "Şirket bulunamadı ya da erişim yetkiniz yok.",
    "taraf": "istemci",
    "kaynak": null,
    "tekrar_denenebilir": false,
    "tekrar_sn": null
  }
}
```

### 401 — Missing or invalid key (`yetkisiz`).


```json
{
  "hata": "yetkisiz",
  "detay": "Geçerli X-API-Key başlığı gerekli (panel › API).",
  "hata_ayrinti": {
    "kod": "yetkisiz",
    "mesaj": "Geçerli X-API-Key başlığı gerekli (panel › API).",
    "taraf": "istemci",
    "kaynak": null,
    "tekrar_denenebilir": false,
    "tekrar_sn": null
  }
}
```

### 429 — Hourly rate limit exceeded (`hiz_siniri`); the Retry-After header gives the seconds until reset.

Retry-After: `2494`

```json
{
  "hata": "hiz_siniri",
  "detay": "Saatlik istek sınırı aşıldı (600). Bir sonraki saatte tekrar deneyin.",
  "hata_ayrinti": {
    "kod": "hiz_siniri",
    "mesaj": "Saatlik istek sınırı aşıldı (600). Bir sonraki saatte tekrar deneyin.",
    "taraf": "istemci",
    "kaynak": null,
    "tekrar_denenebilir": true,
    "tekrar_sn": 2494
  }
}
```

### 500 — Unexpected error (`ic_hata`, taraf ulawk); retry shortly.

Retry-After: `60`

```json
{
  "hata": "ic_hata",
  "detay": "Beklenmeyen bir hata oluştu; kısa süre sonra yeniden deneyin.",
  "hata_ayrinti": {
    "kod": "ic_hata",
    "mesaj": "Beklenmeyen bir hata oluştu; kısa süre sonra yeniden deneyin.",
    "taraf": "ulawk",
    "kaynak": null,
    "tekrar_denenebilir": true,
    "tekrar_sn": 60
  }
}
```

## Request

```bash
curl "https://ulawk.com/api/v1/raporlar/1/rapor/" \
  -H "X-API-Key: ulk_DENEME_ANAHTARINIZ" \
  -H "X-API-Secret: ulsk_DENEME_GIZLI_ANAHTARINIZ" \
  -o rapor.pdf
```
