Fırsatlar

Fırsatları listele

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.

GET/api/v1/opportunities

Yetkilendirme

Authorizationheaderzorunlu
Bearer belirteci: API anahtarı (sk_…), OAuth erişim belirteci (mcp_…) ya da mobil oturum (xk_…).
Modül: FırsatlarKapsam: crm.read

Sorgu parametreleri

scopestringisteğe bağlı
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.
stagestringisteğe bağlıvarsayılan: open
open (varsayılan), closed, account (müşteri takibi kapları) ya da bir aşama anahtarı (/me → constants.stages).
qstringisteğe bağlı
Fırsat ya da firma adı içerir.
sortstringisteğe bağlıvarsayılan: update
Sıralama.
Değerlerupdatehealthvaluesla
pageintegeristeğe bağlıvarsayılan: 1
Sayfa numarası (1'den başlar).
perintegeristeğe bağlıvarsayılan: 40
Sayfa başına satır (10–100).
İstek
curl "https://ornek.solk.app/api/v1/opportunities?scope=all&stage=open&sort=value&per=10" \
  -H "Authorization: Bearer $SOLK_API_KEY"
Yanıt
{
  "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
}

Örnek yanıt örnek veriyle çalışan bir v22 kurulumundan alındı; listeler en çok iki öğeyle kısaltıldı.