{
  "openapi": "3.1.0",
  "info": {
    "title": "RowaShop Public AI & Discovery API",
    "version": "1.0.0",
    "description": "RowaShop kapalı dijital mağaza ve yerel ticaret ekosistemi için kamuya açık, read-only yapay zeka ve entegrasyon API'si. Yapay zeka ajanları ve LLM'lerin platform mimarisi, sektörler, teslimat bölgeleri ve SSS bilgilerini sorgulaması için optimize edilmiştir.",
    "contact": {
      "name": "RowaShop Geliştirici Ekibi",
      "url": "https://rowashop.com.tr",
      "email": "destek@rowashop.com.tr"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://rowashop.com.tr/kullanim-kosullari"
    }
  },
  "servers": [
    {
      "url": "https://rowashop.com.tr",
      "description": "RowaShop Ana Canlı Sunucu"
    }
  ],
  "paths": {
    "/api/v1/public/platform-info": {
      "get": {
        "operationId": "getPlatformInfo",
        "summary": "Platform genel bakış ve iş modeli bilgisi",
        "description": "RowaShop'un kapalı mağaza çalışma modelini, %0 komisyon politikasını, kapıda ödeme seçeneklerini ve kurye altyapısını döner.",
        "responses": {
          "200": {
            "description": "Başarılı platform bilgisi yanıtı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformInfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/sectors": {
      "get": {
        "operationId": "getSectors",
        "summary": "Desteklenen yerel sektör ve reyon kategorileri",
        "description": "RowaShop üzerinde dükkan açabilen 12 temel yerel sektörü (Restoran, Market, Fırın, Kasap, Pet Shop vb.) ve hazır reyon şablonlarını listeler.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Sektör türü filtresi (gida, perakende, hizmet)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sektör listesi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SectorsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/delivery-zones": {
      "get": {
        "operationId": "getDeliveryZones",
        "summary": "Aktif teslimat şehir ve ilçeleri",
        "description": "RowaShop'un hizmet verdiği aktif illeri, ilçeleri ve ortalama teslimat sürelerini döner.",
        "responses": {
          "200": {
            "description": "Teslimat bölgeleri listesi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryZonesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/faq": {
      "get": {
        "operationId": "getFaq",
        "summary": "Sıkça sorulan sorular ve cevaplar",
        "description": "İşletme sahipleri ve müşteriler için doğrulanmış SSS listesini getirir.",
        "parameters": [
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "description": "Konu filtresi (komisyon, odeme, kurye, basvuru)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SSS listesi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaqResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PlatformInfoResponse": {
        "type": "object",
        "required": ["status", "platform", "model", "commissionRate", "paymentMethods"],
        "properties": {
          "status": { "type": "string", "example": "success" },
          "platform": { "type": "string", "example": "RowaShop" },
          "model": { "type": "string", "example": "closed_digital_store" },
          "isMarketplace": { "type": "boolean", "example": false },
          "commissionRate": { "type": "string", "example": "0%" },
          "freeTrialDays": { "type": "integer", "example": 30 },
          "deliveryTimeEstimate": { "type": "string", "example": "30 dakika" },
          "paymentMethods": {
            "type": "array",
            "items": { "type": "string" },
            "example": ["cash_on_delivery", "card_on_delivery_pos", "meal_card_on_delivery"]
          },
          "contact": {
            "type": "object",
            "properties": {
              "email": { "type": "string", "example": "destek@rowashop.com.tr" },
              "website": { "type": "string", "example": "https://rowashop.com.tr" }
            }
          }
        }
      },
      "SectorsResponse": {
        "type": "object",
        "required": ["status", "count", "sectors"],
        "properties": {
          "status": { "type": "string", "example": "success" },
          "count": { "type": "integer", "example": 12 },
          "sectors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "name", "slug", "icon", "description"],
              "properties": {
                "id": { "type": "string" },
                "name": { "type": "string" },
                "slug": { "type": "string" },
                "icon": { "type": "string" },
                "description": { "type": "string" },
                "sampleCategories": {
                  "type": "array",
                  "items": { "type": "string" }
                }
              }
            }
          }
        }
      },
      "DeliveryZonesResponse": {
        "type": "object",
        "required": ["status", "zones"],
        "properties": {
          "status": { "type": "string", "example": "success" },
          "zones": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["city", "districts", "deliveryModel"],
              "properties": {
                "city": { "type": "string" },
                "districts": { "type": "array", "items": { "type": "string" } },
                "deliveryModel": { "type": "string" },
                "avgDeliveryMinutes": { "type": "integer" }
              }
            }
          }
        }
      },
      "FaqResponse": {
        "type": "object",
        "required": ["status", "count", "faqs"],
        "properties": {
          "status": { "type": "string", "example": "success" },
          "count": { "type": "integer" },
          "faqs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["question", "answer", "category"],
              "properties": {
                "question": { "type": "string" },
                "answer": { "type": "string" },
                "category": { "type": "string" }
              }
            }
          }
        }
      }
    }
  }
}
