{
  "name": "GaziPOS Mock API",
  "version": 2,
  "auth": "Authorization: Bearer <token>",
  "common_params": {
    "store": "all | <id> | <id>,<id>",
    "from": "YYYY-MM-DD (varsayılan bugün)",
    "to": "YYYY-MM-DD (varsayılan from)"
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/health",
      "desc": "Sağlık kontrolü (token gerekmez)"
    },
    {
      "method": "POST",
      "path": "/auth/login",
      "desc": "Giriş: {email, password} -> {token, expires_at, user} (token gerekmez)"
    },
    {
      "method": "GET",
      "path": "/stores",
      "desc": "Mağazalar ve son senkron durumu"
    },
    {
      "method": "GET",
      "path": "/summary",
      "desc": "KPI özeti: net_sales (fiş bazlı) + cash_basis (ödeme bazlı, GIFT hariç) + önceki dönem kıyası"
    },
    {
      "method": "GET",
      "path": "/sales/daily",
      "desc": "Günlük brüt / iade / net / cash_net seri"
    },
    {
      "method": "GET",
      "path": "/sales/hourly",
      "desc": "Saatlik net satış ve fiş adedi"
    },
    {
      "method": "GET",
      "path": "/payments/breakdown",
      "desc": "Ödeme tipi dağılımı (satış ve iade ayrı): CASH, CARD, GIFT, TRANSFER, EXCHANGE"
    },
    {
      "method": "GET",
      "path": "/products/top",
      "desc": "by=qty|amount|returns|return_rate, group=model|variant, limit, subgroup"
    },
    {
      "method": "GET",
      "path": "/receipts",
      "desc": "type=all|sale|return|exchange|cancelled, q, limit, offset"
    },
    {
      "method": "GET",
      "path": "/receipts/{store_id}:{sale_id}",
      "desc": "Fiş detayı: satırlar, ödemeler, bağlı iade/orijinal, değişim, hediye fişi, denetim"
    },
    {
      "method": "GET",
      "path": "/alerts",
      "desc": "Kritik stok, fiş iptali (VOID_SALE), ödeme düzeltme (FIX_PAYMENT)"
    }
  ]
}