{
  "openapi": "3.1.0",
  "info": {
    "title": "Yazar Haber Ajansı Kaynak API",
    "version": "1.0.0",
    "description": "Serbest muhabir ve kurumların ajansa haber, basın açıklaması, fotoğraf, video ve belge göndermesi ve gönderinin durumunu sorgulaması. Kimlik: `Authorization: Bearer yha_canli_…` (YHA Gönderim · API anahtarım). Anahtar yalnızca gönderir ve kendi gönderilerinizin durumunu okur; ajansın içeriğini okuyamaz. Her gönderi editör onayından geçer. Yineleme önleme `dis_kimlik` iledir.",
    "contact": {
      "name": "Yazar Haber Ajansı Teknik Destek"
    }
  },
  "servers": [
    {
      "url": "https://kaynak.<alan>",
      "description": "Canlı"
    },
    {
      "url": "https://deneme.<alan>/kaynak",
      "description": "Deneme ortamı (yha_deneme_ anahtarı; gönderi kayda geçmez)"
    }
  ],
  "security": [
    {
      "anahtar": []
    }
  ],
  "tags": [
    {
      "name": "Anahtar"
    },
    {
      "name": "Belge"
    },
    {
      "name": "Gönderi"
    },
    {
      "name": "Sözlük"
    }
  ],
  "paths": {
    "/v1/ben": {
      "get": {
        "operationId": "kaynak_ben",
        "summary": "Anahtarın kaynağı, sınırları ve gönderebilirlik",
        "tags": [
          "Anahtar"
        ],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakBen"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gonderiler": {
      "get": {
        "operationId": "kaynak_gonderi_listesi",
        "summary": "Gönderiler (yoklama)",
        "description": "Anahtarın kaynağının bütün kanallardan gelen gönderileri (kurum anahtarında kurumun hepsi); `degisti_sonra` ile değişenler, imleçli.",
        "tags": [
          "Gönderi"
        ],
        "x-yha-kapsam": "gonderi.durum",
        "parameters": [
          {
            "name": "durum",
            "in": "query",
            "required": false,
            "schema": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "taslak",
                  "yukleniyor",
                  "alindi",
                  "incelemede",
                  "onaylandi",
                  "reddedildi",
                  "geri_cekildi"
                ]
              }
            }
          },
          {
            "name": "degisti_sonra",
            "in": "query",
            "required": false,
            "description": "ISO 8601: bu andan sonra değişenler (yoklama)",
            "schema": {
              "description": "ISO 8601: bu andan sonra değişenler (yoklama)",
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "imlec",
            "in": "query",
            "required": false,
            "description": "Önceki yanıtın sonraki_imlec değeri",
            "schema": {
              "description": "Önceki yanıtın sonraki_imlec değeri",
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "name": "boyut",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakGonderiListesi"
                }
              }
            }
          },
          "400": {
            "description": "dogrulama_hatasi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "kaynak_gonderi_olustur",
        "summary": "Gönderi aç",
        "description": "Aynı `dis_kimlik` ve aynı gövdeyle yinelenen istek var olan gönderiyi 200 ve `X-YHA-Tekrar: evet` ile döner; başka gövdeyle 409 `dis_kimlik_cakisiyor`. Eklerin dosyaları ayrıca parçalı yüklenir.",
        "tags": [
          "Gönderi"
        ],
        "x-yha-kapsam": "icerik.gonder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KaynakGonderiGovdesi"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakGonderi"
                }
              }
            }
          },
          "201": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakGonderi"
                }
              }
            }
          },
          "400": {
            "description": "dogrulama_hatasi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, gonderim_aboneligi_yok, kapsam_disi, kaynak_askida, kaynak_kapali, sozlesme_yururlukte_degil",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "404": {
            "description": "bulunamadi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "409": {
            "description": "dis_kimlik_cakisiyor, gonderim_siniri_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "413": {
            "description": "govde_cok_buyuk",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gonderiler/{id}": {
      "get": {
        "operationId": "kaynak_gonderi",
        "summary": "Gönderinin durumu",
        "tags": [
          "Gönderi"
        ],
        "x-yha-kapsam": "gonderi.durum",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Gönderi kimliği, gönderi numarası (KG-000123) ya da dis:<dis_kimlik>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakGonderi"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "404": {
            "description": "bulunamadi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gonderiler/{id}/ekler/{sira}/parcalar/{parca}": {
      "put": {
        "operationId": "kaynak_ek_parca",
        "summary": "Ek dosyasının parçası",
        "description": "`Content-Type: application/octet-stream`, tam `Content-Length`, `X-YHA-Parca-Ozeti` (parçanın SHA-256'sı); parça en çok 8 MB; aynı özetle yinelenebilir.",
        "tags": [
          "Gönderi"
        ],
        "x-yha-kapsam": "icerik.gonder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Gönderi kimliği, gönderi numarası (KG-000123) ya da dis:<dis_kimlik>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sira",
            "in": "path",
            "required": true,
            "description": "Ekin sırası",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parca",
            "in": "path",
            "required": true,
            "description": "Parça sırası (1…)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gövdesiz"
          },
          "400": {
            "description": "dogrulama_hatasi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "404": {
            "description": "bulunamadi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "409": {
            "description": "gecersiz_durum",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "413": {
            "description": "govde_cok_buyuk",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gonderiler/{id}/ekler/{sira}/tamamla": {
      "post": {
        "operationId": "kaynak_ek_tamamla",
        "summary": "Ek yüklemesini tamamla",
        "tags": [
          "Gönderi"
        ],
        "x-yha-kapsam": "icerik.gonder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Gönderi kimliği, gönderi numarası (KG-000123) ya da dis:<dis_kimlik>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sira",
            "in": "path",
            "required": true,
            "description": "Ekin sırası",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KaynakTamamlaGovdesi"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakTamamlaYaniti"
                }
              }
            }
          },
          "400": {
            "description": "dogrulama_hatasi, ozet_uyusmuyor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "404": {
            "description": "bulunamadi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "409": {
            "description": "gecersiz_durum",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "413": {
            "description": "govde_cok_buyuk",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gonderiler/{id}/geri-cek": {
      "post": {
        "operationId": "kaynak_gonderi_geri_cek",
        "summary": "Gönderiyi geri çek",
        "tags": [
          "Gönderi"
        ],
        "x-yha-kapsam": "icerik.gonder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Gönderi kimliği, gönderi numarası (KG-000123) ya da dis:<dis_kimlik>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakGonderi"
                }
              }
            }
          },
          "400": {
            "description": "dogrulama_hatasi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "404": {
            "description": "bulunamadi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "409": {
            "description": "geri_cekilemez",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "413": {
            "description": "govde_cok_buyuk",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "operationId": "kaynak_openapi",
        "summary": "OpenAPI 3.1 belgesi (anahtarsız)",
        "tags": [
          "Belge"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/sozluk/iller": {
      "get": {
        "operationId": "kaynak_sozluk_iller",
        "summary": "İller ve ilçeler",
        "tags": [
          "Sözlük"
        ],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakSozlukIller"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sozluk/kategoriler": {
      "get": {
        "operationId": "kaynak_sozluk_kategoriler",
        "summary": "Kategoriler",
        "tags": [
          "Sözlük"
        ],
        "responses": {
          "200": {
            "description": "Başarılı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakSozlukKategoriler"
                }
              }
            }
          },
          "401": {
            "description": "anahtar_gecersiz, anahtar_gerekli, anahtar_iptal, anahtar_ortami_uyusmuyor, anahtar_suresi_doldu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "403": {
            "description": "ag_disi, kapsam_disi, kaynak_askida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          },
          "429": {
            "description": "gunluk_sinir_doldu, yavasla",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KaynakHata"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "anahtar": {
        "type": "http",
        "scheme": "bearer",
        "description": "yha_canli_… ya da yha_deneme_… (kaynak anahtarı)"
      }
    },
    "schemas": {
      "KaynakBen": {
        "type": "object",
        "properties": {
          "kaynak": {
            "type": "object",
            "properties": {
              "ad": {
                "type": "string"
              },
              "tur": {
                "type": "string"
              }
            },
            "required": [
              "ad",
              "tur"
            ],
            "additionalProperties": false
          },
          "anahtar": {
            "type": "object",
            "properties": {
              "ad": {
                "type": "string"
              },
              "ortam": {
                "type": "string"
              },
              "kapsamlar": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "on_ek": {
                "type": "string"
              }
            },
            "required": [
              "ad",
              "ortam",
              "kapsamlar",
              "on_ek"
            ],
            "additionalProperties": false
          },
          "sinirlar": {
            "type": "object",
            "properties": {
              "dakika": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "gunluk": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "bugun_kalan": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "dakika",
              "gunluk",
              "bugun_kalan"
            ],
            "additionalProperties": false
          },
          "gonderebilir": {
            "type": "boolean"
          },
          "gonderemezlik_nedeni": {
            "type": [
              "string",
              "null"
            ]
          },
          "gonderim_hakki": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kalan": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "donem_bitis": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "kalan",
                  "donem_bitis"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kaynak",
          "anahtar",
          "sinirlar",
          "gonderebilir",
          "gonderemezlik_nedeni",
          "gonderim_hakki"
        ],
        "additionalProperties": false,
        "description": "Anahtarın kaynağı, sınırları ve gönderebilirliği"
      },
      "KaynakEkBildirimi": {
        "type": "object",
        "properties": {
          "tur": {
            "type": "string",
            "enum": [
              "fotograf",
              "video",
              "belge"
            ]
          },
          "ad": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Dosya adı (uzantısıyla)"
          },
          "boyut_bayt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 68719476736
          },
          "ozet": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{64}$",
            "description": "Bütün dosyanın SHA-256 özeti"
          },
          "sira": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "tur",
          "ad",
          "boyut_bayt",
          "ozet",
          "sira"
        ],
        "additionalProperties": false,
        "description": "Gönderiyle bildirilen ek; dosya ayrıca parçalı yüklenir"
      },
      "KaynakGonderi": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "gonderi_no": {
            "type": "string"
          },
          "icerik_turu": {
            "type": "string"
          },
          "icerik_turu_adi": {
            "type": "string"
          },
          "baslik": {
            "type": [
              "string",
              "null"
            ]
          },
          "metin": {
            "type": [
              "string",
              "null"
            ]
          },
          "kategori": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ad": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "ad"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "il": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "ad": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "ad"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "ilce": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "ad": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "ad"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "editore_not": {
            "type": [
              "string",
              "null"
            ]
          },
          "durum": {
            "type": "string",
            "enum": [
              "taslak",
              "yukleniyor",
              "alindi",
              "incelemede",
              "onaylandi",
              "reddedildi",
              "geri_cekildi"
            ]
          },
          "durum_adi": {
            "type": "string"
          },
          "kanal_turu": {
            "type": "string"
          },
          "gonderen": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ad": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "ad"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "dis_kimlik": {
            "type": [
              "string",
              "null"
            ]
          },
          "ekler": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KaynakGonderiEki"
            }
          },
          "masa_adi": {
            "type": [
              "string",
              "null"
            ]
          },
          "red": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "baslik": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "gerekce": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "baslik",
                  "gerekce"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "haber_durumu": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "serviste",
                  "iptal_edildi"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "servise_cikis_zamani": {
            "anyOf": [
              {
                "type": "string",
                "description": "ISO 8601, UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "puan_etkisi": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "hakedis": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "gecmis": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "durum": {
                  "type": "string"
                },
                "zaman": {
                  "type": "string",
                  "description": "ISO 8601, UTC"
                }
              },
              "required": [
                "durum",
                "zaman"
              ],
              "additionalProperties": false
            }
          },
          "istemci_hazirlama_zamani": {
            "anyOf": [
              {
                "type": "string",
                "description": "ISO 8601, UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "alindi_zamani": {
            "anyOf": [
              {
                "type": "string",
                "description": "ISO 8601, UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "karar_zamani": {
            "anyOf": [
              {
                "type": "string",
                "description": "ISO 8601, UTC"
              },
              {
                "type": "null"
              }
            ]
          },
          "onceki_gonderi_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "islemler": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "anahtar_on_ek": {
            "description": "Gönderiyi açan anahtarın ön eki (API dışı kanallarda boş)",
            "type": [
              "string",
              "null"
            ]
          },
          "olusturma_zamani": {
            "type": "string",
            "description": "ISO 8601, UTC"
          },
          "guncelleme_zamani": {
            "type": "string",
            "description": "ISO 8601, UTC"
          },
          "surum": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "uyarilar": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "deneme": {
            "description": "Deneme ortamının yapay gönderisi",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "gonderi_no",
          "icerik_turu",
          "icerik_turu_adi",
          "baslik",
          "metin",
          "kategori",
          "il",
          "ilce",
          "editore_not",
          "durum",
          "durum_adi",
          "kanal_turu",
          "gonderen",
          "dis_kimlik",
          "ekler",
          "masa_adi",
          "red",
          "haber_durumu",
          "servise_cikis_zamani",
          "puan_etkisi",
          "hakedis",
          "istemci_hazirlama_zamani",
          "alindi_zamani",
          "karar_zamani",
          "onceki_gonderi_id",
          "islemler",
          "anahtar_on_ek",
          "olusturma_zamani",
          "guncelleme_zamani",
          "surum"
        ],
        "additionalProperties": false,
        "description": "Kaynağın gördüğü gönderi (beyaz liste)"
      },
      "KaynakGonderiEki": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sira": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "tur": {
            "type": "string"
          },
          "ozgun_ad": {
            "type": "string"
          },
          "boyut_bayt": {
            "type": "number"
          },
          "yuklenen_bayt": {
            "type": "number"
          },
          "durum": {
            "type": "string",
            "description": "yukleniyor, denetimde, hazir, karantina, iptal"
          },
          "karantina_nedeni": {
            "type": [
              "string",
              "null"
            ]
          },
          "yukleme": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "parca_boyutu": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "parca_sayisi": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "adres_kalibi": {
                    "type": "string"
                  }
                },
                "required": [
                  "parca_boyutu",
                  "parca_sayisi",
                  "adres_kalibi"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Yükleme sürüyorsa parça yükleme bilgisi"
          }
        },
        "required": [
          "id",
          "sira",
          "tur",
          "ozgun_ad",
          "boyut_bayt",
          "yuklenen_bayt",
          "durum",
          "karantina_nedeni",
          "yukleme"
        ],
        "additionalProperties": false,
        "description": "Gönderinin eki"
      },
      "KaynakGonderiGovdesi": {
        "type": "object",
        "properties": {
          "dis_kimlik": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[\\x21-\\x7e]+$",
            "description": "Sizin sisteminizdeki kimlik; aynı kimlik ikinci kez yeni kayıt açmaz"
          },
          "icerik_turu": {
            "type": "string",
            "enum": [
              "haber",
              "basin_aciklamasi",
              "fotograf",
              "video",
              "belge"
            ]
          },
          "baslik": {
            "type": "string",
            "minLength": 3,
            "maxLength": 300
          },
          "metin": {
            "type": "string",
            "maxLength": 400000
          },
          "kategori_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "il_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 81
          },
          "ilce_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "editore_not": {
            "type": "string",
            "maxLength": 2000
          },
          "ekler": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KaynakEkBildirimi"
            }
          },
          "gonderen_eposta": {
            "description": "Kurum anahtarında gönderiyi kurumun etkin kullanıcısına bağlar (eşleşmezse gönderen boş)",
            "type": "string",
            "maxLength": 320,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "dis_kimlik",
          "icerik_turu"
        ],
        "additionalProperties": false,
        "description": "Yeni gönderi"
      },
      "KaynakGonderiListesi": {
        "type": "object",
        "properties": {
          "ogeler": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KaynakGonderi"
            }
          },
          "sonraki_imlec": {
            "type": [
              "string",
              "null"
            ]
          },
          "devami_var": {
            "type": "boolean"
          }
        },
        "required": [
          "ogeler",
          "sonraki_imlec",
          "devami_var"
        ],
        "additionalProperties": false,
        "description": "Gönderi listesi (imleçli; `degisti_sonra` ile yoklama)"
      },
      "KaynakHata": {
        "type": "object",
        "properties": {
          "hata": {
            "type": "object",
            "properties": {
              "kod": {
                "type": "string"
              },
              "mesaj": {
                "type": "string"
              },
              "belge": {
                "type": "string"
              },
              "alanlar": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "alan_kodlari": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kod",
              "mesaj"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "hata"
        ],
        "additionalProperties": false,
        "description": "Hata gövdesi; `hata.belge` kodun açıklamasına gider"
      },
      "KaynakSozlukIller": {
        "type": "object",
        "properties": {
          "ogeler": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "ad": {
                  "type": "string"
                },
                "ilceler": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "ad": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "ad"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "ad",
                "ilceler"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ogeler"
        ],
        "additionalProperties": false,
        "description": "İller (plaka kodu) ve ilçeleri"
      },
      "KaynakSozlukKategoriler": {
        "type": "object",
        "properties": {
          "ogeler": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kod": {
                  "type": "string"
                },
                "ad": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "kod",
                "ad"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ogeler"
        ],
        "additionalProperties": false,
        "description": "Kategoriler"
      },
      "KaynakTamamlaGovdesi": {
        "type": "object",
        "properties": {
          "ozet": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{64}$",
            "description": "Bütün dosyanın SHA-256 özeti; bildirilenle aynı olmalı"
          }
        },
        "required": [
          "ozet"
        ],
        "additionalProperties": false,
        "description": "Ek yüklemesinin tamamlanması"
      },
      "KaynakTamamlaYaniti": {
        "type": "object",
        "properties": {
          "ek_id": {
            "type": "string"
          },
          "durum": {
            "type": "string",
            "description": "denetimde, hazir ya da karantina"
          }
        },
        "required": [
          "ek_id",
          "durum"
        ],
        "additionalProperties": false,
        "description": "Ek denetime alındı; sonuç durum sorgusunda"
      }
    }
  }
}
