{
  "openapi": "3.1.0",
  "info": {
    "title": "Bulgaristan Vatandaşlığı Sorgulama API",
    "version": "1.0.0",
    "description": "Bulgaristan Adalet Bakanlığı (publicbg.mjs.bg) resmi dosya ve kararname durumu sorgulama servisi"
  },
  "servers": [
    {
      "url": "https://bgsorgulama.bulgaristanvatandas.com"
    }
  ],
  "paths": {
    "/api/status": {
      "get": {
        "summary": "Dosya Durumu Sorgula",
        "description": "Dosya numarası ve 6 haneli PIN ile başvuru aşamasını kontrol eder.",
        "parameters": [
          {
            "name": "reqNum",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "14820/2023"
          },
          {
            "name": "pin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "582910"
          }
        ],
        "responses": {
          "200": {
            "description": "Başvuru durumu ve aşama özeti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reqNum": { "type": "string" },
                    "stage": { "type": "string" },
                    "statusText": { "type": "string" },
                    "isDecree": { "type": "boolean" },
                    "decreeNumber": { "type": "string" },
                    "appointmentDate": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Sağlık Kontrolü",
        "responses": {
          "200": {
            "description": "Servis aktif ve çalışıyor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string", "example": "ok" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
