# Fırsatları listele

`GET /api/v1/opportunities`

Fırsatları (satış projeleri) süzer, sıralar ve sayfalar. Yanıtta açık aşama sayıları, açık fırsatların ana dövizdeki toplamı ve SLA aşımı sayısı da gelir.

## Sorgu parametreleri

| Alan | Tür | Açıklama |
|---|---|---|
| `scope` | string | `mine` = sorumlusu olduğum kayıtlar (satışçının varsayılanı), `all` = görebildiğim tüm kayıtlar (yöneticinin varsayılanı) ya da bir kullanıcı kimliği. |
| `stage` | string | `open` (varsayılan), `closed`, `account` (müşteri takibi kapları) ya da bir aşama anahtarı (`/me` → `constants.stages`). |
| `q` | string | Fırsat ya da firma adı içerir. |
| `sort` | string | Sıralama. Değerler: `update`, `health`, `value`, `sla` |
| `page` | integer | Sayfa numarası (1'den başlar). |
| `per` | integer | Sayfa başına satır (10–100). |

## Yanıt

```json 200
{
  "base_currency": "EUR",
  "ok": true,
  "page": 1,
  "pages": 3,
  "rows": [
    {
      "bant": 4,
      "base_currency": "EUR",
      "close_date": "2026-11-12",
      "cur_sym": "€",
      "currency": "EUR",
      "customer": "Sardunya Etiket Ltd. Şti.",
      "customer_city": "Eskişehir",
      "customer_id": 14,
      "days_in_stage": 12,
      "detail_status": "",
      "fc": "Best Case",
      "health": {
        "grade": "success",
        "label": "sağlıklı",
        "score": 100
      },
      "health_color": "g",
      "health_manual": true,
      "health_note": "",
      "id": 14,
      "initials": "SE",
      "is_account": false,
      "is_open": true,
      "last_update": "2026-10-01",
      "lifetime_left": 106,
      "line": "",
      "name": "Mevcut Müşteri — Ek Satış · 2026",
      "next_step": "Vade ve teslim koşullarını görüş",
      "offer_price": 6.12,
      "owner": {
        "full_name": "Deniz Aksoy",
        "id": 1,
        "role": "admin",
        "role_label": "Yönetici",
        "username": "admin"
      },
      "payment_days": 120,
      "potential_kg": 12000.0,
      "prob": 0.75,
      "probability": null,
      "product": "HS 30 Isıl Yapışma Laki",
      "product_id": 5,
      "pu": "€/kg",
      "rid": "006riIxDf4YpLLv",
      "sla_days": 30,
      "sla_left": 18,
      "source": "Soğuk arama",
      "stage": "Negotiation",
      "stage_label": "Negotiation",
      "start_date": "2026-07-20",
      "trend": "up",
      "trend_label": "Yeşil",
      "type": "Mevcut Müşteri — Ek Satış",
      "unit": "kg",
      "unit_code": "kg",
      "value": 881280.0,
      "value_base": 881280.0,
      "value_short": "881K"
    },
    {
      "bant": 4,
      "base_currency": "EUR",
      "close_date": "2027-01-16",
      "cur_sym": "€",
      "currency": "EUR",
      "customer": "Hanımeli Etiket San. Tic. Ltd. Şti.",
      "customer_city": "Adana",
      "customer_id": 23,
      "days_in_stage": 74,
      "detail_status": "",
      "fc": "Best Case",
      "health": {
        "grade": "warning",
        "label": "dikkat",
        "score": 60
      },
      "health_color": "g",
      "health_manual": true,
      "health_note": "",
      "id": 23,
      "initials": "HE",
      "is_account": false,
      "is_open": true,
      "last_update": "2026-09-30",
      "lifetime_left": 69,
      "line": "",
      "name": "Mevcut Müşteri — Yenileme · 2026",
      "next_step": "Deneme tarihini planla",
      "offer_price": null,
      "owner": {
        "full_name": "Deniz Aksoy",
        "id": 1,
        "role": "admin",
        "role_label": "Yönetici",
        "username": "admin"
      },
      "payment_days": null,
      "potential_kg": 12000.0,
      "prob": 0.5,
      "probability": null,
      "product": "PU-SL 350 Yüksek Performans (retort)",
      "product_id": 2,
      "pu": "€/kg",
      "rid": "006LsST7gv514nh",
      "sla_days": 60,
      "sla_left": -14,
      "source": "Web formu",
      "stage": "Present Solution",
      "stage_label": "Present Solution",
      "start_date": "2026-06-13",
      "trend": "up",
      "trend_label": "Yeşil",
      "type": "Mevcut Müşteri — Yenileme",
      "unit": "kg",
      "unit_code": "kg",
      "value": 806000.0,
      "value_base": 806000.0,
      "value_short": "806K"
    }
  ],
  "sla_over": 4,
  "stage_counts": {
    "Expect to Close": 4,
    "Negotiation": 5,
    "Present Solution": 6,
    "Qualify": 7,
    "Viable": 6
  },
  "total": 28,
  "value_open": 11243660.0
}
```
