{"openapi":"3.1.0","info":{"title":"Aposkal API","description":"# Giriş\n\n## API Hakkında\n\nAposkal API'yi kullanmak veya görüşlerinizi bizimle paylaşmak isterseniz lütfen bizimle destek@aposkal.com adresi üzerinden iletişime geçiniz.\n\nAPI'yi kullanarak Aposkal verilerine ulaşabilir ve kendi yazdığınız uygulamalar ile entegre edebilirsiniz. API vasıtasıyla Aposkal Web arayüzü ile yapılan hemen her işlemi gerçekleştirebilirsiniz.\n\n- Dökümantasyon OpenAPI 3.1.0 ile üretilmektedir.\n\n## Ortamlar\n\n| Ortam | API |\n|-------|-----|\n| Canlı | `https://api.aposkal.com` |\n| Test | `https://api.dev.aposkal.com` |\n\nTest ortamı için aldığınız Api-Key / Api-Secret ikilisi **yalnızca test ortamında** geçerlidir; canlı ortam için ayrı bir anahtar oluşturmanız gerekir. Entegrasyonunuzu test ortamında doğrulayın: burada oluşturduğunuz belgeler GİB'e gerçek belge olarak gitmez.\n\nBelge dosyalarını indiren uçlar (`GET /{companyId}/document/{documentId}/download` gibi) gövde döndürmez; her ortamın kendi CDN adresindeki imzalı bir bağlantıya **302** ile yönlendirir (test ortamında `cdn.dev.aposkal.com`). İstemcinizin yönlendirmeleri takip ediyor olması gerekir. Belge indirmede `format` yalnızca `pdf`, `xml` ve `html` değerlerini alır; `ExportFormat` şemasındaki diğer değerler bu uçta kabul edilmez.\n\n## Genel Bilgiler\n\n- API metodlarına erişmek için baz URL olarak `BASE_URL/companyId` adresi kullanılır.\n  - Bu yapıda kullanılan `companyId` parametresi bilgisine erişilmek istenin firmanın Aposkal veritabanındaki kayıt numarasıdır.\n  - CompanyId bilgisine, Aposkal web uygulamasında ilgili şirket sayfasının URL’inde (örneğin https://app.aposkal.com/acc/1) acc/ ifadesinden sonra gelen sayıdan ulaşılabilir.(Örneğin bu firmanın companyId değeri -1- dir.)\n  - Örneğin 1 numaralı firmanın müşteri/tedarikçi listesine erişmek için `https://api.aposkal.com/1/account` adresi kullanılır.\n- İstekleri gönderirken `Content-Type` header'ı olarak `application/json` veya `application/vnd.api+json` göndermelisiniz.\n- Yeni bir kayıt oluştururken **ilgili** kaydın `ID` parametresini boş göndermeli veya hiç göndermemelisiniz.\n- Liste döndüren tüm uçlar sayfalıdır: `page` (0'dan başlar), `size` (varsayılan 20) ve `sort` parametrelerini alır; yanıt `content`, `pageNumber`, `pageSize`, `totalElements`, `totalPages` ve `isLast` alanlarını taşır. \"En son N kayıt\" için `size=N` gönderin; ayrı bir `limit` parametresi yoktur.\n- Tarih alanları aksi belirtilmedikçe `yyyy-MM-dd`, saat alanları `HH:mm:ss` biçimindedir. İstisnası `GET /api/currency` ucudur; `startDate` ve `endDate` orada `gg-aa-yyyy` bekler.\n- Oran alanları (`discountRate`, `taxRate`, `rate`) yüzde değil **0 ile 1 arasında kesirdir**: %20 için `0.2` gönderin.\n\n# Authentication\n\n<!-- ReDoc-Inject: <security-definitions> -->\n\nAposkal API kimlik doğrulama için Api-Key ve Api-Secret ikilisini kullanmaktadır. Bu protokolü destekleyen istemci kütüphanelerini kullanarak oturum açabilir ve API'yi kullanabilirsiniz.\n\nGerekli Api-Key ve Api-Secret bilgilerini almak için profilinizde bulunan Api Anahtarları sayfasına bakabilirsiniz.\n\n## API anahtarının yetkisi\n\n**Bir API anahtarı, onu oluşturan kullanıcıyı temsil eder ve o kullanıcının rolünü taşır.** `USER` rolündeki bir kullanıcının oluşturduğu anahtar da `USER` rolündedir; anahtara ayrıca rol atanamaz. Yükseltilmiş yetki gerektiren uçları kullanacaksanız anahtarı `ADMIN`, `OWNER` veya `ACCOUNTANT` rolündeki bir kullanıcıyla oluşturmanız gerekir.\n\nAnahtarınızın rolünü `GET /profile/company` yanıtındaki `userRole` alanından görebilirsiniz. Yetkisi olmayan bir uca yapılan istek `403` ve `FORBIDDEN — Bu işlemi yapmaya yetkiniz bulunmuyor` döner.\n\nUçların yetki seviyeleri:\n\n| Seviye | Gereken rol | Kapsam |\n|--------|-------------|--------|\n| Firma üyeliği | Firmaya bağlı herhangi bir rol | Okuma uçlarının çoğu, belge oluşturma, cari ve ürün yönetimi, raporlar, bordro |\n| Standart roller | `ADMIN`, `OWNER`, `USER`, `ACCOUNTANT` | Belge ve cari üzerinde değişiklik yapan işlemler |\n| Yükseltilmiş roller | `ADMIN`, `OWNER`, `ACCOUNTANT` | Muhasebe kayıtları (`/accRec`, `/accRec/mizan`), silme işlemleri, firma ayarları |\n| Resmileştirme | `GIB_SUBMIT` ya da `ADMIN`, `OWNER`, `ACCOUNTANT` | `POST /document/{documentId}/cancel` ve GİB'e belge gönderen uçlar |\n\n`POST /{companyId}/document/{documentId}/cancel` yanıtı düz bir metindir; iptalin ulaştığı durumu belgenin kendisinden okumanız gerekir. Belgenin `status` alanı iptal GİB'e iletilene kadar `CANCEL_PENDING`, tamamlandığında `CANCELLED` olur.\n\n# Belge Oluşturma ve Resmileştirme\n\nAkış her senaryoda aynıdır: `POST /{companyId}/document` ile taslak oluşturulur, sonra `POST /{companyId}/document/{documentId}/formalize` ile resmileştirilir. Resmileştirme senkrondur ve belge numarası bu adımda verilir.\n\n## Senaryo ve yön kuralları\n\n`scenario` ve `direction` birlikte doğrulanır. Aşağıdaki iki kural sezgiye ters göründüğü için ayrıca belirtilmelidir:\n\n- `TAHSILAT` senaryosunda `direction` **`OUTGOING`** olmalıdır. Müşteriden alınan tahsilat \"giden\" belgedir.\n- `ODEME` senaryosunda `direction` **`INCOMING`** olmalıdır.\n\n`TAHSILAT` ve `ODEME` senaryolarındaki belgeler **resmileştirilemez**; bunlar kendi akışlarından kaydedilir ve `SAVED` durumu bu belgeler için nihai durumdur. Bu belgeler için `formalize` çağırmayın.\n\n## Alıcının e-Fatura mükellefi olup olmadığını belirlemek\n\nSenaryo, taslak **oluşturulurken** doğru seçilmelidir; resmileştirme adımında değiştirilemez. e-Fatura mükellefi bir alıcıya `EARSIVFATURA` senaryosuyla taslak açmak `400` ve `E-Fatura mükellefine E-arşiv fatura gönderilemez` döner.\n\nDoğru senaryoyu seçmek için önce alıcıyı sorgulayın:\n\n```\nGET /{companyId}/gibUser/checkUser?vkn=1234567890\n```\n\nYanıt, alıcının GİB etiketlerinin listesidir. Alıcı e-Fatura mükellefi değilse boş dizi döner.\n\n```json\n[\n  {\n    \"identifier\": \"1234567890\",\n    \"alias\": \"urn:mail:defaultpk@firma.com.tr\",\n    \"title\": \"Örnek Sanayi ve Ticaret A.Ş.\",\n    \"type\": \"OZEL\",\n    \"unit\": \"PK\",\n    \"registertime\": \"2021-03-14T00:00:00\"\n  }\n]\n```\n\n- Boş dizi döndüyse alıcı e-Fatura mükellefi değildir → `EARSIVFATURA` kullanın.\n- Dolu döndüyse alıcı e-Fatura mükellefidir → `TEMELFATURA` ya da `TICARIFATURA` kullanın ve dönen `alias` değerini resmileştirmede gönderin.\n- `registertime`, alıcının o etiketi kullanmaya başladığı andır. Belgenin düzenleme tarihi bu tarihten önce olamaz.\n- e-İrsaliye için aynı sorguyu `GET /{companyId}/gibUser/checkDispatchUser` ile yapın; e-Fatura ve e-İrsaliye etiketleri ayrıdır.\n\n## Vergi alanları\n\nSatır vergisindeki `taxId`, vergi tanımları ucundan gelen **oran kimliğidir**:\n\n```\nGET /api/definitions/tax?category=VAT\n```\n\nBu uç KDV için `taxList` dizisini boş döndürür; her KDV oranı `taxRates` dizisinde kendi kimliğiyle gelir:\n\n```json\n{\n  \"taxList\": [],\n  \"taxRates\": [\n    { \"id\": \"a3f1c8d2-5b47-4e90-8a6c-1d2f3b4e5c67\", \"label\": \"%20\", \"value\": 0.2, \"code\": \"0015\" }\n  ]\n}\n```\n\n`taxRates[].id` değerini `tax[].taxId` alanına yazın. `value` yüzde değil kesirdir (`0.2` = %20).\n\nBir vergi nesnesinde `taxId`, `category`, `label`, `code`, `description` ve `amount` alanlarının tamamı zorunludur.\n\n**Belge düzeyindeki `tax` dizisini mutlaka doldurun.** Satırlarda KDV olup belge düzeyinde `tax` boş bırakılırsa belge resmileştirilemez: UBL'de `TaxTotal` üretilmediği için GİB belgeyi şema hatasıyla reddeder ve belge numarası harcanmış olur.\n\n## 1. e-Arşiv faturası\n\nAlıcı e-Fatura mükellefi değilken kullanılır.\n\n```\nPOST /{companyId}/document\n```\n\n```json\n{\n  \"accountId\": \"0c6f4b2e-9a1d-4b7c-8f3e-2d5a7c1b9e04\",\n  \"scenario\": \"EARSIVFATURA\",\n  \"documentType\": \"NORMAL\",\n  \"direction\": \"OUTGOING\",\n  \"status\": \"SAVED\",\n  \"date\": \"2026-11-07\",\n  \"time\": \"14:30:00\",\n  \"dueDate\": \"2026-12-07\",\n  \"currency\": \"TRY\",\n  \"exchangeRate\": 1,\n  \"total\": 1200.00,\n  \"lines\": [\n    {\n      \"productId\": \"7b2e1f44-3c8a-4d61-9e05-5a8f2c6d7b31\",\n      \"productName\": \"Danışmanlık hizmeti\",\n      \"description\": \"Kasım 2026 danışmanlık bedeli\",\n      \"unit\": \"C62\",\n      \"quantity\": 10,\n      \"unitPrice\": 100.00,\n      \"discountRate\": 0,\n      \"tax\": [\n        {\n          \"taxId\": \"a3f1c8d2-5b47-4e90-8a6c-1d2f3b4e5c67\",\n          \"category\": \"VAT\",\n          \"label\": \"%20\",\n          \"code\": \"0015\",\n          \"description\": \"KDV\",\n          \"base\": 1000.00,\n          \"rate\": 0.2,\n          \"amount\": 200.00\n        }\n      ]\n    }\n  ],\n  \"tax\": [\n    {\n      \"taxId\": \"a3f1c8d2-5b47-4e90-8a6c-1d2f3b4e5c67\",\n      \"category\": \"VAT\",\n      \"label\": \"%20\",\n      \"code\": \"0015\",\n      \"description\": \"KDV\",\n      \"base\": 1000.00,\n      \"rate\": 0.2,\n      \"amount\": 200.00\n    }\n  ]\n}\n```\n\nYanıt oluşturulan belgeyi döndürür; sonraki adımda ihtiyaç duyacağınız `id` alanı buradadır.\n\nResmileştirme:\n\n```\nPOST /{companyId}/document/{documentId}/formalize\n```\n\n```json\n{\n  \"scenario\": \"EARSIVFATURA\",\n  \"documentType\": \"NORMAL\",\n  \"alias\": \"\"\n}\n```\n\ne-Arşivde `alias` boş gönderilir; alıcının GİB etiketi yoktur. Resmileştirme sonrası belgenin `status` alanı `FORMALIZED`, numarası `documentNo` alanındadır.\n\n## 2. e-Fatura — TEMEL\n\nAlıcı e-Fatura mükellefiyken ve ticari süreç (kabul/ret) işletilmeyecekken kullanılır. Gövde e-Arşiv örneğiyle aynıdır; yalnızca senaryo değişir:\n\n```json\n{\n  \"scenario\": \"TEMELFATURA\",\n  \"documentType\": \"NORMAL\",\n  \"direction\": \"OUTGOING\",\n  \"status\": \"SAVED\",\n  \"date\": \"2026-11-07\",\n  \"time\": \"14:30:00\",\n  \"dueDate\": \"2026-12-07\",\n  \"currency\": \"TRY\",\n  \"exchangeRate\": 1,\n  \"total\": 1200.00,\n  \"lines\": [ \"e-Arşiv örneğindeki satır\" ],\n  \"tax\": [ \"e-Arşiv örneğindeki belge düzeyi vergi\" ]\n}\n```\n\nResmileştirmede `checkUser` yanıtından aldığınız `alias` **zorunludur**:\n\n```json\n{\n  \"scenario\": \"TEMELFATURA\",\n  \"documentType\": \"NORMAL\",\n  \"alias\": \"urn:mail:defaultpk@firma.com.tr\"\n}\n```\n\n`alias` boş gönderilirse `400` ve `Temel/Ticari/Yatırım Teşvik/İlaç-Tıbbi Cihaz faturalarda Gib alias zorunludur` döner.\n\n## 3. e-Fatura — TİCARİ\n\nAlıcının faturayı kabul ya da reddetme hakkını kullanacağı durumda seçilir. `TEMELFATURA` ile tek farkı senaryodur; `alias` yine zorunludur.\n\n```json\n{\n  \"scenario\": \"TICARIFATURA\",\n  \"documentType\": \"NORMAL\",\n  \"alias\": \"urn:mail:defaultpk@firma.com.tr\"\n}\n```\n\nResmileştirmeden sonra alıcının yanıtı belgenin durumuna yansır: kabulde `ACCEPTED`, rette `REJECTED`.\n\n## 4. e-İrsaliye\n\nİrsaliye faturadan ayrı bir belgedir. Faturaya irsaliye bilgisi eklemek ile ayrı bir e-İrsaliye düzenlemek farklı işlemlerdir:\n\n- `docDetail.deliveryNote` ya da `docDetail.dispatch` **`true`** gönderilirse belge \"irsaliyeli fatura\" sayılır. Bu durumda `docDetail` içinde `exitAddressId`, `arrivalAddressId` ve `dispatchInfo` zorunlu olur.\n- Ayrı bir e-İrsaliye için `scenario` olarak `TEMELIRSALIYE` kullanılır ve `docDetail.deliveryNote` **`false`** gönderilir.\n\n```\nPOST /{companyId}/document\n```\n\n```json\n{\n  \"accountId\": \"0c6f4b2e-9a1d-4b7c-8f3e-2d5a7c1b9e04\",\n  \"scenario\": \"TEMELIRSALIYE\",\n  \"documentType\": \"NORMAL\",\n  \"direction\": \"OUTGOING\",\n  \"status\": \"SAVED\",\n  \"date\": \"2026-11-07\",\n  \"time\": \"09:15:00\",\n  \"dueDate\": \"2026-11-07\",\n  \"currency\": \"TRY\",\n  \"exchangeRate\": 1,\n  \"total\": 1000.00,\n  \"docDetail\": {\n    \"deliveryNote\": false,\n    \"exitAddressId\": \"1042\",\n    \"arrivalAddressId\": \"2087\",\n    \"invoiceAddress\": \"2087\"\n  },\n  \"lines\": [\n    {\n      \"productId\": \"7b2e1f44-3c8a-4d61-9e05-5a8f2c6d7b31\",\n      \"productName\": \"Çelik profil\",\n      \"description\": \"40x40 kutu profil\",\n      \"unit\": \"KGM\",\n      \"quantity\": 500,\n      \"unitPrice\": 2.00,\n      \"discountRate\": 0,\n      \"tax\": []\n    }\n  ],\n  \"tax\": []\n}\n```\n\n`exitAddressId` sevkiyatın çıktığı adres (kendi firmanızın adresi), `arrivalAddressId` ve `invoiceAddress` ise carinin adresidir. Adres kimliklerini `GET /{companyId}/account/{accountId}/address` ve firma adresleri için `GET /{companyId}/company` ucundan alırsınız.\n\nResmileştirme:\n\n```\nPOST /{companyId}/document/{documentId}/formalize\n```\n\n```json\n{\n  \"scenario\": \"TEMELIRSALIYE\",\n  \"documentType\": \"NORMAL\",\n  \"alias\": \"urn:mail:irsaliyepk@firma.com.tr\",\n  \"shippingMethod\": \"carrier\",\n  \"drivers\": [\n    { \"name\": \"Ahmet Yılmaz\", \"tckn\": \"11111111111\" }\n  ],\n  \"vehiclePlate\": \"34ABC123\"\n}\n```\n\n`shippingMethod` irsaliye senaryolarında zorunludur; boş gönderilirse `400` ve `Sevkiyat yöntemi seçimi zorunludur` döner. Yalnızca iki değer alır ve **tam olarak küçük harfle** gönderilmelidir; başka bir yazım `Sevkiyat yöntemi geçersiz` hatası verir.\n\n| `shippingMethod` | Anlamı | Ek zorunlu alanlar |\n|------------------|--------|--------------------|\n| `carrier` | Sevkiyat kendi aracınızla yapılır | `vehiclePlate` ya da `trailerPlate` (en az biri) ve en az bir `drivers` kaydı |\n| `logistics` | Sevkiyat bir taşıyıcı firma ile yapılır | `companyName` ve 10 haneli `taxNumber` (taşıyıcının ünvanı ve VKN'si) |\n\n`drivers` kayıtları `name`, `tckn`, `isForeign` ve `passportNo` alanlarını taşır; yabancı şoför için `isForeign: true` ve `passportNo` gönderilir. Aynı şoför iki kez gönderilemez.\n\n`alias` için e-Fatura etiketi değil, `checkDispatchUser` yanıtından gelen e-İrsaliye etiketi kullanılır.\n\nİrsaliye belgelerinin yanıtındaki `docDetail`, gönderdiğiniz alanların yanında resmileştirmede yazılan `drivers`, `vehiclePlate`, `shippingMethod` ve `alias` anahtarlarını da taşır.\n\n## 5. Tahsilat\n\nTahsilat belgesi resmileştirilmez; oluşturulduğunda `SAVED` durumuna geçer ve orada kalır.\n\n```\nPOST /{companyId}/document\n```\n\n```json\n{\n  \"accountId\": \"0c6f4b2e-9a1d-4b7c-8f3e-2d5a7c1b9e04\",\n  \"scenario\": \"TAHSILAT\",\n  \"documentType\": \"NORMAL\",\n  \"direction\": \"OUTGOING\",\n  \"status\": \"SAVED\",\n  \"date\": \"2026-11-07\",\n  \"time\": \"16:00:00\",\n  \"dueDate\": \"2026-11-07\",\n  \"currency\": \"TRY\",\n  \"exchangeRate\": 1,\n  \"total\": 1200.00,\n  \"lines\": [],\n  \"tax\": [],\n  \"payments\": [\n    {\n      \"accountId\": \"5e8d3a17-6c24-49bf-91a0-7f3b2e5d8c46\",\n      \"amount\": 1200.00,\n      \"type\": \"KASA\"\n    }\n  ]\n}\n```\n\n`payments[].accountId` tahsilatın girdiği kasa ya da banka hesabının kimliğidir. `direction` alanının `OUTGOING` olması gerektiğini unutmayın.\n\n# Gelen Kutusu\n\n`GET /{companyId}/inbox` firmaya ulaşan e-belgeleri listeler.\n\nAdına rağmen bu uç yalnızca gelen faturaları içermez: e-İrsaliyeler (`TEMELIRSALIYE`) ve giden kayıtlar (`SEND - …` durumundakiler) da aynı listede döner. Yalnızca gelen faturalarla çalışmak istiyorsanız `scenarios` parametresiyle senaryo bazında daraltın; `direction=INCOMING` tek başına e-irsaliyeleri dışarıda bırakmaz.\n\n## `status` değerleri\n\n`status`, `\"<eylem> - <sonuç>\"` biçiminde birleşik bir metindir. Eylem kaydın hangi aşamada olduğunu, sonuç o aşamanın akıbetini söyler.\n\nEylemler: `RECEIVE`, `SEND`, `LOAD`, `PACKAGE`, `ACCEPT`, `ACCEPTED`, `REJECT`, `REJECTED`, `PARTIALACCEPT`, `PARTIALACCEPTED`, `CANCELLED`, `RECURRING`, `UNKNOWN`.\n\nSonuçlar: `SUCCEED`, `PROCESSING`, `WAIT_APPLICATION_RESPONSE`, `WAIT_GIB_RESPONSE`, `WAIT_SYSTEM_RESPONSE`, `UNKNOWN`.\n\nEylem adlarındaki mastar/geçmiş ayrımı talep ile sonucu birbirinden ayırır:\n\n- `ACCEPT` / `REJECT` / `PARTIALACCEPT`: yanıt **talebi** gönderilmiştir, henüz karşı tarafa ya da GİB'e ulaşmamıştır.\n- `ACCEPTED` / `REJECTED` / `PARTIALACCEPTED`: yanıt **sonuçlanmıştır**.\n\nSık görülen değerler: `RECEIVE - WAIT_APPLICATION_RESPONSE` (yanıt bekleyen gelen fatura), `RECEIVE - SUCCEED`, `ACCEPTED - SUCCEED`, `REJECTED - SUCCEED`, `CANCELLED - SUCCEED`, `LOAD - SUCCEED`, `PARTIALACCEPT - PROCESSING`, `SEND - WAIT_APPLICATION_RESPONSE`.\n\nMetnin okunabilir karşılığı `statusDescription` alanındadır. Tanımadığınız bir değerle karşılaşırsanız kaydı işleme almayın; bilinmeyen durum `UNKNOWN - UNKNOWN` olarak gelir.\n\n## Belgeye dönüştürme\n\nGelen bir faturayı muhasebeleştirmek için önce Aposkal belgesine dönüştürmeniz gerekir:\n\n```\nPOST /{companyId}/inbox/import\n```\n\nUç `202` ve kaç kaydın sıraya alındığını döndürür (`{ \"total\": 1 }`); dönüşüm eşzamansızdır ve kayıt başına birkaç saniye sürer. Oluşan belgede:\n\n- `documentNo` gelen faturanın numarasıdır,\n- `referenceInboxId` gelen faturanın ETTN'idir (büyük harf).\n\nBelge listesinde gelen kutusu kimliğiyle arama yapamazsınız: `searchQuery` bu kimliği eşleştirmez ve `referenceInboxId` için bir süzgeç yoktur. Dönüşümü takip etmek için faturanın numarasını `searchQuery` ile arayın ya da belge listesini tarih aralığıyla süzüp dönen kayıtların `referenceInboxId` alanına bakın.\n\n## Etiketler\n\nEtiketler yalnızca Aposkal belgelerine atanabilir. `PUT /{companyId}/tag/{documentId}/{tagId}` ucuna gelen kutusu kimliği (`REF…`) ya da ETTN gönderilirse `404` ve `Belge bulunamadı` döner; gelen faturayı önce yukarıdaki gibi belgeye dönüştürmeniz gerekir.\n\nBelgeleri etikete göre süzmek için `GET /{companyId}/document` ucunun `tagId` parametresini kullanabilirsiniz.\n\n# Diğer Belge Akışları\n\n## Gider pusulası\n\n`POST /{companyId}/document/expense-note/{documentId}/create` yalnızca **giden** bir belgeden gider pusulası düzenler. Gelen bir belge gönderilirse `400` ve `Sadece giden belge için Gider Pusulası düzenlenebilir` döner.\n\nAynı kaynak belgeden ikinci bir gider pusulası oluşturulamaz; isteği yeniden denemek mükerrer kayıt üretmez.\n\n## Sipariş ve teklif satırları\n\nSipariş (`POST /{companyId}/order`) ve teklif (`POST /{companyId}/salesOffer`) satırlarında:\n\n- `productId` zorunludur; serbest metin satır oluşturulamaz, önce ürünü tanımlamanız gerekir.\n- `taxRate` ve `discountRate` yüzde değil **0 ile 1 arasında kesirdir**: %20 için `0.2` gönderin. Aralık dışındaki değer `400` döner.\n\n# Webhook\n\n`POST /{companyId}/webhooks` ile bir URL'i bir veya daha fazla olaya abone edebilirsiniz. Desteklenen olaylar `CreateCompanyWebhookRequest.event` şemasında listelenir; belge akışı için `DOCUMENT_FORMALIZED` ve `DOCUMENT_CANCELLED` kullanılır.\n\nHer teslimat üç başlık taşır:\n\n| Başlık | İçerik |\n|--------|--------|\n| `webhook-id` | Teslimatın tekil kimliği. Aynı olay yeniden denenirse değişmez; mükerrer işlemeyi bununla engelleyin. |\n| `webhook-timestamp` | Olayın imzalandığı an, Unix saniyesi. |\n| `webhook-signature` | İmza. |\n\nİmza [Standard Webhooks](https://www.standardwebhooks.com) şemasına göre üretilir: `webhook-id`, `webhook-timestamp` ve gövdenin ham hali birleştirilip, webhook'u tanımlarken size verilen gizli anahtarla HMAC-SHA256 ile imzalanır. Doğrulamayı kendiniz yazmak yerine dilinize ait Standard Webhooks kütüphanesini kullanmanız önerilir.\n\nİmzayı doğrularken gövdeyi **ham bayt olarak** kullanın; JSON'u ayrıştırıp yeniden serileştirirseniz imza tutmaz. Ayrıca `webhook-timestamp` değerini kendi saatinizle karşılaştırıp eski teslimatları reddedin.\n","version":"1.0.0","x-logo":{"url":"./docs/images/logo.png","altText":"Aposkal Logo","href":"https://apidocs.aposkal.com"}},"servers":[{"url":"https://api.aposkal.com","description":"Aposkal API Server"}],"tags":[{"name":"Document","description":"Operations related to documents","x-displayName":"Fatura"},{"name":"GibUser","description":"Operations related to GİB taxpayer registration","x-displayName":"Mükellef Sorgu"},{"name":"GlobalSearch","description":"Operations related to GlobalSearch","x-displayName":"Global Arama"},{"name":"Workplace SGK","description":"SGK settings of a workplace","x-displayName":"İş Yeri SGK"},{"name":"SSO","description":"Single sign-on federation endpoints","x-displayName":"SSO"},{"name":"Document","description":"Operations related to documents"},{"name":"StockTransfer","description":"Stock transfers between warehouses","x-displayName":"Depo Transferleri"},{"name":"Payment","description":"Operations related to payments"},{"name":"Tax Payer","description":"Operations related to taxpayer lookup","x-displayName":"Mükellef Sorgulama"},{"name":"Note Templates","description":"Saved notes reused on invoices","x-displayName":"Not Şablonları"},{"name":"DBS","description":"Operations related to DBS","x-displayName":"Defter Beyan"},{"name":"Timesheet","description":"Monthly attendance records for payroll","x-displayName":"Puantaj"},{"name":"Account Address","description":"Operations related to accounts address","x-displayName":"Cari Hesap Adresleri"},{"name":"Lease","description":"Operations related to lease (kira) documents","x-displayName":"Kira Kontratı"},{"name":"Department","description":"Operations related to Departments","x-displayName":"Departmanlar"},{"name":"Workplace R&D Project","description":"Operations related to workplace R&D projects","x-displayName":"İşyeri Ar-Ge Projeleri"},{"name":"Integration","description":"Operations related to integrations","x-displayName":"Entegrasyon"},{"name":"Document Upload","description":"Operations related to document uploads","x-displayName":"Belge Yükle"},{"name":"Account","description":"Operations related to accounts","x-displayName":"Müşteri / Tedarikçi"},{"name":"Category","description":"Operations related to item categories","x-displayName":"Kategori"},{"name":"Support","description":"Operations related to company support tickets","x-displayName":"Destek"},{"name":"Product","description":"Operations related to product","x-displayName":"Ürünler"},{"name":"ParsedDocument","description":"Operations related to parsed inbox documents","x-displayName":"Parsed Documents"},{"name":"Payroll","description":"Turkish payroll (bordro) management","x-displayName":"Bordro"},{"name":"Bank Document","description":"Operations related to bank documents","x-displayName":"Banka Kayıtları"},{"name":"Payroll Deduction","description":"Personal payroll deductions (icra, nafaka, avans, özel sigorta, sendika)","x-displayName":"Bordro Kesintisi"},{"name":"Workplace","description":"Operations related to Workplaces","x-displayName":"İş Yerleri"},{"name":"Document Notes","description":"Operations related to document notes","x-displayName":"Fatura Notları"},{"name":"Order","description":"Operations related to sales orders","x-displayName":"Siparişler"},{"name":"Invoice Inbox","description":"Operations related to Invoice Inbox","x-displayName":"Gelen Kutusu"},{"name":"Warehouse","description":"Operations related to warehouses","x-displayName":"Depolar"},{"name":"Accounting","description":"Operations related to accounting","x-displayName":"Muhasebe"},{"name":"Stock","description":"Operations related to Stock","x-displayName":"Stok bilgileri"},{"name":"Bank POS Commission","description":"Operations related to splitting POS commissions out of bank rows","x-displayName":"Banka POS Komisyonu"},{"name":"Dealer","description":"Operations related to dealer customers and sales","x-displayName":"Bayi"},{"name":"Expense Note Document","description":"Operations related to expense note (Gider Pusulası) documents","x-displayName":"Gider Pusulası"},{"name":"Z-Report","description":"Operations related to z-report documents","x-displayName":"Z-Raporları"},{"name":"Employee","description":"Operations related to employees","x-displayName":"Personel"},{"name":"Cheque","description":"Operations related to cheque and promissory note accounts","x-displayName":"Çek / Senet İşlemleri"},{"name":"Currency","description":"Operations related to exchange rates","x-displayName":"Kur Bilgileri"},{"name":"SGK Tescil","description":"SGK 4A entry and exit declarations"},{"name":"Tag","description":"Operations related to document tags","x-displayName":"Etiket"},{"name":"SGK Vizite","description":"Operations related to SGK medical leave reports","x-displayName":"SGK Raporları"},{"name":"DataPurge","description":"Bulk deletion of a transfer-mode company's own data","x-displayName":"Veri Silme"},{"name":"Settings","description":"Operations related to company settings","x-displayName":"Ayarlar"},{"name":"Company Client Data","description":"Company-scoped key-value records kept for the web app","x-displayName":"İstemci Verileri"},{"name":"Reports","description":"Operations related to Dashboard Reports","x-displayName":"Raporlar"},{"name":"Webhook","description":"Company webhook subscriptions"},{"name":"Definitions","description":"Operations related to tax, address, vkn check","x-displayName":"Tanımlar"},{"name":"SGK Tescil","description":"SGK 4A entry and exit declarations","x-displayName":"SGK Bildirgeleri"},{"name":"Investment","description":"Operations related to investment accounts","x-displayName":"Yatırım Hesap İşlemleri"},{"name":"Profile","description":"Operations related to user profile","x-displayName":"Profil"},{"name":"SalesOffer","description":"Operations related to sales offers (quotes)","x-displayName":"Teklifler"},{"name":"DBS","description":"Operations related to DBS Sales Subtypes","x-displayName":"Defter Beyan"},{"name":"POS","description":"Operations related to POS accounts","x-displayName":"POS Hesap İşlemleri"},{"name":"Accounting Plan","description":"Operations related to accounting plan","x-displayName":"Hesap Planı"}],"paths":{"/{companyId}/account":{"get":{"tags":["Account"],"summary":"List Accounts by Type","description":"\n            Retrieves paginated list of accounts filtered by type and search query.\n            Returns accounts sorted by creation date in descending order.\n        ","operationId":"get-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]}}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseAccountDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Account"],"summary":"Create New Account","description":"\n            Creates a new account with the provided information and specified account type.\n            A PERSONEL account opened here is a payroll pool account: it carries no employee\n            profile or identity number and is excluded from payroll.\n        ","operationId":"save-account","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounts/summary":{"get":{"tags":["Account"],"summary":"Get Company Account Summary By Type","description":"\n            Returns inflow/outflow totals of every account of the company between\n            two dates, grouped by account type and by period (day, week, or month)\n        ","operationId":"get-accounts-summary","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","default":"DAY","enum":["DAY","WEEK","MONTH"]}},{"name":"accountTypes","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]}}},{"name":"currency","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeArchived","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountsSummaryResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}":{"get":{"tags":["Account"],"summary":"Get Account by ID","description":"\n            Retrieves detailed information for a specific account by its ID.\n        ","operationId":"get-account","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Account"],"summary":"Delete Account","description":"\n            Permanently deletes an account by its ID.\n            Returns 204 No Content on success.\n        ","operationId":"delete-account","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Account"],"summary":"Update Account","description":"\n            Updates account information with the provided details; only specified fields change.\n            The account type may be switched between CARI and RESMIKURUM, which leaves existing\n            ledger entries untouched.\n        ","operationId":"update-account","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/mizanForAccount":{"get":{"tags":["Account"],"summary":"Get Account Trial Balance (Mizan)","description":"\n            Retrieves paginated trial balance (mizan) data for accounts.\n            Supports filtering by balance type, account types, date range, search query, and archived status.\n            Optionally includes total calculations.\n        ","operationId":"get-accounts-mizan","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"balanceType","in":"query","required":false,"schema":{"type":"string","enum":["POSITIVE","NEGATIVE","ZERO","NONZERO"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"addTotal","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"accountTypes","in":"query","required":false,"schema":{"type":"array","default":["CARI"],"items":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]}}},{"name":"categoryIds","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MizanResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/findFromVknList":{"post":{"tags":["Account"],"summary":"Find Accounts from VKN/TCKN List","description":"\n            Finds accounts matching a list of VKN/TCKN numbers or company titles.\n            Returns account IDs when found, or null when no match exists.\n        ","operationId":"find-accounts-from-vkn-list","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindAccountsFromVknListRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountLookupResult"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/muavin":{"get":{"tags":["Account"],"summary":"Get Account Muavin (Detailed Ledger)","description":"\n            Retrieves paginated muavin (detailed ledger) records for a specific account.\n            Supports filtering by currency, search query, and date range.\n        ","operationId":"list-muavin","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2023-01-01"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2100-12-31"}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseMuavinRow"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/summary":{"get":{"tags":["Account"],"summary":"Get Account Summary (End-of-Day Report)","description":"\n            Returns per-period totals of an account's muavin between two dates\n        ","operationId":"get-account-summary","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","default":"DAY","enum":["DAY","WEEK","MONTH"]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountSummaryResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/waybill":{"get":{"tags":["Account"],"summary":"Get Unlinked Waybills for Account","description":"\n            Retrieves paginated waybill documents for an account that are not yet linked to any invoices.\n            Optionally filtered by direction (INCOMING / OUTGOING); both directions are returned when omitted.\n        ","operationId":"get-waybill","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/getFromTcVkn/{tcVkn}":{"get":{"tags":["Account"],"summary":"Get Account by TC/VKN","description":"\n            Retrieves the first account matching the given Turkish ID Number (TC) or\n            Tax Identification Number (VKN). Returns null if no account is found.\n        ","operationId":"get-accounts-tcvkn","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"tcVkn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/balances":{"get":{"tags":["Account"],"summary":"Get Account Balances by Currency","description":"Returns the account's balance in each currency it has records in, with its TRY equivalent, as of endDate.","operationId":"list-account-currency-balances","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2100-12-31"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseCurrencyBalanceDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/taxAdmin":{"post":{"tags":["Account"],"summary":"Update Account Tax Office","description":"\n            Updates the tax office (vergi dairesi) information for a specific account.\n        ","operationId":"update-account-tax-admin","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaxAdminUpdateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/paymentLink":{"post":{"tags":["Account"],"summary":"Create Payment Link for Account","description":"Creates a PayTR payment link for the account and returns it. When no amount is given, the account's current debt balance is charged.","operationId":"create-payment-link","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLinkRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentLinkDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/paymentLinks":{"get":{"tags":["Account"],"summary":"List Payment Links for Account","description":"\n            Returns all active payment links for the given account.\n            Each entry includes the payment link URL, amount, and recipient emails.\n        ","operationId":"list-payment-links","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLinkDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/waybill/groups":{"get":{"tags":["Account"],"summary":"Get Waybill Groups for Invoice Import","description":"\n            Returns the account's uninvoiced waybills and the state of each waybill number referenced\n            on the invoice being imported, optionally filtered by direction.\n        ","operationId":"get-waybill-groups","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"dispatchNos","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WaybillGroupsDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/requestPayment":{"post":{"tags":["Account"],"summary":"Request Payment from Account","description":"\n            Initiates a payment request from a CARI type account by sharing payment documents\n            with the account holder.\n        ","operationId":"request-payment","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPaymentFromAccount"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ShareDocumentResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/muavin/export/{format}":{"get":{"tags":["Account"],"summary":"Export Account Muavin","description":"\n            Generates and downloads a report of muavin (detailed ledger) records for a specific account.\n            Supports filtering by currency, search query, and date range.\n            Returns all matching records (not paginated) in the specified format (PDF, EXCEL, or CSV).\n        ","operationId":"export-muavin","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["PDF","EXCEL","CSV","XML","HTML","JSON"]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2023-01-01"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2100-12-31"}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"number"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/consolidated-deficit-record":{"get":{"tags":["Account"],"summary":"Get Consolidated Deficit Record","description":"\n            Retrieves the consolidated deficit record (konsolide ekstre kaydı) for a specific account\n            up to a specified end date.\n        ","operationId":"consolidated-deficit-record","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","default":"2100-12-31"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConsolidatedDeficitRecord"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/transfer/{counterAccountId}":{"post":{"tags":["Account"],"summary":"Transfer Balance Between Accounts","description":"\n            Transfers a specified balance amount from one account to another within the same company.\n            Both accounts must belong to the specified company.\n        ","operationId":"transfer-between-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"counterAccountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceTransferRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/address":{"get":{"tags":["Account Address"],"summary":"Get account addresses","description":"Retrieve paginated list of addresses for a specific account","operationId":"list-account-addresses","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (0-based)","required":false,"schema":{"type":"integer","format":"int32","default":0},"example":0},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":20},"example":20}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved addresses","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseAddressDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Account Address"],"summary":"Create account address","description":"Create a new address for the specified account","operationId":"create-account-address","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddressRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request data or duplicate address name","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Address created successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddressDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/address/invoice":{"get":{"tags":["Account Address"],"summary":"Get invoice address","description":"Retrieve the invoice address (Merkez) for the specified account","operationId":"get-account-invoice-address","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found or invoice address not set","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved invoice address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddressDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/address/{addressId}":{"get":{"tags":["Account Address"],"summary":"Get account address by ID","description":"Retrieve a specific address for an account","operationId":"get-account-address","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}},{"name":"addressId","in":"path","description":"Address ID","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account or address not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddressDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Account Address"],"summary":"Update account address","description":"Update an existing address for the specified account. Note: Invoice address (Merkez) cannot be renamed; use set-invoice-address to change it","operationId":"update-account-address","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}},{"name":"addressId","in":"path","description":"Address ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddressRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request data, duplicate address name or renaming the invoice address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account or address not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Address updated successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddressDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Account Address"],"summary":"Delete account address","description":"Delete an address from the specified account. Note: Invoice address (Merkez) cannot be deleted","operationId":"delete-account-address","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}},{"name":"addressId","in":"path","description":"Address ID","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Cannot delete invoice address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account or address not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Address deleted successfully"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/account/{accountId}/address/{addressId}/set-as-invoice":{"post":{"tags":["Account Address"],"summary":"Set address as invoice address","description":"Set the specified address as the new invoice address (Merkez). The previous invoice address will be renamed","operationId":"set-account-invoice-address","parameters":[{"name":"companyId","in":"path","description":"Company ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"accountId","in":"path","description":"Account ID","required":true,"schema":{"type":"string"}},{"name":"addressId","in":"path","description":"Address ID to set as invoice address","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account or address not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Invoice address set successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddressDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records":{"get":{"tags":["Accounting"],"summary":"List accounting records","description":"Retrieves a paginated list of documents with their accounting records.","operationId":"list-accounting-records","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DocumentSearchRequest"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Accounting"],"summary":"Save accounting record","description":"Creates accounting record for the specified company","operationId":"saveAccountingRecord","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/bulk":{"post":{"tags":["Accounting"],"summary":"Bulk save accounting records","description":"Creates up to 500 accounting record documents in a single request. Each document is created and validated independently, so one document's error does not block the others. Results are returned per document, in request order.","operationId":"bulk-save-accounting-records","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordBulkSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountingRecordBulkSaveResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/mizan":{"get":{"tags":["Accounting"],"summary":"Get paginated Trial Balance (Mizan) report with optional date and period filters","description":"Get mizan in a paging structure","operationId":"mizan","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":false,"schema":{"type":"string"}},{"name":"end","in":"query","required":false,"schema":{"type":"string"}},{"name":"periodStart","in":"query","required":false,"schema":{"type":"string"}},{"name":"periodEnd","in":"query","required":false,"schema":{"type":"string"}},{"name":"selectedPeriod","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseMizanRowProjection"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/muavin":{"get":{"tags":["Accounting"],"summary":"Get paginated General Ledger (Muavin) entries, filterable by account code, counter-account, and date range","description":"Get muavin in a paging structure","operationId":"muavin","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"counterAcc","in":"query","required":false,"schema":{"type":"string"}},{"name":"counterAccNot","in":"query","required":false,"schema":{"type":"string"}},{"name":"accCodeStartWith","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeDraft","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseMuavinRow"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/vat":{"post":{"tags":["Accounting"],"summary":"Create VAT accounting records","description":"Automatically generates VAT-related accounting entries for the specified company","operationId":"create-vat-accounting","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/ready-list":{"get":{"tags":["Accounting"],"summary":"Get ready-to-approve accounting records","description":"Retrieves documents with complete accounting records ready for batch approval.","operationId":"get-acc-rec-ready-list","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/report/vat":{"get":{"tags":["Accounting"],"summary":"Get VAT report","description":"Retrieves VAT calculation report with specified limit of records","operationId":"get-vat-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VatCalculationDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/taxPayment":{"post":{"tags":["Accounting"],"summary":"Create tax/SGK payment accounting record","description":"Creates a DRAFT accounting record for a tax (VERGI) or SGK payment from the given payment account.","operationId":"create-tax-payment","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxPaymentRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxPaymentResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/by-acc-code":{"get":{"tags":["Accounting"],"summary":"Get accounts by account code","description":"Retrieves accounting records filtered by account code, date range, and account association","operationId":"get-account-by-acc-code","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accCode","in":"query","required":true,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"isAccountNull","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountByAccCodeProjection"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/virman":{"post":{"tags":["Accounting"],"summary":"Create a transfer (virman) transaction","description":"Initiates an accounting transfer (virman) process for the given company ID using the provided request body. Returns the ID of the created transaction.","operationId":"create-virman","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirmanSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}":{"get":{"tags":["Accounting"],"summary":"Get all accounting record entries for a specific document by its document ID","description":"Retrieves accounting records for specified company and document ID","operationId":"get-accounting-record","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Accounting"],"summary":"Update accounting records","description":"Updates accounting records for specified document","operationId":"updateAccountingRecord","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingRecordRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/reopen":{"patch":{"tags":["Accounting"],"summary":"Bulk Reopen Accounting Records","description":"Reopens the approved accounting records of the given documents for editing.","operationId":"batchReopen","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordBatchDocumentIdsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/revert":{"patch":{"tags":["Accounting"],"summary":"Bulk Revert Accounting Records","description":"Reverts formalized or transferred documents in the given list back to approved (saved). Documents in other states are left untouched; returns the number reverted.","operationId":"batchRevert","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordBatchDocumentIdsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/kapanis":{"post":{"tags":["Accounting"],"summary":"Automatically generate a closing accounting document","description":"Performs an automatic closing operation for the given company using the provided request data, and returns the newly created document ID","operationId":"acc-rec-auto-closing","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordAutoClosedRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/reflect":{"post":{"tags":["Accounting"],"summary":"Reflect accounting records","description":"Creates and reflects accounting records based on the provided request","operationId":"reflect-accounting-records","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/recreate-list":{"get":{"tags":["Accounting"],"summary":"Get accounting records recreate list with filters","description":"Retrieves documents with accounting records based on filters (unbalanced, incomplete records, or ready records)","operationId":"get-acc-rec-recreate-list","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"unbalancedOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"showReadyRecords","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"scenario","in":"query","required":false,"schema":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/approve":{"patch":{"tags":["Accounting"],"summary":"Bulk Approve Accounting Records","description":"Approves the accounting records of the given documents.","operationId":"batchApprove","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordBatchDocumentIdsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/period-summary":{"get":{"tags":["Accounting"],"summary":"Get period document summary","description":"Counts the documents of each month by scenario, document type, direction and accounting record status, together with their total amount in TRY. The month is the document date, so a cell matches the list endpoint's total under the same filters.","operationId":"get-period-summary","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":true,"schema":{"type":"string"}},{"name":"end","in":"query","required":true,"schema":{"type":"string"}},{"name":"accRecStatus","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]}}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSummaryRow"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/opening-balance":{"post":{"tags":["Accounting"],"summary":"Create opening balance entries","description":"Creates opening balance (devir) entries for transferring accounts from another accounting system to Aposkal. ","operationId":"createOpeningBalance","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningBalanceRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/ready-list/count":{"get":{"tags":["Accounting"],"summary":"Count ready-to-approve accounting records","description":"Returns the number of documents with accounting records ready for batch approval.","operationId":"get-acc-rec-ready-count","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReadyCountResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/forget-rule-keys":{"post":{"tags":["Accounting"],"summary":"Forget all learned accounting rules","description":"Clears ruleKey on every accounting record of the company, resetting the rule-based account prediction engine.","operationId":"forget-rule-keys","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ForgetRuleKeysResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/reCreateAllDraft":{"post":{"tags":["Accounting"],"summary":"Recreate VAT Accounting Records","description":"Deletes and regenerates all VAT accounting records for the specified company","operationId":"reCreateAllDraft","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/amortization":{"get":{"tags":["Accounting"],"summary":"Get Amortization List","description":"Retrieves amortization calculation results for all products of the specified company for the given period","operationId":"get-amortization","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"period","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductWithAmortization"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/mizan-for-periods":{"get":{"tags":["Accounting"],"summary":"Get Trial Balance (Mizan) aggregated by accounting periods, with optional date and status filters","description":"Get mizan for periods","operationId":"mizan-for-periods","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"periodStart","in":"query","required":false,"schema":{"type":"string"}},{"name":"periodEnd","in":"query","required":false,"schema":{"type":"string"}},{"name":"selectedPeriod","in":"query","required":false,"schema":{"type":"string"}},{"name":"accRecStatuses","in":"query","required":false,"schema":{"type":"array","default":["SAVED","FORMALIZED","TRANSFERRED"],"items":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]}}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MizanRowProjection"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/updateStatus":{"patch":{"tags":["Accounting"],"summary":"Bulk Update Accounting Record Status","description":"Updates status of accounting records in bulk for specified company. Checks that no documents are in 'FORMALIZED' status before updating.","operationId":"batchUpdateStatus","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRecordBatchUpdateStatusRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/preAccKapanis":{"post":{"tags":["Accounting"],"summary":"Pre-Accounting Closing","description":"Initiates the pre-accounting closing process for the given company and returns the transaction ID.","operationId":"pre-acc-closing","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreAccClosingRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/getRulesByRuleKeys":{"post":{"tags":["Accounting"],"summary":"Get Rules By Rule Keys","description":"Get Rules By Rule Keys","operationId":"get-rules-by-rule-keys","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/reopen":{"patch":{"tags":["Accounting"],"summary":"Reopen accounting records","description":"Reopens the approved accounting records of the given document for editing.","operationId":"reopen-accounting-record","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/revert":{"patch":{"tags":["Accounting"],"summary":"Revert accounting records to approved","description":"Reverts the accounting records of a formalized or transferred document back to approved (saved) so they can be edited again.","operationId":"revert-accounting-record","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/assigned-rule-groups":{"get":{"tags":["Accounting"],"summary":"List assigned rule groups","description":"Groups draft-scope rows that already have an account, for the rule correction screen. The same ruleKey on two accounts yields two groups.","operationId":"get-assigned-rule-groups","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignedRuleGroupDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/approve":{"patch":{"tags":["Accounting"],"summary":"Approve accounting records","description":"Approves the accounting records of the given document.","operationId":"approve-accounting-record","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/amortizationAcc":{"post":{"tags":["Accounting"],"summary":"Create an amortization accounting transaction","description":"Initiates an amortization accounting process for the given company ID using the provided request body. Returns the ID of the created amortization transaction.","operationId":"create-amortization-acc","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmortizationAccSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/getRules":{"get":{"tags":["Accounting"],"summary":"Get the accounting categorization rules applicable to a given document","description":"Retrieves the category-specific accounting rules applicable to a given document.","operationId":"get-accounting-record-rules","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/muavin/export/{format}":{"get":{"tags":["Accounting"],"summary":"Export General Ledger (Muavin) data as a downloadable file in the specified format (e.g. Excel)","description":"Export muavin data as Excel file","operationId":"muavinExport","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["PDF","EXCEL","CSV","XML","HTML","JSON"]}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"counterAcc","in":"query","required":false,"schema":{"type":"string"}},{"name":"counterAccNot","in":"query","required":false,"schema":{"type":"string"}},{"name":"accCodeStartWith","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeDraft","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/transferable-documents":{"get":{"tags":["Accounting"],"summary":"Get transferable documents","description":"Retrieves saved documents with their accounting records that are ready to be transferred to Luca for a given period, ordered by document class, content group, series and document number. Each row carries the batch keys the transfer screen cuts Luca vouchers on; pagination is based on document count, not accounting record count.","operationId":"get-transferable-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"selectedPeriod","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"scenario","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}}},{"name":"documentType","in":"query","required":false,"schema":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"withStockDetail","in":"query","description":"Adds product, quantity and VAT fields to each line.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransferableDocumentsResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/unassigned-rule-groups":{"get":{"tags":["Accounting"],"summary":"List unassigned rule groups","description":"Groups draft rows that have a ruleKey but no account yet, for the rule-based bulk assignment screen.","operationId":"get-unassigned-rule-groups","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UnassignedRuleGroupDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/transfer-product":{"patch":{"tags":["Accounting"],"summary":"Bulk Transfer Product","description":"Transfers accounting records from one product to another.","operationId":"transferBulkProduct","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferProductBulkRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransferProductBulkResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/ready-list/approve-all":{"post":{"tags":["Accounting"],"summary":"Approve all ready accounting records","description":"Approves documents whose accounting records are ready for batch approval, limited to the given accounting period when one is supplied.","operationId":"approve-all-acc-rec-ready","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"period","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApproveAllReadyResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{code}/mizan-for-periods":{"get":{"tags":["Accounting"],"summary":"Get period-by-period Trial Balance for a specific account code, with optional date range and status filters","description":"Get mizan for periods of code","operationId":"mizan-for-periods-single-code","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","maxLength":2147483647,"minLength":1}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"periodStart","in":"query","required":false,"schema":{"type":"string"}},{"name":"periodEnd","in":"query","required":false,"schema":{"type":"string"}},{"name":"selectedPeriod","in":"query","required":false,"schema":{"type":"string"}},{"name":"accRecStatuses","in":"query","required":false,"schema":{"type":"array","default":["SAVED","FORMALIZED","TRANSFERRED"],"items":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]}}},{"name":"grouped","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MizanRow"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/assign-by-rule-key":{"patch":{"tags":["Accounting"],"summary":"Bulk assign accounts by rule key","description":"Assigns accounts to draft rows grouped by ruleKey + direction + side. Never overwrites rows that already have an account.","operationId":"batch-assign-by-rule-key","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignByRuleKeyItem"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchAssignByRuleKeyResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/auto/{documentId}/acilis":{"post":{"tags":["Accounting"],"summary":"Automatically generate an opening accounting document from a closing document","description":"Takes a closing accounting document ID and automatically creates a corresponding opening accounting document for the given company. Returns the newly created opening document ID.","operationId":"acc-rec-auto-opening","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/auto/acilis":{"post":{"tags":["Accounting"],"summary":"Automatically generate an opening accounting document (deprecated)","description":"Deprecated: use POST /{companyId}/accRec/auto/{documentId}/acilis instead. This endpoint will be removed once frontend migrates.","operationId":"accRecAutoOpeningLegacy","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/updateStatus":{"patch":{"tags":["Accounting"],"summary":"Update AccountingRecords Status","description":"update-accountingRecord-status of a specific document","operationId":"update-accountingRecord-status","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccordingRecordStatusRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/reassign-by-rule-key":{"patch":{"tags":["Accounting"],"summary":"Bulk reassign accounts by rule key","description":"Moves already assigned rows of a rule group from one account to another. Affected SAVED documents drop back to DRAFT for re-approval.","operationId":"batch-reassign-by-rule-key","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReassignByRuleKeyItem"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchReassignByRuleKeyResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/createFromDoc":{"post":{"tags":["Accounting"],"summary":"Create Accounting Record from Document","description":"Creates a new accounting record based on an existing document.","operationId":"createFromDoc","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/unassigned-rule-groups/count":{"get":{"tags":["Accounting"],"summary":"Count unassigned rule groups","description":"Returns how many groups the unassigned rule groups list would contain.","operationId":"get-unassigned-rule-groups-count","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnassignedRuleGroupCountResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{accPlanId}/counter-accounts":{"get":{"tags":["Accounting"],"summary":"Get the historical counter accounts for a given account","description":"Retrieves the counter accounts this account has historically co-occurred with in approved documents, most frequent first.","operationId":"counter-accounts-by-acc-plan-id","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accPlanId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CounterAccountsResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{documentId}/mark-undeclared":{"patch":{"tags":["Accounting"],"summary":"Mark accounting records as undeclared","description":"Marks the accounting records of the given document as undeclared.","operationId":"mark-accounting-record-undeclared","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/document-status-summary-report":{"get":{"tags":["Accounting"],"summary":"Get Document Status Summary Report","description":"Get Document Status Summary Report","operationId":"get-document-status-summary-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStatusSummaryDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/transferable-documents-summary":{"get":{"tags":["Accounting"],"summary":"Get transferable documents summary","description":"Retrieves monthly summary of saved documents that are ready to be transferred to Luca","operationId":"get-transferable-documents-summary","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransferableDocumentsSummaryProjection"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/batch/transfer-accounting-plan":{"patch":{"tags":["Accounting"],"summary":"Bulk Transfer Accounting Plan","description":"Transfers accounting records from one accounting plan to another within a date range. Only transfers records where document status is NOT FORMALIZED or TRANSFERRED.","operationId":"updateBulkAccPlan","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccPlanBulkRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/accounting-code-account-mapping":{"get":{"tags":["Accounting"],"summary":"Get accounting code to account mapping","description":"Retrieves all accounting codes for a given account, or all accounts for a given accounting code. Exactly one of 'accountId' or 'accountingCode' must be provided.","operationId":"get-accounting-code-account-mapping","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountingCode","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountingCodeAccountMappingDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{accountingRecordId}/changeAccount":{"put":{"tags":["Accounting"],"summary":"Update Accounting Record Account","description":"Changes the account associated with a specific accounting record","operationId":"update-accounting-record-account","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountingRecordId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingRecordAccountRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/accounting-code-account-mapping/bulk":{"post":{"tags":["Accounting"],"summary":"Get accounting code to account mapping in bulk","description":"Retrieves the accounts posted under each requested accounting code, matched on exact code equality. A code with no accounting record comes back with an empty account list, so it stays distinguishable from a failed request.","operationId":"get-accounting-code-account-mapping-bulk","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingCodeAccountMappingBulkRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountingCodeAccountMappingBulkResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/{accCode}/consolidated-deficit-record":{"get":{"tags":["Accounting"],"summary":"Get the consolidated deficit (açık bakiye) record for a given account code, optionally filtered by end date","description":"Retrieves the consolidated deficit record for the specified account code and company, optionally filtered by end date","operationId":"consolidated-deficit-record-by-code","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accCode","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9.]{5,}$"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","default":"2100-12-31"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConsolidatedDeficitRecord"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/accounting-codes-with-multiple-accounts":{"get":{"tags":["Accounting"],"summary":"Get accounting codes with their accounts","description":"Retrieves all accounting codes with their associated accounts, paginated. Useful for detecting codes used by more than one account. Returns up to 10 accounts per code.","operationId":"get-accounting-codes-with-multiple-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseAccountingCodeWithMultipleAccountsDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/accounting-records/accounts-with-multiple-accounting-codes":{"get":{"tags":["Accounting"],"summary":"Get accounts with their accounting codes","description":"Retrieves all accounts with their associated accounting codes, paginated. Useful for detecting accounts mapped to more than one code.","operationId":"get-accounts-with-multiple-accounting-codes","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseAccountWithMultipleAccountingCodesDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/acc-plan":{"get":{"tags":["Accounting Plan"],"summary":"List the company's account plan","description":"Returns the account plan, ordered by account code. Optionally filtered by a code or name search and by level.","operationId":"list-acc-plans","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AccountPlanSearchRequest"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseAccountPlanDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Accounting Plan"],"summary":"Create Account Plan","description":"Create a new account plan entry","operationId":"createAccPlan","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPlanDTO"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountPlanDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/acc-plan/bulk":{"post":{"tags":["Accounting Plan"],"summary":"Create Account Plans","description":"Create multiple account plan entries","operationId":"createAccPlans","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountPlanDTO"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Accounting Plan"],"summary":"Delete Account Plans","description":"Delete multiple account plan entries","operationId":"deleteAccPlans","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/acc-plan/unused":{"get":{"tags":["Accounting Plan"],"summary":"List Unused Account Plans","description":"List unused account plan entries","operationId":"list-unused-acc-plans","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountPlanDTO"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/acc-plan/next-code":{"get":{"tags":["Accounting Plan"],"summary":"Get Next Account Code","description":"Next free account code: for base 120/320 it follows the company cari code pattern, otherwise it returns the next code under the given parent account. patternSelected is false when the company has not chosen its cari code pattern yet","operationId":"get-next-acc-code","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"base","in":"query","required":false,"schema":{"type":"string"}},{"name":"parentCode","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"tcVkn","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NextAccCodeResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/acc-plan/{accountPlanId}":{"patch":{"tags":["Accounting Plan"],"summary":"Update Account Plan","description":"Update an existing account plan entry","operationId":"updateAccPlan","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountPlanId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPlanDTO"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountPlanDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/tags":{"get":{"tags":["Bank Document"],"summary":"Get Bank Tag Counts","description":"Returns how many pending bank documents carry each tag, under the same filters as the search. Ignores the tags filter so every count stays visible while one tag is selected.","operationId":"list-bank-tag-counts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DocumentBankSearchRequest"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankTagCount"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/save":{"post":{"tags":["Bank Document"],"summary":"Save Bank Documents with Accounting Records","description":"\n        Saves bank documents and creates associated accounting records.\n        Validates product/account selection and creates document lines or payments accordingly.\n    ","operationId":"save-bank-documents-with-accounting","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBankWithAccountingRecordRequest"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/search":{"post":{"tags":["Bank Document"],"summary":"Search Bank Documents","description":"\n        Searches bank documents with pagination and filtering options.\n        Returns a paginated list of bank documents with predictions and similar documents.\n    ","operationId":"search-bank-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentBankSearchRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentBankSearchResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/save-by-tag":{"post":{"tags":["Bank Document"],"summary":"Save All Pending Bank Documents of a Tag","description":"Saves every pending movement of the tag with the given per-direction assignment. A scope of 100 movements or more is saved in the background and returns 202 with a job id; 409 means the current count differs from expectedTotal, or the same scope is already being saved.","operationId":"save-bank-documents-by-tag","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankSaveByTagRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankSaveByTagResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/{accountId}":{"post":{"tags":["Bank Document"],"summary":"Save Bank Documents","description":"\n        Saves bank statement documents for the specified company and account.\n        Processes the bank statement data and stores it in the document system.\n    ","operationId":"save-bank-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentBankSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/{documentId}":{"get":{"tags":["Bank Document"],"summary":"Get Bank Document by ID","description":"\n        Retrieves a single bank document by its ID.\n        Returns the document with predictions and similar documents.\n    ","operationId":"get-bank-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentBankSearchResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/virman/detect":{"get":{"tags":["Bank Document"],"summary":"Detect Bank Transfers","description":"Detects own-account transfer (virman) pairs among draft bank documents within the given date range.","operationId":"detect-bank-virman","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VirmanDetectResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/pre-acc-pending":{"get":{"tags":["Bank Document"],"summary":"List Bank Rows Awaiting Pre-Accounting","description":"\n        Lists bank movements saved with a ledger code only, with the single cari that already posts to\n        that code. With view=mismatch, lists rows whose voucher no longer agrees with the document.\n    ","operationId":"list-pre-acc-pending","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"view","in":"query","required":false,"schema":{"type":"string"}},{"name":"bankAccountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"start","in":"query","required":false,"schema":{"type":"string"}},{"name":"end","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponsePreAccPendingResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/virman/candidates":{"get":{"tags":["Bank Document"],"summary":"List Transfer Counter Leg Candidates","description":"Lists draft movements of the other own bank accounts that can be the counter leg of the given movement, closest TRY equivalent first.","operationId":"list-bank-virman-candidates","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"movementId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseVirmanCandidateResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/save-by-tag/{jobId}":{"get":{"tags":["Bank Document"],"summary":"Bulk Bank Save Job","description":"Progress of a background bulk save: how many movements were saved, which ones failed and which were left as drafts.","operationId":"get-bank-save-by-tag-job","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankSaveByTagResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/draft-bank-accounts":{"post":{"tags":["Bank Document"],"summary":"Get Distinct Draft Bank Accounts","description":"Returns all distinct bank accounts that have draft bank documents matching the given filters. Ignores the bankAccountId filter so all accounts are always included.","operationId":"list-draft-bank-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentBankSearchRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftBankAccountResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/pre-acc-pending/count":{"get":{"tags":["Bank Document"],"summary":"Count Bank Rows Awaiting Pre-Accounting","description":"Returns how many bank rows wait for pre-accounting and how many disagree with their voucher.","operationId":"count-pre-acc-pending","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PreAccPendingCountResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/{documentId}/attach-pre-acc":{"post":{"tags":["Bank Document"],"summary":"Attach Pre-Accounting to a Bank Row","description":"\n        Links a cari or a product to a bank movement saved with its ledger code only.\n        The voucher is not regenerated: only the reference on the existing counter row is filled in.\n    ","operationId":"attach-bank-pre-acc","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachPreAccRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentBankSearchResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bank/{bankAccountId}/suggest-ledger":{"get":{"tags":["Bank Document"],"summary":"Suggest Bank Ledger Code","description":"Ranks the 102 sub-accounts whose imported voucher movements best match the bank account's statement rows on date, amount and direction. Returns at most five, best first.","operationId":"suggest-bank-ledger","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankLedgerSuggestionResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/bank/{bankAccountId}/pos-commission/bulk":{"post":{"tags":["Bank POS Commission"],"summary":"Create POS commission vouchers in bulk","description":"\n            Creates one DRAFT MAHSUP voucher (770 debit / 108 credit) per bank row and records the\n            suggestion next to the user's decision. Each row is processed on its own, so inspect the\n            per-row status: a row that already has a voucher comes back as ALREADY_EXISTS.\n        ","operationId":"bulk-create-bank-pos-commission","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosCommissionBulkRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request data"},"404":{"description":"Bank account or account plan not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Batch processed; check per-row status","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PosCommissionBulkResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/bank/{bankAccountId}/pos-commission/context":{"post":{"tags":["Bank POS Commission"],"summary":"Get POS commission context for bank rows","description":"\n            Returns, for each bank row, the commission voucher it already has, its single 108.x\n            counter account and the last decision recorded on it. Rows with nothing to report are\n            omitted.\n        ","operationId":"get-bank-pos-commission-context","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosCommissionContextRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PosCommissionContextResponse"}}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/bank/{bankAccountId}/pos-commission/defaults":{"get":{"tags":["Bank POS Commission"],"summary":"Get POS commission defaults","description":"\n            Returns the 770 and 108 accounts the last commission voucher of this bank account used,\n            DRAFT vouchers included, plus the last ten decisions per suggestion method. A field is\n            null when nothing has been learned yet.\n        ","operationId":"get-bank-pos-commission-defaults","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PosCommissionDefaultsResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/category":{"get":{"tags":["Category"],"summary":"List all categories for the company, optionally filtered by category type (PRODUCT, ACCOUNT, etc.)","description":"List category","operationId":"list-categories","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryType","in":"query","required":false,"schema":{"type":"string","enum":["ACCOUNT","INCOME","EXPENSE","PRODUCT"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Category"],"summary":"Create a new category for the company","description":"Create category","operationId":"create-category","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryDto"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CategoryDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/category/{categoryId}":{"get":{"tags":["Category"],"summary":"Get a specific category by its ID for the given company","description":"Get Category by id","operationId":"get-category","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CategoryDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Category"],"summary":"Update an existing category","description":"Update category","operationId":"update-category","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryDto"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CategoryDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Category"],"summary":"Delete a category by its ID","description":"Delete category","operationId":"delete-category","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/category/{categoryType}/{entityId}":{"get":{"tags":["Category"],"summary":"Get the category assigned to a specific entity (product, account, etc.) by entity type and ID","description":"Get entity category","operationId":"get-entity-category","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryType","in":"path","required":true,"schema":{"type":"string","enum":["ACCOUNT","INCOME","EXPENSE","PRODUCT"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CategoryDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Category"],"summary":"Revoke category from entity","description":"Revoke category from entity","operationId":"revoke-category-from-entity","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryType","in":"path","required":true,"schema":{"type":"string","enum":["ACCOUNT","INCOME","EXPENSE","PRODUCT"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/category/{categoryType}/{entityId}/{categoryId}":{"put":{"tags":["Category"],"summary":"Assign given category to entity","description":"Assign given category to entity","operationId":"assign-category-to-entity","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"categoryType","in":"path","required":true,"schema":{"type":"string","enum":["ACCOUNT","INCOME","EXPENSE","PRODUCT"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/cheque/{accountId}/collect":{"post":{"tags":["Cheque"],"summary":"Collect Cheque","description":"\n            Collects an open cheque into a bank or cash account and closes its balance by that amount.\n            The target account defaults to the bank the cheque is currently held at.\n        ","operationId":"collect-cheque","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequeCollectRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ChequeCollectResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/cheque/{accountId}/custody":{"post":{"tags":["Cheque"],"summary":"Change Cheque Custody","description":"\n            Moves a customer cheque or received promissory note between portfolio and bank custody.\n            No accounting record is created for the transition.\n        ","operationId":"change-cheque-custody","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChequeCustodyRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/client-data":{"post":{"tags":["Company Client Data"],"summary":"Save client data value","description":"Saves the value under the key, replacing any previous value.","operationId":"save-company-client-data-value","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyClientDataWriteRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Company Client Data"],"summary":"Delete client data value","description":"Removes the key; succeeds even when the key does not exist.","operationId":"delete-company-client-data-value","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"key","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"bearerAuth":[]}]}},"/{companyId}/client-data/keys":{"get":{"tags":["Company Client Data"],"summary":"List client data keys","description":"Lists the company's keys matching the pattern; `*` matches any text and `?` one character.","operationId":"list-company-client-data-keys","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pattern","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseString"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/client-data/value":{"get":{"tags":["Company Client Data"],"summary":"Get client data value","description":"Returns the JSON value saved under the key, or 404 when there is none.","operationId":"get-company-client-data-value","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"key","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JsonNode"}}}}},"security":[{"bearerAuth":[]}]}},"/api/currency":{"get":{"tags":["Currency"],"summary":"Get currency rates between dates","description":"Get current values between dates","operationId":"get-currency-rates","parameters":[{"name":"startDate","in":"query","description":"Aralığın başlangıç tarihi (gg-aa-yyyy).","required":true,"schema":{"type":"string"},"example":"01-11-2026"},{"name":"endDate","in":"query","description":"Aralığın bitiş tarihi (gg-aa-yyyy).","required":true,"schema":{"type":"string"},"example":"07-11-2026"},{"name":"currency","in":"query","description":"Kurun para birimi kodu.","required":true,"schema":{"type":"string"},"example":"USD"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CurrencyResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs":{"post":{"tags":["DBS"],"summary":"List transferable documents to send DBS","description":"List documents to be transferred to DBS","operationId":"transferable-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DbsTransferableDocumentSearchRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDbsTransferableDocumentSearchResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/unvan":{"get":{"tags":["DBS"],"summary":"Get Company Title","description":"Retrieves the company title (unvan) from DBS for the specified company","operationId":"get-unvan","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DbsServiceResponseMukellefKontrolDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/defter/list":{"get":{"tags":["DBS"],"summary":"List Defters","description":"Lists all defters for the specified company from DBS","operationId":"list-defter","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DefterDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/{type}":{"get":{"tags":["DBS"],"summary":"Get System Variables","description":"Retrieves DBS system variables by type for the specified company","operationId":"get-system-variables","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SistemVarliklariDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/transferToDBS":{"post":{"tags":["DBS"],"summary":"Transfer a document to DBS","description":"This service transfers a document to DBS","operationId":"transferToDBS","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DbsDocumentDto"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/sales-subtypes":{"post":{"tags":["DBS"],"summary":"Create Sales Subtype","description":"Creates a new DBS sales subtype for the specified company","operationId":"create-sales-subtype","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesSubtypeCreateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesSubtype"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/documents/status":{"get":{"tags":["DBS"],"summary":"Get DBS Documents Status","description":"Returns the count of DBS documents by status for the specified company","operationId":"get-dbs-documents-status","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/documents/search":{"post":{"tags":["DBS"],"summary":"Search DBS Documents","description":"Searches DBS documents with filters and returns a paginated result","operationId":"search-dbs-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DbsDocumentSearchRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDbsDocumentSearchResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/listActivityCodes":{"get":{"tags":["DBS"],"summary":"List Activity Codes","description":"Retrieves the list of activity codes registered in DBS for the specified company","operationId":"list-activity-codes","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SicilFaaliyetDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/tax-offices":{"get":{"tags":["DBS"],"summary":"Get Tax Offices","description":"Returns the list of tax offices available in DBS","operationId":"get-tax-offices","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DbsTaxOffice"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/mukellef/mukellefler":{"get":{"tags":["DBS"],"summary":"Get Taxpayers","description":"Returns a paginated list of taxpayers for the specified company from DBS","operationId":"get-taxpayers","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MukellefPage"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/mukellef/genelbilgiler":{"get":{"tags":["DBS"],"summary":"Get Taxpayer General Information","description":"Retrieves general information for the taxpayer associated with the specified company from DBS","operationId":"get-taxpayer-general-information","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MukellefGenelBilgilerDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/fixed-assets-codes":{"get":{"tags":["DBS"],"summary":"Get Fixed Asset Codes","description":"Retrieves the list of fixed asset codes available in DBS for the specified company","operationId":"get-fixed-assets-codes","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DbsFixedAssetCode"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/deleteFromDBS/{documentId}":{"delete":{"tags":["DBS"],"summary":"Delete a document from DBS","description":"This service delete a document from DBS","operationId":"deleteFromDBS","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/{ledgerType}/{category}":{"get":{"tags":["DBS"],"summary":"Get Document Types","description":"Retrieves available document types for the specified ledger type and direction category from DBS","operationId":"get-document-types","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ledgerType","in":"path","required":true,"schema":{"type":"string"}},{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["INCOME","EXPENSE"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DbsDocumentTypeResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/documents/{documentId}/suggestion":{"get":{"tags":["DBS"],"summary":"Get DBS Document Suggestion","description":"Returns DBS field suggestions for the specified document to assist with DBS transfer","operationId":"get-dbs-document-suggestion","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DbsSuggestion"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/{ledgerPermission}/fixed-assets":{"get":{"tags":["DBS"],"summary":"List Fixed Assets","description":"Returns a paginated list of active fixed assets for the given ledger permission from DBS","operationId":"list-fixed-assets","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ledgerPermission","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SabitKiymetPage"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/{ledgerType}/{category}/{documentTypeCode}":{"get":{"tags":["DBS"],"summary":"Get Categories","description":"Retrieves categories for the specified ledger type, direction, and document type from DBS","operationId":"get-categories","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ledgerType","in":"path","required":true,"schema":{"type":"string"}},{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["INCOME","EXPENSE"]}},{"name":"documentTypeCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DbsCategoryResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/{ledgerType}/{category}/{documentTypeCode}/{categoryCode}":{"get":{"tags":["DBS"],"summary":"Get Record Types","description":"Retrieves record types for the specified ledger type, direction, document type, and category from DBS","operationId":"get-record-types","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ledgerType","in":"path","required":true,"schema":{"type":"string"}},{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["INCOME","EXPENSE"]}},{"name":"documentTypeCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"categoryCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DbsCategoryResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/dbs/system/{ledgerType}/{category}/{documentTypeCode}/{categoryCode}/{recordTypeCode}":{"get":{"tags":["DBS"],"summary":"Get Record Subtypes","description":"Retrieves record subtypes for the specified ledger type, direction, document type, category, and record type from DBS","operationId":"get-record-subtypes","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ledgerType","in":"path","required":true,"schema":{"type":"string"}},{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["INCOME","EXPENSE"]}},{"name":"documentTypeCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"categoryCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"recordTypeCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DbsCategoryResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/data-purge":{"post":{"tags":["DataPurge"],"summary":"Start bulk deletion","description":"Queues the deletion of the selected scopes. The data is gone for good.","operationId":"start-data-purge","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPurgeStartRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DataPurgeStartedDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/data-purge/preview":{"get":{"tags":["DataPurge"],"summary":"Preview what bulk deletion would remove","description":"Returns the record counts per scope, the warnings to show and any blockers.","operationId":"preview-data-purge","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DataPurgePreviewDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/data-purge/{purgeId}":{"get":{"tags":["DataPurge"],"summary":"Get a bulk deletion job","description":"Returns the status and the per-scope progress of the job.","operationId":"get-data-purge","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"purgeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DataPurgeDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/dealer/sales":{"get":{"tags":["Dealer"],"summary":"List all subscription and credit package purchases of dealer customers","description":"Bayiye bağlı tüm müşterilerin abonelik ve ek kontör paketi satın alımlarını listeler.","operationId":"list-dealer-sales","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"isAddon","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DealerSalesReport"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/dealer/customers":{"get":{"tags":["Dealer"],"summary":"List dealer customers","description":"Bayiye bağlı müşteri firmalarını listeler.","operationId":"list-dealer-customers","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDealerCustomerDto"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Dealer"],"summary":"Add a new customer company under the dealer","description":"Bayi altına yeni müşteri firması tanımlar ve müşteri yetkilisini davet eder.","operationId":"add-dealer-customer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/dealer/customers/{customerId}/subscriptions":{"get":{"tags":["Dealer"],"summary":"List a dealer customer's subscriptions and credit packages","description":"Bayiye bağlı bir müşterinin satın aldığı abonelik ve ek kontör paketlerini listeler.","operationId":"list-dealer-customer-subscriptions","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"isAddon","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDealerSaleDto"}}}}},"security":[{"bearerAuth":[]}]}},"/api/definitions/tax":{"get":{"tags":["Definitions"],"summary":"Get Tax details","description":"Get Tax Details","operationId":"tax-detail","parameters":[{"name":"category","in":"query","required":true,"schema":{"type":"string","enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/api/definitions/address":{"get":{"tags":["Definitions"],"summary":"Search address","description":"Search address","operationId":"address-details","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["DISTRICT","COUNTRY"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/api/definitions/vknTckn":{"get":{"tags":["Definitions"],"summary":"Get Taxpayer information from GIB","description":"Get Taxpayer information from GIB","operationId":"taxpayer-details","parameters":[{"name":"vknTckn","in":"query","required":true,"schema":{"type":"string"}},{"name":"fresh","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxPayerDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace/{workplaceId}/department":{"get":{"tags":["Department"],"summary":"Get all departments for a workplace","description":"Retrieves a list of all departments associated with the specified workplace","operationId":"list-departments","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDepartmentDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Department"],"summary":"Create new department","description":"Creates a new department in the specified workplace","operationId":"create-department","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepartmentRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepartmentDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace/{workplaceId}/department/{id}":{"get":{"tags":["Department"],"summary":"Get department by ID","description":"Retrieves a specific department by its ID for the given workplace","operationId":"get-department","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepartmentDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Department"],"summary":"Update department","description":"Updates an existing department with the specified ID","operationId":"update-department","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDepartmentRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepartmentDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Department"],"summary":"Delete department","description":"Deletes the department with the specified ID","operationId":"delete-department","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document":{"get":{"tags":["Document"],"summary":"Search and list company documents with filters (direction, scenario, status, date, account) returns paginated results","description":"\n            Retrieves a paginated list of documents for the specified company with optional filtering\n            Use 'detail' parameter to control response type.\n        ","operationId":"get-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DocumentSearchRequest"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Invalid query parameters"},"404":{"description":"Company not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved documents","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentUnion"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Document"],"summary":"Create document","description":"Creates a new document for the specified company","operationId":"create-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSaveRequest"}}},"required":true},"responses":{"400":{"description":"Invalid document data"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Unauthorized - insufficient permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/bulk":{"post":{"tags":["Document"],"summary":"Create bulk documents","description":"\n            Creates multiple documents from Excel data in bulk.\n            Rows are grouped by account (accountId or importAccount) and date.\n            Each group creates a single document with multiple lines.\n\n            - If accountId is provided, uses existing account\n            - If accountId is null and importAccount is provided, creates new account\n            - If productId is empty, searches for existing product by description or creates new one\n            - Total represents the final payable amount (including VAT, minus withholding)\n        ","operationId":"create-bulk-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDocumentCreateRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request data"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error - transaction rolled back"},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Documents successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BulkDocumentCreateResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/basic":{"post":{"tags":["Document"],"summary":"Create basic document","description":"Creates a new document using simplified request format with automatic calculations","operationId":"create-basic-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicDocumentRequest"}}},"required":true},"responses":{"400":{"description":"Invalid document data"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Unauthorized - insufficient permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/periods":{"get":{"tags":["Document"],"summary":"Get used periods","description":"Retrieves all distinct time periods that have been used in documents for the specified company","operationId":"get-used-periods","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Company not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved periods","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/archive":{"post":{"tags":["Document"],"summary":"Archive documents","description":"\n        Archives the specified documents for the given company.\n        Archived documents are moved to inactive status but remain in the system.\n        \n        Request Body:\n        - List of document IDs to be archived\n        - Optional archive reason\n        ","operationId":"archive","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentArchiveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Company or documents not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Documents successfully archived","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/draft-ids":{"get":{"tags":["Document"],"summary":"Get draft document IDs","description":"\n            Retrieves IDs of draft documents for the company.\n            Can limit the number of results and exclude a specific document.\n        ","operationId":"get-draft-document-ids","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","description":"Maximum number of results","required":false,"schema":{"type":"integer","format":"int32","default":2}},{"name":"excludeId","in":"query","description":"Document ID to exclude","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved draft document IDs","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/unArchive":{"post":{"tags":["Document"],"summary":"Unarchive documents","description":"\n        Restores archived documents to active status for the given company.\n        Unarchived documents become visible and editable again in the system.\n        \n        Request Body:\n        - List of document IDs to be unarchived\n        ","operationId":"unArchive","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentArchiveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Company or documents not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Documents successfully unarchived","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/series-gaps":{"get":{"tags":["Document"],"summary":"List document number gaps of a year","description":"\n            Lists the unused outgoing document numbers of the year, grouped by series.\n            Cancelled, rejected, duplicated and unparseable numbers are reported in their own lists.\n        ","operationId":"get-document-series-gaps","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"query","description":"Year component of the document numbers","required":true,"schema":{"type":"integer","format":"int32"},"example":2026}],"responses":{"400":{"description":"Year is missing or outside the supported range"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved document number gaps","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentSeriesGapResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/verify-code":{"get":{"tags":["Document"],"summary":"Verify whether a code matches the one generated for a specific document (used for document authentication)","operationId":"verify-document-code","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"query","required":true,"schema":{"type":"string"}},{"name":"code","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VerifyCodeResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/drafts/count":{"get":{"tags":["Document"],"summary":"Count outgoing draft documents for the company, optionally filtered by account and date range","description":"Get Draft Documents count","operationId":"get-drafts-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"dispatch","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}":{"get":{"tags":["Document"],"summary":"Retrieve a single document with its full details (lines, payments, accounting status) by document ID","description":"Retrieves a single document with the given ID for the specified company","operationId":"get-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Document"],"summary":"Delete document","description":"Deletes the document with the given ID for the specified company","operationId":"deleteDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDeleteResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Document"],"summary":"Update document","description":"Updates the document with the given ID for the specified company","operationId":"updateDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/checkMultiple":{"get":{"tags":["Document"],"summary":"Check whether a document with the same number, year, and account already exists to prevent duplicates","description":"\n        Checks if a document with the same document number, year, and account ID already exists.\n        This is typically used to prevent duplicate entries in the system.\n\n        Parameters:\n        - companyId: The ID of the company to check within\n        - documentNo: The document number to check for duplicates\n        - year: The fiscal year to check within\n        - accountId: The account ID associated with the document\n        - id (optional): If provided, excludes this ID from the check (useful when updating an existing document)\n\n        Returns:\n        List of existing documents that match the criteria as CheckMultipleDto objects\n    ","operationId":"check-duplicate-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentNo","in":"query","required":true,"schema":{"type":"string"}},{"name":"year","in":"query","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CheckMultipleDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/export/by-ids":{"post":{"tags":["Document"],"summary":"Export detailed reports for multiple documents by IDs","description":"\n            Exports documents selected by their IDs.\n            For PDF and XML formats, returns a signed URL to a zip archive of the document files.\n            For JSON, returns the detailed report rows inline. For other formats (Excel, CSV), returns the report file.\n        ","operationId":"export-document-detailed-pdf-report-by-ids","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportByIdsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully exported the selected documents","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DocumentDetailedReportJsonResponse"},{"$ref":"#/components/schemas/DocumentPdfExportResponse"}]}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/next-document-no":{"post":{"tags":["Document"],"summary":"Predict the next document number","description":"\n            Returns the document number this invoice would get if it were formalized now, together with\n            the resolved scenario. The number is advisory: a concurrent invoice in the same series takes it first.\n        ","operationId":"predict-next-document-no","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextDocumentNoRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Predicted document number","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NextDocumentNoResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{accountId}/bank":{"post":{"tags":["Document"],"summary":"Save Bank Documents","description":"\n        Saves bank statement documents for the specified company and account.\n        Processes the bank statement data and stores it in the document system.\n    ","operationId":"documentBank","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentBankSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/prepare-formalize":{"get":{"tags":["Document"],"summary":"Search and list documents ready for formalization","description":"\n            Retrieves a filtered list of documents with formalization preparation data in ONE API call.\n            Default sort: date ASC, time ASC, createdAt ASC\n\n            For DRAFT documents: determines scenario, document type, retrieves GIB user status.\n            For non-DRAFT documents: returns as-is.\n        ","operationId":"get-documents-for-formalize","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DocumentSearchRequest"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}},{"name":"scenarioUserSelect","in":"query","required":false,"schema":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved and prepared documents","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponsePrepareFormalizationResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/name":{"get":{"tags":["Document"],"summary":"Get document name","description":"Retrieves the name of a specific document by its ID","operationId":"get-document-name","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved document name","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentNameDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Document"],"summary":"Update document name","description":"Updates the name of a specific document","operationId":"update-document-name","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNameDto"}}},"required":true},"responses":{"400":{"description":"Invalid request body or parameters"},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document name successfully updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentNameDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Document"],"summary":"Delete document name","description":"Deletes the name of a specific document","operationId":"delete-document-name","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Document name successfully deleted"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/copy":{"post":{"tags":["Document"],"summary":"Copy Document","description":"\n        Creates a copy of an existing document with all its details.\n        The copied document will have a new unique ID but contain identical data to the original.\n        Useful for creating similar documents or duplicating templates.\n    ","operationId":"copyDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid request parameters"},"404":{"description":"Company or document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document copied successfully, returns ID of the new document","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/matbu":{"post":{"tags":["Document"],"summary":"Save Draft Invoice as Printed Invoice","description":"\n    Converts a draft invoice into a printed (matbu) invoice format.\n    Printed invoices are standardized pre-printed paper invoices that comply with Turkish tax regulations.\n    ","operationId":"matbu","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Company or document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Draft invoice successfully converted to printed format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/share":{"post":{"tags":["Document"],"summary":"Share document","description":"Shares a document with specified users or groups","operationId":"share-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDocumentRequest"}}},"required":true},"responses":{"400":{"description":"Invalid share request"},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Unauthorized - insufficient permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document successfully shared","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ShareDocumentResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/cancel":{"post":{"tags":["Document"],"summary":"Cancel a document","description":"Cancels the specified document. Requires authorization.","operationId":"cancelDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCancelRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/download":{"get":{"tags":["Document"],"summary":"Download document file","description":"Redirects to a signed CDN link for the document file in the requested format. Supported formats: pdf, xml, html. Defaults to pdf.","operationId":"download-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"İstenen dosya biçimi.","required":false,"schema":{"type":"string","default":"pdf","enum":["pdf","xml","html"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document or file not found"},"409":{"description":"File is not produced yet; retry shortly"},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"File content"},"302":{"description":"Redirect to the signed file link"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/predict-bank-documents":{"post":{"tags":["Document"],"summary":"Predict bank documents","description":"Predict bank documents","operationId":"predictBankDocuments","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankDocumentPredictionResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/formalize":{"post":{"tags":["Document"],"summary":"Formalize document","description":"\n          Formalizes the document related to companyId and documentId.\n          Not available with support access: the submission goes to GİB and cannot be undone,\n          so it has to be sent by someone holding a role in the company.\n        \"","operationId":"formalizeDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFormalizeRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/recurring":{"post":{"tags":["Document"],"summary":"Create Recurring Document","description":"\n        Creates a recurring version of the specified document for the given company.\n        This operation clones the original document and marks it with 'RECURRING' status.\n        \n        - **companyId**: The ID of the company that owns the document\n        - **documentId**: The ID of the document to be made recurring\n    ","operationId":"recurring","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully created recurring document","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/cancel/undo":{"post":{"tags":["Document"],"summary":"Undo document cancellation","description":"Reverses the cancellation of a document. Returns document to its previous status.","operationId":"cancelUndoDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/createReturn":{"post":{"tags":["Document"],"summary":"Create return document","description":"Creates a return document based on the original document reference","operationId":"createReturnDocument","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/most-used-payment-accounts":{"get":{"tags":["Document"],"summary":"Get most used payment accounts by type","description":"Returns the most used payment account for each payment type based on document direction and scenario. \n            For each type (BANKA, KASA, POS, etc.), only the most frequently used account is returned.\n        ","operationId":"get-most-used-payment-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"direction","in":"query","description":"Document direction (INCOMING or OUTGOING)","required":true,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"scenario","in":"query","description":"Document scenario (e.g., TAHSILAT, ODEME, BANKA)","required":true,"schema":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}}],"responses":{"400":{"description":"Invalid direction or scenario parameter"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved most used payment accounts","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MostUsedPaymentAccountResponse"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/generate-verification-code":{"post":{"tags":["Document"],"summary":"Generate a verification code for a document","operationId":"generate-document-verification-code","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/expense-note/pdf":{"get":{"tags":["Document"],"summary":"Download expense note PDF","description":"Returns the PDF of a paper expense note or of an e-expense note that has not been sent yet.","operationId":"download-expense-note-pdf","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Document is not a printable expense note"},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"PDF file","content":{"application/pdf":{}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/prepare-formalize":{"get":{"tags":["Document"],"summary":"Prepare document for formalization","description":"\n            Prepares a draft document for formalization by determining the appropriate scenario,\n            document type, and document details based on the account's GIB (Turkish Revenue Administration)\n            registration status and tax information.\n\n            This endpoint:\n            - Checks if the account is registered as a GIB e-invoice user\n            - Determines the appropriate document scenario (TICARIFATURA, TEMELFATURA, EARSIVFATURA, etc.)\n            - Updates the document type based on VAT exemption or withholding status\n            - Retrieves bank accounts from the last document for the same account\n            - Returns all necessary information for the formalization form\n        ","operationId":"prepare-formalize-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"scenarioUserSelect","in":"query","required":false,"schema":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully prepared document for formalization","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PrepareFormalizationResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/detailed-report/export/{format}":{"get":{"tags":["Document"],"summary":"Export detailed document report","description":"\n            Exports a detailed report of documents with tax information breakdown in the specified format.\n            The json format returns the rows inline for API consumers instead of a file.\n        ","operationId":"export-document-detailed-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["PDF","EXCEL","CSV","XML","HTML","JSON"]}},{"name":"direction","in":"query","description":"Document direction filter (INCOMING or OUTGOING)","required":true,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"startDate","in":"query","description":"Start date for filtering documents","required":false,"schema":{"type":"string","format":"date","default":"2023-01-01"}},{"name":"endDate","in":"query","description":"End date for filtering documents","required":false,"schema":{"type":"string","format":"date","default":"2100-12-31"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Company not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully exported document detailed report","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DocumentDetailedReportJsonResponse"},{"$ref":"#/components/schemas/DocumentPdfExportResponse"}]}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/{documentId}/payment/{paymentId}":{"delete":{"tags":["Document"],"summary":"Delete a payment of a document","description":"\n          Deletes a single payment (tahsilat/ödeme) of the document, independently of the document\n          status. The accounting record must not be approved, e-defter formalized or transferred,\n          and the document must not be one whose payment is the document itself (collection and\n          payment receipts, cash register, Z report, bank).\n        ","operationId":"delete-document-payment","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"paymentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/note/{documentId}":{"get":{"tags":["Document Notes"],"summary":"List document notes","description":"List document notes","operationId":"list-document-notes","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentNoteDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Document Notes"],"summary":"Add note to document","description":"Add note to document","operationId":"add-note-to-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNoteCreateDto"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentNoteDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/note/{documentId}/count":{"get":{"tags":["Document Notes"],"summary":"Get document note count","description":"Get document note count","operationId":"document-note-count","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/note/{documentId}/{noteId}":{"put":{"tags":["Document Notes"],"summary":"Update document note","description":"Update document note","operationId":"update-document-note","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNoteCreateDto"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentNoteDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Document Notes"],"summary":"Delete document note","description":"Delete document note","operationId":"delete-document-delete","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/upload":{"get":{"tags":["Document Upload"],"summary":"List uploaded documents","description":"Retrieves a paginated list of uploaded documents for a specific company","operationId":"list-uploaded-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"excludeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"contentType","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Company not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved list of documents","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseDocumentInboxDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Document Upload"],"summary":"Upload a document","description":"\n            Uploads a single document or extracts and uploads files from a compressed archive.\n            Returns the ids of the uploaded documents; a compressed archive may produce multiple documents.\n        ","operationId":"upload-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"400":{"description":"Invalid file format or empty file"},"404":{"description":"Company not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document successfully uploaded, response contains the uploaded document ids","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentUploadResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Document Upload"],"summary":"Delete multiple documents","description":"Deletes multiple documents by their IDs","operationId":"delete-multiple-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleteRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"One or more documents not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Documents successfully deleted","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/upload/{ettn}":{"delete":{"tags":["Document Upload"],"summary":"Delete a single document","description":"Deletes a specific document by its ETN (Electronic Tracking Number)","operationId":"delete-single-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ettn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Document not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Document successfully deleted","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/upload/archive":{"post":{"tags":["Document Upload"],"summary":"Archive uploaded documents","description":"Moves the given uploaded documents to the archive. Archived documents are hidden from the default list and from automatic import.","operationId":"archive-uploaded-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileArchiveRequest"}}},"required":true},"responses":{"400":{"description":"Empty id list"},"404":{"description":"One or more documents not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Documents successfully archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentInboxArchiveResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/upload/unarchive":{"post":{"tags":["Document Upload"],"summary":"Unarchive uploaded documents","description":"Brings the given archived uploaded documents back into the default list.","operationId":"unarchive-uploaded-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileArchiveRequest"}}},"required":true},"responses":{"400":{"description":"Empty id list"},"404":{"description":"One or more documents not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Documents successfully unarchived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentInboxArchiveResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/employee":{"get":{"tags":["Employee"],"summary":"List Employees","description":"Retrieves a paginated list of employees for the given company.","operationId":"list-employees","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"workplaceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"ALL","enum":["ACTIVE","EXITED","ALL"]}},{"name":"asOf","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseEmployeeDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Employee"],"summary":"Create Employee","description":"Creates a new employee with the provided information.","operationId":"save-employee","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/employee/{id}":{"get":{"tags":["Employee"],"summary":"Get Employee","description":"Retrieves a specific employee by ID.","operationId":"get-employee","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Employee"],"summary":"Delete Employee","description":"Permanently deletes an employee by ID.","operationId":"delete-employee","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Employee"],"summary":"Update Employee","description":"Updates an existing employee with the provided fields.","operationId":"update-employee","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/employee/codes":{"get":{"tags":["Employee"],"summary":"Get Employee Codes","description":"Returns all valid SGK/payroll lookup codes with labels for all clients.","operationId":"get-employee-codes","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeCodesResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/expense-note/bulk-create":{"post":{"tags":["Expense Note Document"],"summary":"Create expense notes from existing documents in bulk","description":"\n            Creates expense note (Gider Pusulası) documents from multiple source invoices in one request.\n\n            Each item carries the expense note's OWN document number and date; the source invoice's\n            number and date are preserved separately under `refundInfo`. The accounting record is\n            generated from these values, so the note does not have to be corrected afterwards.\n\n            Duplicate document ids are processed once. Each expense note is created in its own\n            transaction, so a failing item does not roll back the others — inspect the per-item\n            `status` in the response. A source invoice that already has an expense note is reported as\n            `ALREADY_EXISTS` and not created again, so a partially failed batch can be safely re-sent.\n        ","operationId":"bulk-create-expense-notes-from-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseNoteBulkCreateRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request data"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Batch processed; check per-item status for individual failures","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExpenseNoteBulkCreateResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/expense-note/{documentId}/create":{"post":{"tags":["Expense Note Document"],"summary":"Create expense note from existing document","description":"\n            Creates a single expense note (Gider Pusulası) from an existing document reference.\n\n            The source document must be an outgoing one; an incoming document is rejected.\n\n            The body carries the expense note's OWN document number and date; the source invoice's\n            number and date are preserved separately under `refundInfo`.\n\n            A source invoice that already has an expense note is rejected, so retrying this call\n            does not create a second note.\n        ","operationId":"create-expense-note-from-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseNoteCreateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/gibUser/checkUser":{"get":{"tags":["GibUser"],"summary":"List a counterparty's e-invoice aliases","description":"Returns the counterparty's registered e-invoice aliases, or an empty array when it is not an e-invoice taxpayer. Pick the invoice scenario from this result before creating the draft.","operationId":"check-gib-user","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"vkn","in":"query","description":"Sorgulanacak VKN ya da TCKN. accountId ile birlikte verilmezse zorunludur.","required":false,"schema":{"type":"string"},"example":1234567890},{"name":"accountId","in":"query","description":"Sorgulanacak carinin kimliği; VKN'si bu cariden okunur.","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Registered aliases; empty when the counterparty is not an e-invoice taxpayer","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GIBUSER"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/gibUser/checkDispatchUser":{"get":{"tags":["GibUser"],"summary":"List a counterparty's e-dispatch aliases","description":"Returns the counterparty's registered e-dispatch aliases, or an empty array when it is not an e-dispatch taxpayer. E-invoice and e-dispatch aliases are registered separately.","operationId":"check-gib-dispatch-user","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"vkn","in":"query","description":"Sorgulanacak VKN ya da TCKN. accountId ile birlikte verilmezse zorunludur.","required":false,"schema":{"type":"string"},"example":1234567890},{"name":"accountId","in":"query","description":"Sorgulanacak carinin kimliği; VKN'si bu cariden okunur.","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Registered aliases; empty when the counterparty is not an e-dispatch taxpayer","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GIBUSER"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/globalSearch":{"get":{"tags":["GlobalSearch"],"summary":"Get Global Search","description":"Performs a global search across the system for the specified company using the provided query.","operationId":"global-search","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","maxLength":2147483647,"minLength":3}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchResponseDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/integration":{"get":{"tags":["Integration"],"summary":"List Integrations","description":"List Integrations","operationId":"list-integrations","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/integration/all":{"get":{"tags":["Integration"],"summary":"List All Integrations","description":"List all saved integrations for a company","operationId":"list-all-integrations","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/integration/kt/auth-url":{"get":{"tags":["Integration"],"summary":"Get KT Authorization URL","description":"Get Kuveyt Türk authorization URL to start OAuth flow","operationId":"get-kt-auth-url","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/KTAuthUrlResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/integration/kt/callback":{"post":{"tags":["Integration"],"summary":"Handle KT OAuth Callback","description":"Exchange authorization code for tokens and create integration","operationId":"kt-oauth-callback","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KTCallbackRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntegrationDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/integration/{integrator}/{type}":{"get":{"tags":["Integration"],"summary":"Get Integration","description":"Get Integration","operationId":"get-integration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"integrator","in":"path","required":true,"schema":{"type":"string","enum":["EDM","NES","TAXTEN","KOLAYSOFT","SOVOS","UYUMSOFT","IZI_BIZ","ELOGO","GIB","PAYTR","SIPAY","KUVEYTTURK","BBVA","ISBANK","ENPARA","VAKIFBANK","TEB","AKBANK","ZIRAAT","HALKBANK","EMLAKKATILIM","YAPIKREDI","QNB"]}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntegrationDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/integration/{integrator}/{type}/auto-prediction":{"patch":{"tags":["Integration"],"summary":"Update Auto Prediction","description":"Enable or disable auto prediction for a bank integration","operationId":"update-auto-prediction","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"integrator","in":"path","required":true,"schema":{"type":"string","enum":["EDM","NES","TAXTEN","KOLAYSOFT","SOVOS","UYUMSOFT","IZI_BIZ","ELOGO","GIB","PAYTR","SIPAY","KUVEYTTURK","BBVA","ISBANK","ENPARA","VAKIFBANK","TEB","AKBANK","ZIRAAT","HALKBANK","EMLAKKATILIM","YAPIKREDI","QNB"]}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"autoPrediction","in":"query","required":true,"schema":{"type":"boolean"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/investment/{accountId}/fund-result":{"post":{"tags":["Investment"],"summary":"Create Fund Profit or Loss","description":"Creates a fund profit or loss entry for the investment account","operationId":"create-fund-result","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundResultRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FundResultResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox":{"get":{"tags":["Invoice Inbox"],"summary":"List paginated incoming e-invoices in the company inbox, filterable by date, scenario, status, and archived flag","description":"\n        Lists invoice inbox records based on the provided criteria.\n        This operation supports pagination, searching, and filtering options.\n        ","operationId":"list-invoice-inbox","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"scenario","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"ignoreStatuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"allowedStatuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"orderByIssueDate","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"excludeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Invalid request parameters"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved inbox list","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseInvoiceInboxDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/paths":{"post":{"tags":["Invoice Inbox"],"summary":"Get Document Inbox Paths","description":"\n        Retrieves file paths for multiple document inbox items (both DocumentInbox and InvoiceInbox).\n        This endpoint accepts a list of IDs and returns the corresponding file paths and metadata\n        for both regular documents and invoices.\n        ","operationId":"get-document-inbox-paths","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInboxPathsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request - Invalid parameters"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - User lacks required permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully retrieved document paths","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentInboxPathDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/{ettn}":{"get":{"tags":["Invoice Inbox"],"summary":"Get a specific incoming e-invoice from the inbox by its ETTN (electronic tracking number)","description":"\n        Retrieves a specific invoice inbox item by its ETTN (Elektronik Takip Numarası).\n        This operation fetches detailed information about a single invoice from the inbox.\n        ","operationId":"get-invoice-inbox-item","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ettn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Invoice not found with given ETTN"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - User lacks required permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Invoice successfully retrieved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceInboxDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/import":{"post":{"tags":["Invoice Inbox"],"summary":"Import selected pending inbox invoices","description":"\n        Starts importing the requested inbox items (uploaded document ids and/or e-invoice ettns)\n        and returns the number queued. Ids that are not importable (already imported, archived,\n        ineligible status) are silently skipped, so the returned total may be lower than the number\n        of ids sent.\n        ","operationId":"inbox-import-by-ids","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxImportByIdsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportAllStartedResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/archive":{"post":{"tags":["Invoice Inbox"],"summary":"Archive Invoice Inbox","description":"\n        Archives invoice inbox records based on the provided criteria. \n        This operation moves invoices to archival storage for compliance and historical tracking purposes.\n        Requires appropriate permissions to execute.\n    ","operationId":"archive-invoice-inbox","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInboxSaveRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request parameters"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Unauthorized - insufficient permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Invoices successfully archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentInboxArchiveResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/unArchive":{"post":{"tags":["Invoice Inbox"],"summary":"UnArchive Invoice Inbox","description":"\n        UnArchives invoice inbox records based on the provided criteria. \n        This operation moves invoices to archival storage for compliance and historical tracking purposes.\n        Requires appropriate permissions to execute.\n    ","operationId":"unarchive-invoice-inbox","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInboxSaveRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request parameters"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Unauthorized - insufficient permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Invoices successfully unarchived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentInboxArchiveResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/import-all":{"post":{"tags":["Invoice Inbox"],"summary":"Import all pending inbox invoices","description":"Starts importing the pending inbox invoices and returns the number queued.","operationId":"inbox-import-all","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportAllStartedResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/productMap":{"post":{"tags":["Invoice Inbox"],"summary":"Map products","description":"Creates or updates product mapping for the specified company","operationId":"productMap","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductMapSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/eInvoiceData/{ettn}":{"get":{"tags":["Invoice Inbox"],"summary":"Retrieve detailed e-invoice data from GIB for a specific ETTN (electronic tracking number)","description":"\n        Retrieves detailed electronic invoice data for a specific invoice identified by ETTN.\n        Supports optional parameters for document number, status filtering and parsing options.\n        Returns the structured invoice data in the system's format.\n        ","operationId":"e-invoice-data","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ettn","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentNo","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]}},{"name":"abstractParsing","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"400":{"description":"Invalid request parameters"},"404":{"description":"Invoice not found with given ETTN"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Unauthorized - insufficient permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Successfully returned invoice data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EInvoiceDataResult"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/userResponse/{ettn}/create":{"post":{"tags":["Invoice Inbox"],"summary":"Create Pending Invoice Response","description":"\n        Creates a pending response for a specific invoice in the inbox.\n        This operation initiates a response process for the invoice identified by ETTN.\n        Requires appropriate permissions to execute.\n        \n        **Note:** This is typically used when a user needs to respond to an invoice\n        but the response is not yet finalized or requires approval.\n    ","operationId":"create-pending-invoice-response","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ettn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request - invalid parameters or business rules violation"},"404":{"description":"Invoice not found with given ETTN"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - user lacks required permissions"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Pending response successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceInboxReplyDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/userResponse/{ettn}/reject":{"post":{"tags":["Invoice Inbox"],"summary":"Reject Pending Invoice","description":"\n        Rejects a pending invoice identified by the given ETTN (Elektronik Takip Numarası).\n        This operation allows authorized users to reject an invoice with an optional rejection reason.\n        \n        **Business Rules:**\n        - Only invoices in a pending state can be rejected\n        - Rejection reason may be required based on business configuration\n        - Operation is audited for compliance purposes\n    ","operationId":"reject-pending-invoice","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ettn","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInboxRejectRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request - Possible reasons: - Invalid request body format - Invoice is not in a rejectable state - Required rejection reason not provided"},"404":{"description":"Invoice not found with the given ETTN"},"409":{"description":"Conflict - Invoice status has changed since last retrieval"},"401":{"description":"Unauthorized - Authentication required"},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - User lacks required permissions to reject invoices"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Invoice successfully rejected","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceInboxReplyDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/inbox/userResponse/{ettn}/partialAccept":{"post":{"tags":["Invoice Inbox"],"summary":"Partially Accept Invoice","description":"\n        Partially accepts an invoice identified by the given ETTN (Elektronik Takip Numarası).\n        This operation allows authorized users to accept specific line items of an invoice while rejecting others.\n        \n        **Business Rules:**\n        - Only invoices in a pending state can be partially accepted\n        - At least one line item must be accepted\n        - Rejected line items may require rejection reasons\n        - Operation is audited for compliance purposes\n        \n        **Request Body Requirements:**\n        - Must contain at least one accepted line item\n        - Rejected items should include rejection reasons when required\n    ","operationId":"partially-accept-invoice","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ettn","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInboxReplyLineRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request - Possible reasons: - Invalid request body format - No line items marked for acceptance - Missing required rejection reasons - Invoice is not in a processable state"},"404":{"description":"Invoice not found with the given ETTN"},"409":{"description":"Conflict - Invoice status has changed since last retrieval"},"401":{"description":"Unauthorized - Authentication required"},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - User lacks required permissions for partial acceptance"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Invoice partially accepted successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceInboxReplyDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/lease":{"post":{"tags":["Lease"],"summary":"Create Lease Document","description":"Create a new lease (kira) document with withholding tax calculation","operationId":"create-lease-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseDocumentRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/lease/{documentId}":{"get":{"tags":["Lease"],"summary":"Get Lease Document","description":"Get a lease (kira) document by ID","operationId":"get-lease-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeaseDocumentResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Lease"],"summary":"Update Lease Document","description":"Update an existing lease (kira) document by ID","operationId":"update-lease-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseDocumentRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeaseDocumentResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/note-template":{"get":{"tags":["Note Templates"],"summary":"List note templates","description":"Lists the company's saved invoice notes; `q` filters by template name","operationId":"list-note-templates","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseNoteTemplateDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Note Templates"],"summary":"Create note template","description":"Saves a reusable invoice note","operationId":"create-note-template","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteTemplateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NoteTemplateDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/note-template/{id}":{"get":{"tags":["Note Templates"],"summary":"Get note template","description":"Returns one saved note","operationId":"get-note-template","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NoteTemplateDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Note Templates"],"summary":"Update note template","description":"Updates a saved note; invoices that already used it keep their own copy","operationId":"update-note-template","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteTemplateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NoteTemplateDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Note Templates"],"summary":"Delete note template","description":"Deletes a saved note","operationId":"delete-note-template","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders":{"get":{"tags":["Order"],"summary":"Get Company Orders","description":"\n            Retrieves paginated orders for the company, optionally filtered by status, account, order number or direction.\n            Archived orders are excluded unless archived=true is requested.\n        ","operationId":"list-orders","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["DRAFT","CONFIRMED","CANCELLED"]}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"invoiced","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseOrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Order"],"summary":"Create New Order","description":"Creates a new draft order with its lines","operationId":"create-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}":{"get":{"tags":["Order"],"summary":"Get Existing Order Details","description":"Get order detail with lines","operationId":"get-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Order"],"summary":"Delete Order","description":"Deletes a draft order. Only draft orders can be deleted","operationId":"delete-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Order"],"summary":"Update Existing Order","description":"Updates a draft order and replaces its lines. Only draft orders can be updated","operationId":"update-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/pdf":{"get":{"tags":["Order"],"summary":"Download Order PDF","description":"Renders the order as a downloadable PDF","operationId":"download-order-pdf","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/cancel":{"post":{"tags":["Order"],"summary":"Cancel Order","description":"Cancels a draft or confirmed order","operationId":"cancel-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/archive":{"post":{"tags":["Order"],"summary":"Archive Order","description":"Hides the order from the default list without deleting it. Reversible","operationId":"archive-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/confirm":{"post":{"tags":["Order"],"summary":"Confirm Order","description":"Confirms a draft order, making it eligible for invoice/dispatch conversion","operationId":"confirm-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/unarchive":{"post":{"tags":["Order"],"summary":"Unarchive Order","description":"Brings an archived order back into the default list","operationId":"unarchive-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/convert/invoice":{"post":{"tags":["Order"],"summary":"Convert Order To Invoice","description":"Creates a draft invoice document from a confirmed, not-yet-invoiced order","operationId":"convert-order-to-invoice","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderConvertRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/orders/{orderId}/convert/dispatch":{"post":{"tags":["Order"],"summary":"Convert Order To Dispatch","description":"Creates a draft dispatch (irsaliye) document from a confirmed, not-yet-dispatched order","operationId":"convert-order-to-dispatch","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderConvertRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/pos/{accountId}/commission":{"post":{"tags":["POS"],"summary":"Create POS Commission","description":"\n        Creates a POS commission entry for the specified account.\n    ","operationId":"create-pos-commission","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosCommissionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/parsed-documents":{"get":{"tags":["ParsedDocument"],"summary":"List parsed documents","description":"\n            Belgelerin kendi beyan ettiği tutar, KDV ve vergi alanlarını tarih aralığıyla döner.\n            Tarihi okunamayan belgeler issueDate alanı boş olarak listeye dahildir.\n        ","operationId":"list-parsed-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"documentType","in":"query","required":false,"schema":{"type":"string"}},{"name":"scenario","in":"query","required":false,"schema":{"type":"string"}},{"name":"autoImportStatus","in":"query","required":false,"schema":{"type":"string","enum":["IMPORTED","SKIPPED","FAILED"]}},{"name":"documentKind","in":"query","required":false,"schema":{"type":"string","enum":["INVOICE","WAYBILL"]}},{"name":"include","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"includeUndated","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseParsedDocumentDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/parsed-documents/aggregate":{"get":{"tags":["ParsedDocument"],"summary":"Aggregate parsed documents by period","description":"\n            Dönem başına matrah, KDV ve tevkifat toplamlarını döner. Reddedilen belgeler\n            varsayılan olarak dışarıda bırakılır. Tarihi okunamayan belgeler period alanı boş olan\n            ayrı bir satırda döner. İrsaliyeler tutar taşımadığı için toplamlara girmez. Tutarlar\n            TL'ye çevrilmiş hâldedir; belgesinde kur olmayan dövizli belgeler toplamlara girmez,\n            sayıları unconvertedCount alanında döner.\n        ","operationId":"aggregate-parsed-documents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},{"name":"documentType","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","default":"MONTH","enum":["DAY","MONTH"]}},{"name":"includeRejected","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeUndated","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ParsedDocumentPeriodTotalsDto"}}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/parsed-documents/auto-import-stats":{"get":{"tags":["ParsedDocument"],"summary":"Auto-import outcome counts","description":"Otomatik içeri almanın sonuç ve sebep dağılımını döner.","operationId":"parsed-document-auto-import-stats","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"includeUndated","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutoImportStatsDto"}}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/payment/add":{"post":{"tags":["Payment"],"summary":"Initiate Payment","description":"Initiates a payment checkout session for the specified company","operationId":"initiate-payment","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayTrResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll":{"get":{"tags":["Payroll"],"summary":"List Payrolls","description":"Returns a paginated list of payroll periods, optionally filtered by year. Warnings are included only when a single period is requested with both year and month.","operationId":"list-payrolls","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagePayrollDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Payroll"],"summary":"Create Payroll Period","description":"Creates a DRAFT payroll period for the given year/month.","operationId":"create-payroll","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollCreateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}":{"get":{"tags":["Payroll"],"summary":"Get Payroll","description":"Returns a payroll period with aggregated totals and the warnings of the last calculation.","operationId":"get-payroll","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Payroll"],"summary":"Delete Payroll","description":"Deletes a DRAFT or CALCULATED payroll and all its lines. An APPROVED payroll must be unapproved first.","operationId":"delete-payroll","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/icmal":{"get":{"tags":["Payroll"],"summary":"Get Payroll Icmal URL","description":"Returns a presigned S3 URL for the period's signature-column payroll summary.","operationId":"get-payroll-icmal-url","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"PDF","enum":["PDF","XLSX"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/lines":{"get":{"tags":["Payroll"],"summary":"List Payroll Lines","description":"Returns a paginated list of employee calculation lines for a payroll period.","operationId":"list-payroll-lines","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagePayrollLineDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/approve":{"post":{"tags":["Payroll"],"summary":"Approve Payroll","description":"Approves a CALCULATED payroll and generates accounting records (BORDRO).","operationId":"approve-payroll","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/calculate":{"post":{"tags":["Payroll"],"summary":"Calculate Payroll","description":"Runs gross-to-net calculations for all employees. All timesheets must exist first.","operationId":"calculate-payroll","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollCalculateRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/unapprove":{"post":{"tags":["Payroll"],"summary":"Unapprove Payroll","description":"Reverts an APPROVED payroll back to CALCULATED status and deletes the BORDRO accounting document.","operationId":"unapprove-payroll","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/parameters/{year}/{month}":{"get":{"tags":["Payroll"],"summary":"Get Payroll Parameters","description":"Returns the parameter row governing the period, with the child aid income tax exemption amounts per age band.","operationId":"get-payroll-parameters","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollParametersDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Payroll"],"summary":"Update Child Aid Income Tax Exemption","description":"Sets the monthly per-child income tax exemption of both age bands on the parameter row governing the period. The amounts are central figures, so writing them is restricted to platform admins.","operationId":"update-payroll-parameters","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollParametersUpdateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollParametersDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/exit/dressed-wage-suggestion":{"get":{"tags":["Payroll"],"summary":"Suggest Dressed Daily Gross","description":"Suggests the dressed daily gross wage for severance and notice pay from the employee's approved payrolls of the last 12 months. Nothing is saved; the value is only a prefill.","operationId":"suggest-exit-dressed-wage","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"query","required":true,"schema":{"type":"string"}},{"name":"exitDate","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DressedWageSuggestionDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/lines/{accountId}":{"get":{"tags":["Payroll"],"summary":"Get Payroll Line","description":"Returns a single employee's detailed payroll calculation.","operationId":"get-payroll-line","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollLineDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/payslip/{accountId}/{year}/{month}":{"get":{"tags":["Payroll"],"summary":"Get Payslip URL by Period","description":"Returns a presigned S3 URL for the employee's payslip PDF directly by accountId, year and month.","operationId":"get-payslip-url-by-period","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll/{payrollId}/lines/{accountId}/payslip":{"get":{"tags":["Payroll"],"summary":"Get Payslip URL","description":"Returns a presigned S3 URL for the employee's payslip PDF. Only available for APPROVED payrolls.","operationId":"get-payslip-url","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"payrollId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll-deduction":{"post":{"tags":["Payroll Deduction"],"summary":"Create Payroll Deduction","description":"Adds a personal deduction (icra/nafaka/avans/özel sigorta/sendika) for an employee's period.","operationId":"create-payroll-deduction","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollDeductionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayrollDeductionDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll-deduction/{id}":{"delete":{"tags":["Payroll Deduction"],"summary":"Delete Payroll Deduction","description":"Deletes a deduction. Cannot delete if the period's payroll is already calculated.","operationId":"delete-payroll-deduction","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/payroll-deduction/{accountId}/{year}/{month}":{"get":{"tags":["Payroll Deduction"],"summary":"List Payroll Deductions","description":"Returns all deductions for an employee's period.","operationId":"list-payroll-deductions","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayrollDeductionDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product":{"get":{"tags":["Product"],"summary":"Get Company Products","description":"Retrieves all products belonging to the specified company with their current price lists","operationId":"list-products","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"categoryIds","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseProductDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Product"],"summary":"Create New Product","description":"Creates a new product with the given details including price lists and tax information","operationId":"create-product","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/maps":{"get":{"tags":["Product"],"summary":"Get paginated product-to-account mapping list, optionally filtered to show only mapped products","description":"Get product list with quantity","operationId":"list-product-maps","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"onlyMapped","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseProductMapProjectionDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/batch-map":{"post":{"tags":["Product"],"summary":"Batch Product Map","description":"Maps multiple lines to their corresponding products based on account ID, name, and unit. This endpoint performs efficient batch processing by collecting unique combinations and querying all product maps in a single database call.","operationId":"batch-product-map","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductMapBatchRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductMapBatchResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/{productId}":{"get":{"tags":["Product"],"summary":"Get Existing Product Details","description":"Get product detail","operationId":"get-product","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Product"],"summary":"Delete Product","description":"Delete an existing product","operationId":"delete-product","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Product"],"summary":"Update Existing Product","description":"Updates an existing product's information. Performs smart updates on price lists: adds new ones, updates existing ones, and removes missing ones","operationId":"update-product","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/batch-with-stock":{"post":{"tags":["Product"],"summary":"Create Products with Initial Stock","description":"Creates or updates multiple products with opening balance stock. For each item: if productId is null, creates new product or uses existing one with same name; if productId exists, validates and uses it. Creates a single opening balance document with all items that have quantity and purchase price.","operationId":"create-products-with-initial-stock","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductWithInitialStockRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductWithInitialStockResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/organize/overview":{"get":{"tags":["Product"],"summary":"Get Product Organize Overview","description":"Read-only, single-request replacement for the product/triage and product/organize screens' opening request storm: every company product with its e-invoice mapping status and purchase/sales usage in one response. Not paginated.","operationId":"get-product-organize-overview","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductOrganizeOverviewResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/list/with-quantity":{"get":{"tags":["Product"],"summary":"Get Product List With Quantity","description":"Get product list with quantity","operationId":"list-products-with-quantity","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productSearchRequest","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ProductSearchRequest"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseProductListProjection"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/{productId}/statement":{"get":{"tags":["Product"],"summary":"Get Existing Product Statement","description":"Get product statement with paginated transactions (newest first). Date, account, amount and quantity filters are combined with AND.","operationId":"get-product-statement","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountIds","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2021-01-01"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2099-12-31"}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"minQuantity","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxQuantity","in":"query","required":false,"schema":{"type":"number"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductStatementPage"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/standard-expense/ensure":{"post":{"tags":["Product"],"summary":"Ensure Standard Expense Products","description":"Idempotent: for each name, creates the EXPENSE product if none matches (Turkish case-insensitive), approves it if it exists but isn't approved yet, or skips it if already approved. A repeated call with the same names is a no-op.","operationId":"ensure-standard-expense-products","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardExpenseEnsureRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardExpenseEnsureResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/{productId}/statement/export":{"get":{"tags":["Product"],"summary":"Export Product Statement to Excel","description":"Exports all product statement transactions (not paginated) as an Excel (XLSX) file","operationId":"export-product-statement","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountIds","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2021-01-01"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2099-12-31"}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"minQuantity","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxQuantity","in":"query","required":false,"schema":{"type":"number"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/{productId}/fixed-asset/amortization":{"get":{"tags":["Product"],"summary":"Get Fixed Asset Amortization","description":"Retrieves amortization schedule for a fixed asset product","operationId":"get-product-amortization","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductWithAmortization"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/product/{productId}/statement/export/{format}":{"get":{"tags":["Product"],"summary":"Export Product Statement","description":"Exports every transaction matching the filters (not paginated) as excel or pdf. The stock column is left out for service and expense cards.","operationId":"export-product-statement-format","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["PDF","EXCEL","CSV","XML","HTML","JSON"]}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountIds","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2021-01-01"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","default":"2099-12-31"}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"number"}},{"name":"minQuantity","in":"query","required":false,"schema":{"type":"number"}},{"name":"maxQuantity","in":"query","required":false,"schema":{"type":"number"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/profile":{"patch":{"tags":["Profile"],"summary":"Update Profile","description":"Updates the user's profile information.","operationId":"update-profile","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"userProfile":{"$ref":"#/components/schemas/UserProfile"},"image":{"type":"string","format":"binary"}},"required":["userProfile"]}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/profile/me":{"get":{"tags":["Profile"],"summary":"Get Current User Profile","description":"Retrieves the current user's profile information.","operationId":"get-current-user-profile","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/profile/company":{"get":{"tags":["Profile"],"summary":"Get Companies","description":"Retrieves the list of companies the user belongs to.","operationId":"get-companies","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyPermissionDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/profile/analytics-context":{"get":{"tags":["Profile"],"summary":"Get Analytics Context","description":"Returns the user type and subscription state of the given company for analytics.","operationId":"get-analytics-context","parameters":[{"name":"companyId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AnalyticsContextDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/todo":{"get":{"tags":["Reports"],"summary":"Get Pending Tasks Report","description":"Retrieves list of pending tasks, approvals and follow-ups requiring action for the company","operationId":"get-todo-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TodoReport"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/assets":{"get":{"tags":["Reports"],"summary":"Get Company Assets Report","description":"Retrieves a comprehensive report of all assets for the specified company","operationId":"get-assets-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetsReport"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/detail":{"get":{"tags":["Reports"],"summary":"Get Account Summary Details","description":"Retrieves detailed breakdown of all accounts with their balances and transactions","operationId":"get-account-summary_1","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DashboardAccountSummary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/profit":{"get":{"tags":["Reports"],"summary":"Get Profit and Loss Report","description":"Generates comprehensive profit/loss statement showing company's revenues, expenses and net profit for given period","operationId":"get-profit-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"YEAR","enum":["ALL","YEAR","MONTH","LAST_MONTH","QUARTER_1","QUARTER_2","QUARTER_3","QUARTER_4"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProfitReport"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/product":{"get":{"tags":["Reports"],"summary":"Get Monthly Product Summary","description":"Retrieves product-based performance metrics including sales, costs and profits for specified period range","operationId":"get-product-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]}},{"name":"lastPeriod","in":"query","required":true,"schema":{"type":"string"}},{"name":"firstPeriod","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MonthlyProductSummary"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/cashFlow":{"get":{"tags":["Reports"],"summary":"Get Company Cash Flow Report","description":"Retrieves the cash flow statement showing company's cash inflows and outflows for operational, investing and financing activities","operationId":"get-cash-flow-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"lookback_period","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":3}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CashFlowReport"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/todo/smm":{"get":{"tags":["Reports"],"summary":"Get Pending Tasks Report for SMM","description":"Retrieves list of pending tasks, approvals and follow-ups requiring action for the company","operationId":"get-todo-smm-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SmmTodoReport"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/profit-trend":{"get":{"tags":["Reports"],"summary":"Get Monthly Profit and Loss Trend period-by-period revenue and expense breakdown as a time series","description":"Generates comprehensive profit/loss statement showing company's revenues, expenses and net profit for given period","operationId":"get-profit-trend-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MizanRow"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/document/line":{"get":{"tags":["Reports"],"summary":"Get Report From Document Lines","description":"Generate Report From Document Lines","operationId":"get-document-line-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"direction","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLineReportDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/sales/account":{"get":{"tags":["Reports"],"summary":"Get Sales Document Report","description":"Retrieves detailed sales report showing monthly revenue breakdown by account for the last 12-month period","operationId":"get-sales-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesReportDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/sales/payment":{"get":{"tags":["Reports"],"summary":"Get Sales Payment Report","description":"Retrieves detailed sales report showing monthly revenue breakdown by account for the last 12-month period","operationId":"get-payment-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentReportRowDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/todo/smm/banks":{"get":{"tags":["Reports"],"summary":"Get Bank Accounts of the Office Clients for SMM","description":"Returns a page of the accounting office's active clients, each with its unarchived bank accounts, their balance and the date of the last accounting entry. Sort by `behindRank` to put the clients that are furthest behind first.","operationId":"get-todo-smm-banks-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SmmBankSearchRequest"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSmmClientBanksDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/expense/account":{"get":{"tags":["Reports"],"summary":"Get Expense Document Report","description":"Retrieves detailed expense report showing monthly revenue breakdown by account for the last 12-month period","operationId":"get-expense-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesReportDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/overduePayments":{"get":{"tags":["Reports"],"summary":"List Overdue Accounts","description":"Lists cari accounts with an outstanding balance (receivables or payables) that have overdue documents.","operationId":"list-overdue-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"balanceType","in":"query","required":true,"schema":{"type":"string","enum":["POSITIVE","NEGATIVE","ZERO","NONZERO"]}},{"name":"asOfDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseOverdueAccountRow"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/{accountId}/detail":{"get":{"tags":["Reports"],"summary":"Get Account Detail Report","description":"Generate Report From Account Transactions for a specific account","operationId":"get-account-detail-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupBy","in":"query","required":true,"schema":{"type":"string","enum":["MONTH","DAY"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountDetailReportDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/withholding-payments":{"get":{"tags":["Reports"],"summary":"Get Withholding Payments","description":"Lists a period's withholding payments in the MUHSGK odemeler[] format.","operationId":"get-withholding-payments","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WithholdingPaymentDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/reports/overduePayments/count":{"get":{"tags":["Reports"],"summary":"Count Overdue Accounts","description":"Counts cari accounts with overdue receivables and payables, for dashboard badges.","operationId":"count-overdue-accounts","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"asOfDate","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OverduePaymentCountsDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/sync":{"get":{"tags":["SGK Tescil"],"summary":"List SGK record reconciliations","description":"Returns run summaries newest first, without the per-employee items. OPEN lists queued and running runs only.","operationId":"list-sgk-tescil-syncs","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"OPEN","enum":["OPEN","ALL"]}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSgkTescilSyncSummaryDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["SGK Tescil"],"summary":"Start an SGK record reconciliation","description":"Queues a run that asks SGK which entry and exit records it holds for the employees","operationId":"start-sgk-tescil-sync","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SgkTescilSyncRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTescilSyncStartedDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/codes":{"get":{"tags":["SGK Tescil"],"summary":"Get SGK registration code catalogue","description":"Returns the SGK code lists with their per-channel formats","operationId":"get-sgk-tescil-codes","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTescilCodesResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/status":{"get":{"tags":["SGK Tescil"],"summary":"Get SGK registration status per workplace","description":"Returns whether each workplace can submit and what is still outstanding","operationId":"get-sgk-tescil-status","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkWorkplaceTescilStatusDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/preflight":{"post":{"tags":["SGK Tescil"],"summary":"Validate declarations before sending","description":"Checks the selected employees against the SGK rules without calling SGK","operationId":"preflight-sgk-tescil","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkPreflightResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/obligations":{"get":{"tags":["SGK Tescil"],"summary":"List employees waiting for an SGK declaration","description":"Returns the pending entry and exit declarations with their legal deadline","operationId":"list-sgk-tescil-obligations","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["ENTRY","EXIT"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkObligationDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/sync/config":{"get":{"tags":["SGK Tescil"],"summary":"Get SGK record reconciliation availability","description":"Tells whether new reconciliations can be started.","operationId":"get-sgk-tescil-sync-config","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTescilSyncConfigDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/exit-period":{"post":{"tags":["SGK Tescil"],"summary":"Get the SGK periods for an exit declaration","description":"Returns the period boundaries SGK calculates, with a payroll based suggestion","operationId":"get-sgk-tescil-exit-period","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitPeriodRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkExitPeriodResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations":{"get":{"tags":["SGK Tescil"],"summary":"List SGK declarations","description":"Returns the declarations of the company","operationId":"list-sgk-tescil-declarations","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["ENTRY","EXIT"]}},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED","UNCERTAIN","FAILED","EXTERNAL","VOIDED","CANCELLED"]}}},{"name":"workplaceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSgkDeclarationListItemDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["SGK Tescil"],"summary":"Submit SGK declarations","description":"Sends the selected entry or exit declarations to SGK","operationId":"submit-sgk-tescil-declarations","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitDeclarationsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkSubmitResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/sync/{syncId}":{"get":{"tags":["SGK Tescil"],"summary":"Get an SGK record reconciliation","description":"Returns the progress and the records SGK reported per employee","operationId":"get-sgk-tescil-sync","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"syncId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTescilSyncDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}":{"get":{"tags":["SGK Tescil"],"summary":"Get an SGK declaration","description":"Returns the declaration with the data that was sent and every attempt","operationId":"get-sgk-tescil-declaration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkDeclarationDetailDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/sync/{syncId}/apply":{"post":{"tags":["SGK Tescil"],"summary":"Write the reconciliation result","description":"Records the declarations found at SGK; the employee card dates are left untouched","operationId":"apply-sgk-tescil-sync","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"syncId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTescilSyncDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/sync/{syncId}/cancel":{"post":{"tags":["SGK Tescil"],"summary":"Cancel an SGK record reconciliation","description":"Stops a queued or running run; items already processed keep their results.","operationId":"cancel-sgk-tescil-sync","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"syncId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTescilSyncDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}/pdf":{"get":{"tags":["SGK Tescil"],"summary":"Get the SGK document of a declaration","description":"Returns a signed URL for the barcoded SGK document","operationId":"get-sgk-tescil-declaration-pdf","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkDeclarationPdfDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}/cancel":{"post":{"tags":["SGK Tescil"],"summary":"Cancel a declaration","description":"Drops a rejected or failed declaration from the counters","operationId":"cancel-sgk-tescil-declaration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDeclarationRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkDeclarationDetailDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}/resend":{"post":{"tags":["SGK Tescil"],"summary":"Resend a declaration","description":"Sends a rejected or failed declaration to SGK again","operationId":"resend-sgk-tescil-declaration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendDeclarationRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkSubmitResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}/resolve":{"post":{"tags":["SGK Tescil"],"summary":"Resolve an uncertain declaration by hand","description":"Records the user's decision on whether the declaration reached SGK","operationId":"resolve-sgk-tescil-declaration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveDeclarationRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkDeclarationDetailDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/mark-external":{"post":{"tags":["SGK Tescil"],"summary":"Mark declarations as filed outside Aposkal","description":"Records that the declaration was filed through SGK's own web interface","operationId":"mark-sgk-tescil-declarations-external","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkExternalRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}/reconcile":{"post":{"tags":["SGK Tescil"],"summary":"Reconcile an uncertain declaration","description":"Checks against the audit log and SGK whether the declaration was recorded","operationId":"reconcile-sgk-tescil-declaration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Result"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/tescil/declarations/{id}/mark-voided":{"post":{"tags":["SGK Tescil"],"summary":"Mark a declaration as cancelled at SGK","description":"Frees the key after the declaration was cancelled through SGK's web interface","operationId":"mark-sgk-tescil-declaration-voided","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkVoidedRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkDeclarationDetailDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/status":{"get":{"tags":["SGK Vizite"],"summary":"Get SGK vizite status per workplace","description":"Returns the SGK medical leave status of each workplace","operationId":"get-sgk-vizite-status","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkViziteStatusDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports":{"get":{"tags":["SGK Vizite"],"summary":"List SGK medical leave reports","description":"Returns the medical leave reports whose effective range overlaps the requested window","operationId":"list-sgk-vizite-reports","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"caseType","in":"query","required":false,"schema":{"type":"string"}},{"name":"read","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"resolution","in":"query","required":false,"schema":{"type":"string","enum":["OPEN","SKIPPED"]}},{"name":"employeeAccountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"overlapsFrom","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"overlapsTo","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"notified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSgkReportListItemDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports/{id}":{"get":{"tags":["SGK Vizite"],"summary":"Get SGK report by ID","description":"Returns a single medical leave report","operationId":"get-sgk-vizite-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkReportDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports/read":{"post":{"tags":["SGK Vizite"],"summary":"Mark SGK reports as read or unread","description":"Sets the read flag of the given reports and returns how many changed","operationId":"mark-sgk-vizite-reports-read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReportsReadRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/work-accidents":{"get":{"tags":["SGK Vizite"],"summary":"List SGK work accident provisions","description":"Returns the hospital provisions SGK reported for work accidents","operationId":"list-sgk-work-accidents","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"read","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSgkWorkAccidentDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports/{id}/read":{"post":{"tags":["SGK Vizite"],"summary":"Mark SGK report as read","description":"Marks the report as read","operationId":"mark-sgk-vizite-report-read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/work-accidents/read":{"post":{"tags":["SGK Vizite"],"summary":"Mark SGK work accident records as read or unread","description":"Sets the read flag of the given records and returns how many changed","operationId":"mark-sgk-work-accidents-read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkWorkAccidentsReadRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/timesheet-suggestion":{"get":{"tags":["SGK Vizite"],"summary":"Suggest medical leave days for a timesheet period","description":"Returns the days each employee's SGK reports cover in the given month","operationId":"get-sgk-vizite-timesheet-suggestion","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"workplaceId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTimesheetSuggestionDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/work-accidents/status":{"get":{"tags":["SGK Vizite"],"summary":"Get SGK work accident query status per workplace","description":"Returns where each workplace stands in the work accident query queue","operationId":"get-sgk-work-accident-status","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkWorkAccidentStatusDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports/{id}/sgk-detail":{"get":{"tags":["SGK Vizite"],"summary":"Read the SGK-side notification record of a report","description":"Queries SGK live and returns the notification parts it holds for this report","operationId":"get-sgk-vizite-report-sgk-detail","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkApprovedReportDetailDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports/{id}/resolution":{"post":{"tags":["SGK Vizite"],"summary":"Set the payroll decision of an SGK report","description":"Marks the report as skipped for payroll, or reopens it","operationId":"set-sgk-vizite-report-resolution","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResolutionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkReportDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/work-accidents/{id}/query":{"post":{"tags":["SGK Vizite"],"summary":"Query SGK for this person's work accident provisions","description":"Asks SGK for every provision of this person and stores what comes back","operationId":"query-sgk-work-accidents-by-person","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkWorkAccidentDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/reports/{id}/notifications":{"get":{"tags":["SGK Vizite"],"summary":"List the SGK notifications of a report","description":"Returns what has been reported to SGK for this medical leave report","operationId":"list-sgk-vizite-notifications","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SgkViziteNotificationDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["SGK Vizite"],"summary":"Report a medical leave outcome to SGK","description":"Queues the notification; it is sent to SGK by a background job","operationId":"create-sgk-vizite-notification","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateViziteNotificationRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkViziteNotificationDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sgk/vizite/notifications/{notificationId}/cancel":{"post":{"tags":["SGK Vizite"],"summary":"Cancel an SGK notification","description":"Queues the cancellation of a notification already sent to SGK","operationId":"cancel-sgk-vizite-notification","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkViziteNotificationDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sso/{target}/ticket":{"post":{"tags":["SSO"],"summary":"Issue outbound SSO ticket","description":"Returns a short-lived, single-use ticket for entering the target system (e.g. 'pazaryeri') as this company. The front-end POSTs it as form field 'token' to the returned redirectUrl.","operationId":"issue-sso-ticket","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"target","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SsoOutboundResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/sales-offers":{"get":{"tags":["SalesOffer"],"summary":"Get Company Sales Offers","description":"\n            Retrieves paginated sales offers for the company, optionally filtered by status, account or offer number.\n            Archived offers are excluded unless archived=true is requested.\n        ","operationId":"list-sales-offers","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["DRAFT","SENT","ACCEPTED","REJECTED","EXPIRED","CANCELLED"]}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string"}},{"name":"converted","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["SalesOffer"],"summary":"Create New Sales Offer","description":"Creates a new draft sales offer with its lines","operationId":"create-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOfferSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}":{"get":{"tags":["SalesOffer"],"summary":"Get Existing Sales Offer Details","description":"Get sales offer detail with lines","operationId":"get-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["SalesOffer"],"summary":"Delete Sales Offer","description":"Deletes a draft sales offer. Only draft offers can be deleted","operationId":"delete-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["SalesOffer"],"summary":"Update Existing Sales Offer","description":"Updates a draft sales offer and replaces its lines. Only draft offers can be updated","operationId":"update-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOfferSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/pdf":{"get":{"tags":["SalesOffer"],"summary":"Download Sales Offer PDF","description":"Renders the sales offer as a downloadable PDF","operationId":"download-sales-offer-pdf","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/send":{"post":{"tags":["SalesOffer"],"summary":"Send Sales Offer","description":"Marks a draft offer as sent to the customer","operationId":"send-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/accept":{"post":{"tags":["SalesOffer"],"summary":"Accept Sales Offer","description":"Marks a sent offer as accepted by the customer, making it eligible for conversion to an order","operationId":"accept-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/cancel":{"post":{"tags":["SalesOffer"],"summary":"Cancel Sales Offer","description":"Cancels a draft or sent sales offer","operationId":"cancel-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/reject":{"post":{"tags":["SalesOffer"],"summary":"Reject Sales Offer","description":"Marks a sent offer as rejected by the customer","operationId":"reject-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/archive":{"post":{"tags":["SalesOffer"],"summary":"Archive Sales Offer","description":"Hides the sales offer from the default list without deleting it. Reversible","operationId":"archive-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/unarchive":{"post":{"tags":["SalesOffer"],"summary":"Unarchive Sales Offer","description":"Brings an archived sales offer back into the default list","operationId":"unarchive-sales-offer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/convert/order":{"post":{"tags":["SalesOffer"],"summary":"Convert Sales Offer To Order","description":"Creates a draft order from an accepted, not-yet-converted sales offer","operationId":"convert-sales-offer-to-order","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/sales-offers/{offerId}/convert/invoice":{"post":{"tags":["SalesOffer"],"summary":"Convert Sales Offer To Invoice","description":"Creates a draft order and immediately converts it to a draft invoice document, from an accepted, not-yet-converted sales offer","operationId":"convert-sales-offer-to-invoice","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"offerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderConvertRequest"}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalesOfferDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/settings/users":{"get":{"tags":["Settings"],"summary":"Get Company Users","description":"Retrieves paginated list of all users associated with the specified company","operationId":"list-company-users","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseUserPermissionDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/settings/config":{"get":{"tags":["Settings"],"summary":"Get Company Configuration","description":"Fetch all configuration settings for a company","operationId":"get-company-config","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Settings"],"summary":"Update Company Configuration","description":"Replace all company configuration settings with new values","operationId":"update-company-config","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/settings/company":{"get":{"tags":["Settings"],"summary":"Get Company Information","description":"Retrieves basic information and settings for the specified company","operationId":"get-company-settings","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SettingsCompanyDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Settings"],"summary":"Update Company Information","description":"Updates the settings and information for the specified company","operationId":"update-company-settings","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanySettingsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/settings/integration":{"post":{"tags":["Settings"],"summary":"Create or Update Integration","description":"Creates a new integration or updates an existing one for the specified company","operationId":"save-settings-integration","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsIntegrationDto"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntegrationDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/settings/config/{key}":{"get":{"tags":["Settings"],"summary":"Get Specific Company Configuration","description":"Fetch a specific configuration setting value","operationId":"get-company-config-key","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Settings"],"summary":"Update Specific Company Configuration","description":"Update a specific company configuration setting value","operationId":"update-company-config-key","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/settings/eInvoiceAttachments":{"get":{"tags":["Settings"],"summary":"List Company E-Invoice Attachments","description":"List company logo and signature attachments.","operationId":"list-e-invoice-attachments","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderItem"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Settings"],"summary":"Upload Company E-Invoice Attachments","description":"Upload company logo or signature attachment.","operationId":"upload-e-invoice-attachment","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"fileName","in":"query","required":true,"schema":{"type":"string","pattern":"(logo|signature)\\.png"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Settings"],"summary":"Delete Company E-Invoice Attachment","description":"Delete company logo or signature attachment.","operationId":"delete-e-invoice-attachment","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"fileName","in":"query","required":true,"schema":{"type":"string","pattern":"(logo|signature)\\.png"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/report":{"get":{"tags":["Stock"],"summary":"Stock Report","description":"Returns per-product bought and sold quantities with weighted mean prices for a given period.","operationId":"get-stock-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productType","in":"query","required":true,"schema":{"type":"string","enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"productName","in":"query","required":false,"schema":{"type":"string"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStockReportResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/produce":{"post":{"tags":["Stock"],"summary":"Create Production Record","description":"Inputs (raw materials + labor) decrease the stock (OUTGOING), outputs (finished products) increase the stock (INCOMING).","operationId":"create-production","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/by-warehouse":{"get":{"tags":["Stock"],"summary":"Stock by Warehouse","description":"Returns the stock of each stock-tracked product in each warehouse, optionally as of a date.","operationId":"get-stock-by-warehouse","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/WarehouseStockSearchRequest"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseWarehouseStockDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/{documentId}":{"get":{"tags":["Stock"],"summary":"Get Production Request Details","description":"Retrieves the details of a specific production request using its document ID and company ID.","operationId":"get-production","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductionRequest"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Stock"],"summary":"Update Production Record","description":"\n        Updates an existing production record and its linked (referenced) document.\n        \n        **Key Process Features:**\n        1. **Smart Stock Validation:** During the update, quantities from the existing outgoing document are virtually restored to the stock. This ensures that stock levels are checked only against the delta (the difference) of the new request.\n        2. **Automatic Link Detection:** The system automatically identifies whether the provided `documentId` belongs to the Input (OUTGOING) or Output (INCOMING) document and manages both.\n        3. **Data Integrity:** Existing document lines and accounting records are deleted and recreated based on the new request to ensure consistency.\n        4. **Labor Cost Integration:** Recalculates the total cost by balancing raw materials and labor costs against the finished product value.\n    ","operationId":"update-production","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Stock"],"summary":"Delete Production Record","description":"Deletes a production record based on the provided document ID and company ID.","operationId":"delete-production","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/report/export":{"get":{"tags":["Stock"],"summary":"Export Stock Report to Excel","description":"Exports the whole stock report (not paginated) as an Excel (XLSX) file.","operationId":"export-stock-report","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"productType","in":"query","required":true,"schema":{"type":"string","enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}},{"name":"productName","in":"query","required":false,"schema":{"type":"string"}},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/copy/{documentId}":{"post":{"tags":["Stock"],"summary":"Copy Production Record","description":"Creates a copy of an existing production record based on the provided document ID and company ID.","operationId":"copy-production","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/batch/transfer-product":{"patch":{"tags":["Stock"],"summary":"Bulk Transfer Product","description":"Transfers accounting records from one product to another.","operationId":"transfer-bulk-product","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferProductBulkRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransferProductBulkResponse"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/stock/transfer":{"get":{"tags":["StockTransfer"],"summary":"List stock transfers","description":"Lists stock transfers and internal dispatches, newest first.","operationId":"list-stock-transfers","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/StockTransferSearchRequest"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseStockTransferDto"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["StockTransfer"],"summary":"Create stock transfer","description":"Moves products from one warehouse to another, optionally as an unsent internal dispatch draft.","operationId":"create-stock-transfer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockTransferCreateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StockTransferCreateResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/stock/transfer/{id}":{"get":{"tags":["StockTransfer"],"summary":"Get stock transfer","description":"Returns a stock transfer with its products.","operationId":"get-stock-transfer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StockTransferDto"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["StockTransfer"],"summary":"Delete stock transfer","description":"Deletes a stock transfer whose dispatch has not been sent.","operationId":"delete-stock-transfer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"bearerAuth":[]}]}},"/{companyId}/support":{"post":{"tags":["Support"],"summary":"Create a Support Ticket (JSON)","description":"Creates a new support ticket for the specified company without attachments.","operationId":"create-support-ticket-json","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"title","in":"query","required":true,"schema":{"type":"string","maxLength":255,"minLength":3}},{"name":"content","in":"query","required":true,"schema":{"type":"string","maxLength":5000,"minLength":10}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["QUESTION","BUG","FEATURE"]}},{"name":"currentPath","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"string","format":"binary"}}}}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupportRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request"},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal server error"},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Support ticket created successfully","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/support/company":{"get":{"tags":["Support"],"summary":"Get All Support Tickets for a Company","description":"Retrieves a paginated list of all support tickets for the specified company.","operationId":"get-all-support-tickets","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal server error"},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Support tickets retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseSupportDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/support/{ticketId}":{"get":{"tags":["Support"],"summary":"Get Support Ticket by ID","description":"Retrieves a specific support ticket by its ID for the given company.","operationId":"get-support-ticket-by-id","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Support ticket not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal server error"},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Support ticket retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupportDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Support"],"summary":"Add a Reply to a Support Ticket (JSON)","description":"Adds a reply to an existing support ticket without attachments.","operationId":"add-reply-to-support-ticket-json","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"content","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"string","format":"binary"}}}}},"application/json":{"schema":{"$ref":"#/components/schemas/SupportReplyDTO"}}},"required":true},"responses":{"400":{"description":"Invalid request"},"404":{"description":"Support ticket not found"},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal server error"},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Reply added successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupportReplyDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/tag":{"get":{"tags":["Tag"],"summary":"List all document tags for the specified company","description":"List Company Tags","operationId":"list-tags","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Tag"],"summary":"Create a new document tag for the company","description":"Create Tag","operationId":"create-tag","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TagDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/tag/{tagId}":{"get":{"tags":["Tag"],"summary":"Get a specific document tag by its ID for the given company","description":"Get Tag By Id","operationId":"get-tag","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TagDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Tag"],"summary":"Update an existing document tag","description":"Update Tag","operationId":"update-tag","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TagDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Tag"],"summary":"Delete a document tag by its ID","description":"Delete Tag","operationId":"delete-tag","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/tag/{documentId}/tags":{"get":{"tags":["Tag"],"summary":"Get all tags assigned to a specific document","description":"Get Document Tags","operationId":"get-document-tags","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTagDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/tag/{documentId}/{tagId}":{"put":{"tags":["Tag"],"summary":"Add Tag to Document","description":"Add Tag to Document","operationId":"add-tag-document","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentTagDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Tag"],"summary":"Remove Tag from Document","description":"Remove Tag from Document","operationId":"remove-document-tag","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/tax-payer":{"get":{"tags":["Tax Payer"],"summary":"Search taxpayer by VKN/TCKN","description":"Returns the taxpayer title, tax office and registered addresses for the given VKN/TCKN.","operationId":"search-tax-payer","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"vkn","in":"query","required":true,"schema":{"type":"string"}},{"name":"fresh","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxPayerDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/timesheet":{"post":{"tags":["Timesheet"],"summary":"Save Timesheet","description":"Creates or replaces a monthly attendance record for an employee.","operationId":"save-timesheet","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimesheetSaveRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TimesheetDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/timesheet/{year}/{month}":{"get":{"tags":["Timesheet"],"summary":"List Timesheets for Period","description":"Returns all timesheets for a given year/month.","operationId":"list-timesheets","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TimesheetDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/timesheet/{accountId}/{year}/{month}":{"get":{"tags":["Timesheet"],"summary":"Get Timesheet","description":"Returns a single employee's timesheet for a given period.","operationId":"get-timesheet","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TimesheetDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Timesheet"],"summary":"Delete Timesheet","description":"Deletes a timesheet entry. Cannot delete if payroll is already calculated.","operationId":"delete-timesheet","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/warehouse":{"get":{"tags":["Warehouse"],"summary":"List Warehouses","description":"Lists the company's warehouses, one per company address. Exactly one is the default.","operationId":"list-warehouses","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"active","in":"query","description":"true: yalnız aktif, false: yalnız pasif depolar; boşsa tümü.","required":false,"schema":{"type":"boolean"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseWarehouseDto"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Warehouse"],"summary":"Create Warehouse","description":"Opens a warehouse on a company address that has none. The company's first warehouse becomes the default.","operationId":"create-warehouse","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseCreateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseDto"}}}}},"security":[{"bearerAuth":[]}]}},"/{companyId}/warehouse/{id}":{"put":{"tags":["Warehouse"],"summary":"Update Warehouse","description":"Renames, activates/deactivates or makes a warehouse the default. Making one default releases the previous default.","operationId":"update-warehouse","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseUpdateRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseDto"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Warehouse"],"summary":"Delete Warehouse","description":"Deletes a warehouse. The default warehouse cannot be deleted.","operationId":"delete-warehouse","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"moveTo","in":"query","description":"Warehouse that takes over the stock movements of the deleted one; required when it has movements.","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}},"security":[{"bearerAuth":[]}]}},"/{companyId}/webhooks":{"get":{"tags":["Webhook"],"summary":"List webhooks","description":"Lists the company's webhooks. Secrets are never returned.","operationId":"list-webhooks","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyWebhookDto"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Webhook"],"summary":"Create webhook","description":"Sends a signed test event to the URL and saves the webhook only if it answers 2xx. The signing secret is shown once.","operationId":"create-webhook","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyWebhookRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyWebhookWithSecretDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/webhooks/{webhookId}":{"delete":{"tags":["Webhook"],"summary":"Delete webhook","description":"Deletes the webhook and its pending deliveries.","operationId":"delete-webhook","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"patch":{"tags":["Webhook"],"summary":"Update webhook","description":"Changes the URL or turns the webhook on/off. A new URL is verified like on creation.","operationId":"update-webhook","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyWebhookRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyWebhookDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace":{"get":{"tags":["Workplace"],"summary":"Get all workplaces","description":"Retrieves a list of all workplaces associated with the specified company","operationId":"list-workplaces","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageResponseWorkplaceDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Workplace"],"summary":"Create new workplace","description":"Creates a new workplace for the specified company","operationId":"create-workplace","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkplaceRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkplaceDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace/{id}":{"get":{"tags":["Workplace"],"summary":"Get workplace by ID","description":"Retrieves a specific workplace by its ID for the given company","operationId":"get-workplace","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkplaceDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"put":{"tags":["Workplace"],"summary":"Update workplace","description":"Updates an existing workplace with the specified ID","operationId":"update-workplace","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkplaceRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkplaceDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Workplace"],"summary":"Delete workplace","description":"Deletes the workplace with the specified ID","operationId":"delete-workplace","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/rnd-project":{"get":{"tags":["Workplace R&D Project"],"summary":"List every R&D project in the company","description":"Şirketin tüm işyerlerindeki Ar-Ge projelerini tek istekte döner","operationId":"list-company-rnd-projects","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkplaceRndProjectDTO"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace/{workplaceId}/rnd-project":{"get":{"tags":["Workplace R&D Project"],"summary":"List a workplace's R&D projects","description":"Bir işyerine tanımlı Ar-Ge projelerini döner","operationId":"list-workplace-rnd-projects","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkplaceRndProjectDTO"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"post":{"tags":["Workplace R&D Project"],"summary":"Create an R&D project","description":"İşyerine yeni Ar-Ge projesi ekler","operationId":"create-workplace-rnd-project","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkplaceRndProjectRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkplaceRndProjectDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace/{workplaceId}/rnd-project/{id}":{"put":{"tags":["Workplace R&D Project"],"summary":"Update an R&D project","description":"Mevcut Ar-Ge projesini günceller","operationId":"update-workplace-rnd-project","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkplaceRndProjectRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkplaceRndProjectDTO"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]},"delete":{"tags":["Workplace R&D Project"],"summary":"Delete an R&D project","description":"Ar-Ge projesini siler; projeye bağlı personel varsa 409 döner","operationId":"delete-workplace-rnd-project","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content"}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/workplace/{workplaceId}/sgk/test":{"post":{"tags":["Workplace SGK"],"summary":"Test SGK connection for a workplace","description":"Checks the SGK credentials of the workplace for both the medical leave and registration services","operationId":"test-sgk-workplace-connection","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workplaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SgkTestResultDto"}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}},"/{companyId}/document/zreport/bulk":{"post":{"tags":["Z-Report"],"summary":"Create Bulk Daily Z-Report","description":"Create Bulk Z-Report","operationId":"create-bulk-zreport","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZReportDocumentRequest"}}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"apiKeyAuth":[]},{"apiSecretAuth":[]}]}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"errors":{"type":["object","null"],"additionalProperties":{"type":"string"}},"warnings":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PayrollWarningDto"}},"field":{"type":["string","null"]},"lines":{"type":["array","null"],"items":{"$ref":"#/components/schemas/StockShortage"}}},"required":["code","message","timestamp"]},"PayrollWarningDto":{"type":"object","properties":{"accountId":{"type":"string"},"code":{"type":"string","enum":["INCENTIVE_UNDEFINED","SGK_DOCUMENT_TYPE_UNSUPPORTED","SGK_DOCUMENT_TYPE_CONFLICTS_INSURANCE_GROUP","SGK_SHORTAGE_REASON_MISSING","NURSERY_GV_EXEMPTION_NOT_APPLICABLE","SICK_LEAVE_DEDUCTED","RND_SUPPORT_STAFF_RATIO_EXCEEDED","WAGE_TYPE_UNSUPPORTED","WAGE_TYPE_HOURS_ASSUMED","SEVERANCE_ON_INELIGIBLE_EXIT_REASON","SEVERANCE_BELOW_MINIMUM_SERVICE","PREVIOUS_BASE_IGNORED","PRIOR_MONTH_NOT_APPROVED","CUMULATIVE_OUT_OF_DATE","MONTH_GAP","MEAL_DAYS_CAPPED","TRANSPORT_DAYS_CAPPED"]},"message":{"type":"string"},"periods":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PayrollWarningPeriodDto"}}},"required":["accountId","code","message"]},"PayrollWarningPeriodDto":{"type":"object","properties":{"payrollId":{"type":["string","null"]},"year":{"type":"integer","format":"int32"},"month":{"type":"integer","format":"int32"}},"required":["month","year"]},"StockShortage":{"type":"object","properties":{"productId":{"type":"string"},"warehouseId":{"type":"string"},"available":{"type":"number"},"requested":{"type":"number"}},"required":["available","productId","requested","warehouseId"]},"WorkplaceRndProjectRequest":{"type":"object","properties":{"lawScope":{"type":["string","null"],"description":"Kanun kapsamı","enum":["4691","5746","6550"],"minLength":1},"technologyZoneCode":{"type":["string","null"],"description":"GİB TGB kodu (MUHSGK isyerininBulunduguBolge) — 4691'de zorunlu","maxLength":3,"minLength":3},"projectCode":{"type":["string","null"],"maxLength":50,"minLength":0},"projectName":{"type":["string","null"],"maxLength":255,"minLength":0},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date","description":"Boş bırakılırsa proje devam ediyor demektir"}},"required":["lawScope","projectCode","startDate"]},"WorkplaceRndProjectDTO":{"type":"object","properties":{"id":{"type":"string"},"workplaceId":{"type":"string"},"lawScope":{"type":"string"},"technologyZoneCode":{"type":["string","null"]},"projectCode":{"type":"string"},"projectName":{"type":["string","null"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":["string","null"],"format":"date"}},"required":["id","lawScope","projectCode","startDate","workplaceId"]},"UpdateDepartmentRequest":{"type":"object","properties":{"departmentName":{"type":"string","minLength":1},"hazardClass":{"type":"string","minLength":1},"hazardLevel":{"type":"string"},"premiumRate":{"type":"number","format":"double"},"dailyWorkingHours":{"type":"number","format":"double"}},"required":["dailyWorkingHours","departmentName","hazardClass","hazardLevel","premiumRate"]},"DepartmentDTO":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"integer","format":"int64"},"workplaceId":{"type":"string"},"departmentName":{"type":"string"},"hazardClass":{"type":"string"},"hazardLevel":{"type":"string"},"premiumRate":{"type":"number","format":"double"},"dailyWorkingHours":{"type":"number","format":"double"}},"required":["companyId","dailyWorkingHours","departmentName","hazardClass","hazardLevel","id","premiumRate","workplaceId"]},"UpdateWorkplaceRequest":{"type":"object","properties":{"name":{"type":["string","null"],"minLength":1},"description":{"type":["string","null"]},"addressId":{"type":["string","null"]},"registrationNumber":{"type":["string","null"],"minLength":1},"taxNumber":{"type":["string","null"]},"taxOffice":{"type":["string","null"]},"mersisNo":{"type":["string","null"]},"registrationDate":{"type":["string","null"],"format":"date"},"employmentAgencyNo":{"type":["string","null"]},"workplaceKind":{"type":["string","null"]},"workplaceType":{"type":["string","null"]},"lineOfBusiness":{"type":["string","null"]},"departureNotificationLineOfBusiness":{"type":["string","null"]},"naceCode":{"type":["string","null"]},"tradeRegistryNo":{"type":["string","null"]},"tradeRegistryDirectorateCode":{"type":["string","null"]},"uavtAddressCode":{"type":["string","null"]},"siiusername":{"type":"string"},"siiworkplaceCode":{"type":"string"},"siiworkplacePassword":{"type":"string"},"siisystemPassword":{"type":"string"}},"required":["name","registrationDate","registrationNumber"]},"WorkplaceDTO":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":["string","null"]},"addressId":{"type":["string","null"]},"registrationNumber":{"type":["string","null"]},"registrationDate":{"type":"string","format":"date"},"deactivedDate":{"type":["string","null"],"format":"date"},"employmentAgencyNo":{"type":["string","null"]},"sIIUsername":{"type":["string","null"],"writeOnly":true},"sIIWorkplaceCode":{"type":["string","null"],"writeOnly":true},"hasSiiCredentials":{"type":"boolean"},"canSubmitSgkTescil":{"type":"boolean"},"workplaceKind":{"type":["string","null"]},"workplaceType":{"type":["string","null"]},"lineOfBusiness":{"type":["string","null"]},"departureNotificationLineOfBusiness":{"type":["string","null"]},"naceCode":{"type":["string","null"]},"tradeRegistryNo":{"type":["string","null"]},"tradeRegistryDirectorateCode":{"type":["string","null"]},"uavtAddressCode":{"type":["string","null"]},"siiusername":{"type":"string"},"siiworkplaceCode":{"type":"string"}},"required":["canSubmitSgkTescil","companyId","hasSiiCredentials","name","registrationDate"]},"WarehouseUpdateRequest":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Yeni depo adı.","maxLength":255,"minLength":0},"active":{"type":["boolean","null"],"description":"Pasif depo yeni belgelerde seçilemez; varsayılan depo pasif yapılamaz."},"isDefault":{"type":["boolean","null"],"description":"true: depo varsayılan olur, önceki varsayılan bırakılır. Varsayılan depoda false kabul edilmez."}}},"WarehouseAddressDto":{"type":"object","properties":{"name":{"type":["string","null"]},"city":{"type":["string","null"]},"district":{"type":["string","null"]}}},"WarehouseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"addressId":{"type":["string","null"]},"address":{"oneOf":[{"$ref":"#/components/schemas/WarehouseAddressDto"},{"type":"null"}]},"active":{"type":"boolean"},"isDefault":{"type":"boolean"},"legacyAssignedToDefault":{"type":"boolean","description":"true: geçiş öncesi tüm stok hareketleri bu (varsayılan) depoya yazıldı; kullanıcıya bildirilir."}},"required":["active","id","isDefault","legacyAssignedToDefault","name"]},"UpdateTagRequest":{"type":"object","properties":{"name":{"type":["string","null"]}}},"TagDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","name"]},"DocumentTagDto":{"type":"object","properties":{"id":{"type":["string","null"]},"documentId":{"type":["string","null"]},"tag":{"oneOf":[{"$ref":"#/components/schemas/TagDto"},{"type":"null"}]}}},"ProductionItemRequest":{"type":"object","properties":{"productId":{"type":["string","null"]},"quantity":{"type":"number","minimum":0},"unitPrice":{"type":"number","minimum":0}},"required":["productId","quantity","unitPrice"]},"ProductionRequest":{"type":"object","properties":{"inputs":{"type":"array","description":"Üretimde tüketilen girdiler. Her girdinin ürün tipi hammadde (RAW_MATERIAL) olmalı ve stoğu istenen miktarı karşılamalıdır.","items":{"$ref":"#/components/schemas/ProductionItemRequest"},"minItems":1},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/ProductionItemRequest"},"minItems":1},"laborCost":{"type":"number","minimum":0},"description":{"type":["string","null"]},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"date":{"type":["string","null"],"format":"date"},"inputWarehouseId":{"type":["string","null"],"description":"Girdilerin tüketildiği depo. Firmada birden çok aktif depo varsa zorunludur.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"outputWarehouseId":{"type":["string","null"],"description":"Çıktıların girdiği depo; girdi deposuyla aynı olabilir. Firmada birden çok aktif depo varsa zorunludur.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}},"required":["currency","exchangeRate","inputs","laborCost","outputs"]},"PayrollParametersUpdateRequest":{"type":"object","properties":{"childAidGvExemptUnder6Monthly":{"type":["number","null"],"description":"0-6 yaş grubundaki çocuk başına aylık gelir vergisi istisnası (GVK m.25/4). null girildiğinde bu yaş grubuna istisna uygulanmaz.","example":787.76,"minimum":0.00},"childAidGvExemptOver6Monthly":{"type":["number","null"],"description":"6 yaş üzeri çocuk başına aylık gelir vergisi istisnası (GVK m.25/4). null girildiğinde bu yaş grubuna istisna uygulanmaz.","example":393.88,"minimum":0.00}}},"PayrollParametersDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":["integer","null"],"format":"int64"},"validFrom":{"type":"string","format":"date"},"validTo":{"type":"string","format":"date"},"childAidGvExemptUnder6Monthly":{"type":["number","null"]},"childAidGvExemptOver6Monthly":{"type":["number","null"]}},"required":["id","validFrom","validTo"]},"DocumentNoteCreateDto":{"type":"object","properties":{"content":{"type":["string","null"]}}},"DocumentNoteDto":{"type":"object","properties":{"id":{"type":["string","null"]},"user":{"oneOf":[{"$ref":"#/components/schemas/UserDto"},{"type":"null"}]},"content":{"type":["string","null"]},"documentId":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"}}},"UserDto":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"image":{"type":["string","null"]}}},"NoteTemplateRequest":{"type":"object","properties":{"name":{"type":"string","description":"Şablonun listede görünen adı; firma içinde tekildir","example":"Ödeme koşulları","maxLength":100,"minLength":0},"content":{"type":"string","description":"Faturanın not alanına aktarılacak metin; her satır ayrı bir fatura notu olur","example":"Ödeme vadesi fatura tarihinden itibaren 30 gündür.","maxLength":4000,"minLength":0}},"required":["content","name"]},"NoteTemplateDto":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"content":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"DocumentNameDto":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"]},"CategoryDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"categoryType":{"type":["string","null"],"enum":["ACCOUNT","INCOME","EXPENSE","PRODUCT"]},"name":{"type":["string","null"]},"bgColor":{"type":["string","null"]},"textColor":{"type":["string","null"]},"parentId":{"type":["string","null"]}}},"UpdateAccountingRecordAccountRequest":{"type":"object","properties":{"accountId":{"type":"string"}},"required":["accountId"]},"UpdateAddressRequest":{"type":"object","description":"Address update data","properties":{"name":{"type":"string","description":"Adresin adı. Aynı cari içinde benzersiz olmalıdır.","example":"Merkez","maxLength":255,"minLength":0},"address":{"type":"string","minLength":1},"district":{"type":"string","maxLength":255,"minLength":0},"city":{"type":"string","maxLength":255,"minLength":0},"country":{"type":"string","maxLength":255,"minLength":0},"phoneNumber":{"type":"string","maxLength":20,"minLength":0},"workPhone":{"type":["string","null"],"maxLength":20,"minLength":0},"email":{"type":"string","format":"email","minLength":1},"postCode":{"type":["string","null"]},"addressNo":{"type":["string","null"]}},"required":["address","city","country","district","email","name","phoneNumber"]},"AddressDto":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"address":{"type":["string","null"]},"district":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"workPhone":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]},"email":{"type":["string","null"]},"post_code":{"type":"string"},"addressNo":{"type":["string","null"]},"countryCode":{"type":["string","null"]}}},"CreateWorkplaceRequest":{"type":"object","properties":{"name":{"type":["string","null"],"minLength":1},"description":{"type":["string","null"]},"addressId":{"type":["string","null"],"minLength":1},"registrationNumber":{"type":["string","null"],"minLength":1},"registrationDate":{"type":["string","null"],"format":"date"},"employmentAgencyNo":{"type":["string","null"]},"workplaceKind":{"type":["string","null"]},"workplaceType":{"type":["string","null"]},"lineOfBusiness":{"type":["string","null"]},"departureNotificationLineOfBusiness":{"type":["string","null"]},"naceCode":{"type":["string","null"]},"tradeRegistryNo":{"type":["string","null"]},"tradeRegistryDirectorateCode":{"type":["string","null"]},"uavtAddressCode":{"type":["string","null"]},"siiusername":{"type":"string"},"siiworkplaceCode":{"type":"string"},"siiworkplacePassword":{"type":"string"},"siisystemPassword":{"type":"string"}},"required":["addressId","name","registrationDate","registrationNumber"]},"SgkTestLegDto":{"type":"object","properties":{"ok":{"type":["boolean","null"]},"code":{"type":"string"},"message":{"type":["string","null"]}},"required":["code"]},"SgkTestResultDto":{"type":"object","properties":{"vizite":{"$ref":"#/components/schemas/SgkTestLegDto"},"tescil":{"$ref":"#/components/schemas/SgkTestLegDto"}},"required":["tescil","vizite"]},"CreateDepartmentRequest":{"type":"object","properties":{"departmentName":{"type":"string","minLength":1},"hazardClass":{"type":"string","minLength":1},"hazardLevel":{"type":"string"},"premiumRate":{"type":"number","format":"double"},"dailyWorkingHours":{"type":"number","format":"double"}},"required":["dailyWorkingHours","departmentName","hazardClass","hazardLevel","premiumRate"]},"CreateCompanyWebhookRequest":{"type":"object","properties":{"url":{"type":"string","description":"Olayların gönderileceği https adresi.","maxLength":2048,"minLength":0},"events":{"type":"array","description":"Abone olunan olaylar; en az biri seçilmeli.","items":{"type":"string","enum":["ACCREC_APPROVED","DOCUMENT_FORMALIZED","DOCUMENT_CANCELLED","TEST"]},"uniqueItems":true}},"required":["events","url"]},"CompanyWebhookDto":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["ACCREC_APPROVED","DOCUMENT_FORMALIZED","DOCUMENT_CANCELLED","TEST"]}},"active":{"type":"boolean"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["active","events","id","url"]},"CompanyWebhookWithSecretDto":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/CompanyWebhookDto"},"secret":{"type":"string","description":"İmza doğrulama anahtarı; yalnız bu yanıtta gösterilir."}},"required":["secret","webhook"]},"WarehouseCreateRequest":{"type":"object","properties":{"addressId":{"type":"string","description":"Firma adresi kimliği; adreste başka depo olmamalı.","minLength":1},"name":{"type":["string","null"],"description":"Depo adı; boşsa adres adı kullanılır.","maxLength":255,"minLength":0}},"required":["addressId"]},"AdditionalEarningsDto":{"type":"object","properties":{"overtimeAmount":{"type":["number","null"]},"nightOvertimeAmount":{"type":["number","null"]},"holidayOvertimeAmount":{"type":["number","null"]},"transportAmount":{"type":["number","null"]},"transportDays":{"type":["integer","null"],"format":"int32"},"transportKind":{"type":["string","null"],"enum":["AYNI","NAKIT"]},"mealAmount":{"type":["number","null"]},"mealDays":{"type":["integer","null"],"format":"int32"},"mealKind":{"type":["string","null"],"enum":["AYNI","NAKIT"]},"familyAid":{"type":["number","null"]},"childAid":{"type":["number","null"]},"childCount":{"type":["integer","null"],"format":"int32"},"childCountUnder6":{"type":["integer","null"],"format":"int32","description":"Çocuk sayısının 0-6 yaş grubunda olan kısmı; bu gruba çocuk zammı gelir vergisi istisnası iki katı tutarda uygulanır. Boş bırakılırsa tüm çocuklar 6 yaş üzeri sayılır.","example":1},"childCountUnder6Disabled":{"type":["integer","null"],"format":"int32","description":"0-6 yaş çocukların engel oranı %40 ve üzeri olan kısmı; bu çocuklar için istisna band tutarının %50 fazlasıdır.","example":1},"childCountOver6Disabled":{"type":["integer","null"],"format":"int32","description":"6 yaş üzeri çocukların engel oranı %40 ve üzeri olan kısmı; bu çocuklar için istisna band tutarının %50 fazlasıdır.","example":1},"sickLeaveAllowance":{"type":["number","null"]},"nurseryAmount":{"type":["number","null"]},"nurseryChildCount":{"type":["integer","null"],"format":"int32"},"nurseryPaidDirect":{"type":["boolean","null"]},"marriageAid":{"type":["number","null"]},"birthAid":{"type":["number","null"]},"deathAid":{"type":["number","null"]},"bonus":{"type":["number","null"]},"premium":{"type":["number","null"]},"attendanceFee":{"type":["number","null"]},"holidayPay":{"type":["number","null"]},"fuelAid":{"type":["number","null"]},"employerHealthBes":{"type":["number","null"]},"unusedLeaveDays":{"type":["integer","null"],"format":"int32"},"noticePayDays":{"type":["integer","null"],"format":"int32","description":"İhbar tazminatı olarak ödenecek gün sayısı; boş veya 0 ise ihbar ödenmez","example":28},"noticePayDressedDailyGross":{"type":["number","null"],"description":"İhbara esas giydirilmiş günlük brüt ücret; boşsa kıdem için girilen giydirilmiş ücret, o da yoksa aylık brütün 30'a bölümü kullanılır","example":1700.0},"severancePay":{"oneOf":[{"$ref":"#/components/schemas/SeverancePayDto"},{"type":"null"}]},"rndDays":{"type":["integer","null"],"format":"int32"},"netAmountKinds":{"type":["array","null"],"items":{"type":"string","enum":["OVERTIME","NIGHT_OVERTIME","HOLIDAY_OVERTIME","TRANSPORT","MEAL","FAMILY_AID","CHILD_AID","MARRIAGE_AID","BIRTH_AID","DEATH_AID","BONUS","PREMIUM","ATTENDANCE_FEE","HOLIDAY_PAY","FUEL_AID"]},"uniqueItems":true}}},"SeverancePayDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Kıdem tazminatı ödenecek mi","example":false},"dressedDailyGross":{"type":["number","null"],"description":"Kıdeme esas giydirilmiş günlük brüt ücret; boşsa aylık brütün 30'a bölümü kullanılır","example":1101.0}},"required":["enabled"]},"TimesheetSaveRequest":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"year":{"type":"integer","format":"int32","maximum":2100,"minimum":2020},"month":{"type":"integer","format":"int32","maximum":12,"minimum":1},"days":{"type":"string","maxLength":31,"minLength":28},"shortageReasonCode":{"type":["string","null"],"maxLength":5,"minLength":0},"normalHours":{"type":["number","null"],"description":"Ay içinde fiilen çalışılan normal saat (UCRET_NEVI = 0 / Saat ücretli personel için). Boş bırakılırsa çalışılan gün sayısı × 7,5 saat varsayılır.","example":225.0,"maximum":744,"minimum":0},"remoteWorkDays":{"type":["integer","null"],"format":"int32","maximum":31,"minimum":0},"workedWhileOnSickLeave":{"type":"boolean"},"earnings":{"oneOf":[{"$ref":"#/components/schemas/AdditionalEarningsDto"},{"type":"null"}]}},"required":["accountId","days","month","workedWhileOnSickLeave","year"]},"TimesheetDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"integer","format":"int64"},"accountId":{"type":"string"},"year":{"type":"integer","format":"int32"},"month":{"type":"integer","format":"int32"},"days":{"type":"string"},"calendarDays":{"type":"integer","format":"int32"},"sgkDays":{"type":"integer","format":"int32"},"calDays":{"type":"integer","format":"int32"},"leaveDays":{"type":"number"},"sickDays":{"type":"number"},"shortageDays":{"type":"number"},"shortageReasonCode":{"type":["string","null"]},"workedDays":{"type":"number"},"paidRestDays":{"type":"number"},"paidDays":{"type":"number"},"normalHours":{"type":["number","null"]},"paidHours":{"type":"number"},"remoteWorkDays":{"type":["integer","null"],"format":"int32"},"workedWhileOnSickLeave":{"type":"boolean"},"earnings":{"oneOf":[{"$ref":"#/components/schemas/AdditionalEarningsDto"},{"type":"null"}]}},"required":["accountId","calDays","calendarDays","companyId","days","id","leaveDays","month","paidDays","paidHours","paidRestDays","sgkDays","shortageDays","sickDays","workedDays","workedWhileOnSickLeave","year"]},"CreateTagRequest":{"type":"object","properties":{"name":{"type":["string","null"]}}},"CreateSupportRequest":{"type":"object","properties":{"title":{"type":["string","null"],"maxLength":255,"minLength":3},"content":{"type":["string","null"],"maxLength":5000,"minLength":10},"currentPath":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["QUESTION","BUG","FEATURE"]}},"required":["content","title"]},"SupportReplyDTO":{"type":"object","properties":{"id":{"type":["string","null"]},"content":{"type":"string","maxLength":2147483647,"minLength":4},"createdAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"type":["string","null"]}},"required":["content"]},"StockTransferCreateRequest":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date","description":"Transfer tarihi; kaynak depoda bu tarihteki stok yeterli olmalı.","example":"2026-11-14"},"fromWarehouseId":{"type":["string","null"],"description":"Stoğun çıktığı depo.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"toWarehouseId":{"type":["string","null"],"description":"Stoğun girdiği depo.","example":"c4a2d3e5-6f70-4b8c-9d0e-1f2a3b4c5d6e"},"note":{"type":["string","null"],"description":"Transfer notu.","example":"Şubeye sevk"},"createDispatchDraft":{"type":["boolean","null"],"description":"true: gönderilmemiş dahili sevk irsaliyesi taslağı açılır, hedef depoya giriş irsaliye gelen kutusundan alınınca olur. false: irsaliyesiz transfer, stok hemen hedef depoya geçer.","example":true},"items":{"type":"array","description":"Taşınan ürünler.","items":{"$ref":"#/components/schemas/StockTransferItemRequest"}}},"required":["items"]},"StockTransferItemRequest":{"type":"object","properties":{"productId":{"type":["string","null"],"description":"Stok takipli ürün (ürün veya hammadde).","example":"d5b3e4f6-7081-4c9d-0e1f-2a3b4c5d6e7f"},"quantity":{"type":["number","null"],"description":"Taşınan miktar; sıfırdan büyük olmalı.","example":3}}},"StockTransferCreateResponse":{"type":"object","properties":{"transferId":{"type":"string"},"dispatchDocumentId":{"type":["string","null"]}},"required":["transferId"]},"SsoOutboundResponse":{"type":"object","properties":{"token":{"type":"string","description":"Hedef sistemin doğrulayacağı, Aposkal imzalı kısa ömürlü RS256 bilet (JWT)"},"redirectUrl":{"type":"string","description":"Biletin form alanı 'token' olarak POST edileceği hedef sistem adresi","example":"https://pazaryeri.aposkal.com/sso/aposkal"},"expiresInSeconds":{"type":"integer","format":"int64","description":"Biletin geçerlilik süresi (saniye)","example":120}},"required":["expiresInSeconds","redirectUrl","token"]},"SgkWorkAccidentDto":{"type":"object","properties":{"id":{"type":"string"},"workplaceId":{"type":"string"},"workplaceName":{"type":["string","null"]},"bildirimId":{"type":["string","null"]},"nationalId":{"type":["string","null"]},"gender":{"type":["string","null"]},"employeeAccountId":{"type":["string","null"]},"employeeName":{"type":["string","null"]},"accidentDate":{"type":["string","null"],"format":"date"},"provisionDate":{"type":["string","null"],"format":"date"},"provisionType":{"type":["string","null"]},"facilityName":{"type":["string","null"]},"title":{"type":["string","null"]},"operationType":{"type":["string","null"]},"gibBranchNo":{"type":["string","null"]},"notificationDeadline":{"type":["string","null"],"format":"date"},"daysToDeadline":{"type":["integer","null"],"format":"int64"},"read":{"type":"boolean"},"readAt":{"type":["string","null"],"format":"date-time"},"changedAt":{"type":["string","null"],"format":"date-time"},"changeNote":{"type":["string","null"]},"firstSeenAt":{"type":["string","null"],"format":"date-time"},"sgkClosedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","read","workplaceId"]},"MarkWorkAccidentsReadRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1},"read":{"type":"boolean"}},"required":["ids","read"]},"ReportResolutionRequest":{"type":"object","properties":{"status":{"type":"string","enum":["OPEN","SKIPPED"]},"reason":{"type":["string","null"],"enum":["WORKED","NOT_MY_EMPLOYEE","OTHER"]},"note":{"type":["string","null"],"maxLength":500,"minLength":0}},"required":["status"]},"SgkReportDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":["integer","null"],"format":"int64"},"workplaceId":{"type":"string"},"workplaceName":{"type":["string","null"]},"medulaReportId":{"type":["string","null"]},"trackingNo":{"type":["string","null"]},"sequenceNo":{"type":["string","null"]},"nationalId":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"employeeAccountId":{"type":["string","null"]},"employeeName":{"type":["string","null"]},"employeeEndDate":{"type":["string","null"],"format":"date"},"caseCode":{"type":["string","null"]},"caseTypeName":{"type":["string","null"]},"reportStatusCode":{"type":["string","null"]},"reportStatusName":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"clinicDate":{"type":["string","null"],"format":"date"},"outpatientStart":{"type":["string","null"],"format":"date"},"outpatientEnd":{"type":["string","null"],"format":"date"},"inpatientStart":{"type":["string","null"],"format":"date"},"inpatientEnd":{"type":["string","null"],"format":"date"},"returnOrControlDate":{"type":["string","null"],"format":"date"},"prenatalLeaveStart":{"type":["string","null"],"format":"date"},"workAccidentDate":{"type":["string","null"],"format":"date"},"facilityCode":{"type":["string","null"]},"facilityName":{"type":["string","null"]},"archived":{"type":"boolean"},"read":{"type":"boolean"},"readAt":{"type":["string","null"],"format":"date-time"},"autoRead":{"type":["string","null"],"enum":["STALE"]},"firstSeenAt":{"type":["string","null"],"format":"date-time"},"changedAt":{"type":["string","null"],"format":"date-time"},"changeNote":{"type":["string","null"]},"resolution":{"type":"string","enum":["OPEN","SKIPPED"]},"resolutionReason":{"type":["string","null"],"enum":["WORKED","NOT_MY_EMPLOYEE","OTHER"]},"resolutionNote":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"],"format":"date-time"},"sgkClosedAt":{"type":["string","null"],"format":"date-time"},"sgkCloseAttempts":{"type":"integer","format":"int32"},"notificationStatus":{"type":"string","enum":["NONE","PENDING","SENT","REJECTED","FAILED"]},"notifiedAt":{"type":["string","null"],"format":"date-time"},"notificationSource":{"type":["string","null"],"enum":["US","SGK"]},"sgkConfirmed":{"type":["boolean","null"]},"paymentIssued":{"type":["boolean","null"]},"sgkReconciledAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["archived","id","notificationStatus","read","resolution","sgkCloseAttempts","workplaceId"]},"CreateViziteNotificationRequest":{"type":"object","properties":{"type":{"type":"string","enum":["NOT_WORKED","WORKED","NOT_MY_EMPLOYEE","CANCEL"]},"notificationDate":{"type":["string","null"],"format":"date"}},"required":["type"]},"SgkViziteNotificationDto":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"type":{"type":"string","enum":["NOT_WORKED","WORKED","NOT_MY_EMPLOYEE","CANCEL"]},"notificationDate":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["PENDING","WAITING_SUBMIT_ENABLED","SENT","REJECTED","FAILED","CANCELLED"]},"sgkNotificationId":{"type":["string","null"]},"cancelsId":{"type":["string","null"]},"attemptCount":{"type":"integer","format":"int32"},"resultCode":{"type":["integer","null"],"format":"int32"},"resultMessage":{"type":["string","null"]},"cancellable":{"type":"boolean"},"paymentIssued":{"type":["boolean","null"]},"sgkReconciledAt":{"type":["string","null"],"format":"date-time"},"sentAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"}},"required":["attemptCount","cancellable","id","reportId","status","type"]},"MarkReportsReadRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1},"read":{"type":"boolean"}},"required":["ids","read"]},"SgkTescilSyncRequest":{"type":"object","properties":{"workplaceId":{"type":["string","null"]},"accountIds":{"type":"array","items":{"type":"string"}},"type":{"type":["string","null"],"enum":["ENTRY","EXIT"]},"dryRun":{"type":"boolean"}},"required":["accountIds","dryRun"]},"SgkTescilSyncStartedDto":{"type":"object","properties":{"syncId":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED","CANCELLED"]},"total":{"type":"integer","format":"int32"},"dryRun":{"type":"boolean"}},"required":["dryRun","status","syncId","total"]},"SgkTescilSyncDto":{"type":"object","properties":{"syncId":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED","CANCELLED"]},"dryRun":{"type":"boolean"},"workplaceId":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["ENTRY","EXIT"]},"total":{"type":"integer","format":"int32"},"processed":{"type":"integer","format":"int32"},"applied":{"type":"boolean"},"appliedCount":{"type":"integer","format":"int32"},"message":{"type":["string","null"]},"startedAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"appliedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilSyncItemDto"}}},"required":["applied","appliedCount","dryRun","items","processed","status","syncId","total"]},"SgkTescilSyncItemDto":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":["string","null"]},"tckn":{"type":["string","null"]},"workplaceId":{"type":["string","null"]},"type":{"type":"string","enum":["ENTRY","EXIT"]},"cardDate":{"type":["string","null"],"format":"date"},"outcome":{"type":["string","null"],"enum":["CONFIRMED","EXTERNAL_NEW","CARD_MISMATCH","MISSING_AT_SGK","UNKNOWN"]},"message":{"type":["string","null"]},"processedAt":{"type":["string","null"],"format":"date-time"},"sgkRecords":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilSyncRecordDto"}}},"required":["accountId","sgkRecords","type"]},"SgkTescilSyncRecordDto":{"type":"object","properties":{"sicilno":{"type":["string","null"]},"eventDate":{"type":["string","null"],"format":"date"},"processedAt":{"type":["string","null"],"format":"date"},"administrativeFine":{"type":["number","null"]},"exceptionCode":{"type":["string","null"]},"match":{"type":"string","enum":["OURS","EXTERNAL_NEW"]},"declarationId":{"type":["string","null"]},"applied":{"type":"boolean"},"pdfAvailable":{"type":"boolean"}},"required":["applied","match","pdfAvailable"]},"PeriodRequest":{"type":"object","properties":{"current":{"$ref":"#/components/schemas/SgkPeriodInput"},"previous":{"$ref":"#/components/schemas/SgkPeriodInput"}},"required":["current","previous"]},"PreflightItemRequest":{"type":"object","properties":{"accountId":{"type":"string"},"eventDate":{"type":["string","null"],"format":"date"},"period":{"oneOf":[{"$ref":"#/components/schemas/PeriodRequest"},{"type":"null"}]}},"required":["accountId"]},"PreflightRequest":{"type":"object","properties":{"type":{"type":"string","enum":["ENTRY","EXIT"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/PreflightItemRequest"},"minItems":1}},"required":["items","type"]},"SgkPeriodInput":{"type":"object","properties":{"documentType":{"type":["string","null"]},"wage":{"type":["number","null"]},"bonus":{"type":["number","null"]},"missingDays":{"type":["integer","null"],"format":"int32"},"missingReason":{"type":["string","null"]},"empty":{"type":"boolean"}},"required":["empty"]},"SgkPreflightItemDto":{"type":"object","properties":{"accountId":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/SgkValidationMessage"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/SgkValidationMessage"}},"payloadPreview":{"type":["object","null"],"additionalProperties":{}}},"required":["accountId","errors","warnings"]},"SgkPreflightResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SgkPreflightItemDto"}}},"required":["items"]},"SgkValidationMessage":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":["string","null"]},"accountId":{"type":["string","null"]}},"required":["code","message"]},"ExitPeriodRequest":{"type":"object","properties":{"accountId":{"type":"string"},"exitDate":{"type":"string","format":"date"}},"required":["accountId","exitDate"]},"SgkExitPeriodInfoDto":{"type":"object","properties":{"entryDate":{"type":["string","null"],"format":"date"},"current":{"oneOf":[{"$ref":"#/components/schemas/SgkPeriodDto"},{"type":"null"}]},"previous":{"oneOf":[{"$ref":"#/components/schemas/SgkPeriodDto"},{"type":"null"}]}}},"SgkExitPeriodResponse":{"type":"object","properties":{"sgk":{"oneOf":[{"$ref":"#/components/schemas/SgkExitPeriodInfoDto"},{"type":"null"}]},"sgkMessage":{"type":["string","null"]},"suggestion":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SgkPeriodSuggestionDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/SgkValidationMessage"}}},"required":["suggestion","warnings"]},"SgkPeriodDto":{"type":"object","properties":{"start":{"type":["string","null"],"format":"date"},"end":{"type":["string","null"],"format":"date"},"days":{"type":["integer","null"],"format":"int32"}}},"SgkPeriodSuggestionDto":{"type":"object","properties":{"documentType":{"type":["string","null"]},"wage":{"type":["number","null"]},"bonus":{"type":["number","null"]},"missingDays":{"type":"integer","format":"int32"},"missingReason":{"type":["string","null"]},"source":{"type":"string","enum":["PAYROLL_APPROVED","PAYROLL_CALCULATED","NONE"]},"required":{"type":"boolean"}},"required":["missingDays","required","source"]},"SubmitDeclarationItemRequest":{"type":"object","properties":{"accountId":{"type":"string"},"eventDate":{"type":"string","format":"date"},"period":{"oneOf":[{"$ref":"#/components/schemas/PeriodRequest"},{"type":"null"}]}},"required":["accountId","eventDate"]},"SubmitDeclarationsRequest":{"type":"object","properties":{"type":{"type":"string","enum":["ENTRY","EXIT"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/SubmitDeclarationItemRequest"},"minItems":1}},"required":["items","type"]},"SgkSubmitItemDto":{"type":"object","properties":{"accountId":{"type":"string"},"declarationId":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["PENDING","ACCEPTED","REJECTED","UNCERTAIN","FAILED","EXTERNAL","VOIDED","CANCELLED"]},"errorClass":{"type":["string","null"],"enum":["VALIDATION","AUTH","SYSTEM","NETWORK","NOT_SENT"]},"sgkMessage":{"type":["string","null"]},"referenceCode":{"type":["integer","null"],"format":"int64"},"sgkFullName":{"type":["string","null"]},"nameMismatch":{"type":"boolean"},"duplicate":{"type":"boolean"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/SgkValidationMessage"}}},"required":["accountId","duplicate","errors","nameMismatch"]},"SgkSubmitResponse":{"type":"object","properties":{"requestId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SgkSubmitItemDto"}}},"required":["items","requestId"]},"ResolveDeclarationRequest":{"type":"object","properties":{"outcome":{"type":"string","enum":["AT_SGK","NOT_AT_SGK"]},"note":{"type":["string","null"]}},"required":["outcome"]},"SgkDeclarationAttemptDto":{"type":"object","properties":{"attemptNo":{"type":"integer","format":"int32"},"requestId":{"type":["string","null"]},"batchId":{"type":["string","null"]},"submittedByUserId":{"type":["string","null"]},"submittedByCrew":{"type":"boolean"},"submittedAt":{"type":["string","null"],"format":"date-time"},"sgkResultCode":{"type":["integer","null"],"format":"int32"},"sgkMessage":{"type":["string","null"]},"errorClass":{"type":["string","null"],"enum":["VALIDATION","AUTH","SYSTEM","NETWORK","NOT_SENT"]},"payload":{"type":["object","null"],"additionalProperties":{}}},"required":["attemptNo","submittedByCrew"]},"SgkDeclarationDetailDto":{"type":"object","properties":{"declaration":{"$ref":"#/components/schemas/SgkDeclarationListItemDto"},"sgkRegistryNo":{"type":["string","null"]},"sgkFullName":{"type":["string","null"]},"sgkProcessedAt":{"type":["string","null"],"format":"date"},"exceptionCode":{"type":["string","null"]},"resolvedBy":{"type":["string","null"],"enum":["SUBMIT","RECONCILE","AUDIT","USER"]},"userNote":{"type":["string","null"]},"voidVerified":{"type":["boolean","null"]},"payload":{"type":["object","null"],"additionalProperties":{}},"attempts":{"type":"array","items":{"$ref":"#/components/schemas/SgkDeclarationAttemptDto"}}},"required":["attempts","declaration"]},"SgkDeclarationListItemDto":{"type":"object","properties":{"id":{"type":"string"},"workplaceId":{"type":["string","null"]},"workplaceName":{"type":["string","null"]},"accountId":{"type":["string","null"]},"employeeName":{"type":["string","null"]},"nationalId":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["ENTRY","EXIT"]},"eventDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"late":{"type":"boolean"},"status":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED","UNCERTAIN","FAILED","EXTERNAL","VOIDED","CANCELLED"]},"errorClass":{"type":["string","null"],"enum":["VALIDATION","AUTH","SYSTEM","NETWORK","NOT_SENT"]},"sgkMessage":{"type":["string","null"]},"referenceCode":{"type":["integer","null"],"format":"int64"},"sgkEnv":{"type":["string","null"],"enum":["TEST","LIVE"]},"nameMismatch":{"type":"boolean"},"administrativeFine":{"type":["number","null"]},"verified":{"type":"boolean"},"canResend":{"type":"boolean"},"canDownloadPdf":{"type":"boolean"},"outOfSync":{"type":"boolean"},"attemptCount":{"type":"integer","format":"int32"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["attemptCount","canDownloadPdf","canResend","id","late","nameMismatch","outOfSync","status","verified"]},"ResendDeclarationRequest":{"type":"object","properties":{"period":{"oneOf":[{"$ref":"#/components/schemas/PeriodRequest"},{"type":"null"}]}}},"Result":{"type":"object","properties":{"declarationId":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED","UNCERTAIN","FAILED","EXTERNAL","VOIDED","CANCELLED"]},"resolvedBy":{"type":["string","null"],"enum":["SUBMIT","RECONCILE","AUDIT","USER"]},"message":{"type":["string","null"]}},"required":["declarationId","status"]},"MarkVoidedRequest":{"type":"object","properties":{"confirmWithoutVerification":{"type":"boolean"},"note":{"type":["string","null"]}},"required":["confirmWithoutVerification"]},"CancelDeclarationRequest":{"type":"object","properties":{"note":{"type":["string","null"]}}},"MarkExternalItemRequest":{"type":"object","properties":{"type":{"type":"string","enum":["ENTRY","EXIT"]},"accountId":{"type":"string"},"eventDate":{"type":"string","format":"date"},"note":{"type":["string","null"]}},"required":["accountId","eventDate","type"]},"MarkExternalRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MarkExternalItemRequest"},"minItems":1}},"required":["items"]},"SettingsIntegrationDto":{"type":"object","properties":{"id":{"type":["string","null"]},"integrator":{"type":["string","null"],"enum":["EDM","NES","TAXTEN","KOLAYSOFT","SOVOS","UYUMSOFT","IZI_BIZ","ELOGO","GIB","PAYTR","SIPAY","KUVEYTTURK","BBVA","ISBANK","ENPARA","VAKIFBANK","TEB","AKBANK","ZIRAAT","HALKBANK","EMLAKKATILIM","YAPIKREDI","QNB"]},"password":{"type":["string","null"]},"type":{"type":["string","null"]},"username":{"type":["string","null"]}}},"CompanyDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int64"},"companyType":{"type":["string","null"],"enum":["ANONIM","LIMITED","PRIVATE_COMPANY","OTHER"]},"title":{"type":["string","null"]},"vknTckn":{"type":["string","null"]},"taxOffice":{"type":["string","null"]},"mersisNo":{"type":["string","null"]},"registrationNumber":{"type":["string","null"]},"webAddress":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdById":{"type":["string","null"]},"invoiceAlias":{"type":["string","null"]},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/AddressDto"},"uniqueItems":true},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationDto"},"uniqueItems":true},"documentSeriPrefix":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSeriPrefixDto"},"uniqueItems":true},"status":{"type":["string","null"],"enum":["ONBOARDING","ACTIVE","PASSIVE"]},"is_smm":{"type":"boolean"},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"balanceBookTransitionDate":{"type":["string","null"],"format":"date"},"is_transfer_mode":{"type":"boolean"},"is_dealer":{"type":"boolean"},"transferMode":{"type":"boolean","writeOnly":true},"dealer":{"type":"boolean","writeOnly":true},"smm":{"type":"boolean","writeOnly":true}},"required":["addresses","documentSeriPrefix","integrations","is_dealer","is_smm","is_transfer_mode"]},"DocumentSeriPrefixDto":{"type":"object","properties":{"id":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["EARSIVFATURA","EFATURA","EIRSALIYE","ESMM","EMM","EGIDERPUSULASI"]},"prefix":{"type":["string","null"]},"integrator":{"type":["string","null"],"enum":["EDM","NES","TAXTEN","KOLAYSOFT","SOVOS","UYUMSOFT","IZI_BIZ","ELOGO","GIB","PAYTR","SIPAY","KUVEYTTURK","BBVA","ISBANK","ENPARA","VAKIFBANK","TEB","AKBANK","ZIRAAT","HALKBANK","EMLAKKATILIM","YAPIKREDI","QNB"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"IntegrationDto":{"type":"object","properties":{"id":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/CompanyDto"},{"type":"null"}]},"integrator":{"type":["string","null"],"enum":["EDM","NES","TAXTEN","KOLAYSOFT","SOVOS","UYUMSOFT","IZI_BIZ","ELOGO","GIB","PAYTR","SIPAY","KUVEYTTURK","BBVA","ISBANK","ENPARA","VAKIFBANK","TEB","AKBANK","ZIRAAT","HALKBANK","EMLAKKATILIM","YAPIKREDI","QNB"]},"type":{"type":["string","null"]},"username":{"type":["string","null"]},"autoPrediction":{"type":"boolean"},"createdAt":{"type":["string","null"],"format":"date-time"},"lastStatus":{"type":["string","null"],"enum":["OK","FAILED"]},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastErrorAt":{"type":["string","null"],"format":"date-time"},"lastErrorMessage":{"type":["string","null"]},"lastErrorCode":{"type":["string","null"],"enum":["INVALID_CREDENTIALS","BANK_ACCESS_DENIED","ACCESS_BLOCKED","REAUTH_REQUIRED","ACCOUNT_INACTIVE","ACCOUNT_RESTRICTED","UNAUTHORIZED","PROVIDER_UNREACHABLE","PROVIDER_ERROR","INTERNAL_ERROR","UNKNOWN"]}},"required":["autoPrediction"]},"FileUploadResponse":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":["string","null"]}},"required":["name"]},"SalesOfferLineRequest":{"type":"object","properties":{"productId":{"type":["string","null"],"description":"Satırın ürünü. Zorunludur; serbest metin satır oluşturulamaz.","maxLength":2147483647,"minLength":1},"description":{"type":["string","null"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"quantity":{"type":["number","null"]},"unitPrice":{"type":["number","null"],"minimum":0},"discountRate":{"type":"number","description":"İskonto oranı; yüzde değil 0 ile 1 arasında kesir. %20 için 0.2 gönderilir.","example":0.2,"maximum":1,"minimum":0},"taxRate":{"type":"number","description":"KDV oranı; yüzde değil 0 ile 1 arasında kesir. %20 için 0.2 gönderilir.","example":0.2,"maximum":1,"minimum":0}},"required":["discountRate","productId","quantity","taxRate","unitPrice"]},"SalesOfferSaveRequest":{"type":"object","properties":{"accountId":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"offerDate":{"type":["string","null"],"format":"date"},"validUntil":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0.0},"discountRate":{"type":"number","maximum":1,"minimum":0},"withholdingRate":{"type":"number","maximum":1,"minimum":0},"vatWithholdingReasonCode":{"type":["string","null"]},"vatWithholdingRate":{"type":"number","maximum":1,"minimum":0},"note":{"type":["string","null"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SalesOfferLineRequest"},"minItems":1}},"required":["accountId","currency","discountRate","exchangeRate","lines","vatWithholdingRate","withholdingRate"]},"AccountSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"tcVkn":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]}},"required":["id","title"]},"ProductSummaryDto":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"detail":{"type":["object","null"],"additionalProperties":{}}}},"SalesOfferDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"account":{"oneOf":[{"$ref":"#/components/schemas/AccountSummaryDto"},{"type":"null"}]},"offerNo":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["DRAFT","SENT","ACCEPTED","REJECTED","EXPIRED","CANCELLED"]},"offerDate":{"type":["string","null"],"format":"date"},"validUntil":{"type":["string","null"],"format":"date"},"currency":{"type":["string","null"]},"exchangeRate":{"type":["number","null"]},"discountRate":{"type":["number","null"]},"subTotal":{"type":["number","null"]},"taxTotal":{"type":["number","null"]},"withholdingRate":{"type":["number","null"]},"withholdingTotal":{"type":["number","null"]},"vatWithholdingReasonCode":{"type":["string","null"]},"vatWithholdingRate":{"type":["number","null"]},"vatWithholdingTotal":{"type":["number","null"]},"total":{"type":["number","null"]},"note":{"type":["string","null"]},"archived":{"type":["boolean","null"]},"convertedOrderId":{"type":["string","null"]},"converted":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SalesOfferLineDto"}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["converted","lines"]},"SalesOfferLineDto":{"type":"object","properties":{"id":{"type":["string","null"]},"product":{"oneOf":[{"$ref":"#/components/schemas/ProductSummaryDto"},{"type":"null"}]},"description":{"type":["string","null"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"quantity":{"type":["number","null"]},"unitPrice":{"type":["number","null"]},"discountRate":{"type":["number","null"]},"taxRate":{"type":["number","null"]},"taxAmount":{"type":["number","null"]},"lineTotal":{"type":["number","null"]}}},"OrderConvertRequest":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date"},"warehouseId":{"type":["string","null"],"description":"Stoklu satırların hareket edeceği depo. Firmada birden çok aktif depo varsa stoklu belgede zorunludur.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}}},"PriceListRequest":{"type":"object","properties":{"currency":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"type":{"type":"string","enum":["PURCHASE","SALE"],"maxLength":2147483647,"minLength":1},"unitPrice":{"type":"number"},"tax":{"type":"array","items":{"$ref":"#/components/schemas/TaxDetail"}}},"required":["currency","tax","type","unitPrice"]},"ProductSaveRequest":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"type":{"type":["string","null"],"enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"code":{"type":["string","null"]},"barcode":{"type":["string","null"]},"gtipNo":{"type":["string","null"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceListRequest"}},"detail":{"type":["object","null"],"additionalProperties":{}}},"required":["name","prices","type","unit"]},"TaxDetail":{"type":"object","properties":{"base":{"type":"number"},"rate":{"type":"number"},"amount":{"type":"number"},"remainingAmount":{"type":"number"},"taxId":{"type":"string","maxLength":2147483647,"minLength":1},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"code":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"description":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"label":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"reasonCode":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"reasonId":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"reasonLabel":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"reasonTaxCode":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"reasonValue":{"type":["string","null"],"maxLength":2147483647,"minLength":1}},"required":["amount","base","rate","remainingAmount","taxId"]},"PriceListDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"productId":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["PURCHASE","SALE"]},"currency":{"type":["string","null"]},"unitPrice":{"type":["number","null"]},"tax":{"type":"array","items":{"$ref":"#/components/schemas/TaxDto"}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["tax"]},"ProductDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"name":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"code":{"type":["string","null"]},"barcode":{"type":["string","null"]},"gtipNo":{"type":["string","null"]},"archived":{"type":["boolean","null"]},"categoryId":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdById":{"type":["string","null"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceListDto"}},"detail":{"type":["object","null"],"additionalProperties":{}}},"required":["prices"]},"TaxDto":{"type":"object","properties":{"base":{"type":["number","null"]},"code":{"type":["string","null"]},"rate":{"type":["number","null"]},"label":{"type":["string","null"]},"taxId":{"type":["string","null"]},"amount":{"type":["number","null"]},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"reasonId":{"type":["string","null"]},"reasonCode":{"type":["string","null"]},"description":{"type":["string","null"]},"reasonLabel":{"type":["string","null"]},"reasonValue":{"type":["string","null"]},"reasonTaxCode":{"type":["string","null"]},"remainingAmount":{"type":["number","null"]}}},"StandardExpenseEnsureRequest":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"}}},"required":["names"]},"StandardExpenseEnsureFailure":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string"}},"required":["name","reason"]},"StandardExpenseEnsureResponse":{"type":"object","properties":{"created":{"type":"integer","format":"int32"},"approved":{"type":"integer","format":"int32"},"skipped":{"type":"integer","format":"int32"},"failed":{"type":"array","items":{"$ref":"#/components/schemas/StandardExpenseEnsureFailure"}}},"required":["approved","created","failed","skipped"]},"ProductWithInitialStockItem":{"type":"object","properties":{"name":{"type":["string","null"]},"productId":{"type":["string","null"]},"type":{"type":"string","enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"unit":{"type":"string","enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"quantity":{"type":["number","null"]},"purchasePrice":{"type":["number","null"],"minimum":0},"code":{"type":["string","null"]},"barcode":{"type":["string","null"]},"gtipNo":{"type":["string","null"]},"warehouseId":{"type":["string","null"],"description":"Açılış stoğunun yazılacağı depo. Firmada birden çok aktif depo varsa zorunludur.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}},"required":["type","unit"]},"ProductWithInitialStockRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductWithInitialStockItem"},"minItems":1},"openingBalanceDate":{"type":"string","minLength":1,"pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0.0}},"required":["currency","exchangeRate","items","openingBalanceDate"]},"ProductWithInitialStockResponse":{"type":"object","properties":{"incomingDocumentId":{"type":["string","null"]},"outgoingDocumentId":{"type":["string","null"]},"incomingDocumentIds":{"type":"array","items":{"type":"string"}},"outgoingDocumentIds":{"type":"array","items":{"type":"string"}}},"required":["incomingDocumentIds","outgoingDocumentIds"]},"LineItem":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":["string","null"]},"unit":{"type":["string","null"]},"productId":{"type":["string","null"]}},"required":["accountId"]},"ProductMapBatchRequest":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"minItems":1}},"required":["lines"]},"MappedLineItem":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":["string","null"]},"unit":{"type":["string","null"]},"productId":{"type":["string","null"]},"productName":{"type":["string","null"]}},"required":["accountId"]},"ProductMapBatchResponse":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/MappedLineItem"}}},"required":["lines"]},"PosCommissionRequest":{"type":"object","properties":{"amount":{"type":"number"},"date":{"type":"string","format":"date"}},"required":["amount","date"]},"PayrollCreateRequest":{"type":"object","properties":{"year":{"type":"integer","format":"int32","maximum":2100,"minimum":2020},"month":{"type":"integer","format":"int32","maximum":12,"minimum":1},"workplaceSector":{"type":"string","enum":["imalat","imalatDisi"]},"declarationsOnTime":{"type":"boolean"},"hasSgkDebt":{"type":"boolean"}},"required":["declarationsOnTime","hasSgkDebt","month","workplaceSector","year"]},"PayrollDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"integer","format":"int64"},"year":{"type":"integer","format":"int32"},"month":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["DRAFT","CALCULATED","APPROVED"]},"parametersId":{"type":"string"},"workplaceSector":{"type":["string","null"],"enum":["imalat","imalatDisi"]},"declarationsOnTime":{"type":"boolean"},"hasSgkDebt":{"type":"boolean"},"employeeCount":{"type":"integer","format":"int32"},"totalGross":{"type":"number"},"totalNet":{"type":"number"},"totalEmployerCost":{"type":"number"},"totalSgkEmployee":{"type":"number"},"totalSgkEmployer":{"type":"number"},"totalIncomeTax":{"type":"number"},"totalStampTax":{"type":"number"},"totalBes":{"type":"number"},"totalIncentiveDiscount":{"type":"number"},"totalAidGvExempt":{"type":"number"},"documentId":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/PayrollWarningDto"}}},"required":["companyId","declarationsOnTime","employeeCount","hasSgkDebt","id","month","parametersId","status","totalAidGvExempt","totalBes","totalEmployerCost","totalGross","totalIncentiveDiscount","totalIncomeTax","totalNet","totalSgkEmployee","totalSgkEmployer","totalStampTax","warnings","year"]},"PayrollCalculateRequest":{"type":"object","properties":{"accountIds":{"type":["array","null"],"items":{"type":"string"}}}},"PayrollDeductionRequest":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"year":{"type":"integer","format":"int32","maximum":2100,"minimum":2020},"month":{"type":"integer","format":"int32","maximum":12,"minimum":1},"type":{"type":"string","enum":["ICRA","NAFAKA","AVANS","OZEL_SIGORTA","SENDIKA","DIGER"]},"amount":{"type":"number","minimum":0.01},"description":{"type":["string","null"],"maxLength":255,"minLength":0}},"required":["accountId","amount","month","type","year"]},"PayrollDeductionDto":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"integer","format":"int64"},"accountId":{"type":"string"},"year":{"type":"integer","format":"int32"},"month":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["ICRA","NAFAKA","AVANS","OZEL_SIGORTA","SENDIKA","DIGER"]},"amount":{"type":"number"},"description":{"type":["string","null"]}},"required":["accountId","amount","companyId","id","month","type","year"]},"BagItem":{"type":"object","properties":{"id":{"type":["string","null"],"minLength":1},"quantity":{"type":["number","null"]}},"required":["id","quantity"]},"CheckoutRequest":{"type":"object","properties":{"paymentMethod":{"type":"string","enum":["CREDIT_CARD","BANK_TRANSFER","PROMOTION"]},"country":{"type":"string","minLength":1},"vknTckn":{"type":"string","minLength":1},"taxOffice":{"type":"string","minLength":1},"name":{"type":["string","null"]},"surname":{"type":["string","null"]},"title":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"city":{"type":"string","minLength":1},"district":{"type":"string","minLength":1},"phone":{"type":"string","minLength":1},"email":{"type":"string","minLength":1},"bag":{"type":"array","items":{"$ref":"#/components/schemas/BagItem"},"maxItems":2147483647,"minItems":1},"isAgreed":{"type":"boolean"}},"required":["address","bag","city","country","district","email","isAgreed","paymentMethod","phone","taxOffice","title","vknTckn"]},"PayTrResponse":{"type":"object","properties":{"status":{"type":["string","null"]},"token":{"type":["string","null"]},"reason":{"type":["string","null"]}}},"OrderLineRequest":{"type":"object","properties":{"productId":{"type":["string","null"],"description":"Satırın ürünü. Zorunludur; serbest metin satır oluşturulamaz.","maxLength":2147483647,"minLength":1},"description":{"type":["string","null"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"quantity":{"type":["number","null"]},"unitPrice":{"type":["number","null"],"minimum":0},"discountRate":{"type":"number","description":"İskonto oranı; yüzde değil 0 ile 1 arasında kesir. %20 için 0.2 gönderilir.","example":0.2,"maximum":1,"minimum":0},"taxRate":{"type":"number","description":"KDV oranı; yüzde değil 0 ile 1 arasında kesir. %20 için 0.2 gönderilir.","example":0.2,"maximum":1,"minimum":0}},"required":["discountRate","productId","quantity","taxRate","unitPrice"]},"OrderSaveRequest":{"type":"object","properties":{"accountId":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"orderNo":{"type":["string","null"],"maxLength":30,"minLength":0},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"orderDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0.0},"discountRate":{"type":"number","maximum":1,"minimum":0},"withholdingRate":{"type":"number","maximum":1,"minimum":0},"vatWithholdingReasonCode":{"type":["string","null"]},"vatWithholdingRate":{"type":"number","maximum":1,"minimum":0},"note":{"type":["string","null"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineRequest"},"minItems":1}},"required":["accountId","currency","direction","discountRate","exchangeRate","lines","vatWithholdingRate","withholdingRate"]},"OrderDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"account":{"oneOf":[{"$ref":"#/components/schemas/AccountSummaryDto"},{"type":"null"}]},"orderNo":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["DRAFT","CONFIRMED","CANCELLED"]},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"orderDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"currency":{"type":["string","null"]},"exchangeRate":{"type":["number","null"]},"discountRate":{"type":["number","null"]},"subTotal":{"type":["number","null"]},"taxTotal":{"type":["number","null"]},"withholdingRate":{"type":["number","null"]},"withholdingTotal":{"type":["number","null"]},"vatWithholdingReasonCode":{"type":["string","null"]},"vatWithholdingRate":{"type":["number","null"]},"vatWithholdingTotal":{"type":["number","null"]},"total":{"type":["number","null"]},"note":{"type":["string","null"]},"archived":{"type":["boolean","null"]},"invoiceDocumentId":{"type":["string","null"]},"dispatchDocumentId":{"type":["string","null"]},"invoiced":{"type":"boolean"},"dispatched":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineDto"}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["dispatched","invoiced","lines"]},"OrderLineDto":{"type":"object","properties":{"id":{"type":["string","null"]},"product":{"oneOf":[{"$ref":"#/components/schemas/ProductSummaryDto"},{"type":"null"}]},"description":{"type":["string","null"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"quantity":{"type":["number","null"]},"unitPrice":{"type":["number","null"]},"discountRate":{"type":["number","null"]},"taxRate":{"type":["number","null"]},"taxAmount":{"type":["number","null"]},"lineTotal":{"type":["number","null"]}}},"FundResultRequest":{"type":"object","properties":{"type":{"type":"string","enum":["PROFIT","LOSS"]},"amount":{"type":"number"},"date":{"type":"string","format":"date"},"exchangeRate":{"type":["number","null"]}},"required":["amount","date","type"]},"FundResultResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"KTCallbackRequest":{"type":"object","properties":{"code":{"type":"string","description":"Bankanın redirect adresine `code` parametresiyle döndürdüğü yetkilendirme kodu","example":"1F6A2C0B9D","minLength":1},"state":{"type":"string","description":"Yetkilendirme adresi alınırken dönen `state` değeri; bankanın geri gönderdiğiyle aynı olmalıdır","example":"Qm9iIHNheXMgaGVsbG8gdGhlcmU","minLength":1}},"required":["code","state"]},"InvoiceInboxReplyDto":{"type":"object","properties":{"ettn":{"type":["string","null"]},"reply":{"type":["string","null"],"enum":["ACCEPT","ACCEPT_PENDING","REJECT","REJECT_PENDING","PARTIAL_ACCEPT","PARTIAL_ACCEPT_PENDING"]},"replyDate":{"type":["string","null"],"format":"date-time"},"replyUser":{"type":["string","null"]},"reason":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceInboxReplyLineDto"},"uniqueItems":true}},"required":["lines"]},"InvoiceInboxReplyLineDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int64"},"dispatchLineId":{"type":["string","null"]},"acceptedQuantity":{"type":["number","null"]},"rejectedQuantity":{"type":["number","null"]},"rejectReason":{"type":["string","null"]},"oversupplyQuantity":{"type":["number","null"]},"shortQuantity":{"type":["number","null"]}}},"InvoiceInboxRejectRequest":{"type":"object","properties":{"reason":{"type":"string","maxLength":255,"minLength":1}},"required":["reason"]},"InvoiceInboxReplyLineRequest":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineDto"},"minItems":1}},"required":["lines"]},"LineDto":{"type":"object","properties":{"dispatchLineId":{"type":"string","maxLength":50,"minLength":0},"acceptedQuantity":{"type":["number","null"]},"rejectedQuantity":{"type":["number","null"]},"rejectReason":{"type":["string","null"]},"oversupplyQuantity":{"type":["number","null"]},"shortQuantity":{"type":["number","null"]}},"required":["dispatchLineId"]},"InvoiceInboxSaveRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"maxItems":2147483647,"minItems":1}},"required":["documentIds"]},"DocumentInboxArchiveResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"ProductMapDto":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string"},"productId":{"type":"string"}},"required":["accountId","name","productId","unit"]},"ProductMapSaveRequest":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductMapDto"},"maxItems":2147483647,"minItems":1}},"required":["data"]},"DocumentInboxPathsRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]},"DocumentInboxPathDto":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":["string","null"]}},"required":["id"]},"InboxImportByIdsRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["documentIds"]},"ImportAllStartedResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int32"}},"required":["total"]},"AccountAddressRequest":{"type":"object","properties":{"id":{"type":["string","null"]},"city":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"country":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"district":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"email":{"type":["string","null"],"format":"email"},"name":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"address":{"type":["string","null"]},"phoneNumber":{"type":["string","null"],"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"},"post_code":{"type":"string"},"workPhone":{"type":["string","null"],"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"},"countryCode":{"type":["string","null"]},"addressNo":{"type":["string","null"]}},"required":["city","name"]},"AccountBankRequest":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":100,"minLength":1},"iban":{"type":"string","maxLength":34,"minLength":16},"bankBranch":{"type":["string","null"],"maxLength":50,"minLength":1},"bankBranchCode":{"type":["string","null"],"maxLength":12,"minLength":1}},"required":["iban"]},"AccountContactRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":2147483647,"minLength":3},"email":{"type":"string","format":"email","minLength":1},"gsm":{"type":"string","minLength":1,"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"}},"required":["email","gsm","name"]},"BesInfo":{"type":"object","properties":{"besEnrolled":{"type":["boolean","null"],"description":"OKS'ye dahil mi — null gönderilince otomatiğe döner: işe giriş tarihinde 45 yaş altı dahil sayılır (4632 SK ek md.2)"},"besStartDate":{"type":["string","null"],"format":"date","description":"BES kesinti başlangıcı (ISO-8601); boşsa dönemin tamamı"},"besEndDate":{"type":["string","null"],"format":"date","description":"BES cayma / ayrılma tarihi (ISO-8601); boşsa üyelik devam ediyor"}}},"EmployeeProfileRequest":{"type":"object","properties":{"personal":{"oneOf":[{"$ref":"#/components/schemas/PersonalInfo"},{"type":"null"}]},"entry":{"oneOf":[{"$ref":"#/components/schemas/EntryInfo"},{"type":"null"}]},"exit":{"oneOf":[{"$ref":"#/components/schemas/ExitInfo"},{"type":"null"}]},"wage":{"oneOf":[{"$ref":"#/components/schemas/WageInfo"},{"type":"null"}]},"payrollFlags":{"oneOf":[{"$ref":"#/components/schemas/PayrollFlags"},{"type":"null"}]},"taxDisability":{"oneOf":[{"$ref":"#/components/schemas/TaxDisabilityInfo"},{"type":"null"}]},"incentiveFlags":{"oneOf":[{"$ref":"#/components/schemas/IncentiveFlags"},{"type":"null"}]},"bes":{"oneOf":[{"$ref":"#/components/schemas/BesInfo"},{"type":"null"}]},"rndInfo":{"oneOf":[{"$ref":"#/components/schemas/RndInfo"},{"type":"null"}]}}},"EmployeeRequest":{"type":"object","properties":{"title":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"contacts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountContactRequest"}},"addresses":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountAddressRequest"}},"bank":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountBankRequest"}},"archived":{"type":"boolean"},"employeeProfile":{"oneOf":[{"$ref":"#/components/schemas/EmployeeProfileRequest"},{"type":"null"}]}},"required":["archived"]},"EntryInfo":{"type":"object","properties":{"workplaceId":{"type":["string","null"],"description":"Bağlı olduğu işyeri (Workplace) id'si"},"startDate":{"type":["string","null"],"format":"date","description":"Giriş tarihi / kıdem başlangıcı (ISO-8601)","example":"2024-01-02"},"previousIncomeTaxBase":{"type":["number","null"],"description":"Geçmiş gelir vergisi matrahı (yıl içinde devir alınan personel için)"},"previousMinimumWageTaxBase":{"type":["number","null"],"description":"Geçmiş asgari ücret vergi matrahı (GVK 23/18)"},"previousTaxBaseYear":{"type":["integer","null"],"format":"int32","description":"Geçmiş matrahların ait olduğu takvim yılı; kümülatif her Ocak'ta sıfırlandığı için matrah yalnız bu yılın bordrosunda dikkate alınır","example":2026},"job":{"type":["string","null"],"description":"İSKUR meslek kodu"},"insuranceBranch":{"type":["string","null"],"description":"Sigorta kolu kodu (SIGORTA_KOLU)","enum":["0","1","2","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41"]},"jobCode2821":{"type":["string","null"],"description":"2821 sayılı kanun görev kodu (GOREV_KODU_2821)","enum":["1","2","3","4","5","6"]},"partTime":{"type":["boolean","null"],"description":"Kısmi süreli (part-time) çalışıyor mu"},"partTimeMonthlyDays":{"type":["integer","null"],"format":"int32","description":"Kısmi süreli aylık çalışma gün sayısı (0-20)"},"transferFromWorkplaceSgkNo":{"type":["string","null"],"description":"Nakil gelinen işyeri SGK sicil numarası (maks 26 karakter)","maxLength":26}}},"ExitInfo":{"type":"object","properties":{"endDate":{"type":["string","null"],"format":"date","description":"Çıkış tarihi (çalışmaya devam edende boş)","example":"2025-12-31"},"sgkExitReason":{"type":["string","null"],"description":"SGK çıkış nedeni kodu (CIKIS_KODU) — geçerli aralık: 1-50"},"workExitReason":{"type":["string","null"],"description":"İŞKUR çıkış nedeni kodu (ISKUR_CIKIS_NEDENI) — geçerli aralık: 1-26"},"transferToWorkplaceSgkNo":{"type":["string","null"],"description":"Nakil gidilecek işyeri SGK sicil numarası (maks 26 karakter)","maxLength":26}}},"IncentiveFlags":{"type":"object","properties":{"freeZone":{"type":["boolean","null"],"description":"Serbest bölgede çalışan (GV istisnası)"},"incomeTaxIncentive":{"type":["boolean","null"],"description":"GV teşvik tutarını net ücrete ilave et"},"stampTaxIncentive":{"type":["boolean","null"],"description":"DV teşvik tutarını net ücrete ilave et"},"incomeTaxIncentiveLaw4447":{"type":["boolean","null"],"description":"4447/18. madde GV teşviğinden faydalansın (işsizlik ödeneği alıp işe başlayan)"},"collectiveLaborAgreement":{"type":["boolean","null"],"description":"Toplu iş sözleşmesi kapsamında"},"civilAviation":{"type":["boolean","null"],"description":"Sivil havacılığa tabi (GVK 23 / 7161 SK 3. md.) — pilot, kabin görevlisi"},"minimumWageTaxExempt":{"type":["boolean","null"],"description":"True ise GVK 23/18 asgari ücret vergi istisnası UYGULANMAZ (ters mantık)"}}},"PayrollFlags":{"type":"object","properties":{"socialSecurity":{"type":["boolean","null"],"description":"SSK (Sosyal Güvenlik) primi hesaplansın mı"},"unemploymentInsurance":{"type":["boolean","null"],"description":"İşsizlik sigortası primi hesaplansın mı"},"incomeTax":{"type":["boolean","null"],"description":"Gelir vergisi kesilsin mi"},"stampTax":{"type":["boolean","null"],"description":"Damga vergisi kesilsin mi"},"calculatePayroll":{"type":["boolean","null"],"description":"Bu personel için bordro hesabı çalışsın mı"},"attendanceFee":{"type":["boolean","null"],"description":"Huzur hakkı (yönetim kurulu üyesi vb.)"},"exConvict":{"type":["boolean","null"],"description":"Eski hükümlü teşviki"}}},"PersonalInfo":{"type":"object","properties":{"firstName":{"type":["string","null"],"description":"Ad","maxLength":100},"lastName":{"type":["string","null"],"description":"Soyad","maxLength":100},"birthDate":{"type":["string","null"],"format":"date","description":"Doğum tarihi (ISO-8601)","example":"1990-05-20"},"gender":{"type":["string","null"],"description":"Cinsiyet — E: Erkek, K: Kadın","enum":["E","K"]},"education":{"type":["string","null"],"description":"Öğrenim durumu kodu (OGRENIM_DURUMU)","enum":["0","1","2","3","4","5","6","7","8","9","10","11","12"]},"educationDate":{"type":["string","null"],"format":"date","description":"Mezuniyet tarihi (ISO-8601)","example":"2012-06-15"},"graduationDepartment":{"type":["string","null"],"description":"Mezuniyet bölümü; SGK işe giriş bildirgesinde zorunlu"}}},"RndInfo":{"type":"object","properties":{"rndProject":{"type":["string","null"],"description":"Ar-Ge projesi adı / kodu (eski serbest metin)"},"rndProjectId":{"type":["string","null"],"description":"İşyeri Ar-Ge projesi (WorkplaceRndProject) id'si — personelin işyerine ait olmalı"},"rndDefinition":{"type":["string","null"],"description":"Ar-Ge personel tanımı kodu 4691 (ARGE_TANIM)","enum":["1","3","5"],"x-enumNames":"[\"Destek Personeli\",\"Tasarım Personeli\",\"Ar-Ge Personeli\"]"},"withholdingTaxCard":{"type":["string","null"],"description":"Muhtasar beyanname kartı kodu (MUHTASAR_KARTI)","enum":["17","18","19","20"]}}},"TaxDisabilityInfo":{"type":"object","properties":{"incomeTaxMethod":{"type":["string","null"],"description":"Gelir vergisi hesap yöntemi (GELIR_VERGISI_YONTEM)","enum":["0","1"],"x-enumNames":"[\"Artan Oranlı\",\"Sabit Oranlı\"]"},"disabled":{"type":["boolean","null"],"description":"Engelli mi; SGK bildirgesindeki `ozurlu` alanı"},"disabilityDegree":{"type":["string","null"],"description":"Sakatlık / engellilik derecesi (SAKATLIK_DERECESI)","enum":["1","2","3"],"x-enumNames":"[\"Birinci Derece\",\"İkinci Derece\",\"Üçüncü Derece\"]"},"disabilityRate":{"type":["number","null"],"description":"Engellilik oranı (yüzde, 1 ondalık basamak)","example":40.0}}},"WageInfo":{"type":"object","properties":{"isMinimumWage":{"type":["boolean","null"],"description":"True ise geçerli asgari brüt ücret uygulanır, wage alanı kullanılmaz"},"wageType":{"type":["string","null"],"description":"Ücret türü kodu (UCRET_NEVI)","enum":["0","1","2"],"x-enumNames":"[\"Saat\",\"Gün\",\"Ay\"]"},"wage":{"type":["number","null"],"description":"Brüt/net ücret tutarı (isMinimumWage=false ise zorunlu)"},"wageCurrency":{"type":["string","null"],"description":"Döviz kodu ISO-4217 (TRY, USD, EUR …)","example":"TRY","maxLength":3},"wageNetGross":{"type":["string","null"],"description":"Net/Brüt seçimi (UCRET_NET_BRUT)","enum":["0","1"],"x-enumNames":"[\"Net\",\"Brüt\"]"},"employmentStatus":{"type":["string","null"],"description":"İstihdam durumu kodu (ISTIHDAM)","enum":["1","2","3","4","5","6"],"x-enumNames":"[\"Daimi\",\"Mevsimlik\",\"Geçici\",\"Tam Zamanlı\",\"Kısmi\",\"Diğer\"]"},"insuranceGroup":{"type":["string","null"],"description":"Sigorta grubu kodu (SIGORTA_GRUP) — geçerli aralık: 1-92"},"sgkDocumentType":{"type":["string","null"],"description":"APHB belge türü kodu — set edilirse bordro oran seti insuranceGroup yerine bunu esas alır"},"lawNo":{"type":["string","null"],"description":"SGK teşvik kanun kodu (KANUN_NO)","enum":["00000","04857","06111","07103","09270","15510","16322","17103","17436","18111","27103","27857","28687","29458","32325","04691","06462","05084"],"maxLength":5,"x-hint":"00000 = teşvik yok"},"mineWorker":{"type":["string","null"],"description":"Maden işçisi türü (MADEN_ISCISI)","enum":["1","2"],"x-enumNames":"[\"Yeraltı\",\"Yerüstü\"]"}}},"EmployeeDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"title":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"contacts":{"type":["array","null"],"items":{"type":"object","additionalProperties":{}}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/AddressDto"},"uniqueItems":true},"bank":{"type":["object","null"],"additionalProperties":{}},"archived":{"type":["boolean","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdById":{"type":["string","null"]},"employeeProfile":{"oneOf":[{"$ref":"#/components/schemas/EmployeeProfileDto"},{"type":"null"}]}},"required":["addresses"]},"EmployeeProfileDto":{"type":"object","properties":{"id":{"type":["string","null"]},"personal":{"oneOf":[{"$ref":"#/components/schemas/PersonalInfo"},{"type":"null"}]},"entry":{"oneOf":[{"$ref":"#/components/schemas/EntryInfo"},{"type":"null"}]},"exit":{"oneOf":[{"$ref":"#/components/schemas/ExitInfo"},{"type":"null"}]},"wage":{"oneOf":[{"$ref":"#/components/schemas/WageInfo"},{"type":"null"}]},"payrollFlags":{"oneOf":[{"$ref":"#/components/schemas/PayrollFlags"},{"type":"null"}]},"taxDisability":{"oneOf":[{"$ref":"#/components/schemas/TaxDisabilityInfo"},{"type":"null"}]},"incentiveFlags":{"oneOf":[{"$ref":"#/components/schemas/IncentiveFlags"},{"type":"null"}]},"bes":{"oneOf":[{"$ref":"#/components/schemas/BesInfo"},{"type":"null"}]},"rndInfo":{"oneOf":[{"$ref":"#/components/schemas/RndInfo"},{"type":"null"}]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"AccountingRecordDto":{"type":"object","properties":{"accPlanId":{"type":"string"},"accCode":{"type":"string"},"accName":{"type":"string"},"ruleKey":{"type":["string","null"]}},"required":["accCode","accName","accPlanId"]},"DocDetail":{"type":"object","properties":{"deliveryNote":{"type":["boolean","null"]},"invoiceAddress":{"type":["string","null"]},"exitAddressId":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"arrivalAddressId":{"type":["string","null"],"pattern":".+"},"refundInfo":{"type":["array","null"],"items":{"$ref":"#/components/schemas/RefundInfo"}},"bankTransactionType":{"type":["string","null"]},"dispatch":{"type":["boolean","null"]},"internalDispatch":{"type":["boolean","null"]},"fasonDispatch":{"type":["boolean","null"]},"dispatchInfo":{"type":["array","null"],"items":{"$ref":"#/components/schemas/RefundInfo"}},"order":{"type":["boolean","null"]},"orderInfo":{"type":["array","null"],"items":{"$ref":"#/components/schemas/RefundInfo"}},"bankBalance":{"type":["number","null"]},"bankRule":{"type":["string","null"]},"leaseAddress":{"type":["string","null"]},"ytbNo":{"type":["string","null"]},"ytbDate":{"type":["string","null"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"idisShipmentNo":{"type":["string","null"]},"buyerPlate":{"type":["string","null"],"description":"Şarj hizmeti alan aracın plakası. ENERJI faturalarında zorunludur.","example":"34ABC123"},"invoicePeriodStartDate":{"type":["string","null"],"description":"Şarj hizmetinin başladığı tarih (yyyy-MM-dd).","example":"2026-01-15"},"invoicePeriodStartTime":{"type":["string","null"],"description":"Şarj hizmetinin başladığı saat (HH:mm:ss).","example":"08:30:00"},"invoicePeriodEndDate":{"type":["string","null"],"description":"Şarj hizmetinin bittiği tarih (yyyy-MM-dd).","example":"2026-01-15"},"invoicePeriodEndTime":{"type":["string","null"],"description":"Şarj hizmetinin bittiği saat (HH:mm:ss).","example":"09:15:00"},"esuReportId":{"type":["string","null"],"description":"ESU rapor numarası (GUID). Şarj hizmeti faturalarında zorunludur.","example":"3f2504e0-4f89-11d3-9a0c-0305e82c3301"},"esuReportDate":{"type":["string","null"],"description":"ESU raporunun düzenlenme tarihi (yyyy-MM-dd).","example":"2026-01-15"},"kobi":{"type":["boolean","null"],"description":"Satıcının KOBİ olup olmadığı. Alıcısı ASELSAN olan faturalarda zorunludur.","example":true},"eydep":{"type":["string","null"],"description":"EYDEP sertifikasının derecesi. Sertifika yoksa boş bırakılır, faturaya HAYIR yazılır.","enum":["A","B","C","D","E","F"],"example":"B"},"serviceNo":{"type":["string","null"],"description":"Alıcının hizmet numarası. GSM ve internet faturalarında kullanılır.","example":"5551234567"},"phoneNo":{"type":["string","null"],"description":"Alıcının faturaya konu telefon numarası.","example":"02121234567"},"subscriberNo":{"type":["string","null"],"description":"Alıcının abone numarası. Elektrik, su ve doğalgaz faturalarında kullanılır.","example":"AB-00012345"},"customerNo":{"type":["string","null"],"description":"Alıcının satıcı nezdindeki müşteri numarası.","example":"MS-99887766"},"installationNo":{"type":["string","null"],"description":"Aboneliğin tesisat numarası. Elektrik ve doğalgaz faturalarında kullanılır.","example":"TS-12345678"},"meterNo":{"type":["string","null"],"description":"Aboneliğin sayaç numarası.","example":"SY-00123456"},"dealerNo":{"type":["string","null"],"description":"Alıcının bayi numarası.","example":"9401"},"branchNo":{"type":["string","null"],"description":"Alıcının şube numarası.","example":"2357"},"contractNo":{"type":["string","null"],"description":"Faturanın dayandığı sözleşmenin numarası.","example":"SZL-2023-0001"},"contractDate":{"type":["string","null"],"description":"Sözleşmenin tarihi (yyyy-MM-dd).","example":"2022-12-15","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"expenseNoteVerificationType":{"type":["string","null"]},"expenseNoteVerificationPhone":{"type":["string","null"]},"isOnlineSale":{"type":["boolean","null"],"description":"Faturanın internet satışı kapsamında düzenlendiğini belirtir.","example":true},"webAddress":{"type":["string","null"],"description":"İnternet satışında satışın yapıldığı web adresi.","example":"www.trendyol.com"},"paidType":{"type":["string","null"],"description":"İnternet satışında ödeme şekli.","enum":["KREDIKARTI/BANKAKARTI","EFT/HAVALE","KAPIDAODEME","ODEMEARACISI"]},"paymentAgentName":{"type":["string","null"],"description":"İnternet satışında ödemeye aracılık eden kuruluşun adı.","example":"Pay Tr"},"payDate":{"type":["string","null"],"description":"İnternet satışında ödeme tarihi (yyyy-MM-dd).","example":"2026-10-22","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"deliveryType":{"type":["string","null"],"description":"İnternet satışında teslim şekli.","example":"cargo"},"sendDate":{"type":["string","null"],"description":"İnternet satışında gönderim tarihi (yyyy-MM-dd).","example":"2026-10-19","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"carrierName":{"type":["string","null"],"description":"Kargo taşıyıcının ünvanı ya da ad soyadı.","example":"Yurtiçi Kargo Servisi A.Ş."},"carrierIdentifier":{"type":["string","null"],"description":"Kargo taşıyıcının VKN ya da TCKN'si.","example":"9860008925","maxLength":11,"minLength":0},"expenseNoteReturnedBy":{"oneOf":[{"$ref":"#/components/schemas/ExpenseNoteReturnedByDto"},{"type":"null"}]},"expenseNoteCargo":{"oneOf":[{"$ref":"#/components/schemas/ExpenseNoteCargoDto"},{"type":"null"}]},"toWarehouseId":{"type":["string","null"],"description":"Dahili sevk irsaliyesinin hedef deposu.","example":"w-2"}}},"DocumentLineDto":{"type":"object","properties":{"id":{"type":["string","null"]},"productId":{"type":["string","null"]},"unit":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"productName":{"type":["string","null"]},"importId":{"type":["string","null"]},"importName":{"type":["string","null"]},"importUnit":{"type":["string","null"]},"date":{"type":["string","null"],"format":"date-time"},"mapId":{"type":["string","null"]},"waybillRefLine":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Satırın açıklaması. null gönderilemez; alan hiç gönderilmezse boş metin kullanılır.","example":"Kasım 2026 danışmanlık bedeli"},"gtipNo":{"type":["string","null"]},"shipmentType":{"type":["string","null"]},"transportMode":{"type":["string","null"]},"detail":{"oneOf":[{"$ref":"#/components/schemas/LineDetail"},{"type":"null"}]},"quantity":{"type":["number","null"],"minimum":0.00001},"unitPrice":{"type":["number","null"],"minimum":0},"discountRate":{"type":"number","maximum":1,"minimum":0},"tax":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTaxDto"},"uniqueItems":true},"documentId":{"type":["string","null"]}},"required":["discountRate","quantity","tax","unit","unitPrice"]},"DocumentPaymentDto":{"type":"object","properties":{"id":{"type":["string","null"]},"accountId":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"amount":{"type":"number"},"type":{"type":["string","null"],"enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"accountTitle":{"type":["string","null"]}},"required":["accountId","amount","type"]},"DocumentSaveRequest":{"type":"object","properties":{"accountId":{"type":["string","null"]},"docDetail":{"oneOf":[{"$ref":"#/components/schemas/DocDetail"},{"type":"null"}]},"recurringJob":{"oneOf":[{"$ref":"#/components/schemas/RecurringJobDto"},{"type":"null"}]},"documentNo":{"type":["string","null"]},"documentType":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"date":{"type":"string","minLength":1,"pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"time":{"type":["string","null"],"minLength":1},"dueDate":{"type":["string","null"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0.0},"note":{"type":["string","null"]},"total":{"type":"number","minimum":0},"discountRate":{"type":"number","maximum":1,"minimum":0},"referenceInboxId":{"type":["string","null"]},"documentName":{"type":["string","null"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLineDto"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentPaymentDto"}},"tax":{"type":"array","description":"Belge düzeyindeki vergi toplamları. Satırlarında KDV bulunan bir belgede bu dizi doldurulmalıdır; boş bırakılan belge resmileştirildiğinde UBL'de TaxTotal üretilmediği için GİB tarafından şema hatasıyla reddedilir.","items":{"$ref":"#/components/schemas/DocumentTaxDto"}},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"withAccRec":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountingRecordDto"}},"warehouseId":{"type":["string","null"],"description":"Belgenin stoklu satırlarının hareket edeceği depo. Firmada birden çok aktif depo varsa stoklu belgede zorunludur.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"isYatirimTesvik":{"type":"boolean"},"isExpenseNote":{"type":"boolean"},"isWithholdingDocumentType":{"type":"boolean"},"isReturn":{"type":"boolean"},"isEArchive":{"type":"boolean"},"isYtbType":{"type":"boolean"},"isExport":{"type":"boolean"},"isTahsilat":{"type":"boolean"},"isOdeme":{"type":"boolean"},"isImport":{"type":"boolean"},"isZReport":{"type":"boolean"},"isOKC":{"type":"boolean"},"isOut":{"type":"boolean"},"isStock":{"type":"boolean"},"isIn":{"type":"boolean"},"isOther":{"type":"boolean"}},"required":["currency","date","direction","discountRate","documentType","dueDate","exchangeRate","isEArchive","isExpenseNote","isExport","isImport","isIn","isOKC","isOdeme","isOther","isOut","isReturn","isStock","isTahsilat","isWithholdingDocumentType","isYatirimTesvik","isYtbType","isZReport","lines","payments","scenario","status","tax","time","total"]},"DocumentTaxDto":{"type":"object","properties":{"id":{"type":["string","null"]},"base":{"type":["number","null"],"minimum":0},"rate":{"type":["number","null"],"minimum":0},"amount":{"type":"number","minimum":0},"remainingAmount":{"type":"number","minimum":0},"taxId":{"type":["string","null"],"description":"Verginin oran kimliği: GET /api/definitions/tax yanıtındaki taxRates[].id değeri.","example":"a3f1c8d2-5b47-4e90-8a6c-1d2f3b4e5c67","maxLength":2147483647,"minLength":3},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"label":{"type":["string","null"],"minLength":1},"code":{"type":["string","null"],"minLength":1},"description":{"type":["string","null"],"minLength":1},"reasonCode":{"type":["string","null"]},"reasonLabel":{"type":["string","null"]},"reasonTaxCode":{"type":["string","null"]},"reasonValue":{"type":["string","null"]},"reasonId":{"type":["string","null"]},"order":{"type":["integer","null"],"format":"int32","minimum":0}},"required":["amount","category","code","description","label","remainingAmount","taxId"]},"ExpenseNoteCargoDto":{"type":"object","properties":{"vkn":{"type":["string","null"]},"title":{"type":["string","null"]},"authorisationNumber":{"type":["string","null"]},"city":{"type":["string","null"]},"district":{"type":["string","null"]}}},"ExpenseNoteReturnedByDto":{"type":"object","properties":{"tckn":{"type":["string","null"]},"firstName":{"type":["string","null"]},"familyName":{"type":["string","null"]},"city":{"type":["string","null"]},"district":{"type":["string","null"]}}},"LineDetail":{"type":"object","properties":{"gtipNo":{"type":["string","null"]},"shipmentType":{"type":["string","null"]},"transportMode":{"type":["string","null"]},"packagingTypeCode":{"type":["string","null"],"description":"Eşyanın bulunduğu kabın cinsi ve nevi (UN/ECE Rec. 21 PackagingTypeCode). ","example":"CT"},"kunyeNo":{"type":["string","null"],"description":"Hal Kayıt Sistemi künye numarası (19 karakter).","example":"1234567890123456789"},"etiketNo":{"type":["array","null"],"description":"İnşaat Demiri İzleme Sistemi etiket numaraları; ilk iki hane harf, son yedi hane rakam.","example":["AB1234567"],"items":{"type":"string"}},"serialId":{"type":["string","null"],"description":"Şarj ünitesinin seri numarası. SARJANLIK faturalarında her satır için zorunludur.","example":"ESU-0001"},"deviceKind":{"type":["string","null"],"description":"Teknoloji desteği kapsamında satılan cihazın türü. Her satır için zorunludur.","enum":["TELEFON","TABLET_PC"],"example":"TELEFON"},"deviceId":{"type":["string","null"],"description":"Cihazın kimlik numarası; telefonda IMEI, tablette seri numarası.","example":"356938035643809"},"type":{"type":["string","null"],"enum":["ILAC","TIBBICIHAZ","DIGER"]},"gtin":{"type":["string","null"]},"batchNumber":{"type":["string","null"]},"serialNumber":{"type":["string","null"]},"expirationDate":{"type":["string","null"],"format":"date"},"productionDate":{"type":["string","null"],"format":"date"},"itemClassificationCode":{"type":["string","null"]},"machineName":{"type":["string","null"]},"machineId":{"type":["string","null"]},"machineTraceId":{"type":["string","null"]},"buyerItemNo":{"type":["string","null"],"description":"Satın alma sipariş (SAS) kalem numarası. Alıcısı ASELSAN olan faturalarda zorunludur.","example":"20"},"domesticRatio":{"type":["number","null"],"description":"Kalemin yerlilik oranı; 0 ile 100 arasında yüzde değer. Alıcısı ASELSAN olan faturalarda zorunludur.","example":25}}},"RecurringJobDto":{"type":"object","properties":{"recurrenceType":{"type":["string","null"],"enum":["WEEKLY","MONTHLY"]},"recurrenceFreq":{"type":["integer","null"],"format":"int64"},"startDate":{"type":["string","null"]},"endDate":{"type":["string","null"]},"autoFormalize":{"type":["boolean","null"]},"status":{"type":["string","null"],"description":"Tekrarın durumu. Boş gelirse yeni tanım ACTIVE başlar, var olan tanımın durumu korunur.","enum":["ACTIVE","PAUSED"]},"isEmpty":{"type":"boolean"}},"required":["isEmpty"]},"RefundInfo":{"type":"object","properties":{"documentNo":{"type":["string","null"]},"date":{"type":["string","null"]},"sourceDocumentType":{"type":["string","null"],"description":"İade edilen ürüne ait belgenin türü. BELGESIZ seçildiğinde belge numarası gönderilmez; iadesi yapılan satışın tarihi ve iade edenin gerçek TCKN bilgisi zorunlu olur.","enum":["EARSIV_FATURA","SATIS_FISI","BELGESIZ"]}}},"AccountDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"type":{"type":["string","null"],"enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"title":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"taxAdmin":{"type":["string","null"]},"taxAdminCode":{"type":["string","null"]},"companyType":{"type":["string","null"]},"noNameCompany":{"type":["boolean","null"]},"isForeignCompany":{"type":["boolean","null"]},"currency":{"type":["string","null"]},"contacts":{"type":["array","null"],"items":{"type":"object","additionalProperties":{}}},"bank":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdById":{"type":["string","null"]},"cheque":{"type":["object","null"],"additionalProperties":{}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/AddressDto"},"uniqueItems":true},"archived":{"type":["boolean","null"]},"categoryId":{"type":["string","null"]},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"employeeProfile":{"oneOf":[{"$ref":"#/components/schemas/EmployeeProfileDto"},{"type":"null"}]},"foreignCompany":{"type":"boolean","writeOnly":true}},"required":["addresses"]},"CompanySummaryDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int64"},"title":{"type":["string","null"]},"vknTckn":{"type":["string","null"]},"taxOffice":{"type":["string","null"]},"companyType":{"type":["string","null"]}}},"DocumentDto":{"type":"object","properties":{"id":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/CompanySummaryDto"},{"type":"null"}]},"documentType":{"type":["string","null"],"enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"createdById":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"documentNo":{"type":["string","null"]},"date":{"type":["string","null"]},"time":{"type":["string","null"]},"dueDate":{"type":["string","null"]},"currency":{"type":["string","null"]},"exchangeRate":{"type":["number","null"]},"note":{"type":["string","null"]},"account":{"oneOf":[{"$ref":"#/components/schemas/AccountDto"},{"type":"null"}]},"total":{"type":["number","null"]},"discountRate":{"type":["number","null"]},"accRecStatus":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"accRecDate":{"type":["string","null"]},"accRecNo":{"type":["integer","null"],"format":"int32"},"accRecDesc":{"type":["string","null"]},"accRecType":{"type":["string","null"],"enum":["MAHSUP","ACILIS","KAPANIS"]},"referenceInboxId":{"type":["string","null"]},"totalDebt":{"type":["number","null"]},"totalCredit":{"type":["number","null"]},"docDetail":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedById":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"archived":{"type":"boolean"},"documentName":{"type":["string","null"]},"category":{"oneOf":[{"$ref":"#/components/schemas/CategoryDto"},{"type":"null"}]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLineDto"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentPaymentDto"}},"accRec":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordDto"}},"integratorStatus":{"type":["string","null"]},"integratorStatusDescription":{"type":["string","null"]},"integratorErrorDetail":{"type":["string","null"]},"recurringJobs":{"type":"array","items":{"$ref":"#/components/schemas/RecurringJobDto"}},"taxSummary":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TaxSummaryDto"}},"warehouseId":{"type":["string","null"]},"warehouseName":{"type":["string","null"]},"stockWarnings":{"type":"array","items":{"$ref":"#/components/schemas/StockWarningDto"}},"isLocked":{"type":"boolean"},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTaxDto"}}},"required":["accRec","accRecStatus","archived","isLocked","lines","payments","recurringJobs","stockWarnings","taxes"]},"StockWarningDto":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":["string","null"]},"warehouseId":{"type":"string"},"available":{"type":"number"},"requested":{"type":"number"}},"required":["available","productId","requested","warehouseId"]},"TaxSummaryDto":{"type":"object","properties":{"code":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"rate":{"type":["number","null"]},"base":{"type":["number","null"]},"amount":{"type":["number","null"]},"remainingAmount":{"type":["number","null"]},"reasonCode":{"type":["string","null"]},"reasonLabel":{"type":["string","null"]}}},"ShareDocumentRequest":{"type":"object","properties":{"to":{"type":"string","maxLength":2147483647,"minLength":1},"subject":{"type":"string","maxLength":2147483647,"minLength":1},"includeStatement":{"type":"boolean"},"paymentLink":{"type":"boolean"},"paymentAmount":{"type":["number","null"]}},"required":["includeStatement","paymentLink","subject","to"]},"ShareDocumentResponse":{"type":"object","properties":{"message":{"type":"string"},"accountId":{"type":["string","null"]},"documentNo":{"type":["string","null"]},"paymentUrl":{"type":["string","null"]}},"required":["message"]},"DocumentFormalizeRequest":{"type":"object","properties":{"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"documentType":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"alias":{"type":"string","description":"Alıcının GİB etiketi; gibUser/checkUser (irsaliyede checkDispatchUser) yanıtındaki alias. TEMELFATURA, TICARIFATURA, YATIRIMTESVIK ve ILAC_TIBBICIHAZ senaryolarında zorunludur, e-Arşivde boş gönderilir.","example":"urn:mail:defaultpk@firma.com.tr"},"deliveryNote":{"type":["boolean","null"]},"isOnlineSale":{"type":["boolean","null"]},"deliveryType":{"type":["string","null"]},"webAddress":{"type":["string","null"]},"paymentAgentName":{"type":["string","null"]},"paidType":{"type":["string","null"]},"payDate":{"type":["string","null"]},"sendDate":{"type":["string","null"]},"carrierName":{"type":["string","null"]},"carrierIdentifier":{"type":["string","null"],"maxLength":11,"minLength":0},"isExportRegistered":{"type":["boolean","null"]},"isVatExemption":{"type":["boolean","null"]},"exemptionCategory":{"type":["string","null"]},"vatExemptionCode":{"type":["string","null"]},"vatExemptionLabel":{"type":["string","null"]},"bankAccounts":{"type":"array","items":{"type":"string"}},"bankAccountIds":{"type":"array","items":{"type":"string"}},"showAccountBalance":{"type":"boolean"},"buyerCustomerId":{"type":["string","null"],"maxLength":10,"minLength":0},"shippingMethod":{"type":["string","null"],"description":"Sevkiyat yöntemi. İrsaliye senaryolarında zorunludur ve küçük harfle gönderilir. carrier seçildiğinde vehiclePlate ya da trailerPlate ile drivers, logistics seçildiğinde companyName ve taxNumber zorunlu olur.","enum":["carrier","logistics"]},"drivers":{"type":"array","description":"Araçtaki şoförler. shippingMethod carrier olduğunda en az bir kayıt zorunludur.","items":{"$ref":"#/components/schemas/DriverDto"}},"companyName":{"type":["string","null"],"description":"Taşıyıcı firmanın ünvanı. shippingMethod logistics olduğunda zorunludur."},"taxNumber":{"type":["string","null"],"description":"Taşıyıcı firmanın 10 haneli VKN'si. shippingMethod logistics olduğunda zorunludur.","example":"9860008925"},"vehiclePlate":{"type":["string","null"],"description":"Sevkiyatı yapan aracın plakası.","example":"34ABC123"},"trailerPlate":{"type":["string","null"],"description":"Dorsenin plakası. Yalnızca dorse ile yapılan sevkiyatta tek başına yeterlidir."},"isForeignVehicle":{"type":["boolean","null"]},"invoicingStartDate":{"type":["string","null"],"format":"date"},"invoicingEndDate":{"type":["string","null"],"format":"date"},"additionalInvoiceType":{"type":["string","null"],"enum":["SAGLIK_ECZ","SAGLIK_HAS","SAGLIK_OPT","SAGLIK_MED","ABONELIK","MAL_HIZMET","DIGER"]},"taxPayerCode":{"type":["string","null"]},"additionalDocumentNo":{"type":["string","null"]},"expenseNoteVerificationPhone":{"type":["string","null"],"description":"e-Gider Pusulası doğrulama kodunun gönderildiği telefon. Yalnız EGIDERPUSULASI senaryosunda kullanılır; boş bırakılırsa belgedeki telefon, o da yoksa karşı tarafın cari kartındaki telefon kullanılır.","example":"5551112233"}},"required":["alias","bankAccountIds","bankAccounts","documentType","drivers","scenario","showAccountBalance"]},"DriverDto":{"type":"object","properties":{"name":{"type":["string","null"]},"tckn":{"type":["string","null"]},"isForeign":{"type":["boolean","null"]},"passportNo":{"type":["string","null"]}}},"DocumentCancelRequest":{"type":"object","properties":{"message":{"type":["string","null"]}}},"BankStatement":{"type":"object","properties":{"amount":{"type":"number"},"balance":{"type":"number"},"currency":{"type":"string","maxLength":3,"minLength":1},"date":{"type":"string","minLength":1},"description":{"type":"string","maxLength":255,"minLength":1},"documentNo":{"type":["string","null"]},"exchangeRate":{"type":"number"}},"required":["amount","balance","currency","date","description","exchangeRate"]},"DocumentBankSaveRequest":{"type":"object","properties":{"bankStatement":{"type":"array","items":{"$ref":"#/components/schemas/BankStatement"},"maxItems":2147483647,"minItems":1}},"required":["bankStatement"]},"ZReportDocumentRequest":{"type":"object","properties":{"documentNo":{"type":"string","maxLength":255,"minLength":0},"date":{"type":"string","format":"date"},"referenceInboxId":{"type":["string","null"]},"payments":{"type":"array","items":{"$ref":"#/components/schemas/ZReportPayment"},"maxItems":2147483647,"minItems":1},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ZReportLine"},"maxItems":2147483647,"minItems":1}},"required":["date","documentNo","lines","payments"]},"ZReportLine":{"type":"object","properties":{"productId":{"type":"string"},"quantity":{"type":"number","minimum":0.01},"base20":{"type":["number","null"]},"base10":{"type":["number","null"]},"base1":{"type":["number","null"]},"base0":{"type":["number","null"]}},"required":["productId","quantity"]},"ZReportPayment":{"type":"object","properties":{"amount":{"type":"number"},"accountId":{"type":"string"}},"required":["accountId","amount"]},"DocumentUploadResponse":{"type":"object","properties":{"uploadedDocuments":{"type":"array","description":"Yüklenen belgelerin kimlikleri ve dosya adları","items":{"$ref":"#/components/schemas/UploadedDocumentDto"}},"skippedFiles":{"type":"array","description":"Arşiv içinden çıkan ancak desteklenmeyen türde olduğu için yüklenmeyen dosyaların adları","example":["notlar.txt"],"items":{"type":"string"}},"duplicateFiles":{"type":"array","description":"Aynı ETTN ile daha önce yüklendiği için reddedilen dosyaların adları","example":["fatura-kopya.xml"],"items":{"type":"string"}}},"required":["duplicateFiles","skippedFiles","uploadedDocuments"]},"UploadedDocumentDto":{"type":"object","properties":{"id":{"type":["string","null"]},"fileName":{"type":["string","null"]}}},"FileArchiveRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"maxItems":2147483647,"minItems":1}},"required":["ids"]},"DocumentArchiveRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"maxItems":100,"minItems":1}},"required":["documentIds"]},"AccountChipDto":{"type":"object","properties":{"accountId":{"type":"string"},"accountTitle":{"type":["string","null"]},"accountType":{"type":"string"},"source":{"type":"string"},"certainty":{"type":"string"},"note":{"type":"string"}},"required":["accountId","accountType","certainty","note","source"]},"AlternativeDto":{"type":"object","properties":{"type":{"type":"string"},"accountId":{"type":["string","null"]},"source":{"type":"string"},"note":{"type":"string"}},"required":["note","source","type"]},"BankDocumentPredictionResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":["string","null"]},"productId":{"type":["string","null"]},"productName":{"type":["string","null"]},"detail":{"type":["string","null"]},"accountId":{"type":["string","null"]},"accountTitle":{"type":["string","null"]},"accountType":{"type":["string","null"]},"newAccount":{"oneOf":[{"$ref":"#/components/schemas/AccountDto"},{"type":"null"}]},"newProduct":{"oneOf":[{"$ref":"#/components/schemas/DocumentLine"},{"type":"null"}]},"counterAcc":{"oneOf":[{"$ref":"#/components/schemas/AccountingRecordDto"},{"type":"null"}]},"rate":{"type":"integer","format":"int32"},"setBy":{"type":["string","null"],"enum":["etiketler","TcVkn","ruleKey","product","newProduct","newAccount","simularAccount","simularAccountFromDetail","pattern","patternKey","tagMemory","model","invoiceNo"]},"bankAcc":{"oneOf":[{"$ref":"#/components/schemas/AccountingRecordDto"},{"type":"null"}]},"tag":{"type":["string","null"]},"tagName":{"type":["string","null"]},"tagConfidence":{"type":["string","null"]},"typeChips":{"type":"array","items":{"$ref":"#/components/schemas/TypeChip"}},"accountChips":{"type":"array","items":{"$ref":"#/components/schemas/AccountChipDto"}},"alternative":{"oneOf":[{"$ref":"#/components/schemas/AlternativeDto"},{"type":"null"}]},"transferMatch":{"oneOf":[{"$ref":"#/components/schemas/TransferMatchDto"},{"type":"null"}]},"shortTextMode":{"type":"boolean"},"reason":{"type":["string","null"]}},"required":["accountChips","id","rate","shortTextMode","typeChips"]},"DocumentLine":{"type":"object","properties":{"importName":{"type":["string","null"]},"importUnit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"importId":{"type":["string","null"]},"id":{"type":["string","null"]},"mapId":{"type":["string","null"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"description":{"type":["string","null"]},"quantity":{"type":["number","null"]},"unitPrice":{"type":["number","null"]},"base":{"type":["number","null"]},"discountRate":{"type":["number","null"]},"netBase":{"type":["number","null"]},"gtipNo":{"type":["string","null"]},"shipmentType":{"type":["string","null"]},"transportMode":{"type":["string","null"]},"date":{"type":["string","null"],"format":"date-time"},"tax":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Tax"}},"productId":{"type":["string","null"]},"name":{"type":["string","null"]},"code":{"type":["string","null"]},"type":{"type":["string","null"]},"detail":{"type":["object","null"],"additionalProperties":{}}}},"Tax":{"type":"object","properties":{"base":{"type":["number","null"]},"code":{"type":["string","null"]},"rate":{"type":["number","null"]},"label":{"type":["string","null"]},"taxId":{"type":["string","null"]},"amount":{"type":["number","null"]},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"reasonId":{"type":["string","null"]},"reasonCode":{"type":["string","null"]},"description":{"type":["string","null"]},"reasonLabel":{"type":["string","null"]},"reasonValue":{"type":["string","null"]},"reasonTaxCode":{"type":["string","null"]},"remainingAmount":{"type":["number","null"]}}},"TransferMatchDto":{"type":"object","properties":{"counterDocumentId":{"type":["string","null"]},"layer":{"type":"string"},"certainty":{"type":"string"}},"required":["certainty","layer"]},"TypeChip":{"type":"object","properties":{"type":{"type":"string"},"p":{"type":"number","format":"double"}},"required":["p","type"]},"NextDocumentNoRequest":{"type":"object","properties":{"documentType":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$"},"accountId":{"type":["string","null"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}},"required":["date","documentType","time"]},"NextDocumentNoResponse":{"type":"object","properties":{"documentNo":{"type":["string","null"]},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"seriType":{"type":["string","null"]}},"required":["scenario"]},"LeaseDocDetail":{"type":"object","properties":{"leaseAddress":{"type":["string","null"]}}},"LeaseDocumentRequest":{"type":"object","properties":{"documentName":{"type":["string","null"]},"documentNo":{"type":["string","null"]},"date":{"type":"string"},"docDetail":{"$ref":"#/components/schemas/LeaseDocDetail"},"accountId":{"type":"string"},"netAmount":{"type":"number"},"withholdingRate":{"type":"number"},"recurringJob":{"$ref":"#/components/schemas/RecurringJobDto"}},"required":["accountId","date","docDetail","netAmount","withholdingRate"]},"DocumentDetailedReportJsonResponse":{"type":"object","description":"Detailed document report rows in JSON form, identical in scope and order to the Excel export","properties":{"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"count":{"type":"integer","format":"int32"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/DocumentDetailedReportRowResponse"}}},"required":["count","direction","rows"]},"DocumentDetailedReportRowResponse":{"type":"object","description":"A single detailed report row; field names match the Excel column keys","properties":{"id":{"type":"string"},"date":{"type":"string","example":"2026-01-05"},"time":{"type":["string","null"],"example":"14:32:10"},"documentNo":{"type":["string","null"]},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"documentType":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"accountTitle":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"currency":{"type":["string","null"]},"exchangeRate":{"type":"number"},"total":{"type":["number","null"],"description":"Document total in the document currency"},"categoryName":{"type":["string","null"]},"tagNames":{"type":["string","null"],"description":"Tag names joined with a comma","example":"ocak, kampanya"},"vat1":{"type":"number"},"vat10":{"type":"number"},"vat20":{"type":"number"},"vatWithholding":{"type":"number"},"withholding":{"type":"number"},"accommodation":{"type":"number"},"otv":{"type":"number"},"oiv":{"type":"number"},"netTotal":{"type":["number","null"],"description":"Total excluding VAT"}},"required":["accommodation","date","documentType","exchangeRate","id","oiv","otv","scenario","vat1","vat10","vat20","vatWithholding","withholding"]},"DocumentPdfExportResponse":{"type":"object","properties":{"url":{"type":["string","null"]}}},"ExportByIdsRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"maxItems":2147483647,"minItems":1},"format":{"type":"string","enum":["PDF","EXCEL","CSV","XML","HTML","JSON"]},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]}},"required":["direction","documentIds","format"]},"ExpenseNoteCreateRequest":{"type":"object","properties":{"documentNo":{"type":["string","null"],"description":"Gider pusulasının kendi belge numarası (kaynak faturanın numarası değil)","example":"GP2026000001","minLength":1},"date":{"type":["string","null"],"description":"Gider pusulasının kendi düzenleme tarihi (kaynak faturanın tarihi değil)","example":"2026-08-15","minLength":1},"payment":{"oneOf":[{"$ref":"#/components/schemas/ExpenseNotePaymentDto"},{"type":"null"}]}},"required":["date","documentNo"]},"ExpenseNotePaymentDto":{"type":"object","properties":{"accountId":{"type":["string","null"],"description":"Ödemenin işleneceği kasa/banka cari hesabının ID si","example":"3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c","minLength":1}},"required":["accountId"]},"ExpenseNoteBulkCreateItem":{"type":"object","properties":{"documentId":{"type":["string","null"],"description":"Gider pusulasının oluşturulacağı kaynak faturanın ID si","example":"0b7f1f1e-1c2a-4f1e-9f3a-7c1d2e3f4a5b","minLength":1},"documentNo":{"type":["string","null"],"description":"Gider pusulasının kendi belge numarası (kaynak faturanın numarası değil)","example":"GP2026000001","minLength":1},"date":{"type":["string","null"],"description":"Gider pusulasının kendi düzenleme tarihi (kaynak faturanın tarihi değil)","example":"2026-08-15","minLength":1}},"required":["date","documentId","documentNo"]},"ExpenseNoteBulkCreateRequest":{"type":"object","properties":{"items":{"type":"array","description":"Oluşturulacak gider pusulaları; her kayıt kaynak belge ve gider pusulasının kendi belge no/tarihini taşır","items":{"$ref":"#/components/schemas/ExpenseNoteBulkCreateItem"},"minItems":1},"payment":{"oneOf":[{"$ref":"#/components/schemas/ExpenseNotePaymentDto"},{"type":"null"}]}},"required":["items"]},"ExpenseNoteBulkCreateResponse":{"type":"object","description":"Toplu gider pusulası oluşturma sonucu","properties":{"createdDocuments":{"type":"array","description":"Her kaynak belge için tek tek sonuç; sıralama istekteki sırayı korur","items":{"$ref":"#/components/schemas/ExpenseNoteBulkCreateResult"}},"failedCount":{"type":"integer","format":"int32","description":"Hata alan kayıt sayısı"},"successCount":{"type":"integer","format":"int32","description":"Başarıyla oluşturulan gider pusulası sayısı"},"skippedCount":{"type":"integer","format":"int32","description":"Daha önce oluşturulduğu için atlanan kayıt sayısı"}},"required":["createdDocuments","failedCount","skippedCount","successCount"]},"ExpenseNoteBulkCreateResult":{"type":"object","description":"Tek bir kaynak belge için toplu oluşturma sonucu","properties":{"documentId":{"type":"string","description":"Kaynak faturanın ID si"},"createdDocumentId":{"type":["string","null"],"description":"Oluşturulan gider pusulasının ID si; hata durumunda null"},"status":{"type":"string","description":"Kaydın sonucu","enum":["SUCCESS","ALREADY_EXISTS","FAILED"]},"message":{"type":["string","null"],"description":"Hata veya atlama nedeni; başarılı kayıtlarda null"}},"required":["documentId","status"]},"BulkDocumentCreateRequest":{"type":"object","properties":{"documentType":{"type":"string","enum":["EFATURA","ESMM"]},"rows":{"type":"array","items":{"$ref":"#/components/schemas/BulkDocumentRow"},"minItems":1}},"required":["documentType","rows"]},"BulkDocumentOnlineSale":{"type":"object","properties":{"webAddress":{"type":["string","null"],"description":"Satışın yapıldığı web adresi.","example":"www.trendyol.com"},"paidType":{"type":["string","null"],"description":"Ödeme şekli.","enum":["KREDIKARTI/BANKAKARTI","EFT/HAVALE","KAPIDAODEME","ODEMEARACISI"],"example":"KREDIKARTI/BANKAKARTI"},"paymentAgentName":{"type":["string","null"],"description":"Ödemeye aracılık eden kuruluşun adı.","example":"Pay Tr"},"payDate":{"type":["string","null"],"description":"Ödeme tarihi (yyyy-MM-dd).","example":"2026-10-22","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"deliveryType":{"type":["string","null"],"description":"Teslim şekli.","example":"cargo"},"sendDate":{"type":["string","null"],"description":"Gönderim tarihi (yyyy-MM-dd).","example":"2026-10-19","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"carrierName":{"type":["string","null"],"description":"Kargo taşıyıcının ünvanı ya da ad soyadı.","example":"Yurtiçi Kargo Servisi A.Ş."},"carrierIdentifier":{"type":["string","null"],"description":"Kargo taşıyıcının VKN ya da TCKN'si.","example":"9860008925","maxLength":11,"minLength":0}}},"BulkDocumentPayment":{"type":"object","properties":{"type":{"type":["string","null"],"description":"Tahsilatın yapıldığı hesabın türü.","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"],"example":"POS"},"accountId":{"type":["string","null"],"description":"Tahsilatın işlendiği kasa/banka/POS hesabının id'si.","minLength":1},"amount":{"type":["number","null"],"description":"Tahsil edilen tutar. Boş bırakılırsa satır toplamının tamamı tahsil edilmiş sayılır.","example":1200.0,"minimum":0}},"required":["accountId","type"]},"BulkDocumentRow":{"type":"object","properties":{"accountId":{"type":["string","null"]},"importAccount":{"oneOf":[{"$ref":"#/components/schemas/ImportAccountRequest"},{"type":"null"}]},"description":{"type":"string","minLength":1},"unit":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"vatRate":{"type":"number"},"productId":{"type":["string","null"]},"date":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0},"tax":{"type":"array","items":{"$ref":"#/components/schemas/BulkDocumentTax"}},"dueDays":{"type":"integer","format":"int32"},"payment":{"oneOf":[{"$ref":"#/components/schemas/BulkDocumentPayment"},{"type":"null"}]},"onlineSale":{"oneOf":[{"$ref":"#/components/schemas/BulkDocumentOnlineSale"},{"type":"null"}]}},"required":["currency","date","description","dueDays","exchangeRate","quantity","tax","total","unit","vatRate"]},"BulkDocumentTax":{"type":"object","properties":{"base":{"type":"number"},"rate":{"type":"number"},"amount":{"type":"number"},"remainingAmount":{"type":"number"},"taxId":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"label":{"type":["string","null"]},"code":{"type":["string","null"]},"description":{"type":["string","null"]},"reasonCode":{"type":["string","null"]},"reasonLabel":{"type":["string","null"]},"reasonTaxCode":{"type":["string","null"]},"reasonValue":{"type":["string","null"]},"reasonId":{"type":["string","null"]}},"required":["amount","base","rate","remainingAmount"]},"ImportAccountAddress":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string","minLength":1},"city":{"type":"string","minLength":1},"district":{"type":["string","null"]},"country":{"type":"string","minLength":1},"email":{"type":["string","null"],"format":"email"},"phoneNumber":{"type":["string","null"],"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"}},"required":["address","city","country","name"]},"ImportAccountRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1},"tcVkn":{"type":"string","maxLength":11,"minLength":10,"pattern":"^\\d+$"},"taxAdmin":{"type":"string","minLength":1},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/ImportAccountAddress"},"minItems":1}},"required":["addresses","taxAdmin","tcVkn","title"]},"BulkDocumentCreateResponse":{"type":"object","properties":{"createdDocuments":{"type":"array","items":{"type":"string"}},"paymentsCreated":{"type":"integer","format":"int32"}},"required":["createdDocuments","paymentsCreated"]},"BasicDocumentLine":{"type":"object","properties":{"productId":{"type":"string"},"unitPrice":{"type":"number","minimum":0},"quantity":{"type":"number","minimum":0},"vatRate":{"type":["number","null"],"maximum":1,"minimum":0},"discountRate":{"type":["number","null"],"maximum":1,"minimum":0}},"required":["discountRate","productId","quantity","unitPrice","vatRate"]},"BasicDocumentRequest":{"type":"object","properties":{"date":{"type":"string","minLength":1,"pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"accountId":{"type":"string"},"currency":{"type":"string"},"exchangeRate":{"type":["number","null"],"minimum":0.0},"discountRate":{"type":["number","null"],"maximum":1,"minimum":0},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$"},"note":{"type":["string","null"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/BasicDocumentLine"},"minItems":1},"warehouseId":{"type":["string","null"],"description":"Stoklu satırların hareket edeceği depo. Firmada birden çok aktif depo varsa stoklu belgede zorunludur.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}},"required":["accountId","currency","date","discountRate","exchangeRate","lines","time"]},"AttachPreAccRequest":{"type":"object","properties":{"accountId":{"type":["string","null"],"description":"Harekete bağlanacak cari/kasa hesabı; productId ile birlikte verilemez"},"productId":{"type":["string","null"],"description":"Harekete bağlanacak ürün/hizmet; accountId ile birlikte verilemez"}}},"BankSameDocDto":{"type":"object","properties":{"description":{"type":["string","null"]},"date":{"type":"string"},"amount":{"type":"number"}},"required":["amount","date"]},"DocumentBankSearchResponse":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"documentNo":{"type":"string"},"bankId":{"type":"string"},"bankName":{"type":"string"},"date":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"amount":{"type":"number"},"balance":{"type":"number"},"counterAccountVKN":{"type":["string","null"]},"counterAccountIBAN":{"type":["string","null"]},"bankRule":{"type":["string","null"]},"sameDocs":{"type":"array","items":{"$ref":"#/components/schemas/BankSameDocDto"}},"predictionResponse":{"oneOf":[{"$ref":"#/components/schemas/BankDocumentPredictionResponse"},{"type":"null"}]}},"required":["amount","balance","bankId","bankName","currency","date","description","direction","documentNo","exchangeRate","id","sameDocs"]},"DocumentBankSearchRequest":{"type":"object","properties":{"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"minAmount":{"type":["number","null"]},"maxAmount":{"type":["number","null"]},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"bankAccountId":{"type":["string","null"]},"currency":{"type":["string","null"]},"searchQuery":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"type":["string","null"],"pattern":"^(amount|description|date|tag)(,(asc|desc))?$"}},"required":["page","size","tags"]},"PageResponseDocumentBankSearchResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBankSearchResponse"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"BankDocumentPartRequest":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"Parçanın tutarı; sıfırdan büyük ve parçaların toplamı hareket tutarına eşit olmalı","example":3000.0},"productId":{"type":["string","null"],"description":"Parçanın ürün/hizmeti; accountId ile birlikte verilemez"},"accountId":{"type":["string","null"],"description":"Parçanın cari/kasa hesabı; productId ile birlikte verilemez"},"counterAccPlanId":{"type":["string","null"],"description":"Parçanın muhasebe fiş kodu; muhasebeleştir modunda dolu gelir"},"description":{"type":["string","null"],"description":"Ürünlü parçanın belge satırı açıklaması; boşsa ürün adı kullanılır. Hesaplı (carili) parçada kullanılmaz.","example":"İşletim ücreti"}}},"DocumentBankWithAccountingRecordRequest":{"type":"object","properties":{"id":{"type":"string","description":"Kaydedilecek banka hareketinin belge kimliği.","minLength":1},"date":{"type":["string","null"],"format":"date"},"description":{"type":["string","null"]},"currency":{"type":["string","null"]},"exchangeRate":{"type":["number","null"]},"amount":{"type":["number","null"],"description":"Hareketin tutarı. Hareket tutarıyla aynı olmalıdır; parçalı kayıtta parçaların toplamı bu tutara eşit olmalıdır.","example":3000.0},"productId":{"type":["string","null"],"description":"Hareketin ürün/hizmeti. accountId ile birlikte verilemez; ikisinden tam biri zorunludur."},"accountId":{"type":["string","null"],"description":"Hareketin cari/kasa hesabı. productId ile birlikte verilemez; ikisinden tam biri zorunludur. parts gönderildiğinde bu alan boş bırakılmalıdır."},"bankAccPlanId":{"type":["string","null"]},"counterAccPlanId":{"type":["string","null"]},"bankTag":{"type":["string","null"]},"parts":{"type":"array","description":"Hareketin bölüşüldüğü karşı taraflar. Verildiğinde accountId gönderilemez; parçaların tutarları toplamı hareket tutarına eşit olmalıdır.","items":{"$ref":"#/components/schemas/BankDocumentPartRequest"}}},"required":["amount","id","parts"]},"BankSaveByTagRequest":{"type":"object","properties":{"tag":{"type":"string","description":"Kaydedilecek hareketlerin etiketi","example":"POS_TAHSILATI","minLength":1},"bankAccountId":{"type":["string","null"],"description":"Yalnız bu banka kartının hareketleri; boşsa tüm kartlar"},"searchQuery":{"type":["string","null"],"description":"Liste aramasıyla aynı serbest metin süzgeci","example":"POS"},"excludeIds":{"type":"array","description":"Kapsamda olup kaydedilmeyecek hareketler","items":{"type":"string"},"uniqueItems":true},"expectedTotal":{"type":"integer","format":"int64","description":"Kullanıcının onayladığı hareket sayısı; güncel sayı farklıysa hiçbir şey kaydedilmez","example":1180,"minimum":0},"assignments":{"$ref":"#/components/schemas/BankTagAssignments","description":"Yön başına atama; boş bırakılan yönün hareketleri kaydedilmez"},"bankAccPlanIds":{"type":"object","additionalProperties":{"type":"string"},"description":"Banka kartı başına banka muhasebe kodu (102); verilmeyen kartta geçmişten belirlenir"}},"required":["assignments","bankAccPlanIds","excludeIds","expectedTotal","tag"]},"BankTagAssignment":{"type":"object","properties":{"accountId":{"type":["string","null"],"description":"Cari hesap; ürün ile birlikte gönderilemez"},"productId":{"type":["string","null"],"description":"Ürün; cari hesap ile birlikte gönderilemez"},"counterAccPlanId":{"type":["string","null"],"description":"Karşı muhasebe kodu"}}},"BankTagAssignments":{"type":"object","properties":{"INCOMING":{"$ref":"#/components/schemas/BankTagAssignment","description":"Gelen hareketlere atanacak hesap/ürün ve karşı muhasebe kodu"},"OUTGOING":{"$ref":"#/components/schemas/BankTagAssignment","description":"Giden hareketlere atanacak hesap/ürün ve karşı muhasebe kodu"}}},"BankSaveByTagFailure":{"type":"object","properties":{"id":{"type":"string","description":"Kaydedilemeyen hareketin belge kimliği"},"message":{"type":"string","description":"Hareketin neden kaydedilemediği"}},"required":["id","message"]},"BankSaveByTagResponse":{"type":"object","properties":{"jobId":{"type":["string","null"],"description":"Arka planda süren işin kimliği; iş aynı istekte bittiyse boş"},"status":{"type":"string","description":"İşin durumu; QUEUED ve RUNNING iken durum ucundan yoklanır","enum":["QUEUED","RUNNING","DONE","FAILED"]},"matched":{"type":"integer","format":"int32","description":"Kapsamdaki hareket sayısı"},"saved":{"type":"integer","format":"int32","description":"Fişi oluşan hareket sayısı"},"failed":{"type":"array","description":"Kaydedilemeyen hareketler ve hata mesajları","items":{"$ref":"#/components/schemas/BankSaveByTagFailure"}},"skipped":{"type":"array","description":"Kaydedilmeden taslakta bırakılan hareketler","items":{"$ref":"#/components/schemas/BankSaveByTagSkipped"}},"remaining":{"type":"integer","format":"int32","description":"Süre sınırına takıldığı için bu istekte işlenmeyen hareket sayısı"},"error":{"type":["string","null"],"description":"İşi kesen hata; yalnız FAILED durumunda dolu"}},"required":["failed","matched","remaining","saved","skipped","status"]},"BankSaveByTagSkipped":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string","enum":["NO_ASSIGNMENT_FOR_DIRECTION","EXCLUDED","ALREADY_SAVED"]}},"required":["id","reason"]},"DraftBankAccountResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"CreateCompanyRequest":{"type":"object","properties":{"companyType":{"type":["string","null"],"enum":["ANONIM","LIMITED","PRIVATE_COMPANY","OTHER"]},"title":{"type":["string","null"],"pattern":"^(?!\\s*$)(?!\\d+$).{5,}$"},"vknTckn":{"type":["string","null"],"pattern":"^(\\d{10}|[1-9]\\d{10})$"},"taxOffice":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"address":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"city":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"district":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"country":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"countryCode":{"type":["string","null"]},"phoneNumber":{"type":["string","null"],"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"},"workPhone":{"type":["string","null"],"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"},"email":{"type":["string","null"],"format":"email"},"webAddress":{"type":["string","null"],"pattern":"^(?:(?:https?://)?[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\.[A-Za-z]{2,}(?::\\d{1,5})?(?:[/?#][A-Za-z0-9\\-._~%!$&()*+,;=:@/?#]*)?|)$"},"isSmmm":{"type":"boolean"},"selectedSmmm":{"type":["integer","null"],"format":"int64"},"username":{"type":["string","null"]},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"tracking":{"oneOf":[{"$ref":"#/components/schemas/JsonNode"},{"type":"null"}]},"smmm":{"type":"boolean","writeOnly":true}},"required":["address","city","country","district","isSmmm","taxOffice","vknTckn"]},"JsonNode":{},"DbsTransferableDocumentSearchRequest":{"type":"object","properties":{"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"documentType":{"type":["string","null"],"enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"searchQuery":{"type":["string","null"]},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"}},"required":["page","size"]},"DbsSuggestion":{"type":"object","properties":{"recordType":{"type":"string"},"recordSubType":{"type":"string"},"activityCode":{"type":"string"},"categoryId":{"type":"string"},"otherTxCode":{"type":["string","null"]},"fixedAssetCode":{"type":["string","null"]},"ledgerType":{"type":"string"}},"required":["activityCode","categoryId","ledgerType","recordSubType","recordType"]},"DbsTransferableDocumentSearchResponse":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"exchangeRate":{"type":"number"},"total":{"type":"number"},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"documentType":{"type":["string","null"],"enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"documentNo":{"type":"string"},"referenceInboxId":{"type":["string","null"]},"account":{"oneOf":[{"$ref":"#/components/schemas/AccountDto"},{"type":"null"}]},"docDetail":{"type":["object","null"],"additionalProperties":{}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLineDto"}},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTaxDto"}},"suggestions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DbsSuggestion"}}},"required":["date","direction","documentNo","exchangeRate","id","lines","suggestions","taxes","total"]},"PageResponseDbsTransferableDocumentSearchResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DbsTransferableDocumentSearchResponse"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"DbsDocumentDto":{"type":"object","properties":{"documentId":{"type":"string"},"date":{"type":"string","format":"date"},"activityCode":{"type":"string"},"ledgerType":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DbsDocumentLineDto"},"maxItems":2147483647,"minItems":1}},"required":["activityCode","date","documentId","ledgerType","lines"]},"DbsDocumentLineDto":{"type":"object","properties":{"docLineId":{"type":"string"},"categoryId":{"type":"string"},"recordTypeId":{"type":"string"},"recordSubTypeId":{"type":"string"},"otherTxCode":{"type":["string","null"]},"fixedAssetCode":{"type":["string","null"]},"plakaNo":{"type":["string","null"]},"finansalKiralama":{"type":["boolean","null"]}},"required":["categoryId","docLineId","recordSubTypeId","recordTypeId"]},"SalesSubtypeCreateRequest":{"type":"object","properties":{"type":{"type":"string","enum":["COMMERCIAL_GOODS","GVK18","SERVICE"]},"ledgerType":{"type":"string"},"typeName":{"type":"string"},"incomeRegistrationTypeCode":{"type":["string","null"]},"expenseRegistrationTypeCode":{"type":["string","null"]}},"required":["ledgerType","type","typeName"]},"SalesSubtype":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"type":{"type":["string","null"],"enum":["COMMERCIAL_GOODS","GVK18","SERVICE"]},"name":{"type":["string","null"]},"taxpayerId":{"type":["string","null"]},"branchNo":{"type":["integer","null"],"format":"int32"},"code":{"type":["string","null"]},"expenseRegistrationTypeCode":{"type":["string","null"]},"incomeRegistrationTypeCode":{"type":["string","null"]},"deleted":{"type":"boolean"},"ledgerType":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","deleted","updatedAt"]},"DbsDocumentSearchRequest":{"type":"object","properties":{"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"documentType":{"type":["string","null"],"enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"status":{"type":["array","null"],"items":{"type":"string","enum":["PENDING","COMPLETED","FAILED"]}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"}},"required":["page","size"]},"DbsDocumentSearchResponse":{"type":"object","properties":{"ettn":{"type":["string","null"]},"documentNo":{"type":["string","null"]},"documentType":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"docDetail":{"type":["object","null"],"additionalProperties":{}},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"accountId":{"type":["string","null"]},"total":{"type":["number","null"]},"title":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["PENDING","COMPLETED","FAILED"]},"currency":{"type":"string"},"date":{"type":"string"}},"required":["currency","date","direction","documentType","scenario"]},"PageResponseDbsDocumentSearchResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DbsDocumentSearchResponse"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"DataPurgeStartRequest":{"type":"object","properties":{"scopes":{"type":"array","description":"Silinecek veri grupları. Bağımlı gruplar birlikte gönderilmeli.","example":["ACC_RECORDS","ACC_PLAN"],"items":{"type":"string","enum":["ACC_PLAN","ACC_RECORDS","DOCUMENTS","INBOX","PRODUCTS","ACCOUNTS"]},"uniqueItems":true},"confirmVknTckn":{"type":["string","null"],"description":"Firmanın VKN/TCKN'si. Yanlış firmada silmeye karşı sunucuda ikinci kez doğrulanır.","example":"1234567890"}},"required":["scopes"]},"DataPurgeStartedDto":{"type":"object","description":"Kuyruğa alınan silme işi","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED"]},"scopes":{"type":"array","items":{"type":"string","enum":["ACC_PLAN","ACC_RECORDS","DOCUMENTS","INBOX","PRODUCTS","ACCOUNTS"]}}},"required":["id","scopes","status"]},"CompanyClientDataWriteRequest":{"type":"object","properties":{"key":{"type":"string","description":"Kayıt anahtarı","example":"guide:flow:v1","maxLength":512,"minLength":0},"value":{"description":"Saklanacak JSON değer","example":{"path":"bilanco"}},"ttlSeconds":{"type":["integer","null"],"format":"int64","description":"Saniye cinsinden geçerlilik süresi; boşsa süresiz","example":86400}},"required":["key","value"]},"ChequeCustodyRequest":{"type":"object","properties":{"custody":{"type":["string","null"],"description":"Çekin taşınacağı durum: portföy, bankada tahsilde veya bankada teminatta","enum":["PORTFOLIO","BANK_COLLECTION","BANK_COLLATERAL"],"x-enumNames":"[\"Portföyde\",\"Bankada Tahsilde\",\"Bankada Teminatta\"]"},"bankAccountId":{"type":["string","null"],"description":"Çekin verildiği kendi BANKA hesabımızın id'si; PORTFOLIO dışındaki durumlarda zorunludur","example":"6f1c2a9e-7b2d-4f8a-9c31-0a2b3c4d5e6f"},"date":{"type":["string","null"],"format":"date","description":"Geçiş tarihi (ISO-8601); boş bırakılırsa bugünün tarihi yazılır","example":"2026-09-12"},"note":{"type":["string","null"],"description":"Geçiş notu, örneğin çek bordro numarası","example":"Çek bordrosu 2026/17","maxLength":500,"minLength":0}},"required":["custody"]},"ChequeCollectRequest":{"type":"object","properties":{"targetAccountId":{"type":["string","null"],"description":"Tahsilatın işleneceği BANKA veya KASA hesabının id'si; boşsa çekin bulunduğu banka kullanılır","example":"6f1c2a9e-7b2d-4f8a-9c31-0a2b3c4d5e6f"},"amount":{"type":["number","null"],"description":"Tahsil edilen tutar; boş bırakılırsa çekin kalan bakiyesinin tamamı tahsil edilir","example":12500.0},"date":{"type":["string","null"],"format":"date","description":"Tahsilat tarihi (ISO-8601); boş bırakılırsa bugünün tarihi kullanılır","example":"2026-09-22"},"description":{"type":["string","null"],"description":"Muhasebe fişine yazılacak açıklama","example":"Çek tahsilatı - 123456","maxLength":255,"minLength":0}}},"ChequeCollectResponse":{"type":"object","properties":{"documentId":{"type":["string","null"]},"account":{"$ref":"#/components/schemas/AccountDto"}},"required":["account"]},"PosCommissionContextRequest":{"type":"object","properties":{"sourceDocumentIds":{"type":"array","description":"Bağlamı sorulan banka dekontlarının belge kimlikleri.","items":{"type":"string"},"maxItems":500,"minItems":0}},"required":["sourceDocumentIds"]},"PosCommissionAccountDto":{"type":"object","properties":{"accPlanId":{"type":"string"},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]}},"required":["accPlanId"]},"PosCommissionContextResponse":{"type":"object","properties":{"sourceDocumentId":{"type":"string","description":"Bağlamın ait olduğu banka dekontunun belge kimliği."},"commission":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionVoucherDto"},{"type":"null"}]},"counterCreditAccount":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionAccountDto"},{"type":"null"}]},"counterCreditAmbiguous":{"type":"boolean","description":"Satırda birden çok 108.x yaprak karşı hesap bulunduğu için hesap seçilemiyorsa true."},"lastDecision":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionLastDecisionDto"},{"type":"null"}]}},"required":["counterCreditAmbiguous","sourceDocumentId"]},"PosCommissionLastDecisionDto":{"type":"object","properties":{"decision":{"type":["string","null"],"enum":["ACCEPTED","MODIFIED","REJECTED","MANUAL"]},"suggestedAmount":{"type":["number","null"]},"finalAmount":{"type":["number","null"]},"method":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"format":"date-time","description":"Kararın verildiği an (sunucu saati)."},"documentDeleted":{"type":"boolean","description":"Kararın ürettiği fiş sonradan silindiyse true."}},"required":["documentDeleted"]},"PosCommissionVoucherDto":{"type":"object","properties":{"documentId":{"type":"string"},"accRecStatus":{"type":["string","null"],"description":"Fişin muhasebe durumu; onay muhasebecide olduğu için genellikle DRAFT.","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"amount":{"type":["number","null"]},"date":{"type":["string","null"],"description":"Fiş tarihi (yyyy-MM-dd).","example":"2026-10-21"}},"required":["documentId"]},"PosCommissionBulkRequest":{"type":"object","properties":{"debitAccPlanId":{"type":["string","null"],"description":"Komisyon giderinin borç yazılacağı 770 alt hesabı. items boş değilse zorunludur.","example":"8b1c2d3e-4f50-6789-abcd-ef0123456789"},"creditAccPlanId":{"type":["string","null"],"description":"Komisyonun alacak yazılacağı 108 alt hesabı. Satır kendi hesabını göndermediğinde kullanılır; items boş değilse zorunludur.","example":"41f0a1b2-c3d4-5678-9abc-def012345678"},"items":{"type":"array","description":"Komisyon fişi oluşturulacak banka satırları.","items":{"$ref":"#/components/schemas/PosCommissionItemRequest"},"maxItems":500,"minItems":0},"rejections":{"type":"array","description":"Önerisi olup kullanıcının boşalttığı satırlar; fiş oluşmaz, yalnız karar kaydı yazılır.","items":{"$ref":"#/components/schemas/PosCommissionRejectionRequest"},"maxItems":500,"minItems":0}},"required":["items","rejections"]},"PosCommissionItemRequest":{"type":"object","properties":{"sourceDocumentId":{"type":["string","null"],"description":"Komisyonun okunduğu banka dekontunun belge kimliği.","example":"c2a91f44-1111-2222-3333-444455556666","minLength":1},"date":{"type":["string","null"],"format":"date","description":"Fişin tarihi; banka satırının tarihidir.","example":"2026-10-20"},"amount":{"type":["number","null"],"description":"BSMV dahil komisyon tutarı; bölünmez, tek 770 satırı yazılır.","example":25.01,"minimum":0.01},"creditAccPlanId":{"type":["string","null"],"description":"Satırın kendi 108 alt hesabı. Yalnız banka satırının karşı hesabı tek bir 108.x yaprağıysa gönderilir; yoksa istek düzeyindeki creditAccPlanId kullanılır.","example":"77aa1234-5678-90ab-cdef-1234567890ab"},"suggestion":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionSuggestionRequest"},{"type":"null"}]}},"required":["amount","date","sourceDocumentId"]},"PosCommissionRejectionRequest":{"type":"object","properties":{"sourceDocumentId":{"type":["string","null"],"description":"Önerinin reddedildiği banka dekontunun belge kimliği.","example":"aa11b2c3-d4e5-f607-1819-2a2b2c2d2e2f","minLength":1},"suggestion":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionSuggestionRequest"},{"type":"null"}]}},"required":["sourceDocumentId","suggestion"]},"PosCommissionSuggestionRequest":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"Ekranda gösterilen öneri tutarı; firma içi öğrenme uygulanmış olabilir.","example":23.82,"minimum":0.01},"rawAmount":{"type":["number","null"],"description":"Kalıbın ham sonucu, öğrenme uygulanmadan önceki tutar.","example":23.82},"method":{"type":["string","null"],"description":"Öneriyi üreten kalıp.","example":"ZIRAAT_KOMISYON","maxLength":64,"minLength":0,"pattern":"[A-Z0-9_]*"},"methodVersion":{"type":["string","null"],"description":"Kalıp tablosunun sürümü; kural iyileştirmesi öncesi/sonrası kıyas için.","example":"2026-10-24.1","maxLength":32,"minLength":0},"source":{"type":["string","null"],"description":"Önerinin kaynağı (ölçüm sözlüğü).","enum":["RULE","MEMORY","MODEL","DEFAULT","NONE"]},"confidence":{"type":["string","null"],"description":"Önerinin güven düzeyi.","enum":["STRONG","VARIABLE","LOW_DATA"]}},"required":["amount","source"]},"PosCommissionBulkResponse":{"type":"object","properties":{"results":{"type":"array","description":"İstekteki her satırın sonucu; sıra istekteki sırayı korur.","items":{"$ref":"#/components/schemas/PosCommissionResult"}}},"required":["results"]},"PosCommissionResult":{"type":"object","properties":{"sourceDocumentId":{"type":"string","description":"Sonucun ait olduğu banka dekontunun belge kimliği."},"status":{"type":"string","description":"Satırın sonucu. CREATED fiş oluştu, ALREADY_EXISTS satırın fişi zaten vardı, RECORDED yalnız karar kaydı yazıldı, FAILED satır işlenemedi.","enum":["CREATED","ALREADY_EXISTS","RECORDED","FAILED"]},"documentId":{"type":["string","null"],"description":"Oluşan ya da hâlihazırda var olan komisyon fişinin kimliği."},"accRecStatus":{"type":["string","null"],"description":"Komisyon fişinin muhasebe fişi durumu.","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"decision":{"type":["string","null"],"description":"Karar kaydına yazılan sınıflama.","enum":["ACCEPTED","MODIFIED","REJECTED","MANUAL"]},"message":{"type":["string","null"],"description":"Satır işlenemediyse ya da atlandıysa kullanıcıya gösterilecek açıklama."}},"required":["sourceDocumentId","status"]},"TaxPaymentRequest":{"type":"object","properties":{"type":{"type":"string","description":"Ödeme türü","enum":["VERGI","SGK"],"example":"VERGI"},"detail":{"type":"string","description":"Ödeme detayı. Türe göre geçerli değerler: VERGI -> KDV1, KDV2, muhtasar, geciciVergi, kurumlar, gelir, damga, konaklama, turizm, gekap, mtv, ceza, yapilandirma, diger; SGK -> cariDonem, gecmisBorc, idariParaCezasi, diger","example":"KDV1","minLength":1},"accountId":{"type":"string","description":"Ödeme aracı (kasa/banka/kredi kartı vb.) ön muhasebe hesap id","minLength":1},"amount":{"type":"number"},"date":{"type":"string","format":"date"},"description":{"type":["string","null"],"description":"Boş bırakılırsa backend üretir: 'Vergi ödemesi - {detail}' / 'SGK ödemesi - {detail}'"},"institutionAccountId":{"type":["string","null"],"description":"Ödemenin bağlanacağı kurum (RESMIKURUM) hesabının id'si. Boş bırakılırsa borç satırı hesapsız yazılır."}},"required":["accountId","amount","date","detail","type"]},"TaxPaymentResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"ApproveAllReadyResponse":{"type":"object","properties":{"approvedCount":{"type":"integer","format":"int32"}},"required":["approvedCount"]},"OpeningBalanceItem":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"amount":{"type":"number"}},"required":["accountId","amount"]},"OpeningBalanceRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpeningBalanceItem"},"maxItems":2147483647,"minItems":1},"date":{"type":["string","null"],"format":"date","description":"Devir fişinin tarihi. Boşsa bugün, gelecek bir tarih kabul edilmez. Başka sistemden geçişte aktarılan ilk belgenin tarihi verilir ki bakiye o tarihten itibaren tutsun.","example":"2026-01-01"}},"required":["items"]},"ForgetRuleKeysResponse":{"type":"object","properties":{"clearedCount":{"type":"integer","format":"int32"}},"required":["clearedCount"]},"AccountingRecordBulkSaveRequest":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordSaveRequest"},"maxItems":500,"minItems":0}},"required":["documents"]},"AccountingRecordRequest":{"type":"object","properties":{"accPlanId":{"type":"string","minLength":1},"accCode":{"type":"string","minLength":1},"accName":{"type":"string","minLength":1},"debt":{"type":"number"},"credit":{"type":"number"},"currency":{"type":"string","minLength":1},"exchangeRate":{"type":"number"},"ruleKey":{"type":"string"},"description":{"type":"string"},"accountId":{"type":["string","null"]},"productId":{"type":["string","null"]},"isDebtAndCreditNotBothPositive":{"type":"boolean"}},"required":["accCode","accName","accPlanId","credit","currency","debt","description","exchangeRate","isDebtAndCreditNotBothPositive","ruleKey"]},"AccountingRecordSaveRequest":{"type":"object","properties":{"accRecDate":{"type":"string","format":"date"},"accRecDesc":{"type":"string","minLength":1},"accRecStatus":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"accRec":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordRequest"},"maxItems":2147483647,"minItems":2},"documentNo":{"type":["string","null"],"maxLength":50,"minLength":0},"documentDate":{"type":["string","null"],"format":"date"}},"required":["accRec","accRecDate","accRecDesc","accRecStatus"]},"AccountingRecordBulkResultDto":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"ok":{"type":"boolean"},"id":{"type":["string","null"]},"error":{"type":["string","null"]},"accRecStatus":{"type":["string","null"],"description":"Fişin kaydedilen son durumu. Dengesiz fiş istenen durumdan bağımsız UNBALANCED olur.","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"],"example":"SAVED"}},"required":["index","ok"]},"AccountingRecordBulkSaveResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordBulkResultDto"}},"okCount":{"type":"integer","format":"int32"},"failCount":{"type":"integer","format":"int32"}},"required":["failCount","okCount","results"]},"AccRecVirman":{"type":"object","properties":{"accCode":{"type":"string","minLength":1},"accName":{"type":"string","minLength":1},"accPlanId":{"type":"string","minLength":1},"balance":{"type":"number"},"code":{"type":"string","minLength":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["accCode","accName","accPlanId","balance","code","id","name"]},"VirmanSaveRequest":{"type":"object","properties":{"period":{"type":"string","minLength":1},"accRec":{"type":"array","items":{"$ref":"#/components/schemas/AccRecVirman"}}},"required":["accRec","period"]},"AccRecVat":{"type":"object","properties":{"balance":{"type":"number"},"code":{"type":"string"},"name":{"type":"string"}},"required":["balance","code","name"]},"VatRequest":{"type":"object","properties":{"accCode":{"type":"string","minLength":1},"accName":{"type":"string","minLength":1},"accPlanId":{"type":"string","minLength":1}},"required":["accCode","accName","accPlanId"]},"VatSaveRequest":{"type":"object","properties":{"period":{"type":"string"},"transferringKdv":{"$ref":"#/components/schemas/VatRequest"},"payableKdv":{"$ref":"#/components/schemas/VatRequest"},"accRec":{"type":"array","items":{"$ref":"#/components/schemas/AccRecVat"},"maxItems":2147483647,"minItems":1},"beforePeriodTransfer":{"type":"number","minimum":0}},"required":["accRec","beforePeriodTransfer","payableKdv","period","transferringKdv"]},"AccRecs":{"type":"object","properties":{"id":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"credit":{"type":["number","null"]},"debt":{"type":["number","null"]}},"required":["code","credit","debt","id","name"]},"ReflectAccCode":{"type":"object","properties":{"accPlanId":{"type":"string","minLength":1},"accCode":{"type":"string","minLength":1},"accName":{"type":"string","minLength":1}},"required":["accCode","accName","accPlanId"]},"ReflectSaveRequest":{"type":"object","properties":{"period":{"type":"string"},"reflectAccCode":{"$ref":"#/components/schemas/ReflectAccCode"},"expenseAccCode":{"$ref":"#/components/schemas/ReflectAccCode"},"accRecs":{"type":"array","items":{"$ref":"#/components/schemas/AccRecs"},"maxItems":255,"minItems":1}},"required":["accRecs","expenseAccCode","period","reflectAccCode"]},"PreAccClosingRequest":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"required":["date"]},"AccountingRecordAutoClosedRequest":{"type":"object","properties":{"year":{"type":"integer","format":"int32","maximum":2099,"minimum":1900}},"required":["year"]},"AmortizationAccDto":{"type":"object","properties":{"name":{"type":"string","minLength":1},"amortization":{"type":"number","minimum":0.000001},"purchaseDate":{"type":["string","null"],"format":"date"},"productId":{"type":["string","null"],"minLength":1}},"required":["amortization","name","productId","purchaseDate"]},"AmortizationAccSaveRequest":{"type":"object","properties":{"period":{"type":"string"},"amortization":{"type":"array","items":{"$ref":"#/components/schemas/AmortizationAccDto"},"maxItems":2147483647,"minItems":1}},"required":["amortization","period"]},"AccountingCodeAccountMappingBulkRequest":{"type":"object","properties":{"accountingCodes":{"type":"array","description":"Hesapları istenen muhasebe kodları. Tekrarlanan kodlar tek satıra indirilir, eşleşme tam eşitlikle yapılır.","example":["120.0750485584","320.01.0042"],"items":{"type":"string"}}},"required":["accountingCodes"]},"AccountBriefDto":{"type":"object","properties":{"accountId":{"type":"string"},"title":{"type":"string"},"tcVkn":{"type":["string","null"]},"type":{"type":["string","null"]}},"required":["accountId","title"]},"AccountingCodeAccountMappingBulkResponse":{"type":"object","properties":{"mappings":{"type":"array","items":{"$ref":"#/components/schemas/AccountingCodeAccountsDto"}}},"required":["mappings"]},"AccountingCodeAccountsDto":{"type":"object","properties":{"accountingCode":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountBriefDto"}}},"required":["accountingCode","accounts"]},"AccountChequeRequest":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"amount":{"type":["number","null"],"minimum":0.00},"currency":{"type":["string","null"],"maxLength":7,"minLength":0},"note":{"type":["string","null"]},"date":{"type":"string","format":"date"},"bank":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"branch":{"type":["string","null"],"maxLength":2147483647,"minLength":3},"number":{"type":["string","null"],"maxLength":7,"minLength":0}},"required":["amount","currency","date","dueDate"]},"AccountSaveRequest":{"type":"object","properties":{"title":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"type":{"type":["string","null"],"enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"tcVkn":{"type":["string","null"],"maxLength":11,"minLength":10,"pattern":"^\\d{10,11}$"},"taxAdmin":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"taxAuthorityCode":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"companyType":{"type":["string","null"]},"currency":{"type":["string","null"]},"noNameCompany":{"type":"boolean"},"isForeignCompany":{"type":"boolean"},"contacts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountContactRequest"}},"bank":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountBankRequest"}},"cheque":{"oneOf":[{"$ref":"#/components/schemas/AccountChequeRequest"},{"type":"null"}]},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/AccountAddressRequest"}},"archived":{"type":"boolean"},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"employeeProfile":{"oneOf":[{"$ref":"#/components/schemas/EmployeeProfileRequest"},{"type":"null"}]},"foreignCompany":{"type":"boolean","writeOnly":true}},"required":["addresses","archived","isForeignCompany","noNameCompany","title"]},"BalanceTransferRequest":{"type":"object","properties":{"date":{"type":"string","format":"date"},"description":{"type":["string","null"],"maxLength":255,"minLength":0},"amount":{"type":"number"}},"required":["amount","date"]},"AccountTaxAdminUpdateRequest":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"code":{"type":["string","null"],"maxLength":2147483647,"minLength":1}}},"RequestPaymentFromAccount":{"type":"object","properties":{"to":{"type":"string","maxLength":2147483647,"minLength":1},"subject":{"type":"string","maxLength":2147483647,"minLength":1},"paymentLink":{"type":"boolean"},"paymentAmount":{"type":["number","null"]},"startDate":{"type":["string","null"],"format":"date","description":"Ekstre dönemi başlangıcı (dahil); boşsa ilk hareketten başlar","example":"2026-10-01"},"endDate":{"type":["string","null"],"format":"date","description":"Ekstre dönemi bitişi (dahil); boşsa son harekete kadar gider","example":"2026-10-31"}},"required":["paymentLink","subject","to"]},"CreatePaymentLinkRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Ödemeyi yapacak kişinin e-posta adresi","example":"cari@example.com","minLength":1},"amount":{"type":["number","null"],"description":"Ödenecek tutar (TL); boşsa carinin güncel borç bakiyesi kullanılır","example":1250.5}},"required":["email"]},"PaymentLinkDto":{"type":"object","properties":{"link":{"type":"string"},"amount":{"type":["number","null"]},"emails":{"type":"array","items":{"type":"string"}}},"required":["emails","link"]},"CreateAddressRequest":{"type":"object","description":"Address creation data","properties":{"name":{"type":"string","description":"Adresin adı. Aynı cari içinde benzersiz olmalıdır.","example":"Merkez","maxLength":255,"minLength":0},"address":{"type":"string","minLength":1},"district":{"type":"string","maxLength":255,"minLength":0},"city":{"type":"string","maxLength":255,"minLength":0},"country":{"type":"string","maxLength":255,"minLength":0},"phoneNumber":{"type":"string","maxLength":20,"minLength":0},"workPhone":{"type":["string","null"],"maxLength":20,"minLength":0},"email":{"type":"string","format":"email","minLength":1},"postCode":{"type":["string","null"]},"addressNo":{"type":["string","null"]}},"required":["address","city","country","district","email","name","phoneNumber"]},"FindAccountsFromVknListRequest":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/VknTitleItem"},"minItems":1}},"required":["list"]},"VknTitleItem":{"type":"object","properties":{"vknTckn":{"type":["string","null"]},"title":{"type":"string"},"isFinalConsumer":{"type":"boolean"}},"required":["isFinalConsumer","title"]},"AccountLookupResult":{"type":"object","properties":{"id":{"type":["string","null"]},"vknTckn":{"type":["string","null"]},"title":{"type":"string"}},"required":["title"]},"AccountPlanDTO":{"type":"object","properties":{"id":{"type":["string","null"]},"code":{"type":"string","minLength":1,"pattern":"^[1-9]\\d{2}.+$"},"name":{"type":"string","maxLength":255,"minLength":1},"type":{"type":["string","null"]},"rule":{"type":["string","null"]},"level":{"type":["string","null"]}},"required":["code","name"]},"UpdateCompanyWebhookRequest":{"type":"object","properties":{"url":{"type":["string","null"],"description":"Yeni adres; değişirse tekrar doğrulanır.","maxLength":2048,"minLength":0},"active":{"type":["boolean","null"],"description":"Kapalı webhook'a olay gönderilmez."},"events":{"type":["array","null"],"description":"Yeni abonelik listesi; gönderilirse mevcut listenin yerine geçer.","items":{"type":"string","enum":["ACCREC_APPROVED","DOCUMENT_FORMALIZED","DOCUMENT_CANCELLED","TEST"]},"uniqueItems":true}}},"TransferProductBulkRequest":{"type":"object","properties":{"fromProductId":{"type":"string","minLength":1},"toProductId":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"deleteSource":{"type":"boolean"}},"required":["deleteSource","endDate","fromProductId","startDate","toProductId"]},"TransferProductBulkResponse":{"type":"object","properties":{"updated":{"type":"integer","format":"int32"},"sourceDeleted":{"type":["boolean","null"]}},"required":["updated"]},"UpdateCompanySettingsRequest":{"type":"object","properties":{"addresses":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AddressDto"},"uniqueItems":true},"webAddress":{"type":["string","null"]},"balanceBookTransitionDate":{"type":["string","null"],"format":"date"}}},"ProductUpdateRequest":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":2147483647,"minLength":1},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"code":{"type":["string","null"]},"barcode":{"type":["string","null"]},"gtipNo":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceListRequest"}},"detail":{"type":["object","null"],"additionalProperties":{}}},"required":["name","prices","unit"]},"LeaseDocumentResponse":{"type":"object","properties":{"id":{"type":["string","null"]},"documentName":{"type":["string","null"]},"documentNo":{"type":["string","null"]},"date":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"accountId":{"type":["string","null"]},"netAmount":{"type":["number","null"]},"withholdingRate":{"type":["number","null"]},"withholdingAmount":{"type":["number","null"]},"grossAmount":{"type":["number","null"]},"docDetail":{"oneOf":[{"$ref":"#/components/schemas/LeaseDocDetail"},{"type":"null"}]}}},"UpdateAccordingRecordStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]}},"required":["status"]},"AccountingRecordSavedDto":{"type":"object","properties":{"accCode":{"type":"string","maxLength":2147483647,"minLength":1},"accName":{"type":"string","maxLength":2147483647,"minLength":1},"accPlanId":{"type":"string","maxLength":2147483647,"minLength":1},"accountId":{"type":["string","null"]},"credit":{"type":"number","minimum":0},"currency":{"type":"string","maxLength":2147483647,"minLength":1},"debt":{"type":"number","minimum":0},"description":{"type":"string","maxLength":2147483647,"minLength":1},"exchangeRate":{"type":"number","minimum":0},"productId":{"type":["string","null"]},"ruleKey":{"type":["string","null"]},"isDebtAndCreditNotBothPositive":{"type":"boolean"}},"required":["accCode","accName","accPlanId","credit","currency","debt","description","exchangeRate","isDebtAndCreditNotBothPositive"]},"UpdateAccountingRecordRequest":{"type":"object","properties":{"status":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"date":{"type":"string","format":"date"},"accRecDesc":{"type":["string","null"],"minLength":1},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordSavedDto"},"maxItems":2147483647,"minItems":1}},"required":["accRecDesc","data","date","status"]},"AccountingRecordBatchUpdateStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"documentIds":{"type":"array","items":{"type":"string"},"maxItems":2147483647,"minItems":1}},"required":["documentIds","status"]},"UpdateAccPlanBulkRequest":{"type":"object","properties":{"fromAccPlanId":{"type":"string","minLength":1},"toAccPlanId":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"required":["endDate","fromAccPlanId","startDate","toAccPlanId"]},"AccountingRecordBatchDocumentIdsRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string"},"maxItems":2147483647,"minItems":1}},"required":["documentIds"]},"ReassignByRuleKeyItem":{"type":"object","properties":{"ruleKey":{"type":"string","minLength":1},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"side":{"type":["string","null"],"enum":["DEBIT","CREDIT"]},"fromAccPlanId":{"type":"string","minLength":1},"toAccPlanId":{"type":"string","minLength":1}},"required":["direction","fromAccPlanId","ruleKey","toAccPlanId"]},"BatchReassignByRuleKeyResponse":{"type":"object","properties":{"updatedRows":{"type":"integer","format":"int32"},"updatedDocs":{"type":"integer","format":"int32"},"reopenedDocs":{"type":"integer","format":"int32"}},"required":["reopenedDocs","updatedDocs","updatedRows"]},"AssignByRuleKeyItem":{"type":"object","properties":{"ruleKey":{"type":"string","minLength":1},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"side":{"type":["string","null"],"enum":["DEBIT","CREDIT"]},"accPlanId":{"type":"string","minLength":1}},"required":["accPlanId","direction","ruleKey"]},"BatchAssignByRuleKeyResponse":{"type":"object","properties":{"updatedRows":{"type":"integer","format":"int32"},"updatedDocs":{"type":"integer","format":"int32"}},"required":["updatedDocs","updatedRows"]},"AccountUpdateRequest":{"type":"object","properties":{"bank":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountBankRequest"}},"companyType":{"type":["string","null"]},"isForeignCompany":{"type":"boolean"},"noNameCompany":{"type":"boolean"},"taxAdmin":{"type":["string","null"]},"taxAuthorityCode":{"type":["string","null"]},"tcVkn":{"type":["string","null"],"maxLength":11,"minLength":10},"title":{"type":["string","null"]},"type":{"type":["string","null"],"description":"Hesap türü. Yalnız CARI ile RESMIKURUM arasında değiştirilebilir; gönderilmediğinde hesabın türü korunur.","enum":["CARI","RESMIKURUM"]},"contacts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountContactRequest"}},"addresses":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountAddressRequest"}},"cheque":{"oneOf":[{"$ref":"#/components/schemas/AccountChequeRequest"},{"type":"null"}]},"archived":{"type":"boolean"},"currency":{"type":["string","null"]},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"employeeProfile":{"oneOf":[{"$ref":"#/components/schemas/EmployeeProfileRequest"},{"type":"null"}]},"foreignCompany":{"type":"boolean","writeOnly":true}},"required":["archived","isForeignCompany","noNameCompany"]},"NotificationPreferences":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["DAILY_REPORT","SYSTEM_UPDATES"]},"status":{"type":"boolean"}},"required":["status"]},"PlatformAccessSummaryDto":{"type":"object","properties":{"role":{"type":["string","null"],"enum":["ADMIN","SUPPORT"]},"grantedAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"}}},"UserProfile":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"readOnly":true},"phone":{"type":["string","null"],"pattern":"^(0[0-9]{10}|[1-9][0-9]{9}|)$"},"image":{"type":["string","null"],"readOnly":true},"emailVerified":{"type":"boolean","readOnly":true},"notificationPreferences":{"type":["array","null"],"items":{"$ref":"#/components/schemas/NotificationPreferences"},"uniqueItems":true},"platformAccess":{"oneOf":[{"$ref":"#/components/schemas/PlatformAccessSummaryDto"},{"type":"null"}]}},"required":["emailVerified"]},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":0},"size":{"type":"integer","format":"int32","minimum":1},"sort":{"type":"array","items":{"type":"string"}}}},"PageResponseWorkplaceDTO":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/WorkplaceDTO"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PageResponseDepartmentDTO":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentDTO"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PageResponseWarehouseDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"MukellefDto":{"type":"object","properties":{"durum":{"oneOf":[{"$ref":"#/components/schemas/MukellefDurumDto"},{"type":"null"}]},"vkn":{"type":["string","null"]},"tckn":{"type":"null"},"ad":{"type":"null"},"soyad":{"type":"null"},"babaAdi":{"type":"null"},"vergiDairesiAdi":{"type":["string","null"]},"vergiDairesiKodu":{"type":["string","null"]},"sirketinTuru":{"type":["string","null"]},"faalTerkDurumu":{"type":["string","null"]},"naceFaaliyetKoduveTanimlari":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MukellefNACEFaaliyetKoduveTanimiDto"}},"adresBilgileri":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MukkelefAdressBilgileriDto"}},"iseBaslamaTarihi":{"type":["string","null"]},"isiBirakmaTarihi":{"type":"null"},"kimlikUnvani":{"type":["string","null"]},"unvan":{"type":["string","null"]},"kurulusTarihi":{"type":["string","null"]},"tamDarMukellefiyet":{"type":"null"},"kimlikPotansiyel":{"type":"null"},"dogumYeri":{"type":"null"}}},"MukellefDurumDto":{"type":"object","properties":{"durumKodu":{"type":["string","null"]},"durumKodAciklamasi":{"type":["string","null"]},"hataDetayBilgisi":{"type":"null"},"sonuc":{"type":"boolean"}},"required":["sonuc"]},"MukellefNACEFaaliyetKoduveTanimiDto":{"type":"object","properties":{"faaliyetAdi":{"type":["string","null"]},"faaliyetKodu":{"type":["string","null"]},"sira":{"type":["string","null"]}}},"MukkelefAdressBilgileriDto":{"type":"object","properties":{"adresTipi":{"type":["string","null"]},"adresTipiAciklamasi":{"type":["string","null"]},"mahalleSemt":{"type":["string","null"]},"koy":{"type":"null"},"caddeSokak":{"type":["string","null"]},"disKapiNo":{"type":["string","null"]},"icKapiNo":{"type":["string","null"]},"beldeBucak":{"type":"null"},"ilceAdi":{"type":["string","null"]},"ilAdi":{"type":["string","null"]},"ilKodu":{"type":"null"},"ilceKodu":{"type":"null"}}},"TaxPayerDto":{"type":"object","properties":{"mukellef":{"oneOf":[{"$ref":"#/components/schemas/MukellefDto"},{"type":"null"}]}}},"SupportAttachmentDTO":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"originalFileName":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"integer","format":"int64"},"url":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["contentType","createdAt","fileName","fileSize","id","originalFileName"]},"SupportDTO":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","WAITING","CONFLICT","CLOSED"]},"category":{"type":["string","null"],"enum":["QUESTION","BUG","FEATURE"]},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"userPhone":{"type":"string"},"userEmail":{"type":"string"},"companyId":{"type":"integer","format":"int64"},"companyTitle":{"type":"string"},"companyVKN":{"type":"string"},"replies":{"type":"array","items":{"$ref":"#/components/schemas/SupportReplyDTO"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/SupportAttachmentDTO"}}},"required":["attachments","companyId","companyTitle","companyVKN","content","createdAt","id","replies","status","title","userEmail","userName","userPhone"]},"PageResponseSupportDTO":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SupportDTO"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"StockTransferSearchRequest":{"type":"object","properties":{"startDate":{"type":["string","null"],"format":"date","description":"Bu tarihten itibaren (yyyy-MM-dd).","example":"2026-11-01"},"endDate":{"type":["string","null"],"format":"date","description":"Bu tarihe kadar (yyyy-MM-dd).","example":"2026-11-30"},"warehouseId":{"type":["string","null"],"description":"Kaynak veya hedefi bu depo olan transferler.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"productId":{"type":["string","null"],"description":"Bu ürünü taşıyan transferler.","example":"d5b3e4f6-7081-4c9d-0e1f-2a3b4c5d6e7f"},"source":{"type":["string","null"],"description":"TRANSFER: transfer ekranından, DISPATCH: dahili sevk irsaliyesinden.","enum":["TRANSFER","DISPATCH"]}}},"PageResponseStockTransferDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/StockTransferDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"StockTransferDto":{"type":"object","properties":{"transferId":{"type":"string"},"date":{"type":"string"},"note":{"type":["string","null"]},"source":{"type":"string"},"fromWarehouseId":{"type":["string","null"]},"fromWarehouseName":{"type":["string","null"]},"toWarehouseId":{"type":["string","null"]},"toWarehouseName":{"type":["string","null"]},"received":{"type":"boolean"},"dispatchDocumentId":{"type":["string","null"]},"dispatchStatus":{"type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/StockTransferItemDto"}}},"required":["date","items","received","source","transferId"]},"StockTransferItemDto":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"unit":{"type":["string","null"]},"quantity":{"type":"number"}},"required":["productId","productName","quantity"]},"PageStockReportResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"numberOfElements":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/StockReportResponse"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"unpaged":{"type":"boolean"},"paged":{"type":"boolean"},"pageSize":{"type":"integer","format":"int32"},"pageNumber":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int64"},"sort":{"$ref":"#/components/schemas/SortObject"}}},"SortObject":{"type":"object","properties":{"unsorted":{"type":"boolean"},"sorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"StockReportResponse":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"productType":{"type":"string"},"unit":{"type":["string","null"]},"boughtQuantity":{"type":"number"},"soldQuantity":{"type":"number"},"meanBuyPrice":{"type":"number"},"meanSellPrice":{"type":"number"}},"required":["boughtQuantity","meanBuyPrice","meanSellPrice","productId","productName","productType","soldQuantity"]},"WarehouseStockSearchRequest":{"type":"object","properties":{"productId":{"type":["string","null"],"description":"Yalnız bu ürünün stoğu.","example":"b3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"warehouseId":{"type":["string","null"],"description":"Yalnız bu deponun stoğu.","example":"c4a2d3e5-6f70-4b8c-9d0e-1f2a3b4c5d6e"},"productType":{"type":["string","null"],"description":"Ürün türü; yalnız stok takipli türler listelenir.","enum":["PRODUCT","RAW_MATERIAL"]},"searchQuery":{"type":["string","null"],"description":"Ürün adında aranan metin.","example":"vida"},"asOf":{"type":["string","null"],"format":"date","description":"Bu tarihteki stok (yyyy-MM-dd); boşsa bugüne kadarki tüm hareketler.","example":"2026-11-30"}}},"PageResponseWarehouseStockDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseStockDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"WarehouseStockDto":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"unit":{"type":["string","null"]},"warehouseId":{"type":"string"},"warehouseName":{"type":"string"},"quantity":{"type":"number"}},"required":["productId","productName","quantity","warehouseId","warehouseName"]},"PageResponseSgkWorkAccidentDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SgkWorkAccidentDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"SgkWorkAccidentStatusDto":{"type":"object","properties":{"workplaceId":{"type":"string"},"workplaceName":{"type":["string","null"]},"credentialsEntered":{"type":"boolean"},"enabled":{"type":"boolean"},"lastQueryAt":{"type":["string","null"],"format":"date-time"},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastErrorCode":{"type":["integer","null"],"format":"int32"},"lastErrorMessage":{"type":["string","null"]},"remainingQuota":{"type":"integer","format":"int32"},"unreadCount":{"type":"integer","format":"int64"},"nextRunAt":{"type":["string","null"],"format":"date-time"}},"required":["credentialsEntered","enabled","remainingQuota","unreadCount","workplaceId"]},"SgkTimesheetSuggestionDto":{"type":"object","properties":{"year":{"type":"integer","format":"int32"},"month":{"type":"integer","format":"int32"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/SgkTimesheetSuggestionRowDto"}}},"required":["month","rows","year"]},"SgkTimesheetSuggestionRowDto":{"type":"object","properties":{"accountId":{"type":"string"},"employeeName":{"type":["string","null"]},"reportIds":{"type":"array","items":{"type":"string"}},"days":{"type":"array","items":{"type":"integer","format":"int32"}},"dayCode":{"type":"string"},"shortageReasonCode":{"type":"string"},"timesheetMask":{"type":"string"}},"required":["accountId","dayCode","days","reportIds","shortageReasonCode","timesheetMask"]},"SgkViziteStatusDto":{"type":"object","properties":{"workplaceId":{"type":"string"},"workplaceName":{"type":["string","null"]},"credentialsEntered":{"type":"boolean"},"enabled":{"type":"boolean"},"lastQueryAt":{"type":["string","null"],"format":"date-time"},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastErrorCode":{"type":["integer","null"],"format":"int32"},"lastErrorMessage":{"type":["string","null"]},"remainingQuota":{"type":"integer","format":"int32"},"unreadReportCount":{"type":"integer","format":"int64"},"pendingClosureCount":{"type":"integer","format":"int64"},"lastFetchCount":{"type":["integer","null"],"format":"int32"},"newestReportDate":{"type":["string","null"],"format":"date"},"nextRunAt":{"type":["string","null"],"format":"date-time"}},"required":["credentialsEntered","enabled","pendingClosureCount","remainingQuota","unreadReportCount","workplaceId"]},"PageResponseSgkReportListItemDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SgkReportListItemDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"SgkReportListItemDto":{"type":"object","properties":{"id":{"type":"string"},"workplaceId":{"type":"string"},"workplaceName":{"type":["string","null"]},"medulaReportId":{"type":["string","null"]},"trackingNo":{"type":["string","null"]},"sequenceNo":{"type":["string","null"]},"nationalId":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"employeeAccountId":{"type":["string","null"]},"employeeName":{"type":["string","null"]},"employeeEndDate":{"type":["string","null"],"format":"date"},"caseCode":{"type":["string","null"]},"caseTypeName":{"type":["string","null"]},"reportStatusCode":{"type":["string","null"]},"reportStatusName":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"clinicDate":{"type":["string","null"],"format":"date"},"outpatientStart":{"type":["string","null"],"format":"date"},"outpatientEnd":{"type":["string","null"],"format":"date"},"inpatientStart":{"type":["string","null"],"format":"date"},"inpatientEnd":{"type":["string","null"],"format":"date"},"returnOrControlDate":{"type":["string","null"],"format":"date"},"prenatalLeaveStart":{"type":["string","null"],"format":"date"},"workAccidentDate":{"type":["string","null"],"format":"date"},"facilityName":{"type":["string","null"]},"archived":{"type":"boolean"},"read":{"type":"boolean"},"readAt":{"type":["string","null"],"format":"date-time"},"autoRead":{"type":["string","null"],"enum":["STALE"]},"firstSeenAt":{"type":["string","null"],"format":"date-time"},"changedAt":{"type":["string","null"],"format":"date-time"},"changeNote":{"type":["string","null"]},"resolution":{"type":"string","enum":["OPEN","SKIPPED"]},"resolutionReason":{"type":["string","null"],"enum":["WORKED","NOT_MY_EMPLOYEE","OTHER"]},"resolutionNote":{"type":["string","null"]},"sgkClosedAt":{"type":["string","null"],"format":"date-time"},"notificationStatus":{"type":"string","enum":["NONE","PENDING","SENT","REJECTED","FAILED"]},"notifiedAt":{"type":["string","null"],"format":"date-time"},"notificationSource":{"type":["string","null"],"enum":["US","SGK"]},"sgkConfirmed":{"type":["boolean","null"]},"paymentIssued":{"type":["boolean","null"]}},"required":["archived","id","notificationStatus","read","resolution","workplaceId"]},"SgkApprovedReportDetailDto":{"type":"object","properties":{"medulaReportId":{"type":["string","null"]},"notificationId":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"workStatus":{"type":["string","null"]},"processedAt":{"type":["string","null"],"format":"date"},"paymentIssued":{"type":["boolean","null"]}}},"PageResponseSgkTescilSyncSummaryDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilSyncSummaryDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"SgkTescilSyncSummaryDto":{"type":"object","properties":{"syncId":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED","CANCELLED"]},"dryRun":{"type":"boolean"},"workplaceId":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["ENTRY","EXIT"]},"total":{"type":"integer","format":"int32"},"processed":{"type":"integer","format":"int32"},"applied":{"type":"boolean"},"appliedCount":{"type":"integer","format":"int32"},"message":{"type":["string","null"]},"requestedByUserId":{"type":["string","null"]},"startedAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"appliedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"}},"required":["applied","appliedCount","dryRun","processed","status","syncId","total"]},"SgkTescilSyncConfigDto":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"SgkWorkplaceTescilStatusDto":{"type":"object","properties":{"workplaceId":{"type":"string"},"workplaceName":{"type":["string","null"]},"canSubmit":{"type":"boolean"},"credentialsInvalid":{"type":"boolean"},"lastErrorCode":{"type":["integer","null"],"format":"int32"},"lastErrorMessage":{"type":["string","null"]},"sgkEnv":{"type":"string","enum":["TEST","LIVE"]},"pendingCount":{"type":"integer","format":"int64"},"uncertainCount":{"type":"integer","format":"int64"},"lateCount":{"type":"integer","format":"int64"},"finedCount":{"type":"integer","format":"int64"}},"required":["canSubmit","credentialsInvalid","finedCount","lateCount","pendingCount","sgkEnv","uncertainCount","workplaceId"]},"SgkObligationDto":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":["string","null"]},"nationalId":{"type":["string","null"]},"workplaceId":{"type":["string","null"]},"workplaceName":{"type":["string","null"]},"type":{"type":"string","enum":["ENTRY","EXIT"]},"eventDate":{"type":"string","format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"daysLeft":{"type":["integer","null"],"format":"int64"},"late":{"type":"boolean"},"sameDayAllowed":{"type":"boolean"},"missingFields":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"$ref":"#/components/schemas/SgkValidationMessage"}}},"required":["accountId","blockers","eventDate","late","missingFields","sameDayAllowed","type"]},"PageResponseSgkDeclarationListItemDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SgkDeclarationListItemDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"SgkDeclarationPdfDto":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"SgkTescilCodeEntry":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"selectable":{"type":"boolean"},"validFrom":{"type":["string","null"],"format":"date"},"validTo":{"type":["string","null"],"format":"date"},"tescil":{"type":"boolean"},"muhsgk":{"type":"boolean"},"tescilValue":{"type":["string","null"]},"muhsgkValue":{"type":["string","null"]}},"required":["code","label","muhsgk","selectable","tescil"]},"SgkTescilCodesResponse":{"type":"object","properties":{"exitReasons":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"shortageReasons":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"documentTypes":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"insuranceBranches":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"jobCodes":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"educationLevels":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"linesOfBusiness":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"exceptionCodes":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"queryInsuranceBranches":{"type":"array","items":{"$ref":"#/components/schemas/SgkTescilCodeEntry"}},"sgdpDocumentTypes":{"type":"array","items":{"type":"string"}},"justCauseExitReasons":{"type":"array","items":{"type":"string"}},"suspensionExitReasons":{"type":"array","items":{"type":"string"}},"transferExitReason":{"type":"string"},"partTimeMinDays":{"type":"integer","format":"int32"},"partTimeMaxDays":{"type":"integer","format":"int32"},"occupationCodePattern":{"type":"string"},"workplaceRegistryLength":{"type":"integer","format":"int32"}},"required":["documentTypes","educationLevels","exceptionCodes","exitReasons","insuranceBranches","jobCodes","justCauseExitReasons","linesOfBusiness","occupationCodePattern","partTimeMaxDays","partTimeMinDays","queryInsuranceBranches","sgdpDocumentTypes","shortageReasons","suspensionExitReasons","transferExitReason","workplaceRegistryLength"]},"PageResponseUserPermissionDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/UserPermissionDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"UserPermissionDto":{"type":"object","properties":{"phone":{"type":"string"},"image":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["ADMIN","ACCOUNTANT","OWNER","SUPPORT","USER","CREW","DEALER"]},"status":{"type":"string"},"name":{"type":"string"}},"required":["email","image","name","phone","role","status","userId"]},"FolderItem":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"url":{"type":["string","null"]}},"required":["createdAt","name","size"]},"PermissionDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"userId":{"type":["string","null"]},"smmCompanyId":{"type":["integer","null"],"format":"int64"},"role":{"type":["string","null"],"enum":["ADMIN","ACCOUNTANT","OWNER","SUPPORT","USER","CREW","DEALER"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"invitedAt":{"type":["string","null"],"format":"date-time"},"invitedBy":{"type":["string","null"]},"isActive":{"type":"boolean"},"acceptedInviteAt":{"type":["string","null"],"format":"date-time"},"inviteId":{"type":["string","null"]}},"required":["isActive"]},"SettingsCompanyDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyDto"},"credit":{"type":"number"},"subscription":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionDto"}},"isActiveSub":{"type":"boolean"},"smmmStatus":{"$ref":"#/components/schemas/SmmmStatus"},"perm":{"$ref":"#/components/schemas/PermissionDto"}},"required":["credit","data","isActiveSub","perm","smmmStatus","subscription"]},"SmmmStatus":{"type":"object","properties":{"smm_company_id":{"type":"integer","format":"int64"},"title":{"type":["string","null"]},"vknTckn":{"type":["string","null"]},"isActive":{"type":["boolean","null"]},"smmLogo":{"type":["string","null"]},"active":{"type":"boolean","writeOnly":true}}},"StorePackageDto":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"vatRate":{"type":["number","null"]},"duration":{"type":["integer","null"],"format":"int32"},"credits":{"type":["integer","null"],"format":"int32"},"isAddon":{"type":["boolean","null"]},"isActive":{"type":["boolean","null"]}}},"SubscriptionDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"packageId":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"credit":{"type":["number","null"]},"status":{"type":["string","null"]},"paymentId":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"package":{"$ref":"#/components/schemas/StorePackageDto"}}},"PageResponseSalesOfferDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SalesOfferDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"AccountDetailReportDto":{"type":"object","properties":{"date":{"type":"string"},"totalDebtTry":{"type":"number"},"totalCreditTry":{"type":"number"},"documentCount":{"type":"number"},"transactionCount":{"type":"number"},"netAmountTry":{"type":"number"}},"required":["date","documentCount","netAmountTry","totalCreditTry","totalDebtTry","transactionCount"]},"WithholdingPaymentDto":{"type":"object","properties":{"documentId":{"type":"string","description":"Kaynak belge id'si"},"source":{"type":"string","description":"Satırın hangi belge türünden üretildiği","enum":["LEASE","FREELANCE_VOUCHER","PRODUCER_RECEIPT","OTHER"]},"paymentTypeCode":{"type":["string","null"],"description":"GİB muhtasar ödeme tür kodu (turKodu); türetilemiyorsa null"},"paymentTypeCodeEstimated":{"type":"boolean","description":"True ise tür kodu belgeden değil senaryo varsayılanından geldi"},"grossAmount":{"type":"number","description":"Stopaj matrahı (gayrisafiTutar, TRY)"},"withheldTax":{"type":"number","description":"Kesilen stopaj (kesilenVergi, TRY)"},"withholdingRate":{"type":"number","description":"Stopaj oranı (kesintiOrani)"},"vatWithholdingCode":{"type":["string","null"],"description":"KDV tevkifat kodu (kdvTevkifati) — tevkifat yoksa 0, varsa ebyn kod listesinden; eşlenemezse null"},"identityType":{"type":["string","null"],"description":"TCKN 11, VKN 10 haneden türetilir; ikisi de değilse null","enum":["TCKN","VKN"]},"tckn":{"type":["string","null"]},"vkn":{"type":["string","null"]},"firstName":{"type":["string","null"],"description":"Gerçek kişide ad"},"lastName":{"type":["string","null"],"description":"Gerçek kişide soyad"},"title":{"type":["string","null"],"description":"Tüzel kişide tam ünvan"},"address":{"type":["string","null"],"description":"Carinin fatura adresi tek satır"},"addressNo":{"type":["string","null"],"description":"UAVT adres kodu — kira tür kodlarında GİB için zorunlu"},"countryCode":{"type":["string","null"],"description":"Yabancı caride GİB ülke kodu"},"supportingDocumentType":{"type":"string","description":"Ödemeye dayanak belge türü (belgeTuru) — 0 Yok · 1 SM Makbuzu · 2 Müstahsil · 3 Gider Pusulası · 4 Fatura · 5 Diğer"},"supportingDocumentDate":{"type":["string","null"],"description":"supportingDocumentType 0 değilse dolu"},"supportingDocumentNo":{"type":["string","null"],"description":"supportingDocumentType 0 değilse dolu"},"description":{"type":["string","null"],"description":"Kira adresi ya da belge notu — listede gösterim için"}},"required":["documentId","grossAmount","paymentTypeCodeEstimated","source","supportingDocumentType","withheldTax","withholdingRate"]},"Todo":{"type":"object","properties":{"inboxCount":{"type":"integer","format":"int64"},"bankInboxCount":{"type":"integer","format":"int64"},"documentInboxCount":{"type":"integer","format":"int64"},"draftAccountingCount":{"type":"integer","format":"int64"},"inboxWaybillCount":{"type":"integer","format":"int64"},"pendingWaybillIncomingCount":{"type":"integer","format":"int64"},"pendingWaybillOutgoingCount":{"type":"integer","format":"int64"},"draftOutgoingDocumentCount":{"type":"integer","format":"int64"},"sgkUnreadReportCount":{"type":"integer","format":"int64"},"sgkWorkAccidentCount":{"type":"integer","format":"int64"}},"required":["bankInboxCount","documentInboxCount","draftAccountingCount","draftOutgoingDocumentCount","inboxCount","inboxWaybillCount","pendingWaybillIncomingCount","pendingWaybillOutgoingCount","sgkUnreadReportCount","sgkWorkAccidentCount"]},"TodoReport":{"type":"object","properties":{"todo":{"$ref":"#/components/schemas/Todo"},"hasNegativeStock":{"type":"boolean","deprecated":true,"description":"Always false, no longer computed"}},"required":["hasNegativeStock","todo"]},"SmmTodoReport":{"type":"object","properties":{"savedDocumentCount":{"type":"number"},"sgkUnreadReportCount":{"type":"number"},"documentInboxCount":{"type":"number"},"draftDocumentCount":{"type":"number"},"unprocessedBankDocumentCount":{"type":"number"},"invoiceInboxCount":{"type":"number"},"companyTitle":{"type":"string"},"id":{"type":"integer","format":"int64"}},"required":["companyTitle","documentInboxCount","draftDocumentCount","id","invoiceInboxCount","savedDocumentCount","sgkUnreadReportCount","unprocessedBankDocumentCount"]},"SmmBankSearchRequest":{"type":"object","properties":{"companyId":{"type":["integer","null"],"format":"int64","description":"Yalnız bu mükellefin hesapları","example":514},"companySearch":{"type":["string","null"],"description":"Mükellef unvanında geçen metin","example":"tekstil"},"accountSearch":{"type":["string","null"],"description":"Banka hesabı adında geçen metin","example":"garanti"},"behindAsOf":{"type":["string","null"],"format":"date","description":"Yalnız bu tarihten geri kalmış hesaplar; hiç işlenmemiş hesaplar da döner","example":"2026-10-01"},"onlyWithAccounts":{"type":"boolean","description":"Banka kartı olmayan mükellefleri listeden çıkarır","example":false}},"required":["onlyWithAccounts"]},"PageResponseSmmClientBanksDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SmmClientBanksDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"SmmBankAccountDto":{"type":"object","description":"Bir banka hesabının bakiyesi ve son muhasebeleştirilen günü","properties":{"accountId":{"type":"string","description":"Banka hesabının (cari kartın) id'si"},"title":{"type":["string","null"],"description":"Banka hesabının adı","example":"Garanti TL"},"bank":{"type":["string","null"],"description":"Banka kartının ham JSON içeriği (banka adı, IBAN)"},"currency":{"type":["string","null"],"description":"Hesabın döviz kodu","example":"TRY"},"balance":{"type":["number","null"],"description":"TL karşılığı bakiye","example":12345.67},"balanceOriginal":{"type":["number","null"],"description":"Hesabın kendi dövizindeki bakiye","example":12345.67},"lastEntryDate":{"type":["string","null"],"description":"Hesapta muhasebeleştirilmiş son günün tarihi; hiç hareket yoksa boş","example":"2026-09-30"}},"required":["accountId"]},"SmmClientBanksDto":{"type":"object","description":"Bir mükellefin banka hesapları; hesap listesi boşsa o mükellefin süzgece uyan banka kartı yok","properties":{"companyId":{"type":"integer","format":"int64","description":"Mükellef firma id'si","example":514},"companyTitle":{"type":["string","null"],"description":"Mükellef firma unvanı","example":"ÖRNEK TEKSTİL A.Ş."},"accountCount":{"type":"integer","format":"int64","description":"Mükellefin süzgece uyan banka hesabı sayısı","example":3},"oldestEntryDate":{"type":["string","null"],"description":"Hesapları arasında en geride kalanın son işlenen günü; hiçbiri işlenmemişse boş","example":"2026-08-31"},"accounts":{"type":"array","description":"Mükellefin banka hesapları, hesap adına göre sıralı","items":{"$ref":"#/components/schemas/SmmBankAccountDto"}}},"required":["accountCount","accounts","companyId"]},"PaymentReportRowDto":{"type":"object","properties":{"month":{"type":"string"},"accountId":{"type":"string"},"accountTitle":{"type":"string"},"totalCredit":{"type":"number"},"totalDebt":{"type":"number"}},"required":["accountId","accountTitle","month","totalCredit","totalDebt"]},"SalesReportDto":{"type":"object","properties":{"totalAmountTry":{"type":"number"},"documentCount":{"type":"number"},"accountTitle":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"}},"required":["accountId","accountTitle","date","documentCount","totalAmountTry"]},"ProfitLossTotals":{"type":"object","properties":{"income":{"type":"number"},"expense":{"type":"number"},"cost":{"type":"number"},"profitLoss":{"type":"number"}},"required":["cost","expense","income","profitLoss"]},"ProfitReport":{"type":"object","properties":{"profitLossTotals":{"$ref":"#/components/schemas/ProfitLossTotals"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"required":["endDate","profitLossTotals","startDate"]},"MizanRow":{"type":"object","properties":{"id":{"type":["string","null"]},"code":{"type":["string","null"]},"name":{"type":["string","null"]},"rule":{"type":["string","null"]},"type":{"type":["string","null"]},"level":{"type":["string","null"]},"period":{"type":["string","null"]},"debt":{"type":["number","null"]},"credit":{"type":["number","null"]},"balance":{"type":["number","null"]},"runningDebt":{"type":["number","null"]},"runningCredit":{"type":["number","null"]},"runningBalance":{"type":["number","null"]},"balanceType":{"type":["string","null"]},"reverseBalance":{"type":["boolean","null"]}}},"MonthlyProductSummary":{"type":"object","properties":{"period":{"type":"string"},"totalPurchaseAmount":{"type":"number"},"yearlyBalance":{"type":"number"}},"required":["period","totalPurchaseAmount","yearlyBalance"]},"OverdueAccountRow":{"type":"object","properties":{"id":{"type":["string","null"]},"title":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"balance":{"type":["number","null"]}}},"PageResponseOverdueAccountRow":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/OverdueAccountRow"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"OverduePaymentCountsDto":{"type":"object","properties":{"receivablesCount":{"type":"integer","format":"int64"},"payablesCount":{"type":"integer","format":"int64"}},"required":["payablesCount","receivablesCount"]},"DocumentLineReportDto":{"type":"object","properties":{"totalQuantity":{"type":"number"},"netTotalAmount":{"type":"number"},"netBaseAmount":{"type":"number"},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"period":{"type":"string"},"category":{"type":"string"},"tags":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["direction","name","netBaseAmount","netTotalAmount","period","scenario","totalQuantity","type"]},"CariOzetItem":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]},"value":{"type":["number","null"]}},"required":["id"]},"DashboardAccountSummary":{"type":"object","properties":{"topCreditors":{"type":"array","items":{"$ref":"#/components/schemas/CariOzetItem"}},"topDebtors":{"type":"array","items":{"$ref":"#/components/schemas/CariOzetItem"}},"vatSummary":{"type":"array","items":{"$ref":"#/components/schemas/VatCalculationDto"}},"totalCredit":{"type":["number","null"]},"totalDebt":{"type":["number","null"]}},"required":["topCreditors","topDebtors","vatSummary"]},"VatCalculationDto":{"type":"object","properties":{"yilAy":{"type":["string","null"]},"indirilecekKdv":{"type":"number"},"hesaplananKdv":{"type":"number"},"oncekiAydanDevir":{"type":"number"},"odenecekKdv":{"type":"number"},"devredenKdv":{"type":"number"}},"required":["devredenKdv","hesaplananKdv","indirilecekKdv","odenecekKdv","oncekiAydanDevir"]},"AccountFlow":{"type":"object","properties":{"accountNo":{"type":"string"},"name":{"type":"string"},"monthlyValues":{"type":"array","items":{"$ref":"#/components/schemas/MonthlyValue"}}},"required":["accountNo","monthlyValues","name"]},"CashFlowAnalysisResult":{"type":"object","properties":{"months":{"type":"array","items":{"type":"string"}},"inflow":{"type":"array","items":{"$ref":"#/components/schemas/AccountFlow"}},"outflow":{"type":"array","items":{"$ref":"#/components/schemas/AccountFlow"}},"monthlyTotals":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MonthlyTotal"}}},"required":["inflow","monthlyTotals","months","outflow"]},"CashFlowReport":{"type":"object","properties":{"cashFlow":{"$ref":"#/components/schemas/CashFlowAnalysisResult"},"balances":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/GroupBalances"}},"averageOutflow":{"type":"number"},"remainingDays":{"type":"integer","format":"int32"}},"required":["averageOutflow","balances","cashFlow","remainingDays"]},"GroupBalances":{"type":"object","properties":{"opening":{"type":"number"},"closing":{"type":"number"}},"required":["closing","opening"]},"MonthlyTotal":{"type":"object","properties":{"totalInflow":{"type":"number"},"totalOutflow":{"type":"number"}},"required":["totalInflow","totalOutflow"]},"MonthlyValue":{"type":"object","properties":{"month":{"type":"string"},"value":{"type":"number"}},"required":["month","value"]},"AccountBalanceDto":{"type":"object","properties":{"accCodePrefix":{"type":"string"},"totalDebtTRY":{"type":"number"},"totalCreditTRY":{"type":"number"},"balanceTRY":{"type":["number","null"]}},"required":["accCodePrefix","totalCreditTRY","totalDebtTRY"]},"AssetsReport":{"type":"object","properties":{"dashboardTotals":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalanceDto"}},"stockCost":{"type":["number","null"]}},"required":["dashboardTotals"]},"PageResponseProductDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PageResponseProductTransaction":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ProductTransaction"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"ProductStatementPage":{"type":"object","properties":{"productInfo":{"$ref":"#/components/schemas/ProfitAndCostDto"},"transactions":{"$ref":"#/components/schemas/PageResponseProductTransaction"}},"required":["productInfo","transactions"]},"ProductTransaction":{"type":"object","properties":{"warehouseName":{"type":["string","null"]},"amountTry":{"type":"number"},"transactionType":{"type":"string"},"runningStock":{"type":"number"},"accountName":{"type":["string","null"]},"warehouseId":{"type":["string","null"]},"quantity":{"type":"number"},"scenario":{"type":"string"},"productId":{"type":"string"},"accountId":{"type":["string","null"]},"documentNumber":{"type":"string"},"docType":{"type":"string"},"productName":{"type":"string"},"id":{"type":"string"},"date":{"type":"string"}},"required":["amountTry","date","docType","documentNumber","id","productId","productName","quantity","runningStock","scenario","transactionType"]},"ProfitAndCostDto":{"type":"object","properties":{"totalCost":{"type":["number","null"]},"totalTransactionCount":{"type":["number","null"]},"totalSalesQuantity":{"type":["number","null"]},"totalPurchaseQuantity":{"type":["number","null"]},"totalStock":{"type":["number","null"]},"totalSalesAmount":{"type":["number","null"]},"totalProfit":{"type":["number","null"]},"totalPurchaseAmount":{"type":["number","null"]}}},"Account":{"type":"object","properties":{"id":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"type":{"type":["string","null"],"enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"title":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"taxAdmin":{"type":["string","null"]},"taxAdminCode":{"type":["string","null"]},"companyType":{"type":["string","null"]},"noNameCompany":{"type":"boolean"},"isForeignCompany":{"type":"boolean"},"currency":{"type":["string","null"]},"contacts":{"type":["array","null"],"items":{"type":"object","additionalProperties":{}}},"bank":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"},{"type":"null"}]},"cheque":{"type":["object","null"],"additionalProperties":{}},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"},"uniqueItems":true},"archived":{"type":"boolean"},"category":{"oneOf":[{"$ref":"#/components/schemas/Category"},{"type":"null"}]},"employeeProfile":{"oneOf":[{"$ref":"#/components/schemas/EmployeeProfile"},{"type":"null"}]},"foreignCompany":{"type":"boolean","writeOnly":true}},"required":["addresses","archived","isForeignCompany","noNameCompany"]},"Address":{"type":"object","properties":{"id":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/Company"},{"type":"null"}]},"account":{"oneOf":[{"$ref":"#/components/schemas/Account"},{"type":"null"}]},"name":{"type":["string","null"]},"address":{"type":["string","null"]},"district":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"gibCountryCode":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]},"workPhone":{"type":["string","null"]},"email":{"type":["string","null"]},"postCode":{"type":["string","null"]},"addressNo":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"phone":{"type":"string"}}},"AmortismanItem":{"type":"object","properties":{"period":{"type":["string","null"]},"year":{"type":"integer","format":"int32"},"month":{"type":"integer","format":"int32"},"get_year":{"type":"integer","format":"int32"},"get_month":{"type":"integer","format":"int32"},"enteredIntoActive":{"type":"boolean"},"isYearChanged":{"type":"boolean"},"passedMonthValue":{"type":"integer","format":"int32"},"remainingMonth":{"type":"integer","format":"int32"},"remainingYear":{"type":"integer","format":"int32"},"relatedMonthlyDepreciationAmount":{"type":"number"},"periodAmortizationAmount":{"type":"number"},"accumulatedAmortization":{"type":"number"},"totalAmortizationAmount":{"type":"number"},"balance":{"type":"number"},"netBookValue":{"type":"number"}},"required":["accumulatedAmortization","balance","enteredIntoActive","get_month","get_year","isYearChanged","month","netBookValue","passedMonthValue","periodAmortizationAmount","relatedMonthlyDepreciationAmount","remainingMonth","remainingYear","totalAmortizationAmount","year"]},"Amortization":{"type":"object","properties":{"relatedMonthlyDepreciationAmount":{"type":"number"},"amortizationTable":{"type":"array","items":{"$ref":"#/components/schemas/AmortismanItem"}}},"required":["amortizationTable","relatedMonthlyDepreciationAmount"]},"AmortizationEntryDto":{"type":"object","properties":{"accCode":{"type":"string"},"accPlanId":{"type":["string","null"]},"credit":{"type":"number"},"debt":{"type":"number"},"exchangeRate":{"type":"number"},"productId":{"type":"string"},"documentId":{"type":"string"},"period":{"type":["string","null"]},"debtTRY":{"type":"number"},"creditTRY":{"type":"number"},"accRecDate":{"type":["string","null"]}},"required":["accCode","credit","creditTRY","debt","debtTRY","documentId","exchangeRate","productId"]},"Category":{"type":"object","properties":{"id":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/Company"},{"type":"null"}]},"categoryType":{"type":["string","null"],"enum":["ACCOUNT","INCOME","EXPENSE","PRODUCT"]},"name":{"type":["string","null"]},"bgColor":{"type":["string","null"]},"textColor":{"type":["string","null"]},"parent":{"oneOf":[{"$ref":"#/components/schemas/Category"},{"type":"null"}]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"Company":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int64"},"companyType":{"type":["string","null"]},"title":{"type":["string","null"]},"vknTckn":{"type":["string","null"]},"taxOffice":{"type":["string","null"]},"mersisNo":{"type":["string","null"]},"registrationNumber":{"type":["string","null"]},"webAddress":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"},{"type":"null"}]},"invoiceAlias":{"type":["string","null"]},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"},"uniqueItems":true},"status":{"type":["string","null"],"enum":["ONBOARDING","ACTIVE","PASSIVE"]},"isSmm":{"type":"boolean"},"isTransferMode":{"type":"boolean"},"isDealer":{"type":"boolean"},"useSmmLogo":{"type":"boolean"},"onboardingProcess":{"type":["object","null"],"additionalProperties":{}},"naceCodes":{"type":["array","null"],"items":{"type":"string"}},"balanceBookTransitionDate":{"type":["string","null"],"format":"date"},"logo":{"type":["string","null"],"format":"byte"},"signature":{"type":["string","null"],"format":"byte"},"transferMode":{"type":"boolean","writeOnly":true},"dealer":{"type":"boolean","writeOnly":true},"smm":{"type":"boolean","writeOnly":true}},"required":["addresses","isDealer","isSmm","isTransferMode","useSmmLogo"]},"EmployeeProfile":{"type":"object","properties":{"id":{"type":["string","null"]},"accountId":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int64"},"account":{"oneOf":[{"$ref":"#/components/schemas/Account"},{"type":"null"}]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"birthDate":{"type":["string","null"],"format":"date"},"gender":{"type":["string","null"],"enum":["E","K"]},"education":{"type":["string","null"]},"educationDate":{"type":["string","null"],"format":"date"},"graduationDepartment":{"type":["string","null"]},"workplaceId":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"previousIncomeTaxBase":{"type":["number","null"]},"previousMinimumWageTaxBase":{"type":["number","null"]},"previousTaxBaseYear":{"type":["integer","null"],"format":"int32"},"job":{"type":["string","null"]},"insuranceBranch":{"type":["string","null"]},"jobCode2821":{"type":["string","null"]},"partTime":{"type":["boolean","null"]},"partTimeMonthlyDays":{"type":["integer","null"],"format":"int32"},"transferFromWorkplaceSgkNo":{"type":["string","null"]},"endDate":{"type":["string","null"],"format":"date"},"sgkExitReason":{"type":["string","null"]},"workExitReason":{"type":["string","null"]},"transferToWorkplaceSgkNo":{"type":["string","null"]},"isMinimumWage":{"type":["boolean","null"]},"wageType":{"type":["string","null"]},"wage":{"type":["number","null"]},"wageCurrency":{"type":["string","null"]},"wageNetGross":{"type":["string","null"]},"employmentStatus":{"type":["string","null"]},"insuranceGroup":{"type":["string","null"]},"sgkDocumentType":{"type":["string","null"]},"lawNo":{"type":["string","null"]},"mineWorker":{"type":["string","null"]},"socialSecurity":{"type":["boolean","null"]},"unemploymentInsurance":{"type":["boolean","null"]},"incomeTax":{"type":["boolean","null"]},"stampTax":{"type":["boolean","null"]},"calculatePayroll":{"type":["boolean","null"]},"attendanceFee":{"type":["boolean","null"]},"exConvict":{"type":["boolean","null"]},"incomeTaxMethod":{"type":["string","null"]},"disabled":{"type":["boolean","null"]},"disabilityDegree":{"type":["string","null"]},"disabilityRate":{"type":["number","null"]},"freeZone":{"type":["boolean","null"]},"incomeTaxIncentive":{"type":["boolean","null"]},"stampTaxIncentive":{"type":["boolean","null"]},"incomeTaxIncentiveLaw4447":{"type":["boolean","null"]},"collectiveLaborAgreement":{"type":["boolean","null"]},"civilAviation":{"type":["boolean","null"]},"minimumWageTaxExempt":{"type":["boolean","null"]},"besEnrolled":{"type":["boolean","null"]},"besStartDate":{"type":["string","null"],"format":"date"},"besEndDate":{"type":["string","null"],"format":"date"},"rndProject":{"type":["string","null"]},"rndProjectId":{"type":["string","null"]},"rndDefinition":{"type":["string","null"]},"withholdingTaxCard":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"},{"type":"null"}]},"minimumWage":{"type":"boolean","writeOnly":true}}},"NotificationPreference":{"type":"object","properties":{"id":{"type":["string","null"]},"user":{"oneOf":[{"$ref":"#/components/schemas/User"},{"type":"null"}]},"type":{"type":["string","null"],"enum":["DAILY_REPORT","SYSTEM_UPDATES"]},"status":{"type":["boolean","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"}}},"PriceList":{"type":"object","properties":{"id":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/Company"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/Product"},{"type":"null"}]},"type":{"type":["string","null"],"enum":["PURCHASE","SALE"]},"currency":{"type":["string","null"]},"unitPrice":{"type":["number","null"]},"tax":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Tax"}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"Product":{"type":"object","properties":{"id":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/Company"},{"type":"null"}]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"productMaps":{"type":"array","items":{"$ref":"#/components/schemas/ProductMap"}},"name":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"unit":{"type":["string","null"],"enum":["C62","DAY","MON","ANN","HUR","D61","D62","PA","BX","MGM","GRM","CTM","KGM","LTR","NT","GT","MMT","CMT","MTR","KTM","MLT","MMQ","CMK","CMQ","MTK","MTQ","KJO","CLT","KWH","CCT","D30","D40","EA","LPA","B32","NCL","PR","RO","R9","SET","DZN","NIU","26"]},"code":{"type":["string","null"]},"barcode":{"type":["string","null"]},"gtipNo":{"type":["string","null"]},"archived":{"type":["boolean","null"]},"category":{"oneOf":[{"$ref":"#/components/schemas/Category"},{"type":"null"}]},"detail":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/User"},{"type":"null"}]}},"required":["prices","productMaps"]},"ProductAmortizationDto":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"purchaseDate":{"type":["string","null"]},"purchasePrice":{"type":["number","null"]},"depreciationLimit":{"type":["number","null"]},"transferredDate":{"type":["string","null"]},"depreciationYear":{"type":["number","null"]},"accelerated":{"type":["boolean","null"]},"cyst":{"type":["boolean","null"]},"depreciationRate":{"type":["number","null"]},"acceleratedDepreciation":{"type":["boolean","null"]},"transferredDepreciationAmount":{"type":["number","null"]},"shortenedDepreciation":{"type":["boolean","null"]},"enteredIntoActive":{"type":["boolean","null"]}}},"ProductMap":{"type":"object","properties":{"id":{"type":["string","null"]},"account":{"oneOf":[{"$ref":"#/components/schemas/Account"},{"type":"null"}]},"name":{"type":["string","null"]},"product":{"oneOf":[{"$ref":"#/components/schemas/Product"},{"type":"null"}]},"unit":{"type":["string","null"]}}},"ProductWithAmortization":{"type":"object","properties":{"product":{"oneOf":[{"$ref":"#/components/schemas/Product"},{"type":"null"}]},"detail":{"$ref":"#/components/schemas/ProductAmortizationDto"},"amortization":{"oneOf":[{"$ref":"#/components/schemas/Amortization"},{"type":"null"}]},"thisPeriodAmortization":{"oneOf":[{"$ref":"#/components/schemas/ThisPeriodAmortization"},{"type":"null"}]},"amortizationEntries":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AmortizationEntryDto"}},"transferredDepreciationAmount":{"type":["number","null"]}},"required":["detail"]},"ThisPeriodAmortization":{"type":"object","properties":{"creditTRY":{"type":["number","null"]}}},"User":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"emailVerified":{"type":["string","null"],"format":"date-time"},"emailVerifiedCode":{"type":["string","null"]},"changePasswordCode":{"type":["string","null"]},"changePasswordCodeExpiresAt":{"type":["string","null"],"format":"date-time"},"phone":{"type":["string","null"]},"image":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"notificationPreference":{"type":"array","items":{"$ref":"#/components/schemas/NotificationPreference"},"uniqueItems":true}},"required":["notificationPreference"]},"ProductOrganizeMapInfo":{"type":"object","properties":{"hasUnmapped":{"type":"boolean"},"mapCount":{"type":"integer","format":"int32"},"suppliers":{"type":"array","items":{"type":"string"}},"mappedNames":{"type":"array","items":{"type":"string"}},"lineDescription":{"type":["string","null"]}},"required":["hasUnmapped","mapCount","mappedNames","suppliers"]},"ProductOrganizeOverviewItem":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/ProductDto"},"map":{"oneOf":[{"$ref":"#/components/schemas/ProductOrganizeMapInfo"},{"type":"null"}]},"usage":{"$ref":"#/components/schemas/ProductOrganizeUsageInfo"}},"required":["product","usage"]},"ProductOrganizeOverviewResponse":{"type":"object","properties":{"generatedAt":{"type":"string"},"productCount":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductOrganizeOverviewItem"}}},"required":["generatedAt","items","productCount"]},"ProductOrganizeUsageInfo":{"type":"object","properties":{"purchaseQuantity":{"type":"number"},"salesQuantity":{"type":"number"},"soldGenuine":{"type":"boolean"}},"required":["purchaseQuantity","salesQuantity","soldGenuine"]},"PageResponseProductMapProjectionDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ProductMapProjectionDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"ProductMapProjectionDto":{"type":"object","properties":{"productUnit":{"type":"string"},"mappedAccountId":{"type":"string"},"mappedName":{"type":"string"},"unitPrice":{"type":"number"},"exchangeRate":{"type":"number"},"accountTitle":{"type":"string"},"productId":{"type":"string"},"accountId":{"type":"string"},"mapId":{"type":"string"},"productName":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string"}},"required":["accountId","accountTitle","mapId","mappedAccountId","productId"]},"ProductSearchRequest":{"type":"object","properties":{"type":{"type":"string","enum":["PRODUCT","SERVICE","EXPENSE","FIXED_ASSET","RAW_MATERIAL"]},"searchQuery":{"type":["string","null"]},"quantity":{"type":["string","null"],"enum":["POSITIVE","ZERO","NEGATIVE"]},"startDate":{"type":"string"},"endDate":{"type":"string"},"categoryIds":{"type":"array","items":{"type":"string"}},"productIds":{"type":["array","null"],"items":{"type":"string"}},"warehouseId":{"type":["string","null"]}},"required":["categoryIds","endDate","startDate","type"]},"PageResponseProductListProjection":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ProductListProjection"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"ProductListProjection":{"type":"object","properties":{"categoryName":{"type":["string","null"]},"salesAmount":{"type":["number","null"]},"purchaseAmount":{"type":["number","null"]},"stock":{"type":["number","null"]},"profit":{"type":["number","null"]},"purchaseQuantity":{"type":["number","null"]},"salesQuantity":{"type":["number","null"]},"productId":{"type":["string","null"]},"cost":{"type":["number","null"]},"name":{"type":["string","null"]},"type":{"type":["string","null"]}}},"PagePayrollDto":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"numberOfElements":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PayrollDto"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"empty":{"type":"boolean"}}},"ExitSuggestionDto":{"type":"object","properties":{"severance":{"type":"string","enum":["NO","YES","ASK"]},"notice":{"type":"string","enum":["NO","YES","ASK"]},"serviceMonths":{"type":"integer","format":"int32"}},"required":["notice","serviceMonths","severance"]},"PagePayrollLineDto":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"numberOfElements":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PayrollLineDto"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"empty":{"type":"boolean"}}},"PayrollEarningAmountDto":{"type":"object","properties":{"kind":{"type":"string","enum":["OVERTIME","NIGHT_OVERTIME","HOLIDAY_OVERTIME","TRANSPORT","MEAL","FAMILY_AID","CHILD_AID","MARRIAGE_AID","BIRTH_AID","DEATH_AID","BONUS","PREMIUM","ATTENDANCE_FEE","HOLIDAY_PAY","FUEL_AID"]},"gross":{"type":"number"},"net":{"type":["number","null"]}},"required":["gross","kind"]},"PayrollIncentiveDetailDto":{"type":"object","properties":{"lawNo":{"type":"string"},"amount":{"type":"number"},"note":{"type":"string"},"defined":{"type":"boolean"}},"required":["amount","defined","lawNo","note"]},"PayrollLineDto":{"type":"object","properties":{"id":{"type":"string"},"payrollId":{"type":"string"},"accountId":{"type":"string"},"calendarDays":{"type":"integer","format":"int32"},"premiumDays":{"type":"integer","format":"int32"},"shortageDays":{"type":"number"},"shortageReasonCode":{"type":["string","null"]},"timesheetDays":{"type":["string","null"]},"timesheetNormalHours":{"type":["number","null"]},"paidDays":{"type":["number","null"]},"paidHours":{"type":["number","null"]},"monthlyGross":{"type":"number"},"anaBrut":{"type":"number"},"additionalEarnings":{"type":"number"},"additionalEarningAmounts":{"type":"array","items":{"$ref":"#/components/schemas/PayrollEarningAmountDto"}},"totalGross":{"type":"number"},"sickLeavePayPolicy":{"type":["string","null"],"enum":["DEDUCT","FULL_PAY","OFFSET_ALLOWANCE"]},"sickLeaveAllowance":{"type":"number"},"argeGvExemption":{"type":"number"},"nurseryAmount":{"type":"number"},"nurseryGvExempt":{"type":"number"},"aidGvExempt":{"type":"number"},"mealExemptDays":{"type":["integer","null"],"format":"int32"},"transportExemptDays":{"type":["integer","null"],"format":"int32"},"pek":{"type":"number"},"pekWage":{"type":"number"},"pekBonus":{"type":"number"},"pekCarryIn":{"type":"number"},"pekCarryOut":{"type":"number"},"pekCarryExpired":{"type":"number"},"sgkBase":{"type":"number"},"sgkEmployee":{"type":"number"},"uiEmployee":{"type":"number"},"sgkEmployer":{"type":"number"},"uiEmployer":{"type":"number"},"incentiveDiscount":{"type":"number"},"incentiveDetails":{"type":"array","items":{"$ref":"#/components/schemas/PayrollIncentiveDetailDto"}},"gvMatrah":{"type":"number"},"prevCumulativeMatrah":{"type":"number"},"cumulativeMatrah":{"type":"number"},"incomeTaxGross":{"type":"number"},"incomeTaxExempt":{"type":"number"},"incomeTaxNet":{"type":"number"},"prevCumulativeAsgariMatrah":{"type":"number"},"cumulativeAsgariMatrah":{"type":"number"},"stampTaxGross":{"type":"number"},"stampTaxExempt":{"type":"number"},"stampTaxNet":{"type":"number"},"bes":{"type":"number"},"besDays":{"type":"integer","format":"int32"},"disabilityDeduction":{"type":"number"},"personalInsuranceDeduction":{"type":"number"},"unionDues":{"type":"number"},"specialDeductions":{"type":"number"},"legalDeductionsTotal":{"type":"number"},"netSalary":{"type":"number"},"netPaid":{"type":"number"},"employerCost":{"type":"number"},"severancePay":{"type":["number","null"]},"noticePay":{"type":["number","null"]},"noticeDailyGross":{"type":["number","null"]},"unusedLeavePay":{"type":["number","null"]},"exitSuggestion":{"oneOf":[{"$ref":"#/components/schemas/ExitSuggestionDto"},{"type":"null"}]},"insureeType":{"type":"string","enum":["NORMAL","SGDP","STAJYER","ISSIZLIKSIZ","NONE"]},"notes":{"type":["string","null"]},"profile":{"$ref":"#/components/schemas/PayrollLineProfileDto"}},"required":["accountId","additionalEarningAmounts","additionalEarnings","aidGvExempt","anaBrut","argeGvExemption","bes","besDays","calendarDays","cumulativeAsgariMatrah","cumulativeMatrah","disabilityDeduction","employerCost","gvMatrah","id","incentiveDetails","incentiveDiscount","incomeTaxExempt","incomeTaxGross","incomeTaxNet","insureeType","legalDeductionsTotal","monthlyGross","netPaid","netSalary","nurseryAmount","nurseryGvExempt","payrollId","pek","pekBonus","pekCarryExpired","pekCarryIn","pekCarryOut","pekWage","personalInsuranceDeduction","premiumDays","prevCumulativeAsgariMatrah","prevCumulativeMatrah","profile","sgkBase","sgkEmployee","sgkEmployer","shortageDays","sickLeaveAllowance","specialDeductions","stampTaxExempt","stampTaxGross","stampTaxNet","totalGross","uiEmployee","uiEmployer","unionDues"]},"PayrollLineProfileDto":{"type":"object","properties":{"workplaceId":{"type":["string","null"]},"lawNo":{"type":["string","null"]},"sgkDocumentType":{"type":["string","null"]},"insuranceGroup":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"sgkExitReason":{"type":["string","null"]},"workExitReason":{"type":["string","null"]},"disabilityRate":{"type":["number","null"]},"disabilityDegree":{"type":["string","null"]},"jobCode2821":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"minimumWageTaxExempt":{"type":"boolean"},"wageType":{"type":["string","null"]}},"required":["minimumWageTaxExempt"]},"DressedWageExcludedDto":{"type":"object","properties":{"kind":{"type":"string","enum":["OVERTIME","NIGHT_OVERTIME","HOLIDAY_OVERTIME","MEAL","TRANSPORT","FAMILY_AID","CHILD_AID","NURSERY","FUEL_AID","MARRIAGE_AID","BIRTH_AID","DEATH_AID","BONUS","PREMIUM","HOLIDAY_PAY","ATTENDANCE_FEE","EMPLOYER_HEALTH_BES","SICK_LEAVE_ALLOWANCE"]},"total":{"type":"number"},"reason":{"type":"string"}},"required":["kind","reason","total"]},"DressedWageItemDto":{"type":"object","properties":{"kind":{"type":"string","enum":["OVERTIME","NIGHT_OVERTIME","HOLIDAY_OVERTIME","MEAL","TRANSPORT","FAMILY_AID","CHILD_AID","NURSERY","FUEL_AID","MARRIAGE_AID","BIRTH_AID","DEATH_AID","BONUS","PREMIUM","HOLIDAY_PAY","ATTENDANCE_FEE","EMPLOYER_HEALTH_BES","SICK_LEAVE_ALLOWANCE"]},"total":{"type":"number"},"months":{"type":"integer","format":"int32"},"method":{"type":"string","enum":["MONTHLY_AVG_30","ANNUAL_365"]},"dailyContribution":{"type":"number"},"includedInTotal":{"type":"boolean"},"note":{"type":["string","null"]}},"required":["dailyContribution","includedInTotal","kind","method","months","total"]},"DressedWageSuggestionDto":{"type":"object","properties":{"accountId":{"type":"string"},"exitDate":{"type":"string","format":"date"},"dailyGross":{"type":"number"},"baseDaily":{"type":"number"},"baseMonthlyGross":{"type":"number"},"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"periodMonths":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DressedWageItemDto"}},"excluded":{"type":"array","items":{"$ref":"#/components/schemas/DressedWageExcludedDto"}},"severanceCeilingDaily":{"type":["number","null"]}},"required":["accountId","baseDaily","baseMonthlyGross","dailyGross","excluded","exitDate","items","periodFrom","periodMonths","periodTo"]},"OtherTaxDto":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Verginin belgedeki adı","example":"Konaklama Vergisi"},"base":{"type":["number","null"],"description":"Verginin matrahı","example":1000.0},"amount":{"type":["number","null"],"description":"Verginin tutarı","example":20.0}}},"PageResponseParsedDocumentDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ParsedDocumentDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"ParsedDocumentDto":{"type":"object","properties":{"id":{"type":["string","null"]},"source":{"type":["string","null"],"description":"Belgenin geldiği gelen kutusu","enum":["INVOICE_INBOX","DOCUMENT_INBOX"]},"sourceId":{"type":["string","null"],"description":"Belgenin gelen kutusundaki kimliği (ETTN ya da yüklenen belge id'si)"},"documentKind":{"type":["string","null"],"description":"Belge türü: fatura/makbuz mu irsaliye mi. Aynı ETTN ikisini de taşıyabilir.","enum":["INVOICE","WAYBILL"]},"direction":{"type":["string","null"],"description":"Belgenin yönü","enum":["INCOMING","OUTGOING"]},"documentType":{"type":["string","null"]},"scenario":{"type":["string","null"]},"documentNo":{"type":["string","null"]},"issueDate":{"type":["string","null"],"format":"date","description":"Belge tarihi; belge okunabilir bir tarih taşımıyorsa boş","example":"2026-07-15"},"accountVkn":{"type":["string","null"],"description":"Karşı tarafın VKN/TCKN'si","example":"1234567890"},"accountName":{"type":["string","null"]},"currency":{"type":["string","null"]},"exchangeRate":{"type":["number","null"]},"grandTotal":{"type":["number","null"]},"grandTotalTry":{"type":["number","null"]},"vatBaseTotal":{"type":["number","null"]},"vatTotal":{"type":["number","null"]},"vatTotalTry":{"type":["number","null"]},"vatBreakdown":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/VatRateTotalsDto"},"description":"Oran bazında KDV kırılımı; anahtar belgedeki yüzde değeri (\"20\", \"10\")"},"withholdingTotal":{"type":["number","null"],"description":"KDV tevkifatı toplamı"},"vatRemaining":{"type":["number","null"],"description":"Tevkifat sonrası kalan KDV"},"accommodationTax":{"type":["number","null"]},"oiv":{"type":["number","null"]},"otv":{"type":["number","null"]},"stopaj":{"type":["number","null"],"description":"Gelir/kurumlar stopajı"},"otherTaxes":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/OtherTaxDto"},"description":"Kendi kolonu olmayan vergiler, kod bazında"},"replyStatus":{"type":["string","null"],"description":"Faturaya verilen yanıt","example":"RED"},"autoImportStatus":{"type":["string","null"],"description":"Otomatik içeri almanın sonucu; hiç denenmediyse boş","enum":["IMPORTED","SKIPPED","FAILED"]},"autoImportReason":{"type":["string","null"],"description":"Atlama sebebi ya da hata sınıfı","example":"DATA_MISMATCH"},"autoImportDetail":{"type":["string","null"]},"autoImportAttempts":{"type":"integer","format":"int32"},"autoImportLastAt":{"type":["string","null"],"format":"date-time"},"schemaVersion":{"type":"integer","format":"int32"},"extractedAt":{"type":["string","null"],"format":"date-time"},"payload":{"type":"null","description":"Belgenin tam parse çıktısı; yalnız include=payload ile dolu"}},"required":["autoImportAttempts","schemaVersion"]},"VatRateTotalsDto":{"type":"object","properties":{"base":{"type":["number","null"],"description":"Bu orandaki KDV matrahı","example":1000.0},"amount":{"type":["number","null"],"description":"Bu orandaki KDV tutarı","example":200.0}}},"AutoImportStatsDto":{"type":"object","properties":{"status":{"type":["string","null"],"description":"Otomatik içeri almanın sonucu","enum":["IMPORTED","SKIPPED","FAILED"]},"reason":{"type":["string","null"],"description":"Atlama sebebi ya da hata sınıfı","example":"DUPLICATE"},"documentCount":{"type":"integer","format":"int64","description":"Bu sonuca ulaşan belge sayısı","example":340}},"required":["documentCount"]},"ParsedDocumentPeriodTotalsDto":{"type":"object","properties":{"period":{"type":["string","null"],"format":"date","description":"Dönemin ilk günü; tarihi okunamayan belgelerin toplandığı satırda boş","example":"2026-07-01"},"documentCount":{"type":"integer","format":"int64","description":"Dönemdeki belge sayısı","example":128},"unconvertedCount":{"type":"integer","format":"int64","description":"Belgesinde kullanılabilir kur olmadığı için toplamlara girmeyen belge sayısı","example":0},"grandTotal":{"type":["number","null"]},"vatBaseTotal":{"type":["number","null"],"description":"KDV matrahı toplamı"},"vatTotal":{"type":["number","null"]},"withholdingTotal":{"type":["number","null"],"description":"KDV tevkifatı toplamı"},"vatRemaining":{"type":["number","null"],"description":"Tevkifat sonrası kalan KDV"},"accommodationTax":{"type":["number","null"]},"oiv":{"type":["number","null"]},"otv":{"type":["number","null"]},"stopaj":{"type":["number","null"]}},"required":["documentCount","unconvertedCount"]},"PageResponseOrderDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/OrderDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PageResponseNoteTemplateDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NoteTemplateDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"Integration":{"type":"object","properties":{"id":{"type":["string","null"]},"provider":{"type":["string","null"]},"service":{"type":["string","null"]},"description":{"type":["string","null"]},"integrator":{"type":["string","null"],"enum":["EDM","NES","TAXTEN","KOLAYSOFT","SOVOS","UYUMSOFT","IZI_BIZ","ELOGO","GIB","PAYTR","SIPAY","KUVEYTTURK","BBVA","ISBANK","ENPARA","VAKIFBANK","TEB","AKBANK","ZIRAAT","HALKBANK","EMLAKKATILIM","YAPIKREDI","QNB"]},"agreementStatus":{"type":["string","null"]},"type":{"type":["string","null"]},"status":{"type":["string","null"]},"lastStatus":{"type":["string","null"],"enum":["OK","FAILED"]},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastErrorAt":{"type":["string","null"],"format":"date-time"},"lastErrorMessage":{"type":["string","null"]},"lastErrorCode":{"type":["string","null"],"enum":["INVALID_CREDENTIALS","BANK_ACCESS_DENIED","ACCESS_BLOCKED","REAUTH_REQUIRED","ACCOUNT_INACTIVE","ACCOUNT_RESTRICTED","UNAUTHORIZED","PROVIDER_UNREACHABLE","PROVIDER_ERROR","INTERNAL_ERROR","UNKNOWN"]}}},"KTAuthUrlResponse":{"type":"object","properties":{"authUrl":{"type":"string","description":"Kullanıcının yönlendirileceği Kuveyt Türk onay adresi","example":"https://identity.kuveytturk.com.tr/connect/authorize?client_id=...&state=..."},"state":{"type":"string","description":"Bu yetkilendirme isteğinin kimliği; bankadan dönen callback ile birlikte geri gönderilir","example":"Qm9iIHNheXMgaGVsbG8gdGhlcmU"}},"required":["authUrl","state"]},"InvoiceInboxDto":{"type":"object","properties":{"id":{"type":["string","null"]},"ettn":{"type":["string","null"]},"company":{"oneOf":[{"$ref":"#/components/schemas/CompanySummaryDto"},{"type":"null"}]},"sender":{"type":["string","null"]},"receiver":{"type":["string","null"]},"supplier":{"type":["string","null"]},"customer":{"type":["string","null"]},"issueDate":{"type":["string","null"],"format":"date"},"payableAmount":{"type":["number","null"]},"currency":{"type":["string","null"]},"scenario":{"type":["string","null"]},"status":{"type":["string","null"],"description":"Kaydın durumu, \"<eylem> - <sonuç>\" biçiminde. Eylem kaydın hangi aşamada olduğunu, sonuç o aşamanın akıbetini söyler. ACCEPT/REJECT/PARTIALACCEPT yanıt talebinin gönderildiğini, ACCEPTED/REJECTED/PARTIALACCEPTED yanıtın sonuçlandığını belirtir. Tanınmayan durum UNKNOWN - UNKNOWN olarak gelir.","example":"RECEIVE - WAIT_APPLICATION_RESPONSE"},"statusDescription":{"type":["string","null"],"description":"status alanının okunabilir karşılığı."},"invoiceCreationDate":{"type":["string","null"],"format":"date-time"},"reply":{"oneOf":[{"$ref":"#/components/schemas/InvoiceInboxReplyDto"},{"type":"null"}]},"invoiceType":{"type":["string","null"]},"invoiceSendType":{"type":["string","null"]},"archived":{"type":"boolean"},"docDetail":{"type":["object","null"],"additionalProperties":{},"description":"Belgenin ek bilgileri; belge kayıt isteğinin taşıdığı docDetail ile birebir aynı anahtarlar. Ek bilgi taşımayan belgede null."}},"required":["archived"]},"PageResponseInvoiceInboxDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceInboxDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"Content":{"type":"object","properties":{"html":{"type":["string","null"]}}},"EInvoiceDataResult":{"type":"object","properties":{"urls":{"oneOf":[{"$ref":"#/components/schemas/FileUrls"},{"type":"null"}]},"parsedJson":{"type":"null"},"content":{"oneOf":[{"$ref":"#/components/schemas/Content"},{"type":"null"}]},"id":{"type":["string","null"]},"invoiceCreationDate":{"type":["string","null"],"format":"date-time"},"companyId":{"type":["integer","null"],"format":"int64"},"path":{"type":["string","null"]},"status":{"type":["string","null"]},"scenario":{"type":["string","null"]},"type":{"type":["string","null"]},"documenttype":{"type":["string","null"]},"reply":{"type":["string","null"]},"reason":{"type":["string","null"]},"replyUser":{"type":["string","null"]},"replyDate":{"type":["string","null"],"format":"date-time"},"companyPartyMatch":{"type":["boolean","null"]}}},"FileUrls":{"type":"object","properties":{"json":{"type":["string","null"]},"xml":{"type":["string","null"]},"html":{"type":["string","null"]},"image":{"type":["string","null"]},"pdf":{"type":["string","null"]}}},"ResultItemDto":{"type":"object","properties":{"category":{"type":["string","null"]},"value":{"type":["string","null"]},"field":{"type":["string","null"]},"id":{"type":["string","null"]},"type":{"type":["string","null"]}}},"SearchResponseDto":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/ResultItemDto"}}},"required":["result"]},"PageResponseEmployeeDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"CodeEntry":{"type":"object","properties":{"value":{"type":["string","null"]},"label":{"type":"string"},"selectable":{"type":"boolean"}},"required":["label","selectable"]},"EmployeeCodesResponse":{"type":"object","properties":{"gender":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"education":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"insuranceBranch":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"jobCode2821":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"sgkExitReason":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"workExitReason":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"employmentStatus":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"wageType":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"wageNetGross":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"insuranceGroup":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"lawNo":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"incomeTaxMethod":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"disabilityDegree":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"argeDefinition":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"withholdingTaxCard":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"mineWorker":{"type":"array","items":{"$ref":"#/components/schemas/CodeEntry"}},"sgkDocumentTypes":{"type":"array","items":{"$ref":"#/components/schemas/SgkDocumentTypeEntry"}}},"required":["argeDefinition","disabilityDegree","education","employmentStatus","gender","incomeTaxMethod","insuranceBranch","insuranceGroup","jobCode2821","lawNo","mineWorker","sgkDocumentTypes","sgkExitReason","wageNetGross","wageType","withholdingTaxCard","workExitReason"]},"SgkDocumentTypeEntry":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"supported":{"type":"boolean"}},"required":["code","label","supported"]},"DocumentSearchRequest":{"type":"object","properties":{"documentType":{"type":"array","items":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]}},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"scenario":{"type":"array","items":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}},"detail":{"type":["boolean","null"]},"currency":{"type":["string","null"]},"status":{"type":"array","items":{"type":"string","enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]}},"accRecStatus":{"type":"array","items":{"type":"string","enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]}},"accRecType":{"type":["string","null"],"enum":["MAHSUP","ACILIS","KAPANIS"]},"accountId":{"type":["string","null"]},"docQuantity":{"type":["boolean","null"]},"searchQuery":{"type":["string","null"]},"archived":{"type":"boolean"},"start":{"type":["string","null"],"format":"date"},"end":{"type":["string","null"],"format":"date"},"dueDateBefore":{"type":["string","null"],"format":"date"},"minAmount":{"type":["number","null"]},"maxAmount":{"type":["number","null"]},"categoryId":{"type":"array","items":{"type":"string"}},"tagId":{"type":"array","items":{"type":"string"}},"bankTags":{"type":"array","items":{"type":"string"}},"withoutCategory":{"type":["boolean","null"]}},"required":["accRecStatus","archived","bankTags","categoryId","documentType","scenario","status","tagId"]},"CategorySummaryDto":{"type":"object","properties":{"name":{"type":"string"},"bgColor":{"type":"string"}},"required":["bgColor","name"]},"DocumentSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"company":{"oneOf":[{"$ref":"#/components/schemas/CompanySummaryDto"},{"type":"null"}]},"documentType":{"type":["string","null"],"enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"documentNo":{"type":["string","null"]},"date":{"type":["string","null"]},"dueDate":{"type":["string","null"]},"currency":{"type":["string","null"]},"note":{"type":["string","null"]},"account":{"oneOf":[{"$ref":"#/components/schemas/AccountSummaryDto"},{"type":"null"}]},"exchangeRate":{"type":["number","null"]},"total":{"type":["number","null"]},"accRecStatus":{"type":["string","null"],"enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"documentName":{"type":["string","null"]},"integratorStatus":{"type":["string","null"]},"integratorErrorDetail":{"type":["string","null"]},"category":{"oneOf":[{"$ref":"#/components/schemas/CategorySummaryDto"},{"type":"null"}]},"tags":{"type":["array","null"],"items":{"type":"string"}},"docDetail":{"type":["object","null"],"additionalProperties":{}}},"required":["id"]},"DocumentUnion":{"description":"Response can contain either Document or DocumentSummaryDto based on detail parameter","oneOf":[{"$ref":"#/components/schemas/DocumentDto"},{"$ref":"#/components/schemas/DocumentSummaryDto"}]},"PageResponseDocumentUnion":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DocumentUnion"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"GibUserDto":{"type":"object","properties":{"identifier":{"type":["string","null"]},"alias":{"type":["string","null"]},"aliasCreationTime":{"type":["string","null"]},"title":{"type":["string","null"]},"type":{"type":["string","null"]}}},"PrepareFormalizationResponse":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/DocumentDto"},"gibUser":{"type":"array","items":{"$ref":"#/components/schemas/GibUserDto"}}},"required":["document","gibUser"]},"VerifyCodeResponse":{"type":"object","properties":{"verify":{"type":["boolean","null"]}}},"DocumentInboxDto":{"type":"object","properties":{"id":{"type":["string","null"]},"companyDto":{"oneOf":[{"$ref":"#/components/schemas/CompanyDto"},{"type":"null"}]},"path":{"type":["string","null"]},"fileName":{"type":["string","null"]},"contentType":{"type":["string","null"]},"documentType":{"type":"string","enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"status":{"type":["string","null"],"enum":["NEW","PENDING","DONE","REMOVED"]},"archived":{"type":"boolean"},"createdAt":{"type":["string","null"],"format":"date-time"}},"required":["archived","direction","documentType","scenario"]},"PageResponseDocumentInboxDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DocumentInboxDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"DocumentSeriesGapDocumentResponse":{"type":"object","properties":{"id":{"type":"string"},"documentNo":{"type":"string"},"date":{"type":"string","example":"2026-09-12"},"scenario":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]},"integratorStatus":{"type":["string","null"],"example":"CANCELLED - SUCCEED"}},"required":["date","documentNo","id","scenario"]},"DocumentSeriesGapDuplicateDocumentResponse":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","example":"2026-03-02"},"status":{"type":["string","null"],"enum":["RECURRING","DRAFT","SAVED","FORMALIZED","DENIED","CANCELLED","ACCEPTED","PENDING","CANCEL_PENDING","REJECTED"]}},"required":["date","id"]},"DocumentSeriesGapDuplicateResponse":{"type":"object","properties":{"documentNo":{"type":"string"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSeriesGapDuplicateDocumentResponse"}}},"required":["documentNo","documents"]},"DocumentSeriesGapNeighbourResponse":{"type":"object","properties":{"id":{"type":"string"},"documentNo":{"type":"string"},"date":{"type":"string","example":"2026-09-01"}},"required":["date","documentNo","id"]},"DocumentSeriesGapRangeResponse":{"type":"object","description":"A run of consecutive missing numbers","properties":{"from":{"type":"string","example":"ABC2026000000210"},"to":{"type":"string","example":"ABC2026000000214"},"count":{"type":"integer","format":"int32"},"leading":{"type":"boolean","description":"True when the gap starts at number 1, before the first document of the year"},"periods":{"type":"array","description":"Accounting periods the gap can belong to","example":["2026-08","2026-09"],"items":{"type":"string"}},"prev":{"oneOf":[{"$ref":"#/components/schemas/DocumentSeriesGapNeighbourResponse"},{"type":"null"}]},"next":{"oneOf":[{"$ref":"#/components/schemas/DocumentSeriesGapNeighbourResponse"},{"type":"null"}]}},"required":["count","from","leading","periods","to"]},"DocumentSeriesGapResponse":{"type":"object","description":"Outgoing document number gaps of a year, grouped by series","properties":{"year":{"type":"integer","format":"int32","description":"Year component of the document numbers","example":2026},"generatedAt":{"type":"string","example":"2026-10-23T18:02:11Z"},"documentCount":{"type":"integer","format":"int32","description":"Documents scanned for the year"},"series":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSeriesGapSeriesResponse"}},"cancelled":{"type":"array","description":"Cancelled and rejected documents; their numbers still fill the series","items":{"$ref":"#/components/schemas/DocumentSeriesGapDocumentResponse"}},"duplicates":{"type":"array","description":"Numbers used by more than one document","items":{"$ref":"#/components/schemas/DocumentSeriesGapDuplicateResponse"}},"unparseable":{"type":"array","description":"Documents whose number does not fit the official number format","items":{"$ref":"#/components/schemas/DocumentSeriesGapDocumentResponse"}}},"required":["cancelled","documentCount","duplicates","generatedAt","series","unparseable","year"]},"DocumentSeriesGapSeriesResponse":{"type":"object","description":"One series, identified by its three character unit code and the year","properties":{"prefix":{"type":"string","example":"ABC2026"},"seriType":{"type":["string","null"],"description":"Series type the scenarios share; null for externally numbered series","example":"EARSIVFATURA"},"scenarios":{"type":"array","items":{"type":"string","enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]}},"first":{"type":"string","description":"Lowest number present in the series","example":"ABC2026000000003"},"last":{"type":"string","description":"Highest number present in the series","example":"ABC2026000000415"},"documentCount":{"type":"integer","format":"int32"},"gapCount":{"type":"integer","format":"int32","description":"Total missing numbers in the series"},"gaps":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSeriesGapRangeResponse"}}},"required":["documentCount","first","gapCount","gaps","last","prefix","scenarios"]},"PageResponsePrepareFormalizationResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/PrepareFormalizationResponse"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"MostUsedPaymentAccountResponse":{"type":"object","properties":{"type":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"accountId":{"type":"string"}},"required":["accountId","type"]},"CheckMultipleDto":{"type":"object","properties":{"documentNo":{"type":"string"},"date":{"type":"string"}},"required":["date","documentNo"]},"BankLedgerSuggestionResponse":{"type":"object","properties":{"accPlanId":{"type":"string","description":"Account plan id of the suggested 102 sub-account."},"accCode":{"type":"string","description":"Ledger code of the suggested 102 sub-account.","example":"102.01.003"},"accName":{"type":["string","null"],"description":"Name of the suggested 102 sub-account.","example":"GARANTİ TL"},"matchedRows":{"type":"integer","format":"int64","description":"Statement rows of the bank account that a movement of this sub-account matches on date, amount and direction."},"statementRows":{"type":"integer","format":"int64","description":"All statement rows of the bank account, so the match can be read as a share."}},"required":["accCode","accPlanId","matchedRows","statementRows"]},"SingleLegSuspicionResponse":{"type":"object","properties":{"movement":{"$ref":"#/components/schemas/VirmanMovementResponse"},"score":{"type":"integer","format":"int32"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["movement","reasons","score"]},"VirmanDetectResponse":{"type":"object","properties":{"pairs":{"type":"array","items":{"$ref":"#/components/schemas/VirmanPairResponse"}},"singleLegSuspicions":{"type":"array","items":{"$ref":"#/components/schemas/SingleLegSuspicionResponse"}},"warnings":{"type":"array","items":{"type":"string"}},"metrics":{"$ref":"#/components/schemas/VirmanMetricsResponse"},"accountsWithoutIban":{"type":"array","items":{"type":"string"}},"skippedMovementCount":{"type":"integer","format":"int32"}},"required":["accountsWithoutIban","metrics","pairs","singleLegSuspicions","skippedMovementCount","warnings"]},"VirmanMetricsResponse":{"type":"object","properties":{"totalMovements":{"type":"integer","format":"int32"},"certain":{"type":"integer","format":"int32"},"suspicious":{"type":"integer","format":"int32"},"coveredAmount":{"type":"number"}},"required":["certain","coveredAmount","suspicious","totalMovements"]},"VirmanMovementResponse":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"bankName":{"type":"string"},"date":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"exchangeRate":{"type":["number","null"]}},"required":["accountId","accountName","amount","bankName","currency","date","description","id"]},"VirmanPairResponse":{"type":"object","properties":{"outgoing":{"$ref":"#/components/schemas/VirmanMovementResponse"},"incoming":{"$ref":"#/components/schemas/VirmanMovementResponse"},"score":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["CERTAIN","SUSPICIOUS"]},"layer":{"type":"string","enum":["K1a","K1b","K1c","K2"]},"reasons":{"type":"array","items":{"type":"string"}},"dayDiff":{"type":"integer","format":"int64"},"feeDiff":{"type":"number"}},"required":["dayDiff","feeDiff","incoming","layer","outgoing","reasons","score","type"]},"PageResponseVirmanCandidateResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/VirmanCandidateResponse"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"VirmanCandidateResponse":{"type":"object","properties":{"movement":{"$ref":"#/components/schemas/VirmanMovementResponse"},"score":{"type":"integer","format":"int32"},"reasons":{"type":"array","items":{"type":"string"}},"dayDiff":{"type":"integer","format":"int64"},"tryDifference":{"type":["number","null"]}},"required":["dayDiff","movement","reasons","score"]},"BankTagCount":{"type":"object","properties":{"tag":{"type":["string","null"],"description":"Etiket kodu; etiketsiz satırlarda null","example":"POS_TAHSILATI"},"tagName":{"type":"string","description":"Etiketin görünen adı","example":"POS tahsilatı"},"group":{"type":["string","null"],"description":"Etiketin grubu; etiketsiz satırlarda null","example":"Kart & POS"},"count":{"type":"integer","format":"int64","description":"Bu etiketi taşıyan bekleyen banka satırı sayısı","example":128}},"required":["count","tagName"]},"CounterAccDto":{"type":"object","properties":{"accPlanId":{"type":["string","null"]},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]}}},"PageResponsePreAccPendingResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/PreAccPendingResponse"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PreAccMismatchDto":{"type":"object","properties":{"accrecAccountId":{"type":["string","null"]},"accrecProductId":{"type":["string","null"]},"paymentAccountId":{"type":["string","null"]},"lineProductId":{"type":["string","null"]}}},"PreAccPendingResponse":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"direction":{"type":"string","enum":["OUTGOING","INCOMING","OFFSET"]},"bankId":{"type":"string"},"bankName":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"counterAcc":{"oneOf":[{"$ref":"#/components/schemas/CounterAccDto"},{"type":"null"}]},"linkedAccountId":{"type":["string","null"]},"predicted":{"oneOf":[{"$ref":"#/components/schemas/PredictedPreAccDto"},{"type":"null"}]},"mismatch":{"oneOf":[{"$ref":"#/components/schemas/PreAccMismatchDto"},{"type":"null"}]}},"required":["amount","bankId","bankName","currency","date","description","direction","id"]},"PredictedPreAccDto":{"type":"object","properties":{"accountId":{"type":["string","null"]},"productId":{"type":["string","null"]}}},"PreAccPendingCountResponse":{"type":"object","properties":{"pending":{"type":"integer","format":"int64"},"mismatch":{"type":"integer","format":"int64"}},"required":["mismatch","pending"]},"DealerSaleDto":{"type":"object","properties":{"subscriptionId":{"type":["string","null"]},"dealer":{"oneOf":[{"$ref":"#/components/schemas/CompanySummaryDto"},{"type":"null"}]},"customer":{"oneOf":[{"$ref":"#/components/schemas/CompanySummaryDto"},{"type":"null"}]},"storePackage":{"oneOf":[{"$ref":"#/components/schemas/StorePackageDto"},{"type":"null"}]},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"credit":{"type":["number","null"]},"status":{"type":["string","null"],"enum":["ACTIVE","PASSIVE"]},"paymentId":{"type":["string","null"]},"paymentAmount":{"type":["number","null"]},"paymentMethod":{"type":["string","null"],"enum":["CREDIT_CARD","BANK_TRANSFER","PROMOTION"]},"paymentStatus":{"type":["string","null"],"enum":["PENDING","CANCELLED","REFUNDED","COMPLETED"]},"createdAt":{"type":["string","null"],"format":"date-time"}}},"DealerSalesReport":{"type":"object","properties":{"sales":{"$ref":"#/components/schemas/PageResponseDealerSaleDto"},"totalPaymentAmount":{"type":"number"}},"required":["sales","totalPaymentAmount"]},"PageResponseDealerSaleDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DealerSaleDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"DealerCustomerDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int64"},"title":{"type":["string","null"]},"vknTckn":{"type":["string","null"]},"taxOffice":{"type":["string","null"]},"companyType":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["ONBOARDING","ACTIVE","PASSIVE"]},"createdAt":{"type":["string","null"],"format":"date-time"}}},"PageResponseDealerCustomerDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DealerCustomerDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"DbsServiceResponseMukellefKontrolDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"statusMessage":{"type":["string","null"]},"requestIdentifier":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"warningMessage":{"type":["string","null"]},"resultContainer":{"oneOf":[{"$ref":"#/components/schemas/MukellefKontrolDto"},{"type":"null"}]},"isSuccess":{"type":"boolean"}},"required":["isSuccess","status"]},"DefterDto":{"type":"object","properties":{"id":{"type":["string","null"]},"baslangicTarihi":{"type":"string","format":"date-time"},"bitisTarihi":{"type":["string","null"],"format":"date-time"},"defterTipi":{"type":"string"},"faal":{"type":"boolean"},"varsayilan":{"type":"boolean"}},"required":["baslangicTarihi","defterTipi","faal","varsayilan"]},"GelirUnsuruDto":{"type":"object","properties":{"basDilekceTarihi":{"type":["string","null"]},"basTar":{"type":["string","null"]},"bitDilekceTarihi":{"type":["string","null"]},"bitTar":{"type":["string","null"]},"durum":{"type":["string","null"]},"subeNo":{"type":["string","null"]},"tipi":{"type":["string","null"]},"vdKodu":{"type":["string","null"]},"vergiKodu":{"type":["string","null"]},"vergiNo":{"type":["string","null"]},"mukBlgIslemTuruBitTur":{"type":["string","null"]},"mukBlgIslemTuruBitTurText":{"type":["string","null"]}}},"HataliKayitDateRangeDto":{"type":"object","properties":{"defterId":{"type":["string","null"]},"baslangic":{"type":["string","null"]},"bitis":{"type":["string","null"]}}},"MaliMusavirBilgileriDto":{"type":"object","properties":{"unvani":{"type":["string","null"]},"vergiDairesiKodu":{"type":["string","null"]},"vkn":{"type":["string","null"]},"sozlesmeTarihi":{"type":["string","null"]},"sozlesmeSonTarih":{"type":["string","null"]},"sozlesmeNo":{"type":["string","null"]}}},"MukellefDefterDurumDto":{"type":"object","properties":{"mevcutDefterler":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DefterDto"}},"acilacakDefterler":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DefterDto"}},"guncellenecekDefterler":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DefterDto"}},"hataliDefterler":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DefterDto"}},"hataliKayitlar":{"type":["array","null"],"items":{"$ref":"#/components/schemas/HataliKayitDateRangeDto"}}}},"MukellefKontrolDto":{"type":"object","properties":{"unvan":{"type":["string","null"]},"vkn":{"type":["string","null"]},"vergiDairesiKodu":{"type":["string","null"]},"sirketTuru":{"type":["string","null"]},"vergiBilgisi":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"gelirUnsuruList":{"type":["array","null"],"items":{"$ref":"#/components/schemas/GelirUnsuruDto"}},"mukellefiyetList":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MukellefMukellefiyetDto"}},"basvuruTarihi":{"type":["string","null"]},"guncelVergiBilgisi":{"type":["array","null"],"items":{"type":"string"},"uniqueItems":true},"maliMusavirBilgileri":{"oneOf":[{"$ref":"#/components/schemas/MaliMusavirBilgileriDto"},{"type":"null"}]},"odaBilgileri":{"oneOf":[{"$ref":"#/components/schemas/OdaBilgileriDto"},{"type":"null"}]},"noter":{"type":"boolean"},"ortaklik":{"type":"boolean"},"temsilciKimlikNo":{"type":["string","null"]},"tipList":{"type":["array","null"],"items":{"type":"string"}},"mukellefDefterDurum":{"oneOf":[{"$ref":"#/components/schemas/MukellefDefterDurumDto"},{"type":"null"}]},"mukellefTuruList":{"type":["array","null"],"items":{"type":"string"}},"isOnayActive":{"type":"boolean"},"onayActive":{"type":"boolean"}},"required":["isOnayActive","noter","onayActive","ortaklik"]},"MukellefMukellefiyetDto":{"type":"object","properties":{"id":{"type":["string","null"]},"deleted":{"type":"boolean"},"kod":{"type":"string"},"baslangicDonem":{"type":["string","null"]},"bitisDonem":{"type":["string","null"]},"subeNo":{"type":["integer","null"],"format":"int32"},"vdKodu":{"type":["string","null"]},"donemKodu":{"type":["string","null"]},"baslangicTarihi":{"type":["string","null"]},"bitisTarihi":{"type":["string","null"]}},"required":["deleted","kod"]},"OdaBilgileriDto":{"type":"object","properties":{"odaUnvan":{"type":["string","null"]},"odaVdKodu":{"type":["string","null"]},"odaVergiNo":{"type":["string","null"]},"sozlesmeNo":{"type":["string","null"]},"sozlesmeSonTarih":{"type":["string","null"]},"sozlesmeTarihi":{"type":["string","null"]},"sozlesmeTipi":{"type":["string","null"]}}},"SistemVarliklariDto":{"type":"object","properties":{"id":{"type":["string","null"]},"deleted":{"type":"boolean"},"v":{"type":["integer","null"],"format":"int32"},"izinler":{"type":["string","null"]},"kod":{"type":["string","null"]},"ad":{"type":["string","null"]},"ilId":{"type":["string","null"]},"gelirBelgeTuru":{"type":["string","null"]},"giderBelgeTuru":{"type":["string","null"]},"aciklama":{"type":["string","null"]},"seriSiraNoZorunluMu":{"type":["boolean","null"]},"kayitTuru":{"type":["string","null"]},"modul":{"type":["string","null"]},"giderKayitTuruKodu":{"type":["string","null"]},"gelirKayitTuruKodu":{"type":["string","null"]},"vBaslangic":{"type":["string","null"],"format":"date-time","writeOnly":true},"vbaslangic":{"type":"string","format":"date-time"}},"required":["deleted"]},"DbsDocumentTypeResponse":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"requiresSerialNumber":{"type":"boolean"}},"required":["code","name","requiresSerialNumber"]},"DbsCategoryResponse":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"module":{"type":["string","null"]}},"required":["code","name"]},"SabitKiymetDto":{"type":"object","properties":{"id":{"type":["string","null"]},"deleted":{"type":"boolean"},"alisTarihi":{"type":"string"},"ad":{"type":["string","null"]},"kod":{"type":"string"},"amortismanYontemiKodu":{"type":"string"},"donemKodu":{"type":"string"},"ekonomikOmur":{"type":"integer","format":"int32"},"miktar":{"type":"number","format":"double"},"birimKodu":{"type":"string"},"birimFiyat":{"type":"number","format":"double"},"sabitKiymetBirikmisDevreden":{"type":["number","null"],"format":"double"},"sabitKiymetBirikmisToplam":{"type":["number","null"],"format":"double"},"sabitKiymetDefterDegeri":{"type":["number","null"],"format":"double"},"sabitKiymetToplamDeger":{"type":["number","null"],"format":"double"},"yillikGider":{"type":["number","null"],"format":"double"},"iktisadiKiymetTuruKodu":{"type":["string","null"]},"sabitKiymetDurumKodu":{"type":["string","null"]},"giderId":{"type":["string","null"]},"devirFisiSatirId":{"type":["string","null"]},"defter":{"type":["string","null"]},"defterId":{"type":["string","null"]},"toplamNetDefterDegeri":{"type":["number","null"],"format":"double"},"toplamBirikmisAmortismanDegeri":{"type":["number","null"],"format":"double"}},"required":["alisTarihi","amortismanYontemiKodu","birimFiyat","birimKodu","deleted","donemKodu","ekonomikOmur","kod","miktar"]},"SabitKiymetPage":{"type":"object","properties":{"resultList":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SabitKiymetDto"}},"size":{"type":["integer","null"],"format":"int32"}}},"DbsTaxOffice":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"cityCode":{"type":"string"}},"required":["cityCode","code","name"]},"DbsFixedAssetCode":{"type":"object","properties":{"kod":{"type":"string"},"tebligNo":{"type":"string"},"madde":{"type":"string"},"aciklama":{"type":"string"},"normalOran":{"type":"number","format":"double"},"faydaliOmur":{"type":"integer","format":"int32"}},"required":["aciklama","kod"]},"MukellefGenelBilgilerDto":{"type":"object","properties":{"deleted":{"type":"boolean"},"adSoyad":{"type":["string","null"]},"unvan":{"type":["string","null"]},"mukellefKimlikNo":{"type":"string"},"beyannameList":{"type":"array","items":{"$ref":"#/components/schemas/MukellefMukellefiyetDto"}},"mukellefUyariList":{"type":"array","items":{}},"defterler":{"type":"array","items":{"$ref":"#/components/schemas/DefterDto"}},"onayli":{"type":"boolean"},"bilgilendirmeMesajiList":{"type":"array","items":{}},"bilancoList":{"type":"array","items":{}},"beyannameXmlExport":{"type":"boolean"},"lastLoginAttempt":{"type":"null"},"temsilciKimlikNo":{"type":["string","null"]}},"required":["beyannameList","beyannameXmlExport","bilancoList","bilgilendirmeMesajiList","defterler","deleted","mukellefKimlikNo","mukellefUyariList","onayli"]},"MukellefPage":{"type":"object","properties":{"resultList":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MukellefGenelBilgilerDto"}},"size":{"type":["integer","null"],"format":"int32"}}},"SicilFaaliyetDto":{"type":"object","properties":{"baslamaTarihi":{"type":["string","null"]},"bitisTarihi":{"type":["string","null"]},"durum":{"type":["string","null"]},"faaliyetAdi":{"type":["string","null"]},"faaliyetKodu":{"type":["string","null"]},"sira":{"type":["string","null"]},"subeNo":{"type":["string","null"]},"vdKodu":{"type":["string","null"]},"vergiNo":{"type":["string","null"]}}},"DataPurgeDto":{"type":"object","description":"Silme işinin durumu ve kapsam ilerlemesi","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED"]},"scopes":{"type":"array","items":{"type":"string","enum":["ACC_PLAN","ACC_RECORDS","DOCUMENTS","INBOX","PRODUCTS","ACCOUNTS"]}},"progress":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DataPurgeProgressDto"}},"error":{"type":["string","null"]},"requestedBy":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","progress","scopes","status"]},"DataPurgeProgressDto":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"deleted":{"type":"integer","format":"int32"}},"required":["deleted","total"]},"DataPurgeBlockerDto":{"type":"object","description":"Bir kapsamın silinmesini engelleyen durum","properties":{"scope":{"type":"string","enum":["ACC_PLAN","ACC_RECORDS","DOCUMENTS","INBOX","PRODUCTS","ACCOUNTS"]},"code":{"type":"string"},"message":{"type":"string"},"count":{"type":"integer","format":"int64"}},"required":["code","count","message","scope"]},"DataPurgeDetailsDto":{"type":"object","description":"Uyarı metinleri için ek sayılar; kapsam toplamına girmezler","properties":{"accRecLines":{"type":"integer","format":"int64"},"transferredRecords":{"type":"integer","format":"int64"},"formalizedDocuments":{"type":"integer","format":"int64"},"orders":{"type":"integer","format":"int64"},"salesOffers":{"type":"integer","format":"int64"},"personnelAccounts":{"type":"integer","format":"int64"},"inboxInvoices":{"type":"integer","format":"int64","description":"Gelen kutusundaki entegratör faturası sayısı. Silinmiyor, uyarı metni için."},"uploadedFiles":{"type":"integer","format":"int64","description":"Gelen kutusuna yüklenmiş ve INBOX kapsamıyla silinecek dosya sayısı"}},"required":["accRecLines","formalizedDocuments","inboxInvoices","orders","personnelAccounts","salesOffers","transferredRecords","uploadedFiles"]},"DataPurgeHandleDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED"]}},"required":["id","status"]},"DataPurgePreviewDto":{"type":"object","description":"Silinecek kayıt sayıları ve silmeyi engelleyen durumlar","properties":{"transferMode":{"type":"boolean","description":"Firma aktarım programı modunda mı; kapalıysa silme reddedilir"},"counts":{"type":"object","additionalProperties":{"type":"integer","format":"int64"},"description":"Kapsam başına silinecek ana kayıt sayısı"},"details":{"$ref":"#/components/schemas/DataPurgeDetailsDto"},"blockers":{"type":"array","description":"Doluysa ilgili kapsam seçilerek silme başlatılamaz","items":{"$ref":"#/components/schemas/DataPurgeBlockerDto"}},"activePurge":{"oneOf":[{"$ref":"#/components/schemas/DataPurgeHandleDto"},{"type":"null"}]}},"required":["blockers","counts","details","transferMode"]},"PageResponseString":{"type":"object","properties":{"content":{"type":"array","items":{"type":"string"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PosCommissionAccountDefault":{"type":"object","properties":{"accPlanId":{"type":"string"},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]},"ruleKey":{"type":["string","null"],"description":"Hesabın hatırlandığı kural anahtarı.","example":"pos_commission_770"}},"required":["accPlanId"]},"PosCommissionDecisionHistory":{"type":"object","properties":{"decision":{"type":["string","null"],"enum":["ACCEPTED","MODIFIED","REJECTED","MANUAL"]},"suggestedAmount":{"type":["number","null"]},"finalAmount":{"type":["number","null"]},"decidedAt":{"type":["string","null"],"format":"date-time"}}},"PosCommissionDefaultsResponse":{"type":"object","properties":{"debit":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionAccountDefault"},{"type":"null"}]},"credit":{"oneOf":[{"$ref":"#/components/schemas/PosCommissionAccountDefault"},{"type":"null"}]},"learning":{"type":"array","description":"Bu banka hesabında kalıp başına son kararlar (yeni → eski). Firma içi veridir.","items":{"$ref":"#/components/schemas/PosCommissionMethodHistory"}}},"required":["learning"]},"PosCommissionMethodHistory":{"type":"object","properties":{"method":{"type":"string","description":"Öneriyi üreten kalıp.","example":"AKBANK_KS"},"recent":{"type":"array","items":{"$ref":"#/components/schemas/PosCommissionDecisionHistory"}}},"required":["method","recent"]},"AccountTypePeriodDto":{"type":"object","properties":{"accountType":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"period":{"type":"string"},"inflow":{"type":"number"},"outflow":{"type":"number"},"net":{"type":"number"},"inflowTRY":{"type":"number"},"outflowTRY":{"type":"number"},"netTRY":{"type":"number"},"transactionCount":{"type":"integer","format":"int64"}},"required":["accountType","inflow","inflowTRY","net","netTRY","outflow","outflowTRY","period","transactionCount"]},"AccountTypeTotalsDto":{"type":"object","properties":{"accountType":{"type":"string","enum":["BANKA","KASA","CARI","POS","KREDIKARTI","PERSONEL","FIRMACEKI","MUSTERICEKI","ALINANSENET","VERILENSENET","ORTAK","KREDI","YATIRIM","RESMIKURUM"]},"inflow":{"type":"number"},"outflow":{"type":"number"},"net":{"type":"number"},"inflowTRY":{"type":"number"},"outflowTRY":{"type":"number"},"netTRY":{"type":"number"},"transactionCount":{"type":"integer","format":"int64"}},"required":["accountType","inflow","inflowTRY","net","netTRY","outflow","outflowTRY","transactionCount"]},"AccountsSummaryResponse":{"type":"object","properties":{"periods":{"$ref":"#/components/schemas/PageResponseAccountTypePeriodDto"},"totals":{"type":"array","items":{"$ref":"#/components/schemas/AccountTypeTotalsDto"}}},"required":["periods","totals"]},"PageResponseAccountTypePeriodDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountTypePeriodDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"CounterAccountDto":{"type":"object","properties":{"accCode":{"type":"string"},"accPlanId":{"type":["string","null"]},"accName":{"type":["string","null"]},"recordCount":{"type":"integer","format":"int64"},"lastAccDate":{"type":["string","null"]}},"required":["accCode","recordCount"]},"CounterAccountsResponse":{"type":"object","properties":{"accPlanId":{"type":"string"},"accCode":{"type":"string"},"counterAccounts":{"type":"array","items":{"$ref":"#/components/schemas/CounterAccountDto"}}},"required":["accCode","accPlanId","counterAccounts"]},"ConsolidatedDeficitRecord":{"type":"object","properties":{"totalCredit":{"type":"number"},"totalDebt":{"type":"number"},"currency":{"type":["string","null"]}},"required":["totalCredit","totalDebt"]},"UnassignedRuleGroupCountResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int32"}},"required":["count"]},"GroupDocumentDto":{"type":"object","properties":{"id":{"type":"string"},"documentNo":{"type":["string","null"]},"date":{"type":["string","null"]},"direction":{"type":"string"},"documentType":{"type":"string"},"referenceInboxId":{"type":["string","null"]},"status":{"type":"string"},"groupAmountTRY":{"type":"number"},"accRecStatus":{"type":["string","null"]}},"required":["direction","documentType","groupAmountTRY","id","status"]},"GroupProductDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":["string","null"]}},"required":["id","name","type"]},"UnassignedRuleGroupDto":{"type":"object","properties":{"ruleKey":{"type":"string"},"kind":{"type":["string","null"]},"direction":{"type":["string","null"]},"side":{"type":["string","null"]},"cariRole":{"type":["string","null"]},"vatRate":{"type":["integer","null"],"format":"int32"},"rowCount":{"type":"integer","format":"int32"},"docCount":{"type":"integer","format":"int32"},"totalTRY":{"type":"number"},"products":{"type":"array","items":{"$ref":"#/components/schemas/GroupProductDto"}},"accountTitles":{"type":"array","items":{"type":"string"}},"sampleDescriptions":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/GroupDocumentDto"}},"suggestedAccPlanId":{"type":["string","null"]},"suggestedAccCode":{"type":["string","null"]},"suggestedAccName":{"type":["string","null"]},"suggestionSource":{"type":["string","null"],"enum":["exact","prefix"]}},"required":["accountTitles","docCount","documents","products","rowCount","ruleKey","sampleDescriptions","totalTRY"]},"TransferableDocumentsSummaryProjection":{"type":"object","properties":{"documentCount":{"type":"integer","format":"int64"},"month":{"type":"string"}},"required":["documentCount","month"]},"TransferableDocumentProjection":{"type":"object","properties":{"balanceTRY":{"type":"number"},"accrecExchangeRate":{"type":"number"},"documentId":{"type":"string"},"documentNo":{"type":["string","null"]},"accRecStatus":{"type":"string"},"accRecDate":{"type":"string"},"documentType":{"type":"string"},"accrecCurrency":{"type":"string"},"balance":{"type":"number"},"debt":{"type":"number"},"credit":{"type":"number"},"debtTRY":{"type":"number"},"creditTRY":{"type":"number"},"scenario":{"type":"string"},"direction":{"type":"string"},"accrecId":{"type":"string"},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]},"docClass":{"type":"integer","format":"int32"},"docGroup":{"type":"integer","format":"int32"},"seriesKey":{"type":"string"},"batchKey":{"type":"string"},"description":{"type":["string","null"]}},"required":["accRecDate","accRecStatus","accrecCurrency","accrecExchangeRate","accrecId","balance","balanceTRY","batchKey","credit","creditTRY","debt","debtTRY","direction","docClass","docGroup","documentId","documentType","scenario","seriesKey"]},"TransferableDocumentsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TransferableDocumentProjection"}},"totalDocument":{"type":"integer","format":"int64"},"usedAccCodes":{"type":"array","items":{"$ref":"#/components/schemas/UsedAccCodeProjection"}},"lucaDetailedBatches":{"type":"boolean"}},"required":["data","lucaDetailedBatches","totalDocument","usedAccCodes"]},"UsedAccCodeProjection":{"type":"object","properties":{"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]}}},"PageResponseDocumentDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DocumentDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"ReadyCountResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int64"}},"required":["count"]},"PeriodSummaryRow":{"type":"object","properties":{"month":{"type":["string","null"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"documentType":{"type":["string","null"],"enum":["NORMAL","IADE","TEVKIFAT","TEVKIFATIADE","ISTISNA","IHRACKAYITLI","OZELMATRAH","SGK","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","SEVK","SARJ","SARJANLIK","KONAKLAMAVERGISI","ILAC_TIBBICIHAZ","MATBUDAN","TEKNOLOJIDESTEK","YTBIADE","YTBISTISNA","YTBSATIS","YTBTEVKIFAT","YTBTEVKIFATIADE","ACILIS","DEVIR","URETIM"]},"direction":{"type":["string","null"],"enum":["OUTGOING","INCOMING","OFFSET"]},"accRecStatus":{"type":["string","null"],"enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"count":{"type":"integer","format":"int64"},"total":{"type":"number"}},"required":["count","total"]},"MuavinRow":{"type":"object","properties":{"id":{"type":["string","null"]},"accDate":{"type":["string","null"],"format":"date"},"documentDate":{"type":["string","null"],"format":"date"},"documentTime":{"type":["string","null"]},"dueDate":{"type":["string","null"],"format":"date"},"accRecType":{"type":["string","null"],"enum":["MAHSUP","ACILIS","KAPANIS"]},"accRecStatus":{"type":["string","null"],"enum":["NULL","DRAFT","UNDECLARED","UNBALANCED","CANCELLED","SAVED","FORMALIZED","TRANSFERRED"]},"scenario":{"type":["string","null"],"enum":["BANKA","DRAFT","ZRAPORU","OKC","MATBU","EARSIVFATURA","ESMM","EMM","TEMELFATURA","TICARIFATURA","IHRACAT","OZELFATURA","YOLCUBERABERFATURA","KAMU","HKS","TEMELIRSALIYE","HKSIRSALIYE","IDISIRSALIYE","ITHALAT","ENERJI","ILAC_TIBBICIHAZ","IDIS","YATIRIMTESVIK","BORDRO","GIDERPUSULASI","EGIDERPUSULASI","POLICE","TAHSILAT","ODEME","MUHASEBE","STOK","KIRA","DIGER"]},"documentNo":{"type":["string","null"]},"documentId":{"type":["string","null"]},"documentType":{"type":["string","null"]},"documentName":{"type":["string","null"]},"createdById":{"type":["string","null"]},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]},"description":{"type":["string","null"]},"debt":{"type":["number","null"]},"credit":{"type":["number","null"]},"exchangeRate":{"type":["number","null"]},"currency":{"type":["string","null"]},"accountId":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"balance":{"type":["number","null"]},"balanceTRY":{"type":["number","null"]},"runningBalance":{"type":["number","null"]},"runningBalanceTRY":{"type":["number","null"]},"counterAcc":{"type":["string","null"]},"counterAcc3":{"type":["string","null"]},"debtTRY":{"type":["number","null"]},"creditTRY":{"type":["number","null"]}}},"PageResponseMuavinRow":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/MuavinRow"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"MizanRowProjection":{"type":"object","properties":{"balanceType":{"type":["string","null"]},"reverseBalance":{"type":["boolean","null"]},"runningDebt":{"type":["number","null"]},"runningCredit":{"type":["number","null"]},"period":{"type":["string","null"]},"runningBalance":{"type":["number","null"]},"rule":{"type":["string","null"]},"balance":{"type":["number","null"]},"code":{"type":["string","null"]},"debt":{"type":["number","null"]},"credit":{"type":["number","null"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]},"type":{"type":["string","null"]},"level":{"type":["string","null"]}}},"PageResponseMizanRowProjection":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/MizanRowProjection"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"DocumentStatusSummaryDto":{"type":"object","properties":{"undeclaredCount":{"type":"number"},"unbalancedCount":{"type":"number"},"cancelledCount":{"type":"number"},"savedCount":{"type":"number"},"formalizedCount":{"type":"number"},"inboxCount":{"type":"number"},"inComplete":{"type":"number"},"draftCount":{"type":"number"},"yearMonth":{"type":"string","format":"date"},"nullCount":{"type":"number"}},"required":["cancelledCount","draftCount","formalizedCount","inComplete","inboxCount","nullCount","savedCount","unbalancedCount","undeclaredCount","yearMonth"]},"AccountByAccCodeProjection":{"type":"object","properties":{"documentId":{"type":["string","null"]},"documentNo":{"type":["string","null"]},"exchangeRate":{"type":"number"},"debt":{"type":"number"},"credit":{"type":"number"},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]},"accountId":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"type":["string","null"]},"currency":{"type":["string","null"]},"date":{"type":["string","null"]}},"required":["credit","debt","exchangeRate"]},"AssignedRuleGroupDto":{"type":"object","properties":{"ruleKey":{"type":"string"},"kind":{"type":["string","null"]},"direction":{"type":["string","null"]},"side":{"type":["string","null"]},"cariRole":{"type":["string","null"]},"vatRate":{"type":["integer","null"],"format":"int32"},"rowCount":{"type":"integer","format":"int32"},"docCount":{"type":"integer","format":"int32"},"savedDocCount":{"type":"integer","format":"int32"},"totalTRY":{"type":"number"},"accPlanId":{"type":"string"},"accCode":{"type":["string","null"]},"accName":{"type":["string","null"]},"products":{"type":"array","items":{"$ref":"#/components/schemas/GroupProductDto"}},"accountTitles":{"type":"array","items":{"type":"string"}},"sampleDescriptions":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/GroupDocumentDto"}}},"required":["accPlanId","accountTitles","docCount","documents","products","rowCount","ruleKey","sampleDescriptions","savedDocCount","totalTRY"]},"AccountWithMultipleAccountingCodesDto":{"type":"object","properties":{"accountId":{"type":"string"},"title":{"type":"string"},"tcVkn":{"type":["string","null"]},"accountingCodes":{"type":"array","items":{"type":"string"}}},"required":["accountId","accountingCodes","title"]},"PageResponseAccountWithMultipleAccountingCodesDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountWithMultipleAccountingCodesDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"AccountingCodeWithMultipleAccountsDto":{"type":"object","properties":{"accountingCode":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountBriefDto"}}},"required":["accountingCode","accounts"]},"PageResponseAccountingCodeWithMultipleAccountsDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountingCodeWithMultipleAccountsDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"AccountingCodeAccountMappingDto":{"type":"object","properties":{"accountingCodes":{"type":"array","items":{"type":"string"}},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountBriefDto"}}},"required":["accountingCodes","accounts"]},"PageResponseAccountDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"InvoiceWaybillDto":{"type":"object","properties":{"documentNo":{"type":"string","description":"Faturadaki irsaliye numarası","example":"IRS2026000000001"},"imported":{"type":"boolean","description":"İrsaliye sistemde belge olarak kayıtlı mı (içeri alındı mı)"},"state":{"type":"string","description":"İrsaliyenin durumu","enum":["IMPORTED","IN_INBOX","NOT_FOUND"]},"uninvoiced":{"type":"boolean","description":"İrsaliye bu cariye ait ve faturalanmamış satırı var mı; true ise document satırları bağlanabilir"},"document":{"oneOf":[{"$ref":"#/components/schemas/WaybillSummaryDto"},{"type":"null"}]},"inboxEttn":{"type":["string","null"],"description":"Gelen kutusundaki irsaliyenin ETTN'i; içeri alma ekranını açmak için"},"inboxStatus":{"type":["string","null"],"description":"Gelen kutusu entegratör durumu","example":"RECEIVE - SUCCEED"},"inboxArchived":{"type":["boolean","null"],"description":"Gelen kutusu kaydı arşivlenmiş mi"},"inboxIssueDate":{"type":["string","null"],"format":"date","description":"Gelen kutusundaki irsaliyenin düzenlenme tarihi","example":"2026-09-01"}},"required":["documentNo","imported","state","uninvoiced"]},"WaybillGroupsDto":{"type":"object","properties":{"uninvoiced":{"type":"array","description":"Carinin faturalanmamış irsaliyeleri; satırları faturaya bağlanabilir","items":{"$ref":"#/components/schemas/WaybillSummaryDto"}},"invoice":{"type":"array","description":"Faturada referans verilen her irsaliye numarasının durumu","items":{"$ref":"#/components/schemas/InvoiceWaybillDto"}}},"required":["invoice","uninvoiced"]},"WaybillLineSummaryDto":{"type":"object","properties":{"id":{"type":"string","description":"Satır id'si"},"quantity":{"type":["number","null"],"description":"Miktar","example":1},"unit":{"type":["string","null"],"description":"Birim kodu","example":"C62"},"product":{"oneOf":[{"$ref":"#/components/schemas/WaybillProductRefDto"},{"type":"null"}]}},"required":["id"]},"WaybillProductRefDto":{"type":"object","properties":{"id":{"type":"string","description":"Ürün id'si"},"name":{"type":["string","null"],"description":"Ürün adı"}},"required":["id"]},"WaybillSummaryDto":{"type":"object","properties":{"id":{"type":"string","description":"İrsaliye belge id'si"},"documentNo":{"type":["string","null"],"description":"İrsaliye numarası","example":"IRS2026000000001"},"date":{"type":["string","null"],"description":"İrsaliye tarihi","example":"2026-09-01"},"time":{"type":["string","null"],"description":"İrsaliye saati","example":"14:04:08"},"status":{"type":["string","null"],"description":"Belge durumu","example":"SAVED"},"scenario":{"type":["string","null"],"description":"Senaryo","example":"TEMELIRSALIYE"},"direction":{"type":["string","null"],"description":"Yön","enum":["INCOMING","OUTGOING"]},"lines":{"type":"array","description":"İrsaliyenin faturalanmamış satırları; tamamı faturalanmışsa boş döner","items":{"$ref":"#/components/schemas/WaybillLineSummaryDto"}}},"required":["id","lines"]},"AccountSummaryPeriodDto":{"type":"object","properties":{"period":{"type":"string"},"inflow":{"type":"number"},"outflow":{"type":"number"},"net":{"type":"number"},"inflowTRY":{"type":"number"},"outflowTRY":{"type":"number"},"netTRY":{"type":"number"},"endBalance":{"type":"number"},"endBalanceTRY":{"type":"number"},"transactionCount":{"type":"integer","format":"int64"}},"required":["endBalance","endBalanceTRY","inflow","inflowTRY","net","netTRY","outflow","outflowTRY","period","transactionCount"]},"AccountSummaryResponse":{"type":"object","properties":{"periods":{"$ref":"#/components/schemas/PageResponseAccountSummaryPeriodDto"},"totals":{"$ref":"#/components/schemas/AccountSummaryTotalsDto"}},"required":["periods","totals"]},"AccountSummaryTotalsDto":{"type":"object","properties":{"inflow":{"type":"number"},"outflow":{"type":"number"},"net":{"type":"number"},"inflowTRY":{"type":"number"},"outflowTRY":{"type":"number"},"netTRY":{"type":"number"},"endBalance":{"type":"number"},"endBalanceTRY":{"type":"number"},"openingBalance":{"type":"number"},"openingBalanceTRY":{"type":"number"},"transactionCount":{"type":"integer","format":"int64"}},"required":["endBalance","endBalanceTRY","inflow","inflowTRY","net","netTRY","openingBalance","openingBalanceTRY","outflow","outflowTRY","transactionCount"]},"PageResponseAccountSummaryPeriodDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountSummaryPeriodDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"CurrencyBalanceDto":{"type":"object","properties":{"currency":{"type":"string","description":"Para birimi","example":"USD"},"balance":{"type":"number","description":"Bu para birimindeki bakiye","example":276.0},"balanceTRY":{"type":"number","description":"Bakiyenin TL karşılığı","example":11454.0}},"required":["balance","balanceTRY","currency"]},"PageResponseCurrencyBalanceDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyBalanceDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"PageResponseAddressDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AddressDto"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"AccountMizanRow":{"type":"object","properties":{"id":{"type":["string","null"]},"title":{"type":["string","null"]},"tcVkn":{"type":["string","null"]},"type":{"type":["string","null"]},"cheque":{"type":["string","null"]},"bank":{"type":["string","null"]},"currency":{"type":["string","null"]},"companyType":{"type":["string","null"]},"debtTRY":{"type":["number","null"]},"creditTRY":{"type":["number","null"]},"balance":{"type":["number","null"]},"debt":{"type":["number","null"]},"credit":{"type":["number","null"]},"balanceOriginal":{"type":["number","null"]},"lastEntryDate":{"type":["string","null"]}}},"MizanResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PageResponseAccountMizanRow"},"total":{"type":["number","null"]}},"required":["data"]},"PageResponseAccountMizanRow":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountMizanRow"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"NextAccCodeResponse":{"type":"object","properties":{"code":{"type":"string"},"patternSelected":{"type":"boolean"}},"required":["code","patternSelected"]},"AccountPlanSearchRequest":{"type":"object","properties":{"searchQuery":{"type":["string","null"],"description":"Hesap kodu ya da adında aranacak metin. Büyük/küçük harf ayrımı yapılmaz.","example":"120"},"level":{"type":["string","null"],"description":"Hesabın seviyesi. Muhasebe kaydı yalnızca Alt seviye hesaplara atılabilir.","enum":["Ana","Ara","Alt"],"example":"Alt"},"includeParents":{"type":"boolean","description":"Hesap planı satırlarına tek düzen hesap planındaki 1-3 haneli üst hesapları da ekler. Eklenen satırların id'si boştur.","example":true}},"required":["includeParents"]},"PageResponseAccountPlanDTO":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AccountPlanDTO"}},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"isLast":{"type":"boolean"}},"required":["content","isLast","pageNumber","pageSize","totalElements","totalPages"]},"CompanyPermissionDto":{"type":"object","properties":{"userRole":{"type":["string","null"],"enum":["ADMIN","ACCOUNTANT","OWNER","SUPPORT","USER","CREW","DEALER"]},"smmCompanyId":{"type":["integer","null"],"format":"int64"},"taxOffice":{"type":"string"},"companyType":{"type":"string"},"vknTckn":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["ONBOARDING","ACTIVE","PASSIVE"]},"smm":{"type":["boolean","null"]},"id":{"type":"integer","format":"int64"}},"required":["companyType","id","status","taxOffice","title","vknTckn"]},"AnalyticsContextDto":{"type":"object","properties":{"user_type":{"type":"string","description":"Aktif firmanın türü: mali müşavir ya da işletme","enum":["musavir","isletme"]},"plan":{"type":["string","null"],"description":"Aktif ya da son ana paketin kodu","example":"clqb3lqbr0000356wg1c7a123"},"trial_status":{"type":"string","description":"Abonelik durumu","enum":["trial","paid","expired"]},"trial_ends_at":{"type":"string","format":"date-time","description":"Deneme sürecinin bitiş zamanı; deneme dışında boş","example":"2026-12-01T00:00:00"},"is_paying":{"type":"boolean","description":"Firmanın şu an ücretli bir paketi var mı"}},"required":["is_paying","trial_status","user_type"]},"GIBUSER":{"type":"object","properties":{"identifier":{"type":"string","xml":{"name":"IDENTIFIER"}},"alias":{"type":"string","xml":{"name":"ALIAS"}},"title":{"type":"string","xml":{"name":"TITLE"}},"type":{"type":"string","xml":{"name":"TYPE"}},"registertime":{"type":"string","xml":{"name":"REGISTER_TIME"}},"unit":{"type":"string","xml":{"name":"UNIT"}},"aliascreationtime":{"type":"string","xml":{"name":"ALIAS_CREATION_TIME"}},"aliasremovaltime":{"type":"string","xml":{"name":"ALIAS_REMOVAL_TIME"}},"documenttype":{"type":"string","xml":{"name":"DOCUMENTTYPE"}}}},"TaxListDto":{"type":"object","properties":{"id":{"type":["string","null"]},"code":{"type":["string","null"]},"label":{"type":["string","null"]},"value":{"type":["string","null"]},"taxCode":{"type":["string","null"]},"description":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"TaxRateDto":{"type":"object","properties":{"id":{"type":["string","null"]},"label":{"type":["string","null"]},"value":{"type":["number","null"],"format":"double"},"code":{"type":["string","null"]},"description":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"category":{"type":["string","null"],"enum":["VAT","OTV","OIV","KONAKLAMA","RUSUM","WITHHOLDING","VAT_EXCEPTION","EXPORT_REGISTERED","VAT_WITHHOLDING","SGK_WITHHOLDING","EXCHANGE_REGISTRATION_FEE","OTHER_LEVY"]}}},"TaxResponse":{"type":"object","properties":{"taxList":{"type":"array","items":{"$ref":"#/components/schemas/TaxListDto"}},"taxRates":{"type":"array","items":{"$ref":"#/components/schemas/TaxRateDto"}}},"required":["taxList","taxRates"]},"CurrencyResponse":{"type":"object","properties":{"id":{"type":["string","null"]},"date":{"type":["string","null"]},"previousDate":{"type":["string","null"]},"isIsNullDay":{"type":["boolean","null"]},"sell":{"type":["number","null"]},"buy":{"type":["number","null"]},"sell_ef":{"type":["number","null"]},"buy_ef":{"type":["number","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"nextDate":{"type":["string","null"]},"currency":{"type":["string","null"]},"isNullDay":{"type":"boolean","writeOnly":true}}},"DocumentDeleteResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"FileDeleteRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"maxItems":2147483647,"minItems":1}},"required":["ids"]}},"securitySchemes":{"apiKeyAuth":{"type":"apiKey","description":"API Key for authentication","name":"X-API-Key","in":"header"},"apiSecretAuth":{"type":"apiKey","description":"API Secret for authentication","name":"X-API-Secret","in":"header"}}},"x-tagGroups":[{"name":"Hesaplar","tags":["Account","Account Address"]},{"name":"Ürünler","tags":["Product","Stock"]},{"name":"Satış","tags":["SalesOffer","Order"]},{"name":"Belge","tags":["Document","Bank Document","POS","Document Notes","Document Upload","Z-Report","Lease","Expense Note Document"]},{"name":"Gelen Kutusu","tags":["Invoice Inbox"]},{"name":"Muhasebe","tags":["Accounting Plan","Accounting","DBS"]},{"name":"Personel","tags":["Workplace","Department","Employee","Payroll","Timesheet"]},{"name":"Global Arama","tags":["GlobalSearch"]},{"name":"Raporlar","tags":["Reports"]},{"name":"Ayarlar","tags":["Profile","Support","Settings","Category","Tag","Webhook"]},{"name":"Yardımcı API","tags":["Currency","Definitions","GibUser"]}]}