{
  "openapi": "3.1.0",
  "info": {
    "title": "Uygun Destek genel API",
    "version": "2026-09-21",
    "description": "Resmî kaynaklardan izlenen ve editör tarafından doğrulanan destek programlarının salt okunur kataloğu. Kimlik doğrulama gerekmez. Yanıtlar CDN'de 5 dakika önbelleğe alınır; lütfen sayfa başına en fazla bir istek/saniye gönderin. Sonuçlar ön değerlendirmedir; kesin karar ilgili kuruma aittir.",
    "contact": {
      "url": "https://uygundestek.com/iletisim"
    }
  },
  "servers": [
    {
      "url": "https://uygundestek.com"
    }
  ],
  "paths": {
    "/api/catalog": {
      "get": {
        "summary": "Doğrulanmış programlar",
        "operationId": "listPrograms",
        "description": "Yayında ve kaynağı doğrulanmış programları kimlik sırasına göre sayfalar. `nextCursor` null olana kadar `cursor` ile devam edin; aynı bağlantı `Link: rel=\"next\"` başlığında da verilir.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bir katalog sayfası",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogPage"
                }
              }
            }
          },
          "304": {
            "description": "If-None-Match ile değişmemiş sayfa"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "Kaynak sağlığı",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Servis çalışıyor; bir kaynak sorunluysa status 'degraded' olur",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "503": {
            "description": "Veritabanına ulaşılamıyor"
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "summary": "Atom akışı",
        "operationId": "feed",
        "description": "Son yayımlanan haberler. `kategori` bir katalog kategorisine göre süzer; `tur=son-basvuru` 30 gün içinde kapanan destekleri listeler.",
        "parameters": [
          {
            "name": "kategori",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "burslar",
                "aile-ve-cocuk",
                "belediye-destekleri",
                "sosyal-yardimlar",
                "tesvikler"
              ]
            }
          },
          {
            "name": "tur",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "son-basvuru"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Atom 1.0",
            "content": {
              "application/atom+xml": {}
            }
          },
          "404": {
            "description": "Bilinmeyen kategori"
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "summary": "Site haritası",
        "operationId": "sitemap",
        "responses": {
          "200": {
            "description": "XML sitemap",
            "content": {
              "application/xml": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Program": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "categoryId": {
            "type": "string",
            "enum": [
              "burslar",
              "aile-ve-cocuk",
              "belediye-destekleri",
              "sosyal-yardimlar",
              "tesvikler"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "national",
              "city",
              "district"
            ]
          },
          "cityIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "shortDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "benefitType": {
            "type": [
              "string",
              "null"
            ]
          },
          "benefitAmountText": {
            "type": [
              "string",
              "null"
            ]
          },
          "eligibilitySummary": {
            "type": [
              "string",
              "null"
            ]
          },
          "requiredDocuments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "institutionName": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "applicationUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "applicationStatus": {
            "type": "string",
            "enum": [
              "open",
              "upcoming",
              "closed",
              "unknown"
            ]
          },
          "callIdentifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "ingestionSourceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "programmeName": {
            "type": [
              "string",
              "null"
            ]
          },
          "applicantTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "naceCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fundingMin": {
            "type": [
              "number",
              "null"
            ]
          },
          "fundingMax": {
            "type": [
              "number",
              "null"
            ]
          },
          "fundingRatePercent": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "repayable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "deMinimis": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "consortiumRequired": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "eligibleCosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coFinancingRequired": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "minimumPartnerCountries": {
            "type": [
              "number",
              "null"
            ]
          },
          "trlMin": {
            "type": [
              "number",
              "null"
            ]
          },
          "trlMax": {
            "type": [
              "number",
              "null"
            ]
          },
          "applicationStages": {
            "type": [
              "string",
              "null"
            ]
          },
          "evaluationCriteria": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "guideUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fieldEvidence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "verificationMethod": {
            "type": [
              "string",
              "null"
            ]
          },
          "canonicalKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastVerifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "startDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deadlineHasTime": {
            "type": "boolean"
          },
          "applicationPeriods": {
            "type": "array",
            "description": "Every application period the official source lists; startDate/endDate describe the current or next one.",
            "items": {
              "type": "object",
              "required": [
                "end"
              ],
              "properties": {
                "start": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "end": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "businessFacts": {
            "type": [
              "object",
              "null"
            ],
            "description": "Kaynak metnindeki kanıt ifadeleriyle eşleşen işletme koşulları ve ayrı hibe/kredi üst limitleri.",
            "additionalProperties": true
          },
          "scholarshipProfile": {
            "type": [
              "object",
              "null"
            ],
            "description": "Burs koşullarına ilişkin editoryal profil ve hazırlık belgesi önerileri; zorunlu belge garantisi değildir.",
            "additionalProperties": true
          }
        }
      },
      "CatalogPage": {
        "type": "object",
        "required": [
          "apiVersion",
          "programs",
          "nextCursor"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "apiVersion": {
            "type": "string"
          },
          "programs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "data"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "data": {
                  "$ref": "#/components/schemas/Program"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded",
              "unavailable"
            ]
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "configuredSources": {
            "type": "integer"
          },
          "observedSources": {
            "type": "integer"
          },
          "unhealthySources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "staleSources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Son 48 saatte başarılı taraması olmayan kaynaklar"
          }
        }
      }
    }
  }
}
