{
  "openapi": "3.0.3",
  "info": {
    "title": "Muhasip API",
    "version": "2026-10-18.1",
    "description": "Fatura, banka, POS ve tahsilat, GİB e-Arşiv, pazaryeri, online işlemler, görevler, ajanda ve takvim entegrasyonları. İşlem alanları, izinler, istek ve cevap örnekleri ile hata yönetimi."
  },
  "servers": [
    {
      "url": "https://api.muhasip.pro",
      "description": "Muhasip API"
    }
  ],
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Uygulamalar"
    },
    {
      "name": "Görev yönetimi"
    },
    {
      "name": "Ajanda ve takvim"
    },
    {
      "name": "Fatura",
      "description": "Fatura bağlantısı, belge işlemleri ve muhasebeye aktarım."
    },
    {
      "name": "Banka",
      "description": "Banka hesapları, hareketler, mahsup ve mevcut çalışma alanı alt kaynakları."
    },
    {
      "name": "POS ve tahsilat",
      "description": "POS hesapları, komisyonlar ve tahsilat bağlantıları."
    },
    {
      "name": "GİB e-Arşiv",
      "description": "GİB hesabı, sorgu, taslak ve SMS imzalama."
    },
    {
      "name": "Pazaryeri",
      "description": "Trendyol bağlantısı ve sipariş aktarımı."
    },
    {
      "name": "Online işlemler",
      "description": "Online işlem ekranı yapılandırması."
    },
    {
      "name": "İşlem takibi",
      "description": "Mali işlem durumu ve tekrar çağrı makbuzları."
    }
  ],
  "paths": {
    "/apps": {
      "get": {
        "operationId": "coreGetApps",
        "tags": ["Uygulamalar"],
        "summary": "Firma uygulamalarını listeleyin",
        "description": "Firmanın uygulamalarını ve kullanım durumlarını listeler. Sayfalama parametresi kullanılmaz. Kullanmak istediğiniz işlem için ilgili API referansındaki izin ve bağlantı koşullarını kontrol edin.\n\nİşlem etkisi: Kayıt değişikliği yapmaz.\n\nSonraki adım: İhtiyaç duyduğunuz uygulamanın kaynak rehberine geçin.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreApp"
                      }
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "$ref": "#/components/responses/InternalError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "apps",
          "access": "read"
        }
      }
    },
    "/apps/agenda": {
      "post": {
        "operationId": "corePostAppsAgenda",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda kaydı oluşturun",
        "description": "Yeni ortak veya özel not oluşturur. todo ve variables verilmezse boş dizi kullanılır. isPrivate=true not yalnız oluşturan API kullanıcısına görünür. Etiket firmada doğrulanır. Sonuç resultData içindedir; İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "resultData": {
                      "$ref": "#/components/schemas/CoreAgendaRecord"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "resultData": {
                    "id": "64b000000000000000000001",
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme notu",
                    "todo": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreAgendaCreate"
              },
              "example": {
                "title": "Ödeme notu",
                "todo": []
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "write"
        }
      },
      "get": {
        "operationId": "muhasipGetAppsAgenda",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda notlarını listele",
        "description": "Firma ortak notlarını ve API kullanıcısının oluşturduğu özel notları listeler. Başka kullanıcılara ait özel notlar gösterilmez. Varsayılan olarak arşivlenmemiş notlar, oluşturulma tarihine göre yeniden eskiye sıralanır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreAgendaRecord"
                      }
                    },
                    "title": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status", "result", "title", "total"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "title": "Ajanda",
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": ""
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            },
            "description": ""
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Başlıkta düz metin araması."
          },
          {
            "name": "isArchived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": ""
          },
          {
            "name": "isTask",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": ""
          },
          {
            "name": "isPin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": ""
          },
          {
            "name": "labelsId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          },
          {
            "name": "taskStart",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Görev tarihi alt sınırı; ISO tarih."
          },
          {
            "name": "taskEnd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Görev tarihi üst sınırı; yalnız gün ise gün sonu dahil."
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["filter", "label"]
            },
            "description": "slug ile birlikte kullanılır."
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "filter=filter: pinned/tasks/delay/index/archived; filter=label: etiket kimliği."
          }
        ],
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "read"
        }
      }
    },
    "/apps/agenda/labels": {
      "get": {
        "operationId": "coreGetAppsAgendaLabels",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda etiketlerini listeleyin",
        "description": "Firma etiketleri tanımlı sıra ile döner; sayfalama yoktur.\n\nİşlem etkisi: Kayıt değişikliği yapmaz.\n\nSonraki adım: Etiket id değerlerini ajanda kaydında labelsId alanında kullanın.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreAgendaLabel"
                      }
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "read"
        }
      },
      "patch": {
        "operationId": "corePatchAppsAgendaLabels",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda etiketlerini topluca kaydedin",
        "description": "En fazla 250 etiket tanımını gövde dizisiyle ekler/günceller. Her öğede id,title,icon zorunludur; kimlikler tekrarlanamaz ve başka firmaya ait olamaz. Sıra dizi konumundan alınır; atlanan etiket silinmez.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CoreAgendaLabel"
                },
                "maxItems": 250
              },
              "example": [
                {
                  "id": "64b000000000000000000001",
                  "title": "Ödemeler",
                  "icon": "wallet"
                }
              ]
            }
          }
        },
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "write"
        }
      }
    },
    "/apps/agenda/labels/{id}": {
      "delete": {
        "operationId": "coreDeleteAppsAgendaLabelsId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda etiketini silin",
        "description": "Etiketi firma kapsamında fiziksel siler; bulunamayan kayıt 404. Aynı firmadaki bağlı ajanda notlarının labelsId alanı temizlenir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "write"
        }
      }
    },
    "/apps/agenda/{id}": {
      "get": {
        "operationId": "coreGetAppsAgendaId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda kaydını okuyun",
        "description": "Firma ortak notunu veya API kullanıcısının oluşturduğu özel notu okur. Kayıt bulunamazsa ya da erişim izni yoksa 404 döner. İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreAgendaRecord"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "id": "64b000000000000000000001",
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme notu",
                    "todo": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "read"
        }
      },
      "patch": {
        "operationId": "corePatchAppsAgendaId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda kaydını güncelleyin",
        "description": "İzinli alanları günceller; boş gövde 400, görünmeyen/bulunmayan kayıt 404. Başka aktörün ortak notu özel nota çevrilemez 403. todo[].key yoksa üretilir. Firma, aktör veya geçmiş doğrudan istemciden değiştirilemez.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreAgendaUpdate"
              },
              "example": {
                "content": "Ödeme bekleniyor"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "muhasipDeleteAppsAgendaId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Ajanda notunu sil",
        "description": "Firma ortak notunu veya API kullanıcısının oluşturduğu özel notu kalıcı olarak siler. Kayıt bulunamazsa ya da erişim izni yoksa 404 döner.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          }
        ],
        "x-muhasip-permission": {
          "module": "agenda",
          "access": "write"
        }
      }
    },
    "/apps/bank": {
      "get": {
        "operationId": "financeListBanks",
        "tags": ["Banka"],
        "summary": "Bağlı banka hesaplarını listele",
        "description": "Firmanın arşivlenmemiş ve entegrasyonu bulunan banka hesaplarının özetini döndürür.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Hareketleri /apps/bank/transactions üzerinden sorgulayın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceBankAccountSummary"
                      }
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": [
                    {
                      "_id": "64b000000000000000000001",
                      "name": "Örnek banka hesabı",
                      "bankCode": "anadolubank",
                      "bankName": "Anadolubank"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      },
      "post": {
        "operationId": "financeSetupBank",
        "tags": ["Banka"],
        "summary": "Banka bağlantısını doğrula",
        "description": "Banka bağlantı bilgileriyle hesap seçeneklerini sorgular. Bu işlem tek başına Muhasip kasa/hesap kartı oluşturduğu anlamına gelmez. Anadolubank için key ve mNo/iban koşulları aşağıdadır.\n\nYan etkiler: Uzak banka bağlantısı kurar ve banka erişim bilgilerini işler; yanıt bankaya göre ek alanlar içerebilir.\n\nSonraki adım: Dönen hesap seçeneklerini mevcut hesap kurulum sürecinde kullanın. Yalnız HTTP 200 sonucundan hesap kartı oluşturulduğunu varsaymayın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Bağlı hizmet veya firma ayarlarına göre ek alanlar değişebilir."
                      }
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "data": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "İş kuralı, bağlantı veya kaynak hizmet hatası. message, description veya result alanı gelebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceBankSetupRequest"
              },
              "example": {
                "bank": "anadolubank",
                "key": "BANKA_ERISIM_ANAHTARI",
                "mNo": "ORNEK_HESAP_NO"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/automation/{id}": {
      "put": {
        "operationId": "financeSetBankAutomationMetadata",
        "tags": ["Banka"],
        "summary": "Hareket otomasyon ek bilgisini güncelle",
        "description": "Firma hareketinin mevcut otomasyon ek bilgisine gövdedeki alanları birleştirir. Bu işlem otomasyon çalıştırmaz ve fatura göndermez. Anahtarlar firmanın mevcut otomasyon kullanımına özgüdür.\n\nYan etkiler: Hareketin ek otomasyon bilgilerini değiştirir.\n\nSonraki adım: Hareket ayrıntısını okuyun. Boş nesne örneği yalnız gövde biçimini gösterir; amaçlanan alanları mevcut firma kullanımından belirleyin.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceWriteResult"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "matchedCount": 1,
                    "modifiedCount": 0
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceBankAutomationMetadata"
              },
              "example": {}
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/check/{id}": {
      "get": {
        "operationId": "financeRefreshBankAccount",
        "tags": ["Banka"],
        "summary": "Banka hesabını yeniden sorgula",
        "description": "Etkin bağlantısı bulunan ve arşivlenmemiş banka hesabının hareketlerini yeniler. GET isteği veri günceller ve write izni gerektirir. Ek sorgu parametresi kabul edilmez. Hesap için bir sorgu devam ediyorsa 409 BANK_QUERY_IN_PROGRESS, banka hizmetine erişilemiyorsa 502 BANK_QUERY_FAILED döner. Başarılı cevapta result.status, size, query ve transactions alanlarını değerlendirin.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceBankQueryResult"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "status": true,
                    "size": 0,
                    "query": 0,
                    "transactions": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Bağlı banka hesabı bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Bağlı banka hesabı bulunamadı."
                }
              }
            }
          },
          "409": {
            "description": "Hesap için sorgu devam ediyor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Hesap için sorgu devam ediyor."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Banka sorgusu tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Banka sorgusu tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "Firma kapsamındaki bağlı banka hesabı."
          }
        ]
      }
    },
    "/apps/bank/select": {
      "get": {
        "operationId": "financeSelectBankAccounts",
        "tags": ["Banka"],
        "summary": "Banka ve alt hesap seçeneklerini oku",
        "description": "Gelen veya giden hareketi açık alt hesapları seçim listesi biçiminde döndürür. Alt hesap kimliği ile ana banka hesabı kimliği farklıdır.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Dönen sonucu kaydedin veya ilgili detay kaynağını okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceBankAccountSelection"
                      }
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": [
                    {
                      "id": "64b000000000000000000001",
                      "bankCode": "anadolubank",
                      "currency": "TRY",
                      "name": "Anadolubank",
                      "subAccounts": [
                        {
                          "id": "ALT_HESAP_KIMLIGI",
                          "name": "ORNEK_IBAN",
                          "title": "Örnek alt hesap",
                          "currency": "TRY"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      }
    },
    "/apps/bank/transaction": {
      "patch": {
        "operationId": "financeSetBankTransactionStatus",
        "tags": ["Banka"],
        "summary": "Hareket durumlarını toplu güncelle",
        "description": "Seçili firma hareketlerine durum veya kontrol işareti uygular. isCheck alanı verilirse status yok sayılır. En az bir kayıt eşleşmesi yeterlidir; tüm kimliklerin eşleştiğini gösteren sayım dönmez.\n\nYan etkiler: Mevcut banka hareketlerinin durumunu değiştirir; bu çağrı kendi başına ödeme veya mahsup oluşturmaz.\n\nSonraki adım: Güncellenen hareketleri yeniden sorgulayın; mali kayıt yaratmak için approval akışını kullanın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FinanceBankStatusRequest"
                  },
                  {
                    "anyOf": [
                      {
                        "required": ["status"]
                      },
                      {
                        "required": ["isCheck"]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "selected": ["64b000000000000000000001"],
                "status": 2
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/transaction/{id}": {
      "get": {
        "operationId": "financeGetBankTransaction",
        "tags": ["Banka"],
        "summary": "Banka hareketi veya bağlı tahsilat bilgisini oku",
        "description": "detail parametresi boş olmayan bir değer taşıyorsa banka hareketinin ayrıntısını döndürür; false metni de bu koşula dahildir. Kayıt bulunamazsa 404 döner. Parametre gönderilmezse harekete bağlı ödeme özeti alınır; ödeme ilişkisi yoksa null veya boş nesne dönebilir.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/FinanceBankTransaction"
                        },
                        {
                          "$ref": "#/components/schemas/FinanceBankLinkedPayment"
                        },
                        {
                          "type": "object",
                          "additionalProperties": true
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": null
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Herhangi bir boş olmayan değer ayrıntı modunu açar; false metni de ayrıntı modudur. Ayrıntı için true gönderin."
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      }
    },
    "/apps/bank/transaction/{id}/approval": {
      "patch": {
        "operationId": "financeApproveBankTransaction",
        "tags": ["Banka"],
        "summary": "Banka hareketini cariye veya faturaya işle",
        "description": "status=0 olan banka hareketini contact veya invoice türünde onaylar ve ödeme kaydı oluşturur. contact türünde id, mevcut cari kimliği veya yeni cari adı olabilir. invoice türünde id ve contactsId zorunludur; cari, fatura, para birimi ve ödeme yönü banka hareketiyle eşleşmelidir. Para birimi boşsa TRY kabul edilir; uyuşmazlık 400 döndürür. IBAN ilgili cariye kaydedilir. Fatura açık, daha önce ödeme almamış ve hareketin tam tutarıyla kapanabilir olmalıdır. Kısmi, önceden ödenmiş veya kapalı fatura 422 döndürür. Döviz hareketinde kaydedilmiş pozitif kur gerekir; TRY dışında kur=1 veya fatura kuruyla uyuşmazlık 422 döndürür. Kur farkı hesaplama ve kısmi kapama desteklenmez. İşlem makbuzunu saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz. Aynı firmada çakışan banka onayı, fatura veya pazaryeri aktarımı 409 döndürebilir. Sonuç belirsizse yeniden onaylamadan işlem durumunu ve oluşan kayıtları inceleyin; okuma istekleri kullanılabilir.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            },
                            "createData": {
                              "type": "object",
                              "properties": {
                                "accountsId": {
                                  "type": "string",
                                  "pattern": "^[a-fA-F0-9]{24}$",
                                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                                },
                                "bankId": {
                                  "type": "string",
                                  "pattern": "^[a-fA-F0-9]{24}$",
                                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                                },
                                "out": {
                                  "type": "boolean"
                                },
                                "paymentDate": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "amount": {
                                  "type": "number"
                                },
                                "currencyCode": {
                                  "type": "string"
                                },
                                "exchangeRate": {
                                  "type": "number"
                                },
                                "contactsId": {
                                  "type": "string",
                                  "pattern": "^[a-fA-F0-9]{24}$",
                                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                                },
                                "transactionsId": {
                                  "type": "string",
                                  "pattern": "^[a-fA-F0-9]{24}$",
                                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                                },
                                "description": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": true
                            }
                          },
                          "required": ["status", "createData"],
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "createData": {
                    "bankId": "64b000000000000000000001",
                    "accountsId": "64b000000000000000000002",
                    "contactsId": "64b000000000000000000002",
                    "amount": 1000,
                    "currencyCode": "TRY",
                    "exchangeRate": 1,
                    "out": false
                  },
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "bank.approve",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {
                      "resultId": "507f1f77bcf86cd799439011"
                    },
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceBankApprovalRequest"
              },
              "examples": {
                "cariyeOdeme": {
                  "summary": "Mevcut cariye ödeme",
                  "value": {
                    "type": "contact",
                    "id": "64b000000000000000000002",
                    "contactsId": "64b000000000000000000002"
                  }
                },
                "faturayaMahsup": {
                  "summary": "Faturaya mahsup; contactsId zorunlu",
                  "value": {
                    "type": "invoice",
                    "id": "64b000000000000000000003",
                    "contactsId": "64b000000000000000000002"
                  }
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/transaction/{id}/comment": {
      "put": {
        "operationId": "financeSetBankTransactionComment",
        "tags": ["Banka"],
        "summary": "Banka hareketi notunu kaydet",
        "description": "Firma kapsamındaki hareketin notunu değiştirir. Eşleşmeyen kayıt için de status:true gelebilir; durum yeniden okunmalıdır.\n\nYan etkiler: Hareket notunu değiştirir; ödeme veya fatura oluşturmaz.\n\nSonraki adım: GET /apps/bank/transaction/{id}?detail=true ile notu yeniden okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceBankCommentRequest"
              },
              "example": {
                "comment": "Örnek mutabakat notu"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/transaction/{id}/estimate": {
      "get": {
        "operationId": "financeEstimateBankMatch",
        "tags": ["Banka"],
        "summary": "Cari ve fatura eşleştirme önerilerini oku",
        "description": "Bekleyen banka hareketi için kimlik/IBAN/ad bilgisinden cari, tutar ve para biriminden açık fatura adayları üretir. Öneri kesin muhasebe eşleşmesi değildir.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Uygun cari/fatura kimliğini doğruladıktan sonra PATCH .../approval ile kaydedin.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceBankMatchEstimate"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "transaction": {
                      "id": "64b000000000000000000001",
                      "amount": 1000,
                      "currency": "TRY",
                      "incoming": true
                    },
                    "contacts": [
                      {
                        "id": "64b000000000000000000002",
                        "name": "Örnek işletme"
                      }
                    ],
                    "invoices": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "411": {
            "description": "Geçersiz kimlik, yetersiz eşleştirme verisi veya cari adayı yok.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      }
    },
    "/apps/bank/transactions": {
      "get": {
        "operationId": "financeListBankTransactions",
        "tags": ["Banka"],
        "summary": "Banka hareketlerini listele",
        "description": "Firma kapsamındaki banka hareketlerini filtreler. Yanıtta result ve total bulunur; paginate nesnesi dönmez. Tarih filtresi başlangıç gününün 00:00:00 anını dahil eder, bitiş gününün 23:59:59 anını hariç tutar.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Bir hareketin ham ayrıntısı için GET /apps/bank/transaction/{id}?detail=true çağırın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceBankTransaction"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status", "result", "total"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "incoming",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            },
            "description": "Gelen/giden hareket filtresi; verilmezse her iki yön."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            },
            "description": "Mevcut boolean metin filtresi sayısal durum alanına uygulanır; true=1, false=0. Bu parametreyle 2 seçilemez."
          },
          {
            "name": "bank",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$",
                "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
              }
            },
            "description": "Ana hesap kimliği listesi; bank[0], bank[1] biçiminde iletin."
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Para birimi kodu listesi; currency[0] biçiminde iletin."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date",
                "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
              },
              "minItems": 2,
              "maxItems": 2
            },
            "description": "date[0] başlangıç, date[1] bitiş. startDate/endDate çiftinden önceliklidir."
          },
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
            },
            "description": "Başlangıç tarihi; endDate ile birlikte kullanılır."
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
            },
            "description": "Bitiş tarihi; startDate ile birlikte kullanılır."
          },
          {
            "name": "dayMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Açık tarih aralığı yoksa mevcut dönem seçimi kullanılır; özel dönem adı varsaymayın."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"],
              "default": "false"
            },
            "description": "true: eskiden yeniye; aksi halde yeniden eskiye."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Sayfa; toplamı aşarsa son sayfa kullanılır."
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 250,
              "minimum": 1
            },
            "description": "Sayfa başına kayıt."
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      }
    },
    "/apps/bank/ws/automations": {
      "get": {
        "operationId": "muhasipGetAppsBankWsAutomations",
        "tags": ["Banka"],
        "summary": "Banka fatura otomasyonlarını listele",
        "description": "bankInvoice/bank türündeki, integration veya manuel çalıştırma biçimini kullanan ve tek invoice aksiyonu içeren banka fatura otomasyonlarını listeler. Sayfa aralığı aşılırsa boş sonuç döner. İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceBankAutomationListRow"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status", "result", "total"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["active", "draft", "archive"]
            },
            "description": ""
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "1 tabanlı sayfa; aşan sayfada boş dizi."
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 25
            },
            "description": ""
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      },
      "patch": {
        "operationId": "muhasipPatchAppsBankWsAutomations",
        "tags": ["Banka"],
        "summary": "Banka fatura otomasyonu kaydet",
        "description": "id gönderilmezse otomasyon taslağı oluşturur; gönderilirse ilgili kaydı günceller. Çalışmakta olan otomasyon için 409 döner. Tek invoice aksiyonu desteklenir. Etkinleştirme için en az bir TRY banka hesabı, etkin fatura bağlantısı, seri, belge şablonu, alıcı adresi ve toplamı yüzde 100 olan satır oranları gerekir. settings ve actions gönderildiğinde mevcut değerleri bütünüyle değiştirir. Kaydetme isteği otomasyonu çalıştırmaz; çalıştırma ve sonuç takibi ayrı işlemlerdir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceWriteResult"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "matchedCount": 0,
                    "modifiedCount": 0,
                    "upsertedCount": 1,
                    "upsertedId": "507f1f77bcf86cd799439011"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceBankAutomationWrite"
              },
              "example": {
                "title": "Banka hareketinden fatura",
                "status": "draft",
                "template": "bankInvoice",
                "integration": "bank",
                "type": "integration",
                "settings": {
                  "accounts": []
                },
                "actions": [
                  {
                    "type": "integration",
                    "integration": "invoice",
                    "settings": {}
                  }
                ]
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/ws/automations/{id}": {
      "get": {
        "operationId": "financeGetBankAutomation",
        "tags": ["Banka"],
        "summary": "Mevcut otomasyon tanımını oku",
        "description": "Banka fatura otomasyonunun form ve result alanlarını okur. Kayıt bulunamazsa 404 döner. İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "form": {
                      "$ref": "#/components/schemas/FinanceBankAutomationForm"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceBankAutomation"
                    }
                  },
                  "required": ["status", "form", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "form": {
                    "id": "507f1f77bcf86cd799439011",
                    "title": "Banka fatura otomasyonu",
                    "status": "draft",
                    "template": "bankInvoice",
                    "integration": "bank",
                    "type": "integration",
                    "settings": {
                      "accounts": []
                    },
                    "actions": [
                      {
                        "type": "integration",
                        "integration": "invoice",
                        "settings": {}
                      }
                    ]
                  },
                  "result": {
                    "id": "507f1f77bcf86cd799439011",
                    "title": "Banka fatura otomasyonu",
                    "status": "draft",
                    "template": "bankInvoice",
                    "integration": "bank",
                    "type": "integration",
                    "settings": {
                      "accounts": []
                    },
                    "actions": [
                      {
                        "type": "integration",
                        "integration": "invoice",
                        "settings": {}
                      }
                    ],
                    "actor": {
                      "type": "api",
                      "id": "507f1f77bcf86cd799439012",
                      "name": "Örnek entegrasyon"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      },
      "delete": {
        "operationId": "financeDeleteBankAutomation",
        "tags": ["Banka"],
        "summary": "Otomasyon tanımını sil",
        "description": "Firma otomasyonunu fiziksel siler. Eksik/yabancı kayıt 404; çalışan tanım 409 ile korunur. Geçmiş kayıtlar zincirleme silinmez.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/ws/automations/{id}/log": {
      "get": {
        "operationId": "financeListBankAutomationLogs",
        "tags": ["Banka"],
        "summary": "Otomasyon geçmişini listele",
        "description": "Otomasyon geçmişini yeniden eskiye listeler. page ve pageSize varsayılanları 1 ve 25, sayfa boyutunun üst sınırı 250’dir. Sayfa aralığı aşılırsa boş sonuç döner. data işlenen satır sayısını, actor işlemi yapan kullanıcı bilgisini içerir.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceBankAutomationLogSummary"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status", "result", "total"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "1 tabanlı sayfa; aşan sayfada boş dizi."
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 250,
              "minimum": 1
            },
            "description": "Sayfa başına kayıt."
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      }
    },
    "/apps/bank/ws/automations/{id}/log/{logId}": {
      "get": {
        "operationId": "financeGetBankAutomationLog",
        "tags": ["Banka"],
        "summary": "Otomasyon geçmişi ayrıntısını oku",
        "description": "Otomasyonun ilgili çalışma kaydını okur. Kayıt bulunamazsa 404 döner. data satırlarında status, recordId ve message bulunur; kesin başarılı satırlarda ayrıca uuid ve type döner.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceBankAutomationLog"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000002",
                    "status": true,
                    "createdDate": "2026-10-18T09:00:00Z",
                    "data": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Çalışan, aktif olmayan veya durumu değişmiş otomasyon."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "logId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      }
    },
    "/apps/bank/ws/automations/{id}/run": {
      "get": {
        "operationId": "muhasipGetAppsBankWsAutomationsIdRun",
        "tags": ["Banka"],
        "summary": "Banka fatura otomasyonunu çalıştır",
        "description": "Etkin ve doğrulanmış TRY banka fatura otomasyonunu çalıştırır. GET isteği mali kayıt oluşturur; write izni ve Idempotency-Key zorunludur. Çalışmakta olan veya etkin olmayan otomasyon 409 döndürür. En fazla 1000 hareket ve son 10 gün değerlendirilir. Bütün satırlar başarılıysa ya da işlenecek hareket yoksa işlem başarılıdır. Başarısız veya sonucu belirsiz bir satır varsa HTTP 502, review_required ve retryable=false döner. İşlem durumunu, otomasyon geçmişini ve ilgili faturaları incelemeden yeniden çalıştırmayın. İşlem makbuzunu saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "boolean"
                                },
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/FinanceBankAutomationLogItem"
                                  }
                                }
                              },
                              "required": ["status", "data"]
                            }
                          },
                          "required": ["status", "result"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "result": {
                    "status": true,
                    "data": []
                  },
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "bank.automation",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {},
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "description": "Bu yeni mali işlem için zorunludur."
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/ws/workflows": {
      "get": {
        "operationId": "financeListBankWorkflows",
        "tags": ["Banka"],
        "summary": "İş akışlarını listele",
        "description": "Banka çalışma alanı altında firmanın iş akışlarını döndürür. Bu kaynak bir banka para transferi veya muhasebe fişi değildir.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Dönen sonucu kaydedin veya ilgili detay kaynağını okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceWorkflow"
                      }
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      },
      "post": {
        "operationId": "financeCreateBankWorkflow",
        "tags": ["Banka"],
        "summary": "İş akışı oluştur",
        "description": "Firma için iş akışı kaydı oluşturur. Başlıktan adres adı üretilir; çakışırsa benzersiz ek kullanılır. icon boşsa varsayılan simge uygulanır.\n\nYan etkiler: Yeni iş akışı kaydı oluşturur; ödeme veya belge göndermez.\n\nSonraki adım: Dönen _id ile iş akışı ayrıntısını okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceWorkflow"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Örnek mutabakat akışı",
                    "slug": "ornekmutabakatakisi",
                    "status": true,
                    "icon": "i-tabler-user-screen",
                    "usersId": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceWorkflowRequest"
              },
              "example": {
                "title": "Örnek mutabakat akışı",
                "status": true
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/ws/workflows/{id}": {
      "get": {
        "operationId": "financeGetBankWorkflow",
        "tags": ["Banka"],
        "summary": "İş akışı ayrıntısını oku",
        "description": "Firma kapsamındaki iş akışını okur; eksik/yabancı kimlik 404. Alt öznitelikleri ayrıca attributes kaynağından okuyun.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceWorkflow"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "507f1f77bcf86cd799439011",
                    "title": "Mutabakat",
                    "slug": "mutabakat",
                    "status": true,
                    "icon": "i-tabler-user-screen",
                    "usersId": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      },
      "put": {
        "operationId": "financeUpdateBankWorkflow",
        "tags": ["Banka"],
        "summary": "İş akışını güncelle",
        "description": "Firma iş akışını günceller. title zorunludur; slug başlıktan yeniden üretilir. usersId aktif firma üyeleri olmalıdır; null boş diziye dönüşür. Eksik/yabancı 404; icon boşsa varsayılan uygulanır. Bağlı öznitelikler otomatik değiştirilmez.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceWriteResult"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "matchedCount": 1,
                    "modifiedCount": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceWorkflowRequest"
              },
              "example": {
                "title": "Örnek mutabakat akışı",
                "status": false
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "financeDeleteBankWorkflow",
        "tags": ["Banka"],
        "summary": "İş akışını sil",
        "description": "Firma iş akışını fiziksel siler; eksik/yabancı kayıt 404. Alt öznitelikler zincirleme silinmez.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceWriteResult"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "deletedCount": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/ws/workflows/{id}/attributes": {
      "get": {
        "operationId": "financeListBankWorkflowAttributes",
        "tags": ["Banka"],
        "summary": "İş akışı alanlarını listele",
        "description": "Önce firma ve iş akışı doğrulanır; eksik/yabancı 404. Alanlar order,id sırasıyla data dizisinde döner; son işlemi yapan kullanıcı actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceWorkflowAttribute"
                      }
                    }
                  },
                  "required": ["status", "data"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "data": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "read"
        }
      },
      "patch": {
        "operationId": "muhasipPatchAppsBankWsWorkflowsIdAttributes",
        "tags": ["Banka"],
        "summary": "İş akışı alanlarını kaydet",
        "description": "Firma iş akışının öznitelik dizisini ekler/günceller. id yoksa yeni kayıt üretilir; id verilirse firma ve iş akışı sahipliği doğrulanır. Tekrarlanan alan/seçenek kimlikleri 400. Sıra dizi konumudur; dizide atlanan alanlar silinmez. Son düzenleyen kullanıcı bilgisi saklanır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "attributes": {
                      "$ref": "#/components/schemas/FinanceWriteResult"
                    }
                  },
                  "required": ["status", "attributes"]
                },
                "example": {
                  "status": true,
                  "attributes": {
                    "acknowledged": true,
                    "matchedCount": 0,
                    "modifiedCount": 0,
                    "upsertedCount": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "maxItems": 250,
                "items": {
                  "$ref": "#/components/schemas/FinanceWorkflowAttributeWrite"
                }
              },
              "example": [
                {
                  "title": "İşlem etiketi",
                  "type": "select",
                  "options": [
                    {
                      "title": "Kontrol edilecek",
                      "color": "amber"
                    }
                  ]
                }
              ]
            }
          }
        },
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/bank/ws/workflows/{workflowId}/attributes/{id}": {
      "delete": {
        "operationId": "financeDeleteBankWorkflowAttribute",
        "tags": ["Banka"],
        "summary": "İş akışı alanını sil",
        "description": "Alanı firma ve iş akışı kapsamında fiziksel siler; eksik/yabancı 404. Diğer tanımlar veya mali kayıtlar silinmez.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları veya kimlik geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları veya kimlik geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "64b000000000000000000001"
          }
        ],
        "x-muhasip-permission": {
          "module": "bank",
          "access": "write"
        }
      }
    },
    "/apps/calendar": {
      "get": {
        "operationId": "muhasipGetAppsCalendar",
        "tags": ["Ajanda ve takvim"],
        "summary": "Takvim, hatırlatma ve vadeleri listele",
        "description": "Firma kapsamındaki tarih aralığıyla kesişen bütün etkinlikleri getirir; aralığı tamamen çevreleyen etkinlikler dahildir. Kullanıcı bilgisi bulunmayan kayıt düşmez; actor.type unknown olabilir. Ayrıca hatırlatmalar ve en fazla 100 açık belge vadesi döner. Ters/geçersiz tarih veya şirket seçme parametresi 400.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreCalendarRow"
                      }
                    },
                    "reminders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreCalendarReminder"
                      }
                    },
                    "invoices": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreCalendarInvoice"
                      }
                    }
                  },
                  "required": ["status", "result", "reminders", "invoices"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "reminders": [],
                  "invoices": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Varsayılan bugün; yalnız gün verilirse gün başı."
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Varsayılan bugün; yalnız gün verilirse gün sonu dahil."
          }
        ],
        "x-muhasip-permission": {
          "module": "calendar",
          "access": "read"
        }
      },
      "post": {
        "operationId": "muhasipPostAppsCalendar",
        "tags": ["Ajanda ve takvim"],
        "summary": "Takvim etkinliği oluştur",
        "description": "Firma kapsamında etkinlik oluşturur. startDate endDate sonrasında olamaz; İşlemi yapan kullanıcı bilgisi actor alanındadır. Oluşturulan kayıt liste ve detaydan okunabilir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreCalendarRow"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "507f1f77bcf86cd799439011",
                    "title": "Ödeme görüşmesi",
                    "type": "meeting",
                    "startDate": "2026-10-18T09:00:00Z",
                    "endDate": "2026-10-18T10:00:00Z",
                    "allDay": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreCalendarWrite"
              },
              "example": {
                "title": "Ödeme görüşmesi",
                "type": "meeting",
                "startDate": "2026-10-18T09:00:00Z",
                "endDate": "2026-10-18T10:00:00Z",
                "allDay": false
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "calendar",
          "access": "write"
        }
      }
    },
    "/apps/calendar/google": {
      "get": {
        "operationId": "coreGetAppsCalendarGoogle",
        "tags": ["Ajanda ve takvim"],
        "summary": "Google takvim bağlantısının kayıt durumunu okuyun",
        "description": "Google takvim bağlantısının kayıtlı olup olmadığını boolean olarak döndürür. type gönderilmeyebilir veya status olabilir; başka bir değer 400 döndürür. Bağlantı oluşturma desteklenmez. Bu cevap bağlantının kayıt durumunu gösterir; eşitlemenin başarıyla tamamlandığı anlamına gelmez.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": false
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["status"]
            },
            "description": "Durum sorgusu için status gönderin."
          }
        ],
        "x-muhasip-permission": {
          "module": "calendar",
          "access": "read"
        }
      }
    },
    "/apps/calendar/{id}": {
      "put": {
        "operationId": "corePutAppsCalendarId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Takvim kaydını güncelleyin",
        "description": "Gönderilen izinli alanları günceller. type,allDay ve data desteklenir; description boş veya null ile temizlenebilir. Eksik alanlar korunur. Başlık boş olamaz; tarih aralığı mevcut/gönderilen tarihler birlikte değerlendirilir. Bulunamayan kayıt 404.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreWriteResult"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "matchedCount": 1,
                    "modifiedCount": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreCalendarUpdate"
              },
              "example": {
                "title": "Güncel ödeme görüşmesi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "calendar",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "coreDeleteAppsCalendarId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Takvim kaydını silin",
        "description": "Firma kapsamındaki etkinliği fiziksel siler. Geçersiz kimlik 400, bulunamayan kayıt 404; başarılı yanıtta silme sonucu vardır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreWriteResult"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "deletedCount": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "calendar",
          "access": "write"
        }
      },
      "get": {
        "operationId": "muhasipGetAppsCalendarId",
        "tags": ["Ajanda ve takvim"],
        "summary": "Takvim etkinliğini oku",
        "description": "Takvim etkinliğinin ayrıntısını okur. Kayıt bulunamazsa 404 döner. İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreCalendarRow"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "id": "507f1f77bcf86cd799439011",
                    "title": "Ödeme görüşmesi",
                    "actor": {
                      "type": "api",
                      "id": "507f1f77bcf86cd799439012",
                      "name": "Örnek entegrasyon"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          }
        ],
        "x-muhasip-permission": {
          "module": "calendar",
          "access": "read"
        }
      }
    },
    "/apps/earsiv": {
      "post": {
        "tags": ["GİB e-Arşiv"],
        "operationId": "paymentsConnectEArchive",
        "summary": "GİB e-Arşiv hesabını bağlayın",
        "description": "GİB kullanıcı/parolasını doğrular ve firma bağlantısını kaydeder. Cevap kullanıcı bilgilerini içerir; geçici token geri döndürülmez. userid en fazla 250,password en fazla 1024 karakterdir.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/PaymentsEArchiveLoginResult"
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "taxIDOrTRID": "ORNEK_VKN",
                    "title": "Örnek İşletme"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "406": {
            "description": "GİB hesabı veya oturumu hazır değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "GİB hesabı veya oturumu hazır değil."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "GİB hizmetinden güvenilir yanıt alınamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "GİB hizmetinden güvenilir yanıt alınamadı."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentsEArchiveLoginInput"
              },
              "example": {
                "userid": "GIB_KULLANICI_ADI",
                "password": "GIB_PAROLASI"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "earsiv",
          "access": "write"
        }
      },
      "delete": {
        "tags": ["GİB e-Arşiv"],
        "operationId": "paymentsDisconnectEArchive",
        "summary": "GİB bağlantısını kaldırın",
        "description": "Firmanın kayıtlı GİB bağlantı bilgisini temizler. Bağlantı kaldırılır; mevcut belgeler/görünüm ayarları silinmez. Sonraki adım: yeniden kullanım için POST /apps/earsiv.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; hata tipine göre 411 dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; hata tipine göre 411 dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "earsiv",
          "access": "write"
        }
      },
      "patch": {
        "tags": ["GİB e-Arşiv"],
        "operationId": "paymentsExecuteEArchiveAction",
        "summary": "GİB e-Arşiv işlemi yürütün",
        "description": "Yalnız logout,getUserData,query,html,download,cancel,verifyPhoneNumber,sign,send türleri kabul edilir. query için giden/itiraz ve sıralı iki ISO tarih; html/download için UUID ve signed boolean zorunludur. send ve verifyPhoneNumber Idempotency-Key ister. İptal belge tarihindeki hesaba ait listede doğrulanır; sağlayıcı iptali kesinleşmeden yerel bağ kaldırılmaz. sign yalnız GİB sonuc=1 ile başarı sayılır. send kesin ETTN sunamazsa 502 review_required döner; rastgele veya son listedeki belge UUID değeri kullanılmaz. İşlem takibi: yanıttaki operation makbuzunu saklayın; replayed=true cevabı ilk yanıtın bütün içeriğini tekrar etmez. İmzada aynı ETTN+OID farklı SMS koduyla tekrar kullanılırsa 409; kesin yanlış koddan sonra yeni SMS challenge/oid alınmalıdır.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PaymentsEArchiveActionResponse"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "406": {
            "description": "Hesap bulunamadı / GİB oturumu açılamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Hesap bulunamadı / GİB oturumu açılamadı."
                }
              }
            }
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentsEArchiveActionInput"
              },
              "examples": {
                "query": {
                  "summary": "query",
                  "value": {
                    "func": "query",
                    "type": "giden",
                    "date": ["2026-10-01", "2026-10-18"]
                  }
                },
                "html": {
                  "summary": "html",
                  "value": {
                    "func": "html",
                    "uuid": "00000000-0000-4000-8000-000000000001",
                    "signed": false
                  }
                },
                "download": {
                  "summary": "download",
                  "value": {
                    "func": "download",
                    "uuid": "00000000-0000-4000-8000-000000000001",
                    "signed": true
                  }
                },
                "send": {
                  "summary": "send",
                  "value": {
                    "func": "send",
                    "CustomerInfo": {
                      "Name": "Örnek İşletme",
                      "Address": "Örnek adres",
                      "District": "Çankaya",
                      "City": "Ankara"
                    },
                    "InvoiceType": "SATIS",
                    "issueDate": "2026-10-18",
                    "currencyCode": "TRY",
                    "description": "Örnek satış",
                    "total": {
                      "linesTotal": 100,
                      "linesAllowanceTotal": 0,
                      "taxesTotals": [
                        {
                          "taxCode": "0015",
                          "total": 20
                        }
                      ],
                      "payableAmount": 120
                    },
                    "lines": [
                      {
                        "name": "Örnek hizmet",
                        "quantity": 1,
                        "unitType": "C62",
                        "price": 100,
                        "total": 100,
                        "allowanceTotal": 0,
                        "KDVPercent": 20,
                        "KDVTotal": 20,
                        "taxes": [
                          {
                            "taxCode": "0015",
                            "total": 20,
                            "percent": 20
                          }
                        ]
                      }
                    ]
                  }
                },
                "verifyPhoneNumber": {
                  "summary": "verifyPhoneNumber",
                  "value": {
                    "func": "verifyPhoneNumber"
                  }
                },
                "sign": {
                  "summary": "sign",
                  "value": {
                    "func": "sign",
                    "smsCode": "123456",
                    "oid": "ORNEK_SMS_ISLEM_KIMLIGI",
                    "data": {
                      "ettn": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                },
                "cancel": {
                  "summary": "cancel",
                  "value": {
                    "func": "cancel",
                    "reason": "Örnek iptal gerekçesi",
                    "data": {
                      "ettn": "00000000-0000-4000-8000-000000000001",
                      "belgeTarihi": "18/10/2026"
                    }
                  }
                },
                "getUserData": {
                  "summary": "getUserData",
                  "value": {
                    "func": "getUserData"
                  }
                },
                "logout": {
                  "summary": "logout",
                  "value": {
                    "func": "logout"
                  }
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "earsiv",
          "access": "write",
          "selector": "earsivAction"
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "description": "func=send veya verifyPhoneNumber için zorunlu."
          }
        ]
      }
    },
    "/apps/earsiv/detail": {
      "get": {
        "tags": ["GİB e-Arşiv"],
        "operationId": "paymentsGetEArchiveDesign",
        "summary": "Belge görünümünü okuyun",
        "description": "Logo ve banka gösterim ayarlarını döndürür; GİB bağlantı hesabını döndürmez. Yalnız okuma. Kayıt yoksa result=null. Sonraki adım: gerekiyorsa POST /apps/earsiv/detail ile ayarları kaydedin.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "description": "Kayıt kimliği.",
                          "pattern": "^[a-fA-F0-9]{24}$"
                        },
                        "name": {
                          "type": "string",
                          "enum": ["earsiv"]
                        },
                        "type": {
                          "type": "string"
                        },
                        "status": {
                          "type": "boolean"
                        },
                        "data": {
                          "$ref": "#/components/schemas/PaymentsEArchiveDesign"
                        },
                        "createdDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "additionalProperties": true,
                      "nullable": true
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "600000000000000000000001",
                    "name": "earsiv",
                    "data": {
                      "logo": null,
                      "accounts": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; hata tipine göre 411 dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; hata tipine göre 411 dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "earsiv",
          "access": "read"
        }
      },
      "post": {
        "tags": ["GİB e-Arşiv"],
        "operationId": "paymentsSetEArchiveDesign",
        "summary": "Belge görünümünü kaydedin",
        "description": "Belge görünüm ayarlarını JSON gövdesiyle kaydeder. Gövde mevcut görünüm ayarlarını bütünüyle değiştirir; göndermeden önce kullanmak istediğiniz bütün alanları kontrol edin. Bu işlem GİB hesabı bağlamaz veya logo dosyası yüklemez. Kaydedilen ayarları GET /apps/earsiv/detail ile okuyun.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/PaymentsMutationResult"
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "matchedCount": 1,
                    "modifiedCount": 1,
                    "upsertedCount": 0,
                    "upsertedId": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; hata tipine göre 411 dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; hata tipine göre 411 dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentsEArchiveDesign"
              },
              "example": {
                "logo": null,
                "accounts": [
                  {
                    "name": "Örnek Banka",
                    "currency": "TRY",
                    "IBAN": "IBAN_DEGERI"
                  }
                ]
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "earsiv",
          "access": "write"
        }
      }
    },
    "/apps/earsiv/getUserData": {
      "get": {
        "operationId": "muhasipGetAppsEarsivGetuserdata",
        "tags": ["GİB e-Arşiv"],
        "summary": "GİB kullanıcı bilgilerini oku",
        "description": "Firmanın bağlı GİB hesabında oturum açıp kullanıcı bilgisini okur. Oturum çağrı sonunda kapatılır; token dönmez. Kullanıcı alanları üst düzeyde, status alanının yanında bulunur.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "taxIDOrTRID": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "taxIDOrTRID": "ORNEK_VKN",
                  "title": "Örnek İşletme"
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "406": {
            "description": "GİB hesabı veya oturumu hazır değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "GİB hesabı veya oturumu hazır değil."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "GİB hizmetinden güvenilir yanıt alınamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "GİB hizmetinden güvenilir yanıt alınamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "earsiv",
          "access": "read"
        }
      }
    },
    "/apps/invoice/api": {
      "post": {
        "operationId": "financeInvoiceAction",
        "tags": ["Fatura"],
        "summary": "Fatura işlemini yürüt",
        "description": "invoiceInfo, view, invoiceapproval ve invoicecancel işlem türlerini destekler. invoiceInfo, read izniyle seri ve belge şablonu seçeneklerini getirir. view taslak oluşturur ve Idempotency-Key gerektirir. Onay ve silme isteklerinde body, 1–100 benzersiz UUID veya {UUID} öğesi içermelidir; moduleType eInvoice veya eArchive olmalıdır. Gönderim sonucu doğrulanmadan belge gönderilmiş sayılmaz. Sonuç belirsizse 502, retryable=false ve işlem makbuzu dönebilir; yeni istek göndermeden mevcut işlemi inceleyin. replayed=true cevabı ilk yanıtın bütün içeriğini tekrarlamaz.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            },
                            "result": {
                              "$ref": "#/components/schemas/FinanceInvoiceApiResult"
                            }
                          },
                          "required": ["status", "result"],
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "result": {
                    "status": true,
                    "series": [
                      {
                        "label": "ABC",
                        "value": "ABC",
                        "isDefault": true
                      }
                    ],
                    "templates": [
                      {
                        "label": "Örnek şablon",
                        "value": "123e4567-e89b-42d3-a456-426614174000",
                        "isDefault": true
                      }
                    ],
                    "info": {
                      "aliases": [],
                      "moduleType": "eArchive"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Tür, UUID listesi veya alan geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Tür, UUID listesi veya alan geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceInvoiceApiRequest"
              },
              "examples": {
                "invoiceInfo": {
                  "summary": "Mükellef, seri ve şablon sorgusu",
                  "value": {
                    "type": "invoiceInfo",
                    "vkn": "0000000000",
                    "countriesCode": "TR"
                  }
                },
                "view": {
                  "summary": "Yeni e-belge taslağı",
                  "value": {
                    "type": "view",
                    "data": {
                      "CustomerInfo": {
                        "Name": "Örnek İşletme",
                        "TaxNumber": "0000000000",
                        "Address": "Örnek adres",
                        "District": "Çankaya",
                        "City": "Ankara",
                        "Country": "TÜRKİYE"
                      },
                      "InvoiceProfile": "EARSIVFATURA",
                      "InvoiceType": "SATIS",
                      "InvoiceSerieOrNumber": "ABC",
                      "TemplateUUID": "00000000-0000-4000-8000-000000000001",
                      "issueDate": "2026-10-18",
                      "currencyCode": "TRY",
                      "exchangeRate": 1,
                      "lines": [
                        {
                          "name": "Örnek hizmet",
                          "quantity": 1,
                          "price": 100,
                          "total": 100,
                          "taxes": [
                            {
                              "taxCode": "0015",
                              "percent": 20,
                              "total": 20
                            }
                          ]
                        }
                      ],
                      "total": {
                        "linesTotal": 100,
                        "linesAllowanceTotal": 0,
                        "taxesTotals": [
                          {
                            "taxCode": "0015",
                            "percent": 20,
                            "total": 20
                          }
                        ],
                        "payableAmount": 120
                      }
                    }
                  }
                },
                "invoiceapproval": {
                  "summary": "Mevcut taslağı gönder",
                  "value": {
                    "type": "invoiceapproval",
                    "moduleType": "eArchive",
                    "body": [
                      {
                        "UUID": "00000000-0000-4000-8000-000000000001"
                      }
                    ]
                  }
                },
                "invoicecancel": {
                  "summary": "Mevcut taslağı sil",
                  "value": {
                    "type": "invoicecancel",
                    "moduleType": "eArchive",
                    "body": ["00000000-0000-4000-8000-000000000001"]
                  }
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write",
          "selector": "invoiceApi"
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "description": "Yalnız type=view için zorunlu."
          }
        ]
      }
    },
    "/apps/invoice/cancel/{UUID}": {
      "delete": {
        "operationId": "financeCancelInvoice",
        "tags": ["Fatura"],
        "summary": "Faturayı iptal et",
        "description": "Satış veya e-Arşiv belgesini iptal eder; kabul sonrasında Muhasip’teki bağlı muhasebe, ödeme ve stok kayıtlarını günceller. eInvoice/Purchase iptali desteklenmez. Bağlı ödemede banka hareketi veya birden çok fatura mahsubu varsa 409 INVOICE_COMPLEX_PAYMENT_CANCEL_UNSUPPORTED döner ve iptal başlatılmaz. Desteklenmeyen bir kaynaktan oluşturulmuş faturada 409 INVOICE_EXCLUDED_SOURCE_CANCEL_UNSUPPORTED döner. Tamamlanma durumu belirsizse review_required oluşabilir; belgeyi tekrar iptal etmeyin. İşlem makbuzunu saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz. Aynı firmada çakışan banka onayı, fatura veya pazaryeri aktarımı 409 döndürebilir. Sonucu işlem durumu ve ilgili kayıtlarla doğrulayın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            }
                          },
                          "required": ["status"],
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "invoice.cancel",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {},
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "UUID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "123e4567-e89b-42d3-a456-426614174000"
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["eInvoice/Sale", "eArchive/Invoices"]
            },
            "description": "Faturanın kaynak kanalı.",
            "example": "eInvoice/Sale"
          }
        ],
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      }
    },
    "/apps/invoice/check/{UUID}": {
      "get": {
        "operationId": "financeImportInvoice",
        "tags": ["Fatura"],
        "summary": "Faturayı muhasebeye aktar",
        "description": "Belgeyi Muhasip muhasebe kayıtlarına aktarır. GET isteği veri değiştirir ve write izni gerektirir. path; eInvoice/Purchase, eInvoice/Sale veya eArchive/Invoices olmalıdır. Aynı UUID daha önce aktarılmışsa ikinci kayıt oluşturulmaz; işlem makbuzundaki resultId ile ilgili kaydı izleyin. Aynı belge için devam eden aktarım veya iptal 409 döndürebilir. İşlem makbuzunu saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz. Aynı firmada başka bir mali yazmayla çakışma 409 döndürebilir. Sonuç belirsizse yeni aktarım başlatmadan işlem durumunu inceleyin; okuma istekleri kullanılabilir.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            }
                          },
                          "required": ["status"],
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "invoice.import",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {
                      "resultId": "507f1f77bcf86cd799439011"
                    },
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "UUID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "İşlem yapılacak kayıt kimliği.",
            "example": "123e4567-e89b-42d3-a456-426614174000"
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["eInvoice/Purchase", "eInvoice/Sale", "eArchive/Invoices"]
            },
            "description": "Faturanın kaynak kanalı.",
            "example": "eInvoice/Purchase"
          }
        ],
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      }
    },
    "/apps/invoice/connect": {
      "post": {
        "operationId": "financeConnectInvoice",
        "tags": ["Fatura"],
        "summary": "Fatura hesabını bağla",
        "description": "apiKey değerini sağlayıcı kredi sorgusuyla doğrular; başarılıysa bağlantıyı kaydeder. apiKey boş olamaz ve en fazla 4096 karakterdir. Yanıt anahtarı geri döndürmez. Etkinlik bilgisi için GET info çağrısını kullanın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "apiKey geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "apiKey geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Sağlayıcı veya bağlantı doğrulaması reddedildi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı veya bağlantı doğrulaması reddedildi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem tamamlanamadı."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceInvoiceConnectRequest"
              },
              "example": {
                "apiKey": "EBELGE_HESAP_ANAHTARI"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      }
    },
    "/apps/invoice/credit": {
      "get": {
        "operationId": "financeGetInvoiceCredit",
        "tags": ["Fatura"],
        "summary": "Belge kredilerini oku",
        "description": "Bağlı e-belge hesabının modül bazında kalan kredi bilgisini döndürür. E-belge bağlantısı önceden kurulmuş olmalıdır.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Dönen sonucu kaydedin veya ilgili detay kaynağını okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinanceInvoiceCredit"
                      }
                    },
                    "isMuhasip": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status", "result", "isMuhasip"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": [
                    {
                      "EndDate": "2027-01-01T00:00:00Z",
                      "Name": "E-Fatura",
                      "ModuleID": 1,
                      "RemainingCredit": 250
                    }
                  ],
                  "isMuhasip": false
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "İş kuralı, bağlantı veya kaynak hizmet hatası. message, description veya result alanı gelebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "read"
        }
      }
    },
    "/apps/invoice/disconnect": {
      "post": {
        "operationId": "financeDisconnectInvoice",
        "tags": ["Fatura"],
        "summary": "Fatura bağlantısını kaldır",
        "description": "Firmanın e-belge bağlantı anahtarını temizler. Başka gövde alanı gerekmez.\n\nYan etkiler: Sonraki e-belge çağrılarının mevcut bağlantıyı kullanmasını engeller; önceden oluşturulmuş belgeleri iptal etmez.\n\nSonraki adım: GET /apps/invoice/info ile bağlantı durumunu okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      }
    },
    "/apps/invoice/info": {
      "get": {
        "operationId": "financeGetInvoiceInfo",
        "tags": ["Fatura"],
        "summary": "Fatura bağlantı bilgisini oku",
        "description": "Fatura bağlantısının güvenli durumunu okur; integrator,isCustomer,connected ve varsa firma bilgileri döner. apiKey veya gizli bağlantı değeri dönmez.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceInvoiceConnection"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "integrator": "nilvera",
                    "isCustomer": false,
                    "connected": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "read"
        }
      }
    },
    "/apps/invoice/settings": {
      "get": {
        "operationId": "financeGetInvoiceSettings",
        "tags": ["Fatura"],
        "summary": "Fatura ayarlarını oku",
        "description": "Mevcut e-fatura ayar nesnesini döndürür. Kayıt yoksa yalnız status:true gelebilir.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Değişiklik gerekecekse mevcut ayar yapısını koruyarak PUT /apps/invoice/settings çağırın.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceInvoiceSettings"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Ayarlar okunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "read"
        }
      },
      "put": {
        "operationId": "financeSetInvoiceSettings",
        "tags": ["Fatura"],
        "summary": "Fatura ayarlarını kaydet",
        "description": "Firma kapsamındaki e-fatura ayar nesnesini kaydeder. Gövde, GET ile okunan mevcut ayar yapısıdır; bu uç genel bir ayar anahtarı kataloğu sağlamaz.\n\nYan etkiler: Firmanın sonraki e-fatura işlemlerinde kullanılan ayarlarını değiştirir.\n\nSonraki adım: GET /apps/invoice/settings ile kaydı yeniden okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "required": ["status"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Ayarlar kaydedilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceInvoiceSettings"
              },
              "example": {}
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      }
    },
    "/apps/invoice/sync": {
      "get": {
        "operationId": "financeSyncInvoices",
        "tags": ["Fatura"],
        "summary": "Fatura aktarımını eşitle",
        "description": "Firma faturalarını Muhasip muhasebe kayıtlarıyla eşitler. GET isteği veri değiştirir; write izni ve Idempotency-Key zorunludur. type; eInvoice/Purchase, eInvoice/Sale veya eArchive/Invoices olmalıdır. Tarihler ISO biçiminde ve sıralı gönderilir; tarih verilmezse son 14 gün kullanılır. Bütün sayfalardaki belgeler değerlendirilir. Daha önce aktarılmış UUID için ikinci kayıt oluşturulmaz. Cevap TotalCount ve alt belge işlemlerinin operationIds değerlerini içerir. Bir aktarımın sonucu belirsizse eşitleme inceleme gerektirir ve başka mali yazmalar 409 döndürebilir. İşlem kimliklerini saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "TotalCount": {
                                  "type": "integer"
                                }
                              },
                              "additionalProperties": true
                            },
                            "operationIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": ["status", "result"],
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "result": {
                    "TotalCount": 0
                  },
                  "operationIds": [],
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "invoice.sync",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {},
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Belgenin kaynak kanalı. Kullanılabilir fatura kanalları eInvoice/Purchase, eInvoice/Sale ve eArchive/Invoices biçimindedir.",
              "enum": ["eInvoice/Purchase", "eInvoice/Sale", "eArchive/Invoices"]
            },
            "description": "Fatura kaynak kanalı.",
            "example": "eInvoice/Purchase"
          },
          {
            "name": "StartDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
            },
            "description": "Başlangıç tarihi; varsayılan son 14 günlük dönemin başlangıcı."
          },
          {
            "name": "EndDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
            },
            "description": "Bitiş tarihi; varsayılan dönemin sonu."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "description": "Bu yeni mali işlem için zorunludur."
          }
        ],
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      },
      "post": {
        "operationId": "financeQueueInvoiceSync",
        "tags": ["Fatura"],
        "summary": "Fatura aktarım filtresi kaydet",
        "description": "Verilen filtreyi firma kapsamındaki aktarım akışına kaydeder. Başarı yanıtı belge gönderiminin veya aktarımın tamamlandığını ifade etmez.\n\nYan etkiler: Yeni aktarım filtresi kaydı oluşturur; tekrarlanan POST için idempotency güvencesi yoktur.\n\nSonraki adım: Dönen id bilgisini saklayın ve aktarımın iş sonucu için ilgili belge/muhasebe kayıtlarını izleyin.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/FinanceInvoiceSyncRecord"
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "id": "64b000000000000000000001",
                    "filter": {
                      "type": "eInvoice/Purchase",
                      "StartDate": "2026-10-01",
                      "EndDate": "2026-10-18"
                    },
                    "createdDate": "2026-10-18T09:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinanceInvoiceSyncFilter"
              },
              "example": {
                "type": "eInvoice/Purchase",
                "StartDate": "2026-10-01",
                "EndDate": "2026-10-18"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "write"
        }
      }
    },
    "/apps/invoice/taxId/{taxId}": {
      "get": {
        "operationId": "financeLookupInvoiceTaxId",
        "tags": ["Fatura"],
        "summary": "E-fatura mükellef bilgisini sorgula",
        "description": "Vergi veya kimlik numarasına ait e-fatura mükellef/posta kutusu bilgisini sorgular. Sonuç bağlı sorgu hizmetinin nesnesidir.\n\nYan etkiler: Kalıcı mali kayıt oluşturmaz.\n\nSonraki adım: Dönen sonucu kaydedin veya ilgili detay kaynağını okuyun.",
        "responses": {
          "200": {
            "description": "İşlem tamamlandı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Bağlı hizmet veya firma ayarlarına göre ek alanlar değişebilir."
                    }
                  },
                  "required": ["status", "result"],
                  "additionalProperties": true
                },
                "example": {
                  "status": true,
                  "result": {
                    "ModuleType": "eInvoice",
                    "Aliases": [
                      {
                        "Name": "urn:mail:ornek@example.com"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "İş kuralı, bağlantı veya kaynak hizmet hatası. message, description veya result alanı gelebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "412": {
            "description": "İşlem tamamlanamadı. Genel message ve description alanları dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceBusinessError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taxId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Sorgulanacak vergi/kimlik numarası.",
            "example": "ORNEK_VERGI_NUMARASI"
          }
        ],
        "x-muhasip-permission": {
          "module": "invoice",
          "access": "read"
        }
      }
    },
    "/apps/marketplace": {
      "get": {
        "tags": ["Pazaryeri"],
        "summary": "Bağlantıları listele",
        "description": "Firmanın pazaryeri bağlantılarını listeler. data alanında title ve supplierId, hasCredentials alanında erişim bilgilerinin kayıtlı olup olmadığı bulunur. Bağlantı parolası cevapta verilmez. hasCredentials, sağlayıcı bağlantısının çalıştığını doğrulamaz.",
        "operationId": "appsMarketplaceList",
        "parameters": [],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "HTTP işleminin başarı durumu."
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppsMarketplace"
                      }
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "read"
        }
      },
      "post": {
        "tags": ["Pazaryeri"],
        "summary": "Trendyol bağlantısı kur",
        "description": "Trendyol bağlantısını doğrular ve oluşturur. data.username,password,supplierId gereklidir; başlık opsiyoneldir. status varsayılan true. Cari verilirse firmada doğrulanır. Cevap yalnız başarıdır; yeni kimliği listeden alın.",
        "operationId": "appsMarketplaceCreate",
        "parameters": [],
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppsMarketplaceWrite"
              },
              "example": {
                "marketplace": "trendyol",
                "status": true,
                "data": {
                  "title": "Örnek Mağaza",
                  "username": "ORNEK_API_ANAHTARI",
                  "password": "ORNEK_API_PAROLASI",
                  "supplierId": "ORNEK_SATICI"
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      }
    },
    "/apps/marketplace/order": {
      "get": {
        "tags": ["Pazaryeri"],
        "summary": "Sipariş sorgula ve yerel kayıt oluştur",
        "description": "Trendyol siparişlerini sorgular ve kaydeder; write izni gerekir. date iki YYYY-MM-DD gününden oluşur, başlangıç gün başı/bitiş gün sonu +03:00 uygulanır. page varsayılan1,en fazla10000; sayfa boyutu sabit50. Sağlayıcı hatası boş başarı yerine 502 döner.",
        "operationId": "appsMarketplaceOrdersQuery",
        "parameters": [
          {
            "name": "marketplaceId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "Bağlantı kimliği."
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date"
              },
              "minItems": 2,
              "maxItems": 2
            },
            "description": "İki günlük tarih dizisi; date[0] başlangıç, date[1] bitiş. Köşeli parantezli alan adlarıyla gönderin."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "maximum": 10000
            },
            "description": "1 tabanlı sayfa; sağlayıcıya page-1 iletilir."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sağlayıcının sipariş durum filtresi; sabit bir doğrulama listesi uygulanmaz."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "HTTP işleminin başarı durumu."
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppsMarketplaceOrderListItem"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      }
    },
    "/apps/marketplace/order/{id}": {
      "get": {
        "tags": ["Pazaryeri"],
        "summary": "Kayıtlı sipariş detayı",
        "description": "Firma siparişini ve bağlı faturanın e-belge bilgisini okur. Bulunamayan kayıt 404; bağlı fatura yoksa invoice=null.",
        "operationId": "appsMarketplaceOrderDetail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "HTTP işleminin başarı durumu."
                    },
                    "result": {
                      "$ref": "#/components/schemas/AppsMarketplaceOrder"
                    },
                    "invoice": {
                      "type": "object",
                      "properties": {},
                      "description": "Bağlı faturanın e-belge bilgisi; fatura/ilişki yoksa null.",
                      "nullable": true
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "507f1f77bcf86cd799439011",
                    "marketplaceId": "507f1f77bcf86cd799439012",
                    "marketplace": "trendyol",
                    "status": true,
                    "transactionId": null,
                    "sendInvoice": false,
                    "invoiceUrl": null,
                    "data": {}
                  },
                  "invoice": null
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "read"
        }
      },
      "put": {
        "tags": ["Pazaryeri"],
        "summary": "Sağlayıcı sipariş durumunu değiştir",
        "description": "Siparişin bütün satırlarının durumunu Picking, Invoiced, Shipped, Delivered veya unsupplied olarak günceller. unsupplied için pozitif tam sayı reasonId zorunludur. Sağlayıcı reddinde 422, belirsiz sonuçta 502 döner. Fatura iptali yapmaz. Farklı durumlara geçiş ayrı işlemdir; aynı sipariş için eş zamanlı durum değişikliği 409 döndürebilir. İşlem makbuzunu saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz.",
        "operationId": "appsMarketplaceOrderUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["Picking", "Invoiced", "Shipped", "Delivered", "unsupplied"]
            },
            "description": "Sağlayıcı durumu; `unsupplied` özel olarak tedarik edilememe isteği oluşturur."
          },
          {
            "name": "reasonId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "status=unsupplied durumunda zorunlu pozitif tam sayı sağlayıcı neden kodu."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean",
                              "description": "HTTP işleminin başarı durumu."
                            },
                            "result": {
                              "$ref": "#/components/schemas/AppsMarketplaceProviderResult"
                            }
                          },
                          "required": ["status", "result"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "result": {
                    "status": true
                  },
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "marketplace.status.Picking",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {},
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      },
      "delete": {
        "tags": ["Pazaryeri"],
        "summary": "Siparişi işlem listesinden çıkar",
        "description": "Yerel sipariş status alanını false yapar; bulunamayan kayıt 404. Sağlayıcı siparişini veya faturayı silmez.",
        "operationId": "appsMarketplaceOrderIgnore",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      },
      "patch": {
        "tags": ["Pazaryeri"],
        "summary": "Siparişi Muhasip faturasına aktar",
        "description": "Siparişi Muhasip faturasına aktarır. Mevcut transactionId varsa yeniden fatura oluşturmaz. Gerektiğinde depo, cari ve ürün kayıtları da oluşturulur. E-belge gönderimi veya tahsilat yapılmaz. Desteklenen para birimi TRY’dir. Kısmi veya belirsiz sonuçta yeni aktarım başlatmadan işlem durumunu ve ilgili kayıtları inceleyin. Aynı firmada çakışan banka onayı, fatura veya pazaryeri aktarımı 409 döndürebilir. İşlem makbuzunu saklayın; replayed=true ilk cevabın bütün içeriğini tekrarlamaz.",
        "operationId": "appsMarketplaceOrderTransfer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean",
                              "description": "HTTP işleminin başarı durumu."
                            },
                            "transactionId": {
                              "type": "string",
                              "description": "Oluşturulan Muhasip fatura kimliği.",
                              "pattern": "^[a-fA-F0-9]{24}$"
                            }
                          },
                          "required": ["status", "transactionId"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "transactionId": "507f1f77bcf86cd799439013",
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "marketplace.transfer",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {
                      "transactionId": "507f1f77bcf86cd799439013"
                    },
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      }
    },
    "/apps/marketplace/{id}": {
      "put": {
        "tags": ["Pazaryeri"],
        "summary": "Bağlantıyı güncelle",
        "description": "Mevcut bağlantıyı günceller. data kısmi olabilir; gönderilmeyen erişim alanları korunur. Sağlayıcı ve cari doğrulanır; bulunmayan bağlantı 404. Her çağrı sağlayıcı erişimini yeniden doğrular.",
        "operationId": "appsMarketplaceUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppsMarketplaceUpdate"
              },
              "example": {
                "marketplace": "trendyol",
                "status": true,
                "data": {
                  "title": "Örnek Mağaza",
                  "username": "ORNEK_API_ANAHTARI",
                  "password": "ORNEK_API_PAROLASI",
                  "supplierId": "ORNEK_SATICI"
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      },
      "delete": {
        "tags": ["Pazaryeri"],
        "summary": "Bağlantıyı kaldır",
        "description": "Firma bağlantısını siler; bulunmayan kimlik 404. Sipariş veya fatura kayıtlarını silmez.",
        "operationId": "appsMarketplaceDelete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      }
    },
    "/apps/marketplace/{id}/summary": {
      "get": {
        "tags": ["Pazaryeri"],
        "summary": "Siparişleri getir ve kaydet",
        "description": "Etkin bağlantıdan en fazla 200 sipariş alır ve yeni siparişleri kaydeder. GET isteği veri değiştirir ve write izni gerektirir. Sağlayıcı hatasında 502, kayıt hatasında 503 döner. Belirli tarih aralığı ve sayfalama ile sipariş almak için sipariş sorgulama işlemini kullanın.",
        "operationId": "appsMarketplaceSummary",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "description": "İşlemin hedef kayıt kimliği."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "HTTP işleminin başarı durumu."
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "boolean"
                        },
                        "size": {
                          "type": "integer"
                        },
                        "message": {}
                      },
                      "required": ["status"]
                    },
                    "orders": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {},
                            "description": "Sağlayıcı siparişi, bağlantı ve firma kimliklerini içeren aktarım öğesi."
                          }
                        },
                        {
                          "type": "object",
                          "properties": {},
                          "description": "Sağlayıcı başarısızlığında boş nesne olabilir."
                        }
                      ]
                    }
                  },
                  "required": ["status", "result", "orders"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "status": true,
                    "size": 0
                  },
                  "orders": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Firma kapsamında kayıt bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Firma kapsamında kayıt bulunamadı."
                }
              }
            }
          },
          "422": {
            "description": "Mali veri veya sağlayıcı reddi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Mali veri veya sağlayıcı reddi."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "Sağlayıcı/işlem sonucu kesin değil.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Sağlayıcı/işlem sonucu kesin değil."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt işlemi tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt işlemi tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "marketplace",
          "access": "write"
        }
      }
    },
    "/apps/oim": {
      "get": {
        "tags": ["Online işlemler"],
        "summary": "Online işlem ayarları",
        "description": "Firmanın online işlem ayarlarını getirir. Henüz kurulum yapılmamışsa result=null döner.",
        "operationId": "appsOimInfo",
        "parameters": [],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "HTTP işleminin başarı durumu."
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Online işlem ekranı başlığı; yeni kayıtta gereklidir."
                        },
                        "description": {
                          "type": "string"
                        },
                        "domain": {
                          "type": "string",
                          "description": "En az 4 karakterlik adres etiketi; etkinleştirmede gereklidir."
                        },
                        "status": {
                          "type": "boolean",
                          "description": "Online işlemleri etkinleştirir.",
                          "default": false
                        },
                        "paymentStatus": {
                          "type": "boolean",
                          "description": "Online ödeme görünürlüğü.",
                          "default": false
                        },
                        "publicPayment": {
                          "type": "boolean",
                          "description": "Üyeliksiz ödeme görünürlüğü.",
                          "default": false
                        },
                        "logo": {
                          "type": "string"
                        },
                        "auth": {
                          "type": "string",
                          "description": "Giriş yöntemi yapılandırması; uç sabit enum doğrulamaz.",
                          "default": "vknCode"
                        },
                        "modules": {
                          "type": "array",
                          "items": {}
                        },
                        "companiesId": {
                          "type": "string",
                          "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
                          "pattern": "^[a-fA-F0-9]{24}$"
                        },
                        "updateTime": {
                          "type": "string",
                          "description": "ISO 8601 tarih ve saat.",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "ISO 8601 tarih ve saat.",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "ISO 8601 tarih ve saat.",
                          "format": "date-time"
                        }
                      },
                      "nullable": true
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": null
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "503": {
            "description": "Online işlem bilgisi okunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Online işlem bilgisi okunamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "oim",
          "access": "read"
        }
      },
      "post": {
        "tags": ["Online işlemler"],
        "summary": "Online işlemleri yapılandır",
        "description": "status boolean olarak açıkça gönderilmelidir. İlk kayıtta title ve geçerli domain gerekir; status=false ilk kurulum desteklenir. Güncellemede domain atlanırsa mevcut adres korunur; kapatma domain silmez. Yalnız belgelenmiş alanlar kabul edilir; modules en fazla 100 kısa metindir. Domain çakışması 409.",
        "operationId": "appsOimUpdate",
        "parameters": [],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "Alan, domain veya status geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Alan, domain veya status geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "Domain başka firmada kullanılıyor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Domain başka firmada kullanılıyor."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "503": {
            "description": "Kayıt tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kayıt tamamlanamadı."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppsOimWrite"
              },
              "example": {
                "title": "Örnek Firma Online İşlemler",
                "domain": "ornekfirma",
                "status": true,
                "paymentStatus": false,
                "publicPayment": false,
                "modules": []
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "oim",
          "access": "write"
        }
      }
    },
    "/apps/oim/domain": {
      "get": {
        "tags": ["Online işlemler"],
        "summary": "Adres etiketi uygunluğunu kontrol et",
        "description": "Adres etiketinin 4–63 karakterli küçük harf/rakam/tire biçimini, ayrılmış sözcükleri ve başka firmada kullanılmasını kontrol eder. Geçersiz 400, kullanımda 409. Başarı rezervasyon yapmaz.",
        "operationId": "appsOimDomainCheck",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "En az 4 karakterlik aday etiket; ayrılmış/uygunsuz sözcükler kabul edilmez."
          }
        ],
        "responses": {
          "200": {
            "description": "İşlem tamamlandı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "Domain geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Domain geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "Domain kullanılıyor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Domain kullanılıyor."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "503": {
            "description": "Kontrol tamamlanamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "Kontrol tamamlanamadı."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "oim",
          "access": "read"
        }
      }
    },
    "/apps/operations/{operationId}": {
      "get": {
        "operationId": "muhasipGetAppsOperationsOperationid",
        "tags": ["İşlem takibi"],
        "summary": "Mali işlem durumunu oku",
        "description": "İşlemi yalnız kimlikten çözülen firma kapsamında okur. İşlemin ait olduğu modülde read veya write izni yeterlidir; API yöneticisi modül iznini geçebilir. İşlemi yeniden başlatmaz ve kilit açmaz.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "$ref": "#/components/schemas/ApiOperation"
                    }
                  },
                  "required": ["status", "result"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "invoice.import",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {
                      "resultId": "507f1f77bcf86cd799439011"
                    },
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "İşlem bulunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem bulunamadı."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "503": {
            "description": "İşlem durumu okunamadı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem durumu okunamadı."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "description": ""
          }
        ],
        "x-muhasip-permission": {
          "module": "operations",
          "access": "read",
          "deferred": true
        }
      }
    },
    "/apps/pos": {
      "get": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsListPosAccounts",
        "summary": "POS hesaplarını listeleyin",
        "description": "Arşivlenmemiş POS hesaplarını listeler. isDefault=true varsayılan hesabı, false ek hesapları getirir. Parametre gönderilmezse varsayılan hesap listelenir. status yalnız true veya false olabilir. Bağlantı anahtarları cevapta verilmez.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "İsteğin başarı durumu."
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentsPosAccount"
                      }
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": [
                    {
                      "_id": "600000000000000000000001",
                      "isDefault": true,
                      "isApproval": true,
                      "status": true,
                      "installments": {
                        "1": true
                      },
                      "commission": {
                        "1": 0
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "isDefault",
            "in": "query",
            "required": false,
            "description": "true varsayılan hesabı, false ek hesapları getirir.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "İsteğe bağlı aktiflik filtresi.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "pos",
          "access": "read"
        }
      },
      "put": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsSetDefaultPos",
        "summary": "Muhasip POS başvurusunu yönetin",
        "description": "status=false varsayılan POS ve firma tahsilat özelliğini pasifleştirir; başvuru veya Idempotency-Key gerekmez. Diğer çağrılarda Idempotency-Key ve OWNER_NAME,OWNER_SURNAME,OWNER_IDENTITY_NUMBER,GSM,BANK_NAME,IBAN zorunludur. Başvuru kabulünden sonra hesap onaysız/aktif duruma alınır. Sağlayıcı kabulü nihai POS onayı değildir. İşlem takibi: yanıttaki operation makbuzunu saklayın; replayed=true cevabı ilk yanıtın bütün içeriğini tekrar etmez.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "pos.seller",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {},
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Yalnız false kapatır; yok/true başvuru/güncelleme yapar.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "description": "status=false dışındaki başvuru/etkinleştirmede zorunlu."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "OWNER_NAME": {
                    "type": "string",
                    "description": "Yetkilinin adı.",
                    "minLength": 1
                  },
                  "OWNER_SURNAME": {
                    "type": "string",
                    "description": "Yetkilinin soyadı.",
                    "minLength": 1
                  },
                  "OWNER_IDENTITY_NUMBER": {
                    "type": "string",
                    "description": "Yetkili kimlik numarası; örnekte yer tutucu kullanılmıştır.",
                    "minLength": 1
                  },
                  "GSM": {
                    "type": "string",
                    "description": "Telefon.",
                    "minLength": 1
                  },
                  "BANK_NAME": {
                    "type": "string",
                    "description": "Banka adı.",
                    "minLength": 1
                  },
                  "IBAN": {
                    "type": "string",
                    "description": "Tahsilat hesabı IBAN değeri.",
                    "minLength": 1
                  }
                },
                "additionalProperties": true,
                "description": "status=false ile kapatmada gövde gerekmez. Başvuruda aşağıdaki altı alanın tamamı boş olmayan string olmalıdır."
              },
              "example": {
                "OWNER_NAME": "YETKILI_ADI",
                "OWNER_SURNAME": "YETKILI_SOYADI",
                "OWNER_IDENTITY_NUMBER": "KIMLIK_NUMARASI",
                "GSM": "TELEFON_NUMARASI",
                "BANK_NAME": "BANKA_ADI",
                "IBAN": "IBAN_DEGERI"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        }
      },
      "post": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsCreatePosAccount",
        "summary": "Ek POS hesabı kaydedin",
        "description": "Ek banka veya POS hesabı oluşturur. Sağlayıcı bağlantısını doğrulamaz. Hesap status=true ile kaydedilir; varsayılan taksit haritası {\"1\":true}, komisyon haritası {\"1\":0} değerindedir. Cevap yeni hesap kimliğini içermez; ek hesapları GET /apps/pos?isDefault=false ile listeleyin.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Hesap adı."
                  },
                  "bankCode": {
                    "type": "string",
                    "description": "Banka kodu; güncelleme işleminde kullanılmaz."
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Hesaba özgü yapılandırma; ortak zorunlu alt alan listesi yoktur."
                  },
                  "commission": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Taksit adedi anahtarı ve komisyon oranı."
                  },
                  "installments": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "description": "Taksit adedi anahtarı ve kullanım izni."
                  },
                  "status": {
                    "type": "boolean",
                    "description": "Yalnız PUT /apps/pos/{id} tarafından kullanılır."
                  }
                },
                "additionalProperties": true
              },
              "example": {
                "name": "Örnek POS",
                "bankCode": "000",
                "installments": {
                  "1": true
                },
                "commission": {
                  "1": 0
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        }
      }
    },
    "/apps/pos/default": {
      "get": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsGetDefaultPos",
        "summary": "Varsayılan POS hesabını okuyun",
        "description": "Firmaya ait arşivlenmemiş varsayılan POS için data işletme özeti,isApproval,status döner. Bağlantı sırrı yoktur; kayıt yoksa result=null olabilir.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "description": "Kayıt kimliği.",
                          "pattern": "^[a-fA-F0-9]{24}$"
                        },
                        "data": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Başvuru verileri; kişisel alanlar içerebilir."
                        },
                        "isApproval": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": true,
                      "nullable": true
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "600000000000000000000001",
                    "isApproval": true,
                    "status": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "pos",
          "access": "read"
        }
      }
    },
    "/apps/pos/installments": {
      "get": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsGetPosInstallments",
        "summary": "POS taksit seçeneklerini okuyun",
        "description": "Hesabın izinli taksit ve komisyon haritalarını verir. Yalnız okuma. Yalnız izinli seçenekleri ödeme bağlantısında kullanın. Onaysız/eksik hesap veya hesaplama hatası isApproval=false ve boş haritalarla başarılı HTTP cevabı üretebilir.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "isApproval": {
                          "type": "boolean"
                        },
                        "installments": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          },
                          "description": "Taksit adedi anahtarı ve kullanım izni."
                        },
                        "commission": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "number"
                          },
                          "description": "Taksit adedi anahtarı ve komisyon oranı."
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "isApproval": true,
                    "installments": {
                      "1": true,
                      "3": false
                    },
                    "commission": {
                      "1": 2.5
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "pos",
          "access": "read"
        }
      }
    },
    "/apps/pos/link": {
      "post": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsCreatePaymentLink",
        "summary": "Ödeme bağlantısı kaydı oluşturun",
        "description": "Aktif/onaylı varsayılan POS için tahsilat kaydı oluşturur; karttan çekim yapmaz. Idempotency-Key zorunludur. Cari verilirse firma sahipliği doğrulanır; komisyon hesapları geçerli olmalıdır. Cevap orderId,paymentId ve işlem makbuzudur; URL dönmez. Tekrarda güvenli resultId makbuzu kullanılır. İşlem takibi: yanıttaki operation makbuzunu saklayın; replayed=true cevabı ilk yanıtın bütün içeriğini tekrar etmez.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            },
                            "orderId": {
                              "type": "string",
                              "description": "Kayıt kimliği."
                            },
                            "paymentId": {
                              "type": "string",
                              "description": "Kayıt kimliği."
                            }
                          },
                          "additionalProperties": true,
                          "required": ["status", "orderId", "paymentId"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "orderId": "600000000000000000000002",
                  "paymentId": "600000000000000000000001",
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "pos.link",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {
                      "resultId": "507f1f77bcf86cd799439011",
                      "orderId": "600000000000000000000002"
                    },
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contactsId": {
                    "type": "string",
                    "nullable": true,
                    "description": "İlişkili cari kimliği."
                  },
                  "description": {
                    "type": "string",
                    "description": "Ödeme açıklaması."
                  },
                  "changeable": {
                    "type": "boolean",
                    "description": "Ödeme sayfasında tutar düzenleme.",
                    "default": false
                  },
                  "amount": {
                    "type": "number",
                    "description": "Pozitif ve sonlu JSON sayısı; sayısal metin kabul edilmez.",
                    "minimum": 0,
                    "exclusiveMinimum": true
                  },
                  "installments": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "description": "Taksit adedi anahtarı ve kullanım izni."
                  },
                  "commissions": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Taksit adedi anahtarı ve komisyon oranı."
                  }
                },
                "additionalProperties": false,
                "required": ["description", "amount"]
              },
              "example": {
                "description": "Örnek satış tahsilatı",
                "amount": 1200,
                "changeable": false,
                "installments": {
                  "1": true
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            },
            "description": "Bu yeni mali işlem için zorunludur."
          }
        ]
      }
    },
    "/apps/pos/transactions": {
      "get": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsListPaymentTransactions",
        "summary": "Tahsilat hareketlerini listeleyin",
        "description": "Tahsilat bağlantılarını kullanım ve ödeme durumuna göre listeler. Yalnız okuma. Dönen kimlikleri sonraki ilgili çağrıda kullanın. Artan oluşturulma tarihine göre sıralanır. Liste yanıtında tutar, açıklama, tarih, cari, dealer, isApi ve changeable alanları seçilir; ödeme durum alanları detaydan okunur.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "İsteğin başarı durumu."
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentsPosTransactionListRow"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "posAccountsId",
            "in": "query",
            "required": false,
            "description": "POS hesabı filtresi.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "0 kullanılmamış; 1 başarılı; 2 başarısız; 3 iade/iptal edilmiş. Yoksa kullanılmış ve iade edilmemiş.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Tarih aralığı; date[0], date[1] olarak gönderin. Örnek kodlama: date[0]=2026-10-01&date[1]=2026-10-18.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date"
              },
              "minItems": 2,
              "maxItems": 2
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Sayfa boyutu; güvenli kullanım 1–50. Kod 50 üstünü düzenli biçimde sınırlamaz.",
            "schema": {
              "type": "integer",
              "default": 25
            }
          },
          {
            "name": "currentPage",
            "in": "query",
            "required": false,
            "description": "Sayfa numarası; bu uç page kullanmaz.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "pos",
          "access": "read"
        }
      }
    },
    "/apps/pos/transactions/{id}": {
      "get": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsGetPaymentTransaction",
        "summary": "Tahsilat detayını okuyun",
        "description": "Tahsilatın ayrıntısını, hesaplanmış komisyon ve taksit bilgilerini ve işlem geçmişini okur. Kayıt bulunamazsa 404 döner. mailTrack alanı null değerindedir.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "İsteğin başarı durumu."
                    },
                    "result": {
                      "description": "Liste yalnız seçili alanları, detay ek ödeme ve hesaplama alanlarını döndürür.",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PaymentsPosTransaction"
                        }
                      ]
                    },
                    "mailTrack": {
                      "type": "string",
                      "nullable": true,
                      "description": "Kayıt kimliği."
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "600000000000000000000001",
                    "amount": 1200,
                    "dealer": 1170,
                    "commission": 30,
                    "approval": false,
                    "status": false,
                    "returnStatus": false,
                    "calcData": []
                  },
                  "mailTrack": null
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "pos",
          "access": "read"
        }
      },
      "delete": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsDeleteUnusedPaymentLink",
        "summary": "Kullanılmamış bağlantıyı silin",
        "description": "Yalnız approval=false bağlantıyı siler; tahsil edilmiş ödemeyi iptal veya iade etmez. Bağlantı kaydını siler; geri alınmaz. deletedCount=1 olduğunu doğrulayın; 0 ise kaydın durumunu detaydan okuyun.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "description": "İsteğin başarı durumu."
                    },
                    "result": {
                      "$ref": "#/components/schemas/PaymentsDeleteResult"
                    }
                  },
                  "additionalProperties": true,
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "acknowledged": true,
                    "deletedCount": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "411": {
            "description": "Bazı istisnalar HTTP 411 olarak iletilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "412": {
            "description": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi; bazı hata nesneleri 411 olarak dönebilir."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        }
      },
      "patch": {
        "operationId": "muhasipPatchAppsPosTransactionsId",
        "tags": ["POS ve tahsilat"],
        "summary": "Tahsilatı iptal et",
        "description": "Yalnız bugün onaylanmış, başarılı ve henüz iade edilmemiş firma tahsilatı iptal edilir. Sağlayıcı kabulünden sonra yerel iade durumu ve işlem geçmişi güncellenir. İşlem korumalıdır; belirsiz cevapta 502/503 ve işlem makbuzu değerlendirilir. İşlem takibi: yanıttaki operation makbuzunu saklayın; replayed=true cevabı ilk yanıtın bütün içeriğini tekrar etmez.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "boolean"
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": ["status"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "$ref": "#/components/schemas/ApiOperation"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ApiOperation"
                              }
                            },
                            "replayed": {
                              "type": "boolean"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ApiOperationReplay"
                    }
                  ],
                  "description": "İlk çağrı kaynağa özgü yanıtı ve işlem makbuzunu; tamamlanmış tekrar yalnız güvenli makbuzu ve uygun sonuç kimliklerini döndürür."
                },
                "example": {
                  "status": true,
                  "message": "İşlem İptal Edildi",
                  "operation": {
                    "operationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "type": "pos.cancel",
                    "state": "succeeded",
                    "reviewRequired": false,
                    "retryable": false,
                    "result": {
                      "resultId": "507f1f77bcf86cd799439011"
                    },
                    "statusUrl": "/apps/operations/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "createdAt": "2026-10-18T09:00:00.000Z",
                    "updatedAt": "2026-10-18T09:00:01.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_IN_PROGRESS",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "422": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_REJECTED",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          },
          "502": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "UPSTREAM_RESULT_UNCERTAIN",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          },
          "503": {
            "description": "İşlem koruması veya mali sonuç; kaynak varyantının koşullarını değerlendirin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperationError"
                },
                "example": {
                  "status": false,
                  "code": "OPERATION_RECORD_UNAVAILABLE",
                  "message": "İşlem sonucunu durum adresinden kontrol ediniz.",
                  "retryable": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          }
        ],
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        }
      }
    },
    "/apps/pos/{id}": {
      "put": {
        "tags": ["POS ve tahsilat"],
        "operationId": "paymentsUpdatePosAccount",
        "summary": "Ek POS hesabını güncelleyin",
        "description": "Yalnız firmaya ait arşivlenmemiş ek POS hesabının name,status,data,commission,installments alanlarını günceller. Varsayılan veya bulunamayan hesap 404. status boolean olmalıdır.",
        "responses": {
          "200": {
            "description": "İşlem sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string",
                      "description": "Kayıt kimliği."
                    },
                    "amount": {
                      "type": "number"
                    },
                    "createdDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": {
                      "type": "string"
                    },
                    "contactsId": {
                      "description": "İlişkili cari; bulunamazsa null olabilir.",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PaymentsContactBrief"
                        }
                      ]
                    },
                    "dealer": {
                      "type": "number"
                    },
                    "isApi": {
                      "type": "boolean"
                    },
                    "changeable": {
                      "type": "boolean"
                    },
                    "approval": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "boolean",
                      "description": "Ödeme sonucu; üst düzey status alanından farklıdır."
                    },
                    "returnStatus": {
                      "type": "boolean"
                    },
                    "payable": {
                      "type": "number"
                    },
                    "orderId": {
                      "type": "string",
                      "description": "Kayıt kimliği."
                    },
                    "installment": {
                      "type": "integer"
                    },
                    "commission": {
                      "type": "number"
                    },
                    "calcData": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentsPosCalculation"
                      }
                    },
                    "approvedDate": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "returnDate": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    }
                  },
                  "additionalProperties": true
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Hesap adı."
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Hesaba özgü yapılandırma; ortak zorunlu alt alan listesi yoktur."
                  },
                  "commission": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Taksit adedi anahtarı ve komisyon oranı."
                  },
                  "installments": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "description": "Taksit adedi anahtarı ve kullanım izni."
                  },
                  "status": {
                    "type": "boolean",
                    "description": "Yalnız PUT /apps/pos/{id} tarafından kullanılır."
                  }
                },
                "additionalProperties": true
              },
              "example": {
                "name": "Güncellenmiş POS",
                "status": true,
                "installments": {
                  "1": true
                },
                "commission": {
                  "1": 2.5
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "muhasipDeleteAppsPosId",
        "tags": ["POS ve tahsilat"],
        "summary": "Ek POS hesabını arşivle",
        "description": "Firmaya ait ek POS hesabını archived=true,status=false yapar. Varsayılan hesap 409 DEFAULT_POS_ARCHIVE_FORBIDDEN ile reddedilir; varsayılanı PUT /apps/pos?status=false ile pasifleştirin. Arşivlenen hesap listelerde görünmez.",
        "responses": {
          "200": {
            "description": "İşlem cevabı; örnek temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": ""
          }
        ],
        "x-muhasip-permission": {
          "module": "pos",
          "access": "write"
        }
      }
    },
    "/apps/todo/labels": {
      "get": {
        "operationId": "coreGetAppsTodoLabels",
        "tags": ["Görev yönetimi"],
        "summary": "Etiketler kaynağını listeleyin",
        "description": "Firma kapsamındaki kayıtları listeler. Kimlik filtreleri sayım ve sonuç için aynı kapsamda değerlendirilir. Başlık araması düz metindir. Proje/görevde page=1,limit=50; üst sınır 250. Etiket/durum listeleri sayfalamasızdır. Kayıtlar oluşturulma zamanı azalan; durumlar order artan sıralıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreTodoLabelsRecord"
                      }
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "Etiket kapsamı; verilmezse tüm kapsamlar.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "read"
        }
      },
      "post": {
        "operationId": "corePostAppsTodoLabels",
        "tags": ["Görev yönetimi"],
        "summary": "Etiketler kaydı oluşturun",
        "description": "Firma kapsamında yeni kayıt oluşturur. İlişkili kullanıcı, proje, durum, etiket, cari ve işlem kimlikleri firmada doğrulanır. Tekrar POST isteği yeni kayıt oluşturabilir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreTodoLabelsRecord"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme takibi"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoLabelsCreate"
              },
              "example": {
                "title": "Ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/labels/{id}": {
      "patch": {
        "operationId": "corePatchAppsTodoLabelsId",
        "tags": ["Görev yönetimi"],
        "summary": "Etiketler kaydını güncelleyin",
        "description": "Yalnız gönderilen izinli alanları günceller. Gövde boş olamaz; title gönderilirse boş/null olamaz. İlişkiler firma kapsamında doğrulanır; bulunmayan kayıt 404. Değişiklikler kayıt geçmişine eklenir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoLabelsUpdate"
              },
              "example": {
                "title": "Güncel ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "coreDeleteAppsTodoLabelsId",
        "tags": ["Görev yönetimi"],
        "summary": "Etiketler kaydını silin",
        "description": "Firma kapsamındaki kaydı fiziksel siler; bulunamayan kayıt 404. İlişkili kayıtlar zincirleme silinmez; arşivleme isArchived güncellemesinden ayrıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/projects": {
      "get": {
        "operationId": "coreGetAppsTodoProjects",
        "tags": ["Görev yönetimi"],
        "summary": "Projeler kaynağını listeleyin",
        "description": "Firma kapsamındaki kayıtları listeler. Kimlik filtreleri sayım ve sonuç için aynı kapsamda değerlendirilir. Başlık araması düz metindir. Proje/görevde page=1,limit=50; üst sınır 250. Etiket/durum listeleri sayfalamasızdır. Kayıtlar oluşturulma zamanı azalan; durumlar order artan sıralıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreTodoProjectsRecord"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1 tabanlı sayfa.",
            "schema": {
              "type": "integer",
              "default": 1,
              "example": 1,
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Pozitif sayfa boyutu; en fazla 250.",
            "schema": {
              "type": "integer",
              "default": 50,
              "example": 50,
              "minimum": 1,
              "maximum": 250
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Başlıkta büyük/küçük harf duyarsız düz metin araması; en fazla 500 karakter.",
            "schema": {
              "type": "string",
              "example": "Ödeme",
              "maxLength": 500
            }
          },
          {
            "name": "isArchived",
            "in": "query",
            "required": false,
            "description": "Verilmezse aktif/arşiv birlikte okunur.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "usersId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "labelsId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "dueStart",
            "in": "query",
            "required": false,
            "description": "dueDate alt sınırı; dahil.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dueEnd",
            "in": "query",
            "required": false,
            "description": "dueDate üst sınırı; dahil.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "read"
        }
      },
      "post": {
        "operationId": "corePostAppsTodoProjects",
        "tags": ["Görev yönetimi"],
        "summary": "Projeler kaydı oluşturun",
        "description": "Firma kapsamında yeni kayıt oluşturur. İlişkili kullanıcı, proje, durum, etiket, cari ve işlem kimlikleri firmada doğrulanır. Tekrar POST isteği yeni kayıt oluşturabilir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreTodoProjectsRecord"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme takibi"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoProjectsCreate"
              },
              "example": {
                "title": "Ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/projects/{id}": {
      "get": {
        "operationId": "coreGetAppsTodoProjectsId",
        "tags": ["Görev yönetimi"],
        "summary": "Projeler kaydını ve geçmişini okuyun",
        "description": "Firma kapsamındaki kaydı ve en yeni geçmişten başlayarak page/pageSize ile seçilen dilimi döndürür. Varsayılan 1/25, boyut en fazla 250. Sayfa ilerler; aşan sayfada histories boş döner. total ve historiesTotal geçmiş sayısıdır. İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreTodoProjectsRecord"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme takibi",
                    "histories": [],
                    "historiesTotal": 0
                  },
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1 tabanlı sayfa.",
            "schema": {
              "type": "integer",
              "default": 1,
              "example": 1,
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Pozitif sayfa boyutu; en fazla 250.",
            "schema": {
              "type": "integer",
              "default": 25,
              "example": 25,
              "minimum": 1,
              "maximum": 250
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "read"
        }
      },
      "patch": {
        "operationId": "corePatchAppsTodoProjectsId",
        "tags": ["Görev yönetimi"],
        "summary": "Projeler kaydını güncelleyin",
        "description": "Yalnız gönderilen izinli alanları günceller. Gövde boş olamaz; title gönderilirse boş/null olamaz. İlişkiler firma kapsamında doğrulanır; bulunmayan kayıt 404. Değişiklikler kayıt geçmişine eklenir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoProjectsUpdate"
              },
              "example": {
                "title": "Güncel ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "coreDeleteAppsTodoProjectsId",
        "tags": ["Görev yönetimi"],
        "summary": "Projeler kaydını silin",
        "description": "Firma kapsamındaki kaydı fiziksel siler; bulunamayan kayıt 404. İlişkili kayıtlar zincirleme silinmez; arşivleme isArchived güncellemesinden ayrıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/statuses": {
      "get": {
        "operationId": "coreGetAppsTodoStatuses",
        "tags": ["Görev yönetimi"],
        "summary": "Durumlar kaynağını listeleyin",
        "description": "Firma kapsamındaki kayıtları listeler. Kimlik filtreleri sayım ve sonuç için aynı kapsamda değerlendirilir. Başlık araması düz metindir. Proje/görevde page=1,limit=50; üst sınır 250. Etiket/durum listeleri sayfalamasızdır. Kayıtlar oluşturulma zamanı azalan; durumlar order artan sıralıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreTodoStatusesRecord"
                      }
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": []
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "read"
        }
      },
      "post": {
        "operationId": "corePostAppsTodoStatuses",
        "tags": ["Görev yönetimi"],
        "summary": "Durumlar kaydı oluşturun",
        "description": "Firma kapsamında yeni kayıt oluşturur. İlişkili kullanıcı, proje, durum, etiket, cari ve işlem kimlikleri firmada doğrulanır. Tekrar POST isteği yeni kayıt oluşturabilir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreTodoStatusesRecord"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme takibi"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoStatusesCreate"
              },
              "example": {
                "title": "Ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/statuses/{id}": {
      "patch": {
        "operationId": "corePatchAppsTodoStatusesId",
        "tags": ["Görev yönetimi"],
        "summary": "Durumlar kaydını güncelleyin",
        "description": "Yalnız gönderilen izinli alanları günceller. Gövde boş olamaz; title gönderilirse boş/null olamaz. İlişkiler firma kapsamında doğrulanır; bulunmayan kayıt 404. Değişiklikler kayıt geçmişine eklenir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoStatusesUpdate"
              },
              "example": {
                "title": "Güncel ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "coreDeleteAppsTodoStatusesId",
        "tags": ["Görev yönetimi"],
        "summary": "Durumlar kaydını silin",
        "description": "Firma kapsamındaki kaydı fiziksel siler; bulunamayan kayıt 404. İlişkili kayıtlar zincirleme silinmez; arşivleme isArchived güncellemesinden ayrıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/tasks": {
      "get": {
        "operationId": "coreGetAppsTodoTasks",
        "tags": ["Görev yönetimi"],
        "summary": "Görevler kaynağını listeleyin",
        "description": "Firma kapsamındaki kayıtları listeler. Kimlik filtreleri sayım ve sonuç için aynı kapsamda değerlendirilir. Başlık araması düz metindir. Proje/görevde page=1,limit=50; üst sınır 250. Etiket/durum listeleri sayfalamasızdır. Kayıtlar oluşturulma zamanı azalan; durumlar order artan sıralıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CoreTodoTasksRecord"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": [],
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1 tabanlı sayfa.",
            "schema": {
              "type": "integer",
              "default": 1,
              "example": 1,
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Pozitif sayfa boyutu; en fazla 250.",
            "schema": {
              "type": "integer",
              "default": 50,
              "example": 50,
              "minimum": 1,
              "maximum": 250
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Başlıkta büyük/küçük harf duyarsız düz metin araması; en fazla 500 karakter.",
            "schema": {
              "type": "string",
              "example": "Ödeme",
              "maxLength": 500
            }
          },
          {
            "name": "isArchived",
            "in": "query",
            "required": false,
            "description": "Verilmezse aktif/arşiv birlikte okunur.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "usersId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "labelsId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "dueStart",
            "in": "query",
            "required": false,
            "description": "dueDate alt sınırı; dahil.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dueEnd",
            "in": "query",
            "required": false,
            "description": "dueDate üst sınırı; dahil.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "statusId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "contactsId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "salesId",
            "in": "query",
            "required": false,
            "description": "Firma kapsamındaki kayıt kimliği.",
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "compStart",
            "in": "query",
            "required": false,
            "description": "Tamamlanma tarihi alt sınırı; dahil.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "compEnd",
            "in": "query",
            "required": false,
            "description": "Tamamlanma tarihi üst sınırı; dahil.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "read"
        }
      },
      "post": {
        "operationId": "corePostAppsTodoTasks",
        "tags": ["Görev yönetimi"],
        "summary": "Görevler kaydı oluşturun",
        "description": "Firma kapsamında yeni kayıt oluşturur. İlişkili kullanıcı, proje, durum, etiket, cari ve işlem kimlikleri firmada doğrulanır. Tekrar POST isteği yeni kayıt oluşturabilir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreTodoTasksRecord"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme takibi",
                    "projectId": "64b000000000000000000001"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoTasksCreate"
              },
              "example": {
                "title": "Ödeme takibi",
                "projectId": "64b000000000000000000001"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/apps/todo/tasks/{id}": {
      "get": {
        "operationId": "coreGetAppsTodoTasksId",
        "tags": ["Görev yönetimi"],
        "summary": "Görevler kaydını ve geçmişini okuyun",
        "description": "Firma kapsamındaki kaydı ve en yeni geçmişten başlayarak page/pageSize ile seçilen dilimi döndürür. Varsayılan 1/25, boyut en fazla 250. Sayfa ilerler; aşan sayfada histories boş döner. total ve historiesTotal geçmiş sayısıdır. İşlemi yapan kullanıcı bilgisi actor alanındadır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "result": {
                      "$ref": "#/components/schemas/CoreTodoTasksRecord"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "result": {
                    "_id": "64b000000000000000000001",
                    "title": "Ödeme takibi",
                    "histories": [],
                    "historiesTotal": 0
                  },
                  "total": 0
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "1 tabanlı sayfa.",
            "schema": {
              "type": "integer",
              "default": 1,
              "example": 1,
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Pozitif sayfa boyutu; en fazla 250.",
            "schema": {
              "type": "integer",
              "default": 25,
              "example": 25,
              "minimum": 1,
              "maximum": 250
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "read"
        }
      },
      "patch": {
        "operationId": "corePatchAppsTodoTasksId",
        "tags": ["Görev yönetimi"],
        "summary": "Görevler kaydını güncelleyin",
        "description": "Yalnız gönderilen izinli alanları günceller. Gövde boş olamaz; title gönderilirse boş/null olamaz. İlişkiler firma kapsamında doğrulanır; bulunmayan kayıt 404. Değişiklikler kayıt geçmişine eklenir.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoreTodoTasksUpdate"
              },
              "example": {
                "title": "Güncel ödeme takibi"
              }
            }
          }
        },
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      },
      "delete": {
        "operationId": "coreDeleteAppsTodoTasksId",
        "tags": ["Görev yönetimi"],
        "summary": "Görevler kaydını silin",
        "description": "Firma kapsamındaki kaydı fiziksel siler; bulunamayan kayıt 404. İlişkili kayıtlar zincirleme silinmez; arşivleme isArchived güncellemesinden ayrıdır.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": true
                }
              }
            }
          },
          "400": {
            "description": "İstek alanları geçersiz.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İstek alanları geçersiz."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "İşlem gerçekleştirilemedi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": false,
                  "message": "İşlem gerçekleştirilemedi."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "İşlem yapılacak kayıt kimliği.",
            "schema": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        ],
        "x-muhasip-permission": {
          "module": "todo",
          "access": "write"
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "coreGetHealth",
        "tags": ["Uygulamalar"],
        "summary": "Servis durumunu okuyun",
        "description": "Kimlik doğrulaması gerektirmeyen erişilebilirlik bilgisidir. İşlevsel banka veya belge entegrasyonu sağlığını ölçmez.\n\nİşlem etkisi: Kayıt değişikliği yapmaz.\n\nSonraki adım: Kimlikli erişimi doğrulamak için GET /apps çağrısını kullanın.",
        "responses": {
          "200": {
            "description": "İşlem cevabı. Örnek değerler temsilîdir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "boolean",
                      "example": true
                    },
                    "uptime": {
                      "type": "number",
                      "description": "Saniye cinsinden süreç çalışma süresi."
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "service": {
                      "type": "string",
                      "enum": ["muhasip-api"]
                    }
                  },
                  "required": ["status"]
                },
                "example": {
                  "status": true,
                  "uptime": 120.5,
                  "timestamp": "2026-10-18T09:00:00.000Z",
                  "service": "muhasip-api"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [],
        "x-muhasip-permission": {
          "module": "apps",
          "access": "read"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Kullanıcı adı apiUserId, parola secretKey. Aktif ve süresi geçmemiş API kullanıcısı ve uygun firma gerekir."
      }
    },
    "schemas": {
      "ApiActor": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["api", "user", "unknown"]
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["type", "id", "name"]
      },
      "ApiOperation": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "type": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "claimed",
              "dispatching",
              "provider_accepted",
              "succeeded",
              "rejected",
              "failed_before_dispatch",
              "review_required"
            ]
          },
          "reviewRequired": {
            "type": "boolean"
          },
          "retryable": {
            "type": "boolean"
          },
          "result": {
            "$ref": "#/components/schemas/ApiOperationReceipt"
          },
          "statusUrl": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          }
        },
        "required": [
          "operationId",
          "type",
          "state",
          "reviewRequired",
          "retryable",
          "result",
          "statusUrl",
          "createdAt",
          "updatedAt"
        ]
      },
      "ApiOperationError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "reviewRequired": {
            "type": "boolean"
          },
          "operation": {
            "$ref": "#/components/schemas/ApiOperation"
          },
          "operationId": {
            "type": "string"
          }
        },
        "required": ["status"],
        "additionalProperties": true
      },
      "ApiOperationReceipt": {
        "type": "object",
        "properties": {
          "resultId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "transactionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "uuid": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "providerId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "documentId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "paymentId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "orderId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "uuids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "maxItems": 100
          }
        },
        "additionalProperties": false
      },
      "ApiOperationReplay": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "replayed": {
            "type": "boolean",
            "enum": [true]
          },
          "operation": {
            "$ref": "#/components/schemas/ApiOperation"
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiOperation"
            }
          },
          "resultId": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "providerId": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "paymentId": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "uuids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": ["status", "replayed", "operation", "operations"],
        "additionalProperties": false
      },
      "AppsMarketplace": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "boolean"
          },
          "marketplace": {
            "type": "string"
          },
          "contactsId": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "data": {
            "$ref": "#/components/schemas/AppsMarketplacePublicData"
          },
          "createdDate": {
            "type": "string",
            "description": "ISO 8601 tarih ve saat.",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "ISO 8601 tarih ve saat.",
            "format": "date-time"
          },
          "hasCredentials": {
            "type": "boolean"
          }
        },
        "required": ["_id", "title", "status", "marketplace"]
      },
      "AppsMarketplaceCredentials": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Bağlantının görünen adı.",
            "maxLength": 200
          },
          "username": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "password": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "supplierId": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "required": ["username", "password", "supplierId"],
        "additionalProperties": false
      },
      "AppsMarketplaceOrder": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "companiesId": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "marketplaceId": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "transactionId": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "nullable": true
          },
          "createdDate": {
            "type": "string",
            "description": "ISO 8601 tarih ve saat.",
            "format": "date-time"
          },
          "status": {
            "type": "boolean"
          },
          "sendInvoice": {
            "type": "boolean"
          },
          "invoiceUrl": {
            "type": "string",
            "nullable": true
          },
          "uniqueId": {
            "type": "string"
          },
          "marketplace": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {},
            "description": "Sağlayıcının ham sipariş alanları."
          },
          "invoiceData": {
            "type": "object",
            "properties": {},
            "nullable": true
          }
        },
        "required": ["_id", "marketplaceId", "status"]
      },
      "AppsMarketplaceOrderListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "marketplace": {
            "type": "string"
          },
          "invoiceUrl": {
            "type": "string",
            "nullable": true
          },
          "sendInvoice": {
            "type": "boolean"
          },
          "status": {
            "type": "boolean"
          },
          "transactionId": {
            "type": "string",
            "description": "Muhasip kayıt kimliği; 24 onaltılık karakter.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "nullable": true
          },
          "customer": {
            "type": "object",
            "properties": {},
            "description": "Alıcı adı, adresi ve vergi bilgileri."
          },
          "shipment": {
            "type": "object",
            "properties": {},
            "description": "Teslimat alıcısı ve adresi."
          },
          "cargo": {
            "type": "object",
            "properties": {},
            "description": "Takip numarası ve kargo bilgisi."
          },
          "histories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number"
                },
                "discount": {
                  "type": "number"
                },
                "name": {
                  "type": "string"
                },
                "barcode": {
                  "type": "string"
                },
                "vatRate": {
                  "type": "number"
                },
                "listPrice": {
                  "type": "number"
                },
                "vatAmount": {
                  "type": "number"
                },
                "amount": {
                  "type": "number"
                }
              }
            }
          },
          "order": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "orderNumber": {
                "type": "string"
              },
              "packageId": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "orderDate": {
                "type": "string",
                "description": "ISO 8601 tarih ve saat.",
                "format": "date-time"
              },
              "agreedDeliveryDate": {
                "type": "string",
                "description": "ISO 8601 tarih ve saat.",
                "format": "date-time"
              },
              "lastModifiedDate": {
                "type": "string",
                "description": "ISO 8601 tarih ve saat.",
                "format": "date-time"
              },
              "totalDiscount": {
                "type": "number"
              },
              "totalPrice": {
                "type": "number"
              },
              "vatAmount": {
                "type": "number"
              },
              "grossAmount": {
                "type": "number"
              }
            }
          }
        },
        "required": ["id", "marketplace", "status"]
      },
      "AppsMarketplaceProviderResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "description": "İşlemin sonucu. HTTP durumu başarılı olsa bile bu alanı ayrıca kontrol edin."
          },
          "data": {
            "type": "object",
            "properties": {},
            "description": "Sağlayıcının değişken cevap içeriği."
          },
          "message": {
            "type": "string"
          }
        },
        "required": ["status"]
      },
      "AppsMarketplacePublicData": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "supplierId": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        }
      },
      "AppsMarketplaceUpdate": {
        "type": "object",
        "properties": {
          "marketplace": {
            "type": "string",
            "description": "Kurulum için desteklenen sağlayıcı.",
            "enum": ["trendyol"]
          },
          "status": {
            "type": "boolean",
            "description": "Sipariş sorgusuna açık bağlantı."
          },
          "contactsId": {
            "type": "string",
            "description": "İsteğe bağlı sabit cari; verilmezse aktarımda alıcıdan cari bulunur/oluşturulur.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "data": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "Bağlantının görünen adı."
              },
              "username": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "password": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "supplierId": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "AppsMarketplaceWrite": {
        "type": "object",
        "properties": {
          "marketplace": {
            "type": "string",
            "description": "Kurulum için desteklenen sağlayıcı.",
            "enum": ["trendyol"]
          },
          "status": {
            "type": "boolean",
            "description": "Sipariş sorgusuna açık bağlantı.",
            "default": true
          },
          "contactsId": {
            "type": "string",
            "description": "İsteğe bağlı sabit cari; verilmezse aktarımda alıcıdan cari bulunur/oluşturulur.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "data": {
            "$ref": "#/components/schemas/AppsMarketplaceCredentials"
          }
        },
        "required": ["marketplace", "data"],
        "additionalProperties": false
      },
      "AppsOimWrite": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Online işlem ekranı başlığı; yeni kayıtta gereklidir.",
            "maxLength": 1000
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          },
          "domain": {
            "type": "string",
            "description": "İlk kayıtta gereklidir; güncellemede atlanırsa mevcut adres korunur. Ayrılmış/uygunsuz değer kabul edilmez.",
            "pattern": "^[a-z0-9][a-z0-9-]{2,61}[a-z0-9]$",
            "minLength": 4,
            "maxLength": 63
          },
          "status": {
            "type": "boolean",
            "description": "Online işlemleri etkinleştirir."
          },
          "paymentStatus": {
            "type": "boolean",
            "description": "Online ödeme görünürlüğü. Varsayılan yalnız yeni kayıttadır; güncellemede atlanırsa mevcut değer korunur.",
            "default": false
          },
          "publicPayment": {
            "type": "boolean",
            "description": "Üyeliksiz ödeme görünürlüğü. Varsayılan yalnız yeni kayıttadır; güncellemede atlanırsa mevcut değer korunur.",
            "default": false
          },
          "logo": {
            "type": "string",
            "maxLength": 1000
          },
          "auth": {
            "type": "string",
            "description": "Giriş yöntemi yapılandırması; uç sabit enum doğrulamaz. Varsayılan yalnız yeni kayıttadır; güncellemede atlanırsa mevcut değer korunur.",
            "default": "vknCode",
            "maxLength": 1000
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "maxItems": 100,
            "default": []
          }
        },
        "required": ["status"],
        "additionalProperties": false
      },
      "CoreAgendaCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "taskDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "labelsId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          },
          "isPin": {
            "type": "boolean"
          },
          "isTask": {
            "type": "boolean"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "todo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreAgendaTodoCreate"
            },
            "default": []
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreAgendaVariable"
            },
            "default": []
          },
          "isArchived": {
            "type": "boolean"
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "CoreAgendaLabel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "title": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "icon": {
            "type": "string"
          }
        },
        "required": ["id", "title", "icon"],
        "additionalProperties": false
      },
      "CoreAgendaRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "companiesId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "compDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "usersId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "isApi": {
            "type": "boolean"
          },
          "isArchived": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "taskDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "labelsId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          },
          "isPin": {
            "type": "boolean"
          },
          "isTask": {
            "type": "boolean"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "todo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreAgendaTodoCreate"
            }
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreAgendaVariable"
            }
          },
          "histories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreHistory"
            }
          },
          "comments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          },
          "userName": {
            "type": "string"
          },
          "todoSize": {
            "type": "integer",
            "description": "Liste cevabında yapılacak alt madde sayısı."
          },
          "variablesSize": {
            "type": "integer"
          },
          "historiesSize": {
            "type": "integer"
          },
          "commentsSize": {
            "type": "integer"
          },
          "label": {
            "type": "object",
            "nullable": true,
            "properties": {
              "name": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              },
              "color": {
                "type": "string",
                "nullable": true
              }
            }
          }
        },
        "additionalProperties": true
      },
      "CoreAgendaTodoCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "check": {
            "type": "boolean"
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "CoreAgendaUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "taskDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "labelsId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          },
          "isPin": {
            "type": "boolean"
          },
          "isTask": {
            "type": "boolean"
          },
          "isArchived": {
            "type": "boolean"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "todo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreAgendaTodoCreate"
            }
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreAgendaVariable"
            }
          }
        },
        "description": "İzinli alanlardan en az biri gönderilmelidir. title boş/null olamaz; content boş/null olabilir.",
        "additionalProperties": false,
        "minProperties": 1
      },
      "CoreAgendaVariable": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": ["key", "value"],
        "additionalProperties": false
      },
      "CoreApp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "to": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "short": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "keywords": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "statusTag": {
            "type": "string",
            "nullable": true
          },
          "packages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "projectsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Kayıt kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "price": {
            "type": "number"
          },
          "url": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "shortcut": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "boolean"
          },
          "multiple": {
            "type": "boolean"
          },
          "isMenu": {
            "type": "boolean"
          },
          "isPreference": {
            "type": "boolean"
          },
          "isList": {
            "type": "boolean"
          },
          "isModule": {
            "type": "boolean"
          },
          "workspace": {
            "type": "boolean"
          },
          "func": {
            "type": "boolean"
          },
          "private": {
            "type": "boolean"
          },
          "available": {
            "type": "boolean",
            "description": "Mevcut pakete uygunluk."
          },
          "used": {
            "type": "boolean",
            "description": "Firma için kullanım durumu."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "CoreCalendarInvoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "description": {
            "type": "string"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "out": {
            "type": "boolean"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "contactsId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "contact": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "CoreCalendarReminder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "content": {
            "type": "string"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "status": {
            "type": "boolean"
          },
          "reminderDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          }
        },
        "additionalProperties": true
      },
      "CoreCalendarRow": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "status": {
            "type": "boolean"
          },
          "allDay": {
            "type": "boolean"
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "nullable": true
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          }
        },
        "additionalProperties": true
      },
      "CoreCalendarUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "allDay": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "nullable": true
          }
        },
        "additionalProperties": false,
        "minProperties": 1
      },
      "CoreCalendarWrite": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "allDay": {
            "type": "boolean",
            "default": false
          },
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "nullable": true
          }
        },
        "required": ["title", "type", "startDate", "endDate"],
        "additionalProperties": false
      },
      "CoreHistory": {
        "type": "object",
        "properties": {
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "usersId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "isApi": {
            "type": "boolean"
          },
          "action": {
            "type": "string",
            "enum": ["create", "update"]
          },
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "userName": {
            "type": "string"
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          }
        }
      },
      "CoreTodoLabelsCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Etiket başlığı."
          },
          "color": {
            "type": "string",
            "description": "Renk.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "İkon.",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "description": "Kapsam; yeni kayıtta task.",
            "nullable": true,
            "default": "task"
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "CoreTodoLabelsRecord": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "companiesId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "description": "Etiket başlığı."
          },
          "color": {
            "type": "string",
            "description": "Renk.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "İkon.",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "description": "Kapsam; yeni kayıtta task.",
            "nullable": true,
            "default": "task"
          }
        },
        "additionalProperties": true
      },
      "CoreTodoLabelsUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Gönderilirse boş veya null olamaz."
          },
          "color": {
            "type": "string",
            "description": "Renk.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "İkon.",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "description": "Kapsam; yeni kayıtta task.",
            "nullable": true
          }
        },
        "minProperties": 1,
        "additionalProperties": false
      },
      "CoreTodoProjectsCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Başlık."
          },
          "description": {
            "type": "string",
            "description": "Açıklama.",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Son tarih.",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Atanan kullanıcı kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "labelsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Etiket kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "isArchived": {
            "type": "boolean",
            "description": "Arşiv durumu.",
            "default": false
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "CoreTodoProjectsRecord": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "companiesId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "description": "Başlık."
          },
          "description": {
            "type": "string",
            "description": "Açıklama.",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Son tarih.",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Atanan kullanıcı kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "labelsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Etiket kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "isArchived": {
            "type": "boolean",
            "description": "Arşiv durumu.",
            "default": false
          },
          "histories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreHistory"
            }
          },
          "historiesTotal": {
            "type": "integer"
          },
          "lastHistory": {
            "$ref": "#/components/schemas/CoreHistory"
          },
          "lastHistoryUserName": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "CoreTodoProjectsUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Gönderilirse boş veya null olamaz."
          },
          "description": {
            "type": "string",
            "description": "Açıklama.",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Son tarih.",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Atanan kullanıcı kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "labelsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Etiket kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "isArchived": {
            "type": "boolean",
            "description": "Arşiv durumu."
          }
        },
        "minProperties": 1,
        "additionalProperties": false
      },
      "CoreTodoStatusesCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Durum başlığı."
          },
          "color": {
            "type": "string",
            "description": "Renk.",
            "nullable": true
          },
          "order": {
            "type": "number",
            "description": "Sıra.",
            "default": 1
          },
          "isDefault": {
            "type": "boolean",
            "description": "Varsayılan durum.",
            "default": false
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "CoreTodoStatusesRecord": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "companiesId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "description": "Durum başlığı."
          },
          "color": {
            "type": "string",
            "description": "Renk.",
            "nullable": true
          },
          "order": {
            "type": "number",
            "description": "Sıra.",
            "default": 1
          },
          "isDefault": {
            "type": "boolean",
            "description": "Varsayılan durum.",
            "default": false
          }
        },
        "additionalProperties": true
      },
      "CoreTodoStatusesUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Gönderilirse boş veya null olamaz."
          },
          "color": {
            "type": "string",
            "description": "Renk.",
            "nullable": true
          },
          "order": {
            "type": "number",
            "description": "Sıra."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Varsayılan durum."
          }
        },
        "minProperties": 1,
        "additionalProperties": false
      },
      "CoreTodoTasksCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Başlık."
          },
          "description": {
            "type": "string",
            "description": "Açıklama.",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Son tarih.",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Atanan kullanıcı kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "labelsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Etiket kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "isArchived": {
            "type": "boolean",
            "description": "Arşiv durumu.",
            "default": false
          },
          "projectId": {
            "type": "string",
            "description": "Proje kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "compDate": {
            "type": "string",
            "description": "Tamamlanma tarihi.",
            "format": "date-time",
            "nullable": true
          },
          "statusId": {
            "type": "string",
            "description": "Durum kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          },
          "contactsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Bağlı cari kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "salesId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Bağlı işlem kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        },
        "required": ["projectId", "title"],
        "additionalProperties": false
      },
      "CoreTodoTasksRecord": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "companiesId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "description": "Başlık."
          },
          "description": {
            "type": "string",
            "description": "Açıklama.",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Son tarih.",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Atanan kullanıcı kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "labelsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Etiket kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "isArchived": {
            "type": "boolean",
            "description": "Arşiv durumu.",
            "default": false
          },
          "projectId": {
            "type": "string",
            "description": "Proje kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "compDate": {
            "type": "string",
            "description": "Tamamlanma tarihi.",
            "format": "date-time",
            "nullable": true
          },
          "statusId": {
            "type": "string",
            "description": "Durum kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          },
          "contactsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Bağlı cari kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "salesId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Bağlı işlem kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "histories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoreHistory"
            }
          },
          "historiesTotal": {
            "type": "integer"
          },
          "lastHistory": {
            "$ref": "#/components/schemas/CoreHistory"
          },
          "lastHistoryUserName": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "CoreTodoTasksUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Gönderilirse boş veya null olamaz."
          },
          "description": {
            "type": "string",
            "description": "Açıklama.",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Son tarih.",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Atanan kullanıcı kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "labelsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Etiket kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "isArchived": {
            "type": "boolean",
            "description": "Arşiv durumu."
          },
          "projectId": {
            "type": "string",
            "description": "Proje kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001"
          },
          "compDate": {
            "type": "string",
            "description": "Tamamlanma tarihi.",
            "format": "date-time",
            "nullable": true
          },
          "statusId": {
            "type": "string",
            "description": "Durum kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          },
          "contactsId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Bağlı cari kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          },
          "salesId": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Bağlı işlem kimliği.",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "64b000000000000000000001"
            }
          }
        },
        "minProperties": 1,
        "additionalProperties": false
      },
      "CoreWriteResult": {
        "type": "object",
        "properties": {
          "acknowledged": {
            "type": "boolean"
          },
          "matchedCount": {
            "type": "integer"
          },
          "modifiedCount": {
            "type": "integer"
          },
          "deletedCount": {
            "type": "integer"
          },
          "upsertedCount": {
            "type": "integer"
          },
          "upsertedId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "example": "64b000000000000000000001",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "reviewRequired": {
            "type": "boolean"
          },
          "operationId": {
            "type": "string"
          }
        },
        "required": ["status"],
        "additionalProperties": true
      },
      "FinanceBankAccountSelection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "bankCode": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceBankSubAccount"
            }
          }
        },
        "additionalProperties": true
      },
      "FinanceBankAccountSummary": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "name": {
            "type": "string"
          },
          "bankCode": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FinanceBankApprovalRequest": {
        "description": "contact ve invoice varyantlarında zorunlu alanlar farklıdır.",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": ["contact"],
                "description": "contact: cariye ödeme; invoice: belirli faturaya mahsup."
              },
              "id": {
                "type": "string",
                "description": "contact: firmadaki cari kimliği veya yeni cari adı; invoice: fatura kimliği."
              }
            },
            "required": ["type", "id"],
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": ["invoice"],
                "description": "contact: cariye ödeme; invoice: belirli faturaya mahsup."
              },
              "id": {
                "type": "string",
                "description": "contact: firmadaki cari kimliği veya yeni cari adı; invoice: fatura kimliği."
              },
              "contactsId": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$",
                "description": "Seçilen faturanın cari kimliğiyle birebir eşleşmelidir."
              }
            },
            "required": ["type", "id", "contactsId"],
            "additionalProperties": true
          }
        ]
      },
      "FinanceBankAutomation": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["active", "draft", "archive"]
          },
          "type": {
            "type": "string"
          },
          "template": {
            "type": "string",
            "nullable": true
          },
          "integration": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "$ref": "#/components/schemas/FinanceBankAutomationSettings"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceBankAutomationAction"
            }
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastDate": {
            "type": "string",
            "format": "date-time"
          },
          "isRun": {
            "type": "boolean"
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "user": {
            "type": "string"
          },
          "userPicture": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "FinanceBankAutomationAction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "type": {
            "type": "string",
            "enum": ["integration"]
          },
          "integration": {
            "type": "string",
            "enum": ["invoice"]
          },
          "order": {
            "type": "integer",
            "minimum": 0
          },
          "settings": {
            "$ref": "#/components/schemas/FinanceBankAutomationInvoiceSettings"
          }
        },
        "required": ["type", "integration", "settings"],
        "additionalProperties": false
      },
      "FinanceBankAutomationForm": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": ["active", "draft", "archive"],
            "description": "Yeni kayıtta verilmezse draft."
          },
          "template": {
            "type": "string",
            "enum": ["bankInvoice"],
            "description": "Yeni kayıtta bankInvoice."
          },
          "type": {
            "type": "string",
            "enum": ["integration", "manuel"],
            "description": "Yeni kayıtta integration."
          },
          "integration": {
            "type": "string",
            "enum": ["bank"],
            "description": "Yeni kayıtta bank."
          },
          "settings": {
            "$ref": "#/components/schemas/FinanceBankAutomationSettings"
          },
          "actions": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "$ref": "#/components/schemas/FinanceBankAutomationAction"
            }
          }
        },
        "description": "id yoksa yeni taslak, varsa firma kaydı güncellenir; yeni kayıtta actions zorunludur. Gönderilen settings/actions nesneleri bütün olarak değiştirilir. Aktif durumda hesap, tam fatura ayarları ve oran toplamı 100 gerekir."
      },
      "FinanceBankAutomationInvoiceSettings": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/FinanceBankAutomationLine"
            }
          },
          "series": {
            "type": "string",
            "maxLength": 30
          },
          "templates": {
            "type": "string",
            "format": "uuid"
          },
          "eSeries": {
            "type": "string",
            "maxLength": 30
          },
          "eTemplates": {
            "type": "string",
            "format": "uuid"
          },
          "nameSurname": {
            "type": "string",
            "maxLength": 300
          },
          "address": {
            "type": "string",
            "maxLength": 1000
          },
          "cities": {
            "type": "string",
            "maxLength": 100
          },
          "states": {
            "type": "string",
            "maxLength": 100
          },
          "notes": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string",
              "maxLength": 1000
            }
          }
        },
        "additionalProperties": false
      },
      "FinanceBankAutomationLine": {
        "type": "object",
        "properties": {
          "lineName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "ratio": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 100
          },
          "KDV": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "default": 1
          },
          "unitType": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          }
        },
        "required": ["lineName", "ratio", "KDV", "unitType"],
        "additionalProperties": false
      },
      "FinanceBankAutomationListRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat."
          },
          "lastDate": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 tarih-saat.",
            "nullable": true
          },
          "isRun": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": ["integration", "manuel"]
          },
          "template": {
            "type": "string",
            "enum": ["bankInvoice"]
          },
          "status": {
            "type": "string",
            "enum": ["active", "draft", "archive"]
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "user": {
            "type": "string"
          },
          "userPicture": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "FinanceBankAutomationLog": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceBankAutomationLogItem"
            }
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "user": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FinanceBankAutomationLogItem": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "recordId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği.",
            "nullable": true
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "format": "uuid"
              },
              "type": {
                "type": "string",
                "enum": ["einvoice", "earchive"]
              }
            },
            "required": ["uuid", "type"],
            "nullable": true
          }
        },
        "required": ["status", "recordId", "message", "data"]
      },
      "FinanceBankAutomationLogSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "status": {
            "type": "boolean"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "userId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "data": {
            "type": "integer",
            "description": "Log içindeki sonuç satırı sayısı; sonuç verisinin kendisi değildir."
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          },
          "apiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "user": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FinanceBankAutomationMetadata": {
        "type": "object",
        "additionalProperties": true,
        "description": "Mevcut otomasyon alanlarına eklenecek veya üstüne yazılacak anahtar/değerler. Yeni işlev yaratan anahtar varsaymayın."
      },
      "FinanceBankAutomationSettings": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "maxItems": 250,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "description": "Firma içindeki arşivlenmemiş TRY banka hesapları."
          },
          "hour": {
            "type": "string",
            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$",
            "description": "Saat bilgisi; API otomatik zamanlayıcı çalıştırma güvencesi vermez. Boş metin de kabul edilir.",
            "nullable": true
          },
          "operationType": {
            "type": "string",
            "enum": ["incoming", "outgoing"],
            "nullable": true
          },
          "filterStatus": {
            "type": "string",
            "enum": ["0", "1", "2"],
            "description": "Metin olarak gönderin; sayısal 0 kabul edilmez.",
            "nullable": true
          },
          "setStatus": {
            "type": "boolean"
          },
          "negativeWords": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "description": "Düz metin sözcükleri; düzenli ifade metakarakterleri kabul edilmez."
          }
        },
        "additionalProperties": false
      },
      "FinanceBankAutomationWrite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": ["active", "draft", "archive"],
            "description": "Yeni kayıtta verilmezse draft."
          },
          "template": {
            "type": "string",
            "enum": ["bankInvoice"],
            "description": "Yeni kayıtta bankInvoice."
          },
          "type": {
            "type": "string",
            "enum": ["integration", "manuel"],
            "description": "Yeni kayıtta integration."
          },
          "integration": {
            "type": "string",
            "enum": ["bank"],
            "description": "Yeni kayıtta bank."
          },
          "settings": {
            "$ref": "#/components/schemas/FinanceBankAutomationSettings"
          },
          "actions": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "$ref": "#/components/schemas/FinanceBankAutomationAction"
            }
          }
        },
        "required": ["title"],
        "additionalProperties": false,
        "description": "id yoksa yeni taslak, varsa firma kaydı güncellenir; yeni kayıtta actions zorunludur. Gönderilen settings/actions nesneleri bütün olarak değiştirilir. Aktif durumda hesap, tam fatura ayarları ve oran toplamı 100 gerekir."
      },
      "FinanceBankCommentRequest": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string",
            "description": "Yeni not metni; gövde alanı işlevsel olarak gerekir."
          }
        },
        "required": ["comment"],
        "additionalProperties": true
      },
      "FinanceBankLinkedPayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "FinanceBankMatchEstimate": {
        "type": "object",
        "properties": {
          "transaction": {
            "$ref": "#/components/schemas/FinanceBankTransaction"
          },
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$",
                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                },
                "name": {
                  "type": "string"
                },
                "taxId": {
                  "type": "string"
                },
                "currentCode": {
                  "type": "string"
                },
                "labels": {},
                "percentage": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "invoices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$",
                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                },
                "total": {
                  "type": "object",
                  "additionalProperties": true
                },
                "contactsId": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{24}$",
                  "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
                },
                "receiptNumber": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "invoiceInfo": {
                  "type": "object",
                  "additionalProperties": true
                },
                "issueDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "currencyCode": {
                  "type": "string"
                },
                "createdDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "contact": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "FinanceBankQueryResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "size": {
            "type": "integer"
          },
          "query": {
            "type": "integer"
          },
          "transactions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "Bağlı hizmet veya firma ayarlarına göre ek alanlar değişebilir."
            }
          }
        },
        "additionalProperties": true
      },
      "FinanceBankSetupRequest": {
        "type": "object",
        "properties": {
          "bank": {
            "type": "string",
            "description": "Banka kodu; örneğin anadolubank."
          },
          "model": {
            "type": "string",
            "description": "Bağlantı türü. Anadolubank için sunucu openBank olarak belirler."
          },
          "key": {
            "type": "string",
            "maxLength": 50,
            "description": "Anadolubank WebServis Key; bu bankada zorunlu."
          },
          "mNo": {
            "type": "string",
            "description": "Anadolubank Müşteri/Hesap No; mNo veya iban değerlerinden tam biri gerekir."
          },
          "iban": {
            "type": "string",
            "description": "Anadolubank için TR ile başlayan, boşlukları ayıklanınca 26 karakterlik IBAN."
          },
          "currency": {
            "type": "string",
            "description": "Banka hesabı para birimi; banka bağlantısına göre kullanılabilir."
          }
        },
        "required": ["bank"],
        "additionalProperties": true,
        "description": "Bağlantı alanları bankaya göre değişir. Yalnız kurumunuz için sağlanan banka bağlantı bilgilerini gönderin; desteklenmeyen bankaya alan genellemesi yapılmaz."
      },
      "FinanceBankStatusRequest": {
        "type": "object",
        "properties": {
          "selected": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            },
            "minItems": 1
          },
          "status": {
            "type": "integer",
            "enum": [0, 1, 2],
            "description": "0 bekleyen, 1 işlenmiş, 2 yok sayılmış."
          },
          "isCheck": {
            "type": "boolean",
            "description": "Verilirse status alanının yerine yalnız bu işaret güncellenir."
          }
        },
        "required": ["selected"],
        "additionalProperties": true
      },
      "FinanceBankSubAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Alt hesap IBAN bilgisi."
          },
          "title": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FinanceBankTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "accountsId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "transactionDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "incoming": {
            "type": "boolean"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "number"
          },
          "status": {
            "type": "integer",
            "enum": [0, 1, 2],
            "description": "0 bekleyen, 1 işlenmiş, 2 yok sayılmış."
          },
          "isCheck": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "nameSurname": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "idNo": {
            "type": "string"
          },
          "paymentId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "contactsId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "bankCode": {
            "type": "string"
          },
          "isNotification": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Banka hareketinin belgelenmiş mali alanları."
      },
      "FinanceBusinessError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "enum": [false]
          },
          "message": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "result": {}
        },
        "required": ["status"],
        "additionalProperties": true
      },
      "FinanceInvoiceApiRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": ["invoiceInfo"]
              },
              "vkn": {
                "type": "string",
                "description": "Sorgulanacak vergi/kimlik numarası.",
                "pattern": "^\\d{10,11}$"
              },
              "countriesCode": {
                "type": "string",
                "default": "TR",
                "description": "Ülke kodu; TR veya boş değer yurt içi sorgudur."
              }
            },
            "required": ["type", "vkn"],
            "additionalProperties": true,
            "description": "Mükellef/seri/şablon sorgusu; read izni."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": ["view"]
              },
              "data": {
                "$ref": "#/components/schemas/FinanceInvoiceViewData"
              }
            },
            "required": ["type", "data"],
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": ["invoicecancel"]
              },
              "moduleType": {
                "type": "string",
                "enum": ["eInvoice", "eArchive"]
              },
              "body": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "uniqueItems": true,
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "UUID": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "Alias": {
                          "type": "string",
                          "maxLength": 500,
                          "nullable": true
                        }
                      },
                      "required": ["UUID"],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            },
            "required": ["type", "moduleType", "body"],
            "additionalProperties": true,
            "description": "Hedef UUID listesiyle işlem korumalı taslak silme."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": ["invoiceapproval"]
              },
              "moduleType": {
                "type": "string",
                "enum": ["eInvoice", "eArchive"]
              },
              "body": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "uniqueItems": true,
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "UUID": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "Alias": {
                          "type": "string",
                          "maxLength": 500,
                          "nullable": true
                        }
                      },
                      "required": ["UUID"],
                      "additionalProperties": false
                    }
                  ]
                },
                "description": "1–100 benzersiz UUID. Nesne biçiminde yalnız UUID ve isteğe bağlı Alias kabul edilir; Alias işlem içeriğine dahildir."
              }
            },
            "required": ["type", "moduleType", "body"],
            "additionalProperties": true,
            "description": "Hedef UUID listesiyle işlem korumalı gönderim."
          }
        ],
        "description": "İşlem türünü invoiceInfo, view, invoiceapproval veya invoicecancel olarak gönderin. Her türün gerekli alanları aşağıda tanımlanır."
      },
      "FinanceInvoiceApiResult": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "templates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "info": {
                "type": "object",
                "properties": {
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    },
                    "nullable": true
                  },
                  "moduleType": {
                    "type": "string"
                  }
                },
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "UUID": {
                "type": "string",
                "format": "uuid"
              },
              "html": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": true
          },
          {
            "$ref": "#/components/schemas/FinanceInvoiceProviderResult"
          }
        ]
      },
      "FinanceInvoiceConnectRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "description": "Bağlanacak e-belge hesabının anahtarı; işlevsel olarak zorunludur.",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": ["apiKey"],
        "additionalProperties": true
      },
      "FinanceInvoiceConnection": {
        "type": "object",
        "properties": {
          "integrator": {
            "type": "string"
          },
          "isCustomer": {
            "type": "boolean"
          },
          "connected": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "taxId": {
            "type": "string"
          },
          "taxOffice": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "required": ["isCustomer", "connected"]
      },
      "FinanceInvoiceCredit": {
        "type": "object",
        "properties": {
          "EndDate": {
            "type": "string",
            "format": "date-time"
          },
          "Name": {
            "type": "string"
          },
          "ModuleID": {
            "type": "integer"
          },
          "RemainingCredit": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "FinanceInvoiceProviderResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "statusCode": {
            "type": "integer",
            "nullable": true
          },
          "statusText": {
            "type": "string"
          },
          "data": {},
          "message": {},
          "deliveryUncertain": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "Fatura işleminin sonucu. Alanlar işlem türüne göre değişir; bağlantı anahtarları cevapta verilmez."
      },
      "FinanceInvoiceSettings": {
        "type": "object",
        "additionalProperties": true,
        "description": "Firmanın e-fatura ayar nesnesi. İçerik mevcut firma ayarlarına göre değişir; yeni veya desteklenmeyen ayar anahtarı varsaymayın."
      },
      "FinanceInvoiceSyncFilter": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Belgenin kaynak kanalı. Kullanılabilir fatura kanalları eInvoice/Purchase, eInvoice/Sale ve eArchive/Invoices biçimindedir."
          },
          "StartDate": {
            "type": "string",
            "format": "date",
            "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
          },
          "EndDate": {
            "type": "string",
            "format": "date",
            "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
          }
        },
        "required": ["type"],
        "additionalProperties": true
      },
      "FinanceInvoiceSyncRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "companiesId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "filter": {
            "$ref": "#/components/schemas/FinanceInvoiceSyncFilter"
          },
          "result": {
            "type": "object",
            "additionalProperties": true,
            "description": "Bağlı hizmet veya firma ayarlarına göre ek alanlar değişebilir."
          }
        },
        "additionalProperties": true
      },
      "FinanceInvoiceViewData": {
        "type": "object",
        "properties": {
          "CustomerInfo": {
            "type": "object",
            "properties": {
              "Name": {
                "type": "string",
                "description": "Alıcı unvanı veya ad soyadı."
              },
              "TaxNumber": {
                "type": "string",
                "description": "Alıcı vergi veya kimlik numarası."
              },
              "Address": {
                "type": "string",
                "description": "Alıcı açık adresi."
              },
              "District": {
                "type": "string",
                "description": "İlçe bilgisi."
              },
              "City": {
                "type": "string",
                "description": "İl bilgisi."
              },
              "Country": {
                "type": "string",
                "description": "Ülke adı."
              },
              "Mail": {
                "type": "string",
                "description": "E-posta adresi."
              }
            },
            "required": ["Name"],
            "additionalProperties": true,
            "description": "Alıcının kimlik ve adres bilgileri."
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Mal veya hizmet adı."
                },
                "quantity": {
                  "type": "number",
                  "description": "Miktar."
                },
                "price": {
                  "type": "number",
                  "description": "Birim fiyat."
                },
                "total": {
                  "type": "number",
                  "description": "Kalem toplamı."
                },
                "amount": {
                  "type": "number",
                  "description": "Kalem tutarı."
                },
                "unitType": {
                  "type": "string",
                  "default": "C62",
                  "description": "Birim kodu; boşsa önce unit alanı, o da yoksa C62 kullanılır."
                },
                "taxes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "taxCode": {
                        "type": "string",
                        "description": "Vergi kodu."
                      },
                      "percent": {
                        "type": "number",
                        "description": "Vergi oranı."
                      },
                      "total": {
                        "type": "number",
                        "description": "Vergi tutarı."
                      }
                    },
                    "additionalProperties": true
                  },
                  "description": "Vergi satırları; toplamı sıfır veya negatif olan vergi satırları taslak dönüşümünde çıkarılır."
                },
                "withholdingTax": {
                  "type": "object",
                  "properties": {
                    "taxCode": {
                      "type": "string"
                    },
                    "percent": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": true,
                  "description": "Kalemin tevkifat bilgisi."
                }
              },
              "required": ["name", "taxes"],
              "additionalProperties": true
            },
            "description": "Belge kalemleri; taxes her kalemde dizi olarak bulunmalıdır."
          },
          "InvoiceProfile": {
            "type": "string",
            "description": "E-arşiv için EARSIVFATURA; e-fatura için bağlı hesabın desteklediği profil."
          },
          "InvoiceType": {
            "type": "string",
            "default": "SATIS"
          },
          "InvoiceSerieOrNumber": {
            "type": "string",
            "description": "invoiceInfo işleminden seçilen belge serisi veya numarası."
          },
          "TemplateUUID": {
            "type": "string",
            "format": "uuid",
            "description": "invoiceInfo işleminden seçilen şablon UUID değeri."
          },
          "CustomerAlias": {
            "type": "string",
            "description": "Alıcının seçilen e-fatura posta kutusu."
          },
          "issueDate": {
            "type": "string",
            "format": "date",
            "description": "Belge tarihi; tarih-saat sunucu tarafından düzenlenir."
          },
          "currencyCode": {
            "type": "string",
            "description": "Belgenin para birimi kodu."
          },
          "exchangeRate": {
            "type": "number",
            "description": "Belgede kullanılan döviz kuru."
          },
          "Notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Belge notları."
          },
          "total": {
            "type": "object",
            "additionalProperties": true,
            "description": "İstemcinin hesapladığı toplamlar; bağlı hizmetin belge doğrulamasına tabidir."
          }
        },
        "required": ["CustomerInfo", "lines"],
        "additionalProperties": true
      },
      "FinanceWorkflow": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "boolean",
            "default": true
          },
          "companiesId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "usersId": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
            }
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FinanceWorkflowAttribute": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 haneli kayıt kimliği; firma API kimliğinden belirlenir."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "order": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "default": ""
          },
          "isMultiple": {
            "type": "boolean",
            "default": false
          },
          "isRequired": {
            "type": "boolean",
            "default": false
          },
          "isUnique": {
            "type": "boolean",
            "default": false
          },
          "isRange": {
            "type": "boolean",
            "default": false
          },
          "format": {
            "type": "string",
            "maxLength": 100,
            "default": null,
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "checkbox",
              "created_by",
              "created_time",
              "date",
              "email",
              "files",
              "formula",
              "last_edited_by",
              "last_edited_time",
              "number",
              "people",
              "phone_number",
              "relation",
              "rich_text",
              "rollup",
              "select",
              "status",
              "title",
              "url"
            ],
            "default": "title"
          },
          "defaultValue": {
            "description": "Serbest değer; tehlikeli nesne anahtarları kabul edilmez."
          },
          "options": {
            "type": "array",
            "maxItems": 250,
            "items": {
              "$ref": "#/components/schemas/FinanceWorkflowAttributeOption"
            },
            "default": []
          },
          "lastApiUserId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "actor": {
            "$ref": "#/components/schemas/ApiActor"
          },
          "lastActorName": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FinanceWorkflowAttributeOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "icon": {
            "type": "string",
            "maxLength": 100,
            "nullable": true
          },
          "color": {
            "type": "string",
            "enum": [
              "slate",
              "gray",
              "red",
              "orange",
              "amber",
              "yellow",
              "green",
              "emerald",
              "blue",
              "indigo",
              "violet",
              "pink"
            ],
            "default": "slate"
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "FinanceWorkflowAttributeWrite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "24 karakterli Muhasip kayıt kimliği."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "default": ""
          },
          "isMultiple": {
            "type": "boolean",
            "default": false
          },
          "isRequired": {
            "type": "boolean",
            "default": false
          },
          "isUnique": {
            "type": "boolean",
            "default": false
          },
          "isRange": {
            "type": "boolean",
            "default": false
          },
          "type": {
            "type": "string",
            "enum": [
              "checkbox",
              "created_by",
              "created_time",
              "date",
              "email",
              "files",
              "formula",
              "last_edited_by",
              "last_edited_time",
              "number",
              "people",
              "phone_number",
              "relation",
              "rich_text",
              "rollup",
              "select",
              "status",
              "title",
              "url"
            ],
            "default": "title"
          },
          "format": {
            "type": "string",
            "maxLength": 100,
            "default": null,
            "nullable": true
          },
          "defaultValue": {
            "description": "Serbest değer; tehlikeli nesne anahtarları kabul edilmez."
          },
          "options": {
            "type": "array",
            "maxItems": 250,
            "items": {
              "$ref": "#/components/schemas/FinanceWorkflowAttributeOption"
            },
            "default": []
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "FinanceWorkflowRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "status": {
            "type": "boolean"
          },
          "usersId": {
            "type": "array",
            "maxItems": 250,
            "items": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$",
              "description": "24 karakterli Muhasip kayıt kimliği."
            },
            "nullable": true
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "icon": {
            "type": "string",
            "maxLength": 100,
            "default": "i-tabler-user-screen",
            "nullable": true
          }
        },
        "required": ["title"],
        "additionalProperties": false
      },
      "FinanceWriteResult": {
        "type": "object",
        "properties": {
          "acknowledged": {
            "type": "boolean"
          },
          "matchedCount": {
            "type": "integer"
          },
          "modifiedCount": {
            "type": "integer"
          },
          "upsertedCount": {
            "type": "integer"
          },
          "upsertedId": {
            "type": "string",
            "nullable": true
          },
          "deletedCount": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "description": "İşleme göre yalnız ilgili sayımlar bulunur. matchedCount eşleşen, modifiedCount değişen, deletedCount silinen kayıt sayısıdır."
      },
      "PaymentsContactBrief": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "id": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "İlişkili cari bilgisi."
      },
      "PaymentsDeleteResult": {
        "type": "object",
        "properties": {
          "acknowledged": {
            "type": "boolean"
          },
          "deletedCount": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required": ["acknowledged", "deletedCount"]
      },
      "PaymentsEArchiveActionInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentsEArchiveLogoutInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveUserInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveQueryInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveHtmlInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveDownloadInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveCancelInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveVerifyPhoneInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveSignInput"
          },
          {
            "$ref": "#/components/schemas/PaymentsEArchiveSendInput"
          }
        ],
        "description": "Yalnız listelenen func değerleri desteklenir. Bilinmeyen func/type yanıt üretmeyebilir."
      },
      "PaymentsEArchiveActionResponse": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "message": {
                "type": "string"
              }
            },
            "additionalProperties": true,
            "required": ["status", "message"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "$ref": "#/components/schemas/PaymentsEArchiveUser"
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PaymentsEArchiveDocument"
                }
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "type": "string",
                "description": "HTML belge içeriği."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "nullable": true
              },
              "fileInfo": {
                "$ref": "#/components/schemas/PaymentsEArchiveFileInfo"
              },
              "contacts": {
                "type": "object",
                "properties": {
                  "_id": {
                    "type": "string",
                    "description": "Kayıt kimliği.",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "additionalProperties": true,
                "nullable": true
              },
              "whatsapp": {
                "type": "object",
                "nullable": true,
                "description": "Bu API yanıtında daima null."
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "$ref": "#/components/schemas/PaymentsEArchiveDownload"
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "$ref": "#/components/schemas/PaymentsEArchivePhoneResult"
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "sonuc": {
                        "type": "string"
                      },
                      "msg": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": true,
                    "description": "GİB iptal sonucu; sağlayıcıya göre değişebilir."
                  }
                ]
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean"
              },
              "result": {
                "$ref": "#/components/schemas/PaymentsEArchiveDraftResult"
              },
              "invoiceDetails": {
                "$ref": "#/components/schemas/PaymentsEArchiveCalculatedInvoice"
              }
            },
            "additionalProperties": true,
            "required": ["status"]
          }
        ],
        "description": "logout/sign message; getUserData kullanıcı; query dizi; html HTML ve dosya alanları; download dosya sonucu; cancel GİB sonucu; verifyPhoneNumber phone/oid; send taslak sonucu."
      },
      "PaymentsEArchiveCalculatedInvoice": {
        "type": "object",
        "properties": {
          "faturaTarihi": {
            "type": "string"
          },
          "saat": {
            "type": "string"
          },
          "paraBirimi": {
            "type": "string"
          },
          "dovzTLkur": {
            "type": "number"
          },
          "faturaTipi": {
            "type": "string"
          },
          "vknTckn": {
            "type": "string"
          },
          "aliciUnvan": {
            "type": "string"
          },
          "matrah": {
            "type": "number"
          },
          "malhizmetToplamTutari": {
            "type": "number"
          },
          "toplamIskonto": {
            "type": "number"
          },
          "hesaplanankdv": {
            "type": "number"
          },
          "vergilerToplami": {
            "type": "number"
          },
          "vergilerDahilToplamTutar": {
            "type": "number"
          },
          "odenecekTutar": {
            "type": "number"
          },
          "not": {
            "type": "string"
          },
          "malHizmetTable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentsEArchiveCalculatedLine"
            }
          }
        },
        "additionalProperties": true,
        "description": "GİB taslağına iletilen hesaplanmış alanlar; istemci toplamları yeniden hesaplanmaz."
      },
      "PaymentsEArchiveCalculatedLine": {
        "type": "object",
        "properties": {
          "malHizmet": {
            "type": "string"
          },
          "miktar": {
            "type": "number"
          },
          "birim": {
            "type": "string"
          },
          "birimFiyat": {
            "type": "number"
          },
          "fiyat": {
            "type": "number"
          },
          "iskontoTutari": {
            "type": "number"
          },
          "kdvOrani": {
            "type": "number"
          },
          "kdvTutari": {
            "type": "number"
          }
        },
        "additionalProperties": true,
        "description": "Özel vergi alanları belgeye göre eklenebilir."
      },
      "PaymentsEArchiveCancelInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["cancel"]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentsEArchiveDocument"
              },
              {
                "type": "object",
                "required": ["ettn", "belgeTarihi"],
                "properties": {
                  "ettn": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "belgeTarihi": {
                    "type": "string",
                    "description": "DD/MM/YYYY, DD-MM-YYYY veya YYYY-MM-DD"
                  }
                }
              }
            ]
          }
        },
        "additionalProperties": true,
        "description": "data.ettn geçerli UUID, data.belgeTarihi iptal edilecek belgenin gerçek tarihi olmalıdır: DD/MM/YYYY, DD-MM-YYYY veya YYYY-MM-DD. Belge o gün bağlı hesabın listesinde doğrulanır.",
        "required": ["func", "reason", "data"]
      },
      "PaymentsEArchiveCustomer": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Alıcı adı/ünvanı."
          },
          "TaxNumber": {
            "type": "string",
            "description": "Alıcı vergi/kimlik numarası; boşsa nihai tüketici değeri kullanılır."
          },
          "District": {
            "type": "string",
            "description": "İlçe."
          },
          "Address": {
            "type": "string",
            "description": "Adres."
          },
          "City": {
            "type": "string",
            "description": "İl."
          },
          "Country": {
            "type": "string",
            "description": "Ülke; boşsa TÜRKİYE."
          },
          "Phone": {
            "type": "string",
            "description": "Telefon."
          },
          "Mail": {
            "type": "string",
            "description": "E-posta."
          },
          "TaxOffice": {
            "type": "string",
            "description": "Vergi dairesi; boşsa City."
          }
        },
        "additionalProperties": true,
        "required": ["Name"]
      },
      "PaymentsEArchiveDesign": {
        "type": "object",
        "properties": {
          "logo": {
            "type": "string",
            "description": "Logo URL değeri.",
            "format": "uri",
            "nullable": true
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Banka adı."
                },
                "currency": {
                  "type": "string",
                  "description": "Gösterim para birimi."
                },
                "IBAN": {
                  "type": "string",
                  "description": "Gösterim IBAN değeri."
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true,
        "description": "Görünüm ayarı; veri doğrudan kaydedilir, dosya yükleme yapılmaz."
      },
      "PaymentsEArchiveDocument": {
        "type": "object",
        "properties": {
          "ettn": {
            "type": "string"
          },
          "belgeNumarasi": {
            "type": "string"
          },
          "aliciVknTckn": {
            "type": "string"
          },
          "aliciUnvanAdSoyad": {
            "type": "string"
          },
          "belgeTarihi": {
            "type": "string"
          },
          "belgeTuru": {
            "type": "string"
          },
          "onayDurumu": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "Sorgudan dönen belge tanımlayıcıları; ek sağlayıcı alanları bulunabilir. İmzalama/iptalde sorgu kaydı korunur."
      },
      "PaymentsEArchiveDownload": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "fileInfo": {
            "$ref": "#/components/schemas/PaymentsEArchiveFileInfo"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "Belge indirme sonucu. İçeriği kullanmadan önce başarı durumunu ve dönen alanları kontrol edin."
      },
      "PaymentsEArchiveDownloadInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["download"]
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "signed": {
            "type": "boolean"
          }
        },
        "additionalProperties": true,
        "required": ["func", "uuid", "signed"]
      },
      "PaymentsEArchiveDraftResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": true,
        "description": "Yalnız sağlayıcının kesin ETTN kanıtı varsa uuid bulunur; aksi durumda başarı yerine review_required işlem hatası döner."
      },
      "PaymentsEArchiveFileInfo": {
        "type": "object",
        "properties": {
          "transactionsId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$"
          }
        },
        "additionalProperties": true,
        "description": "Belge dosyasının bilgileri. Muhasip kaydıyla eşleşirse transactionsId bulunur. Diğer alanları işlem cevabına göre değerlendirin."
      },
      "PaymentsEArchiveHtmlInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["html"]
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "signed": {
            "type": "boolean"
          }
        },
        "additionalProperties": true,
        "required": ["func", "uuid", "signed"]
      },
      "PaymentsEArchiveLineTax": {
        "type": "object",
        "properties": {
          "taxCode": {
            "type": "string"
          },
          "percent": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "additionalProperties": true,
        "required": ["taxCode", "total", "percent"]
      },
      "PaymentsEArchiveLoginInput": {
        "type": "object",
        "properties": {
          "userid": {
            "type": "string",
            "description": "GİB kullanıcı adı.",
            "minLength": 1,
            "maxLength": 250
          },
          "password": {
            "type": "string",
            "description": "GİB parolası.",
            "format": "password",
            "writeOnly": true,
            "minLength": 1,
            "maxLength": 1024
          }
        },
        "additionalProperties": false,
        "required": ["userid", "password"]
      },
      "PaymentsEArchiveLoginResult": {
        "type": "object",
        "properties": {
          "taxIDOrTRID": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "surname": {
            "type": "string"
          },
          "registryNo": {
            "type": "string"
          },
          "mersisNo": {
            "type": "string"
          },
          "taxOffice": {
            "type": "string"
          },
          "fullAddress": {
            "type": "string"
          },
          "buildingName": {
            "type": "string"
          },
          "buildingNumber": {
            "type": "string"
          },
          "doorNumber": {
            "type": "string"
          },
          "town": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "webSite": {
            "type": "string"
          },
          "businessCenter": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "GİB kullanıcı bilgileri; doluluk hesaba göre değişir."
      },
      "PaymentsEArchiveLogoutInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["logout"]
          }
        },
        "additionalProperties": true,
        "description": "GİB oturumu açılır ve kapatılır.",
        "required": ["func"]
      },
      "PaymentsEArchivePhoneResult": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "SMS gönderilen telefon.",
            "nullable": true
          },
          "oid": {
            "type": "string",
            "description": "SMS işlem kimliği.",
            "nullable": true
          }
        },
        "additionalProperties": true,
        "required": ["phone", "oid"]
      },
      "PaymentsEArchiveQueryInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["query"]
          },
          "type": {
            "type": "string",
            "enum": ["giden", "itiraz"]
          },
          "date": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "additionalProperties": true,
        "required": ["func", "type", "date"]
      },
      "PaymentsEArchiveSendInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["send"]
          },
          "issueDate": {
            "type": "string",
            "format": "date"
          },
          "currencyCode": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "exchangeRate": {
            "type": "number",
            "description": "TRY dışında gereklidir."
          },
          "InvoiceType": {
            "type": "string",
            "default": "SATIS"
          },
          "CustomerInfo": {
            "$ref": "#/components/schemas/PaymentsEArchiveCustomer"
          },
          "total": {
            "$ref": "#/components/schemas/PaymentsEArchiveSendTotals"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentsEArchiveSendLine"
            },
            "minItems": 1,
            "maxItems": 1000
          },
          "description": {
            "type": "string"
          },
          "Notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "TaxExemptionReasonInfo": {
            "type": "object",
            "properties": {
              "KDVExemptionReasonCode": {
                "type": "string"
              }
            },
            "additionalProperties": true,
            "description": "ISTISNA türü için gereklidir."
          },
          "OrderReference": {
            "type": "object",
            "properties": {
              "Value": {
                "type": "string"
              },
              "IssueDate": {
                "type": "string",
                "format": "date"
              }
            },
            "additionalProperties": true
          },
          "OKCInfo": {
            "type": "object",
            "properties": {
              "ID": {
                "type": "string"
              },
              "IssueDate": {
                "type": "string",
                "format": "date"
              },
              "Time": {
                "type": "string"
              },
              "DocumentDescription": {
                "type": "string"
              },
              "ZNo": {
                "type": "string"
              },
              "EndPointID": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "ReturnInvoiceInfo": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "InvoiceNumber": {
                  "type": "string"
                },
                "IssueDate": {
                  "type": "string",
                  "format": "date"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true,
        "description": "GİB taslağı oluşturur. Zorunlu mali alanlar doğrulanır; TRY dışındaki para birimlerinde pozitif exchangeRate gerekir. ISTISNA için istisna kodu, TEVKIFAT için withholdingTaxTotal gerekir. Kesin ETTN alınamazsa belge UUID dönmeden review_required olur.",
        "required": ["func", "issueDate", "currencyCode", "CustomerInfo", "total", "lines"]
      },
      "PaymentsEArchiveSendLine": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": true,
            "minimum": 0
          },
          "unitType": {
            "type": "string",
            "default": "C62"
          },
          "price": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "allowancePercent": {
            "type": "number",
            "default": 0
          },
          "allowanceTotal": {
            "type": "number",
            "description": "İskonto yoksa 0 gönderin."
          },
          "KDVPercent": {
            "type": "number"
          },
          "KDVTotal": {
            "type": "number"
          },
          "withholdingTax": {
            "$ref": "#/components/schemas/PaymentsEArchiveWithholding"
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentsEArchiveLineTax"
            }
          },
          "specialBasePrice": {
            "type": "number",
            "description": "OZELMATRAH için."
          },
          "specialBaseReason": {
            "type": "string",
            "description": "OZELMATRAH için."
          }
        },
        "additionalProperties": true,
        "required": ["name", "quantity", "price", "total", "allowanceTotal", "KDVPercent", "KDVTotal", "taxes"]
      },
      "PaymentsEArchiveSendTotals": {
        "type": "object",
        "properties": {
          "linesTotal": {
            "type": "number"
          },
          "linesAllowanceTotal": {
            "type": "number"
          },
          "taxesTotals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentsEArchiveTax"
            }
          },
          "payableAmount": {
            "type": "number"
          },
          "withholdingTaxTotal": {
            "type": "number",
            "description": "TEVKIFAT için."
          }
        },
        "additionalProperties": true,
        "required": ["linesTotal", "linesAllowanceTotal", "taxesTotals", "payableAmount"]
      },
      "PaymentsEArchiveSignInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["sign"]
          },
          "smsCode": {
            "type": "string",
            "pattern": "^\\d{4,8}$"
          },
          "oid": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentsEArchiveDocument"
              },
              {
                "type": "object",
                "required": ["ettn"],
                "properties": {
                  "ettn": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            ]
          }
        },
        "additionalProperties": true,
        "required": ["func", "smsCode", "oid", "data"],
        "description": "data.ettn geçerli belge UUID olmalıdır. oid en fazla 200 karakter, smsCode 4–8 rakam metnidir. Aynı belge+oid değişen kodla tekrar kullanılamaz 409; kesin redden sonra yeni SMS challenge/oid gerekir."
      },
      "PaymentsEArchiveTax": {
        "type": "object",
        "properties": {
          "taxCode": {
            "type": "string"
          },
          "percent": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "additionalProperties": true,
        "required": ["taxCode", "total"]
      },
      "PaymentsEArchiveUser": {
        "type": "object",
        "properties": {
          "taxIDOrTRID": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "surname": {
            "type": "string"
          },
          "registryNo": {
            "type": "string"
          },
          "mersisNo": {
            "type": "string"
          },
          "taxOffice": {
            "type": "string"
          },
          "fullAddress": {
            "type": "string"
          },
          "buildingName": {
            "type": "string"
          },
          "buildingNumber": {
            "type": "string"
          },
          "doorNumber": {
            "type": "string"
          },
          "town": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "webSite": {
            "type": "string"
          },
          "businessCenter": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "GİB kullanıcı bilgileri; doluluk hesaba göre değişir."
      },
      "PaymentsEArchiveUserInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["getUserData"]
          }
        },
        "additionalProperties": true,
        "required": ["func"]
      },
      "PaymentsEArchiveVerifyPhoneInput": {
        "type": "object",
        "properties": {
          "func": {
            "type": "string",
            "enum": ["verifyPhoneNumber"]
          }
        },
        "additionalProperties": true,
        "description": "Hesaba kayıtlı telefona SMS kodu gönderilir.",
        "required": ["func"]
      },
      "PaymentsEArchiveWithholding": {
        "type": "object",
        "properties": {
          "percent": {
            "type": "number"
          },
          "taxCode": {
            "type": "string"
          },
          "total": {
            "type": "number"
          }
        },
        "additionalProperties": true,
        "required": ["percent", "total"]
      },
      "PaymentsMutationResult": {
        "type": "object",
        "properties": {
          "acknowledged": {
            "type": "boolean"
          },
          "matchedCount": {
            "type": "integer"
          },
          "modifiedCount": {
            "type": "integer"
          },
          "upsertedCount": {
            "type": "integer"
          },
          "upsertedId": {
            "type": "string",
            "description": "Kayıt kimliği.",
            "pattern": "^[a-fA-F0-9]{24}$",
            "nullable": true
          }
        },
        "additionalProperties": true,
        "description": "Güncelleme/ekleme işlem sayıları."
      },
      "PaymentsPosAccount": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "isApproval": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "bankCode": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "NAME": {
                "type": "string"
              },
              "OWNER_NAME": {
                "type": "string"
              },
              "OWNER_SURNAME": {
                "type": "string"
              },
              "COMPANY_NAME": {
                "type": "string"
              },
              "EMAIL": {
                "type": "string"
              },
              "GSM": {
                "type": "string"
              },
              "BANK_NAME": {
                "type": "string"
              },
              "IBAN": {
                "type": "string"
              },
              "TAX_OFFICE": {
                "type": "string"
              },
              "TAX_NUMBER": {
                "type": "string"
              },
              "OWNER_IDENTITY_NUMBER": {
                "type": "string"
              },
              "TYPE": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "description": "Başvuru ve işletme özeti. Erişim anahtarı cevapta verilmez."
          },
          "commission": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "Taksit adedi anahtarı ve komisyon oranı."
          },
          "installments": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Taksit adedi anahtarı ve kullanım izni."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "archived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PaymentsPosCalculation": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "dealerR": {
            "type": "number"
          },
          "payable": {
            "type": "number"
          },
          "bank": {
            "type": "number"
          },
          "bankR": {
            "type": "number"
          },
          "dealer": {
            "type": "number"
          },
          "instAmount": {
            "type": "number"
          },
          "installment": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "PaymentsPosTransaction": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği."
          },
          "amount": {
            "type": "number"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "contactsId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentsContactBrief"
              }
            ],
            "nullable": true
          },
          "dealer": {
            "type": "number"
          },
          "isApi": {
            "type": "boolean"
          },
          "changeable": {
            "type": "boolean"
          },
          "approval": {
            "type": "boolean"
          },
          "status": {
            "type": "boolean",
            "description": "Ödeme sonucu; üst düzey status alanından farklıdır."
          },
          "returnStatus": {
            "type": "boolean"
          },
          "payable": {
            "type": "number"
          },
          "orderId": {
            "type": "string",
            "description": "Kayıt kimliği."
          },
          "installment": {
            "type": "integer"
          },
          "commission": {
            "type": "number"
          },
          "calcData": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentsPosCalculation"
            }
          },
          "approvedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "returnDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "PaymentsPosTransactionListRow": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Kayıt kimliği."
          },
          "amount": {
            "type": "number"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "contactsId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentsContactBrief"
              }
            ],
            "nullable": true
          },
          "dealer": {
            "type": "number"
          },
          "isApi": {
            "type": "boolean"
          },
          "changeable": {
            "type": "boolean"
          }
        },
        "additionalProperties": true,
        "description": "Liste yanıtında seçilen alanlar. Ödeme durumu ve komisyon detaydan okunur."
      },
      "RateLimitError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "enum": [429]
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": ["status", "error", "message"]
      },
      "Success": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "enum": [true],
            "example": true
          }
        },
        "required": ["status"],
        "additionalProperties": true
      },
      "ValidationErrors": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "enum": [false]
          },
          "result": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "joiType": {
                  "type": "string"
                },
                "path": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "label": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "required": ["status", "result"]
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "API kimliği/parolası, erişim süresi veya firma doğrulanamadı.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            },
            "description": "Basic realm=\"Muhasip API\", charset=\"UTF-8\""
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": false,
              "code": "UNAUTHORIZED",
              "message": "API kimlik bilgileri doğrulanamadı."
            }
          }
        }
      },
      "Forbidden": {
        "description": "Ürün, IP, modül izni veya kaynak kapsamı uygun değil.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": false,
              "message": "Ürün, IP, modül izni veya kaynak kapsamı uygun değil."
            }
          }
        }
      },
      "NotFound": {
        "description": "Kayıt bulunamadı veya bu erişim bağlamında kullanılamıyor.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": false
            }
          }
        }
      },
      "ValidationError": {
        "description": "Alan doğrulaması başarısız.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationErrors"
            },
            "example": {
              "status": false,
              "result": [
                {
                  "type": "required",
                  "joiType": "any.required",
                  "path": "title",
                  "label": "title"
                }
              ]
            }
          }
        }
      },
      "InternalError": {
        "description": "İşleme hatası. Bazı işleme hataları 411 olarak dönebilir.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": false,
              "message": "Üzgünüz, bir hata oluştu."
            }
          }
        }
      },
      "Unprocessable": {
        "description": "İşleme özgü ret, hizmet veya iş kuralı hatası.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": false
            }
          }
        }
      },
      "RateLimited": {
        "description": "Ortak istek sınırı aşıldı; sayısal status alanı kullanılır.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RateLimitError"
            },
            "example": {
              "status": 429,
              "error": "Too Many Requests",
              "message": "Rate limit exceeded. Please try again later."
            }
          }
        }
      }
    }
  }
}
