{"openapi":"3.1.0","info":{"title":"Keywarden SDK API","version":"0.3.0","description":"Cihaz/SDK uclari. Kimlik: Authorization: Bearer pk_live_…"},"components":{"securitySchemes":{"publicKey":{"type":"http","scheme":"bearer","bearerFormat":"pk_live_…"}},"schemas":{},"parameters":{}},"paths":{"/v1/health":{"get":{"tags":["health"],"security":[{"publicKey":[]}],"responses":{"200":{"description":"Sunucu ve magaza baglantisi durumu","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"version":{"type":"string"},"db":{"type":"boolean"},"stores":{"type":"object","properties":{"play":{"type":"object","nullable":true,"properties":{"voidedSyncedOk":{"type":"boolean"},"count":{"type":"number"},"ageSeconds":{"type":"number","nullable":true}},"required":["voidedSyncedOk","count","ageSeconds"]}},"required":["play"]}},"required":["ok","version","db","stores"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/keys":{"get":{"tags":["keys"],"security":[{"publicKey":[]}],"responses":{"200":{"description":"Bu uygulamanin dogrulama anahtarlari","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"keys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string"},"alg":{"type":"string","enum":["ES256"]},"kty":{"type":"string","enum":["EC"]},"crv":{"type":"string","enum":["P-256"]},"x":{"type":"string"},"y":{"type":"string"},"pem":{"type":"string"},"status":{"type":"string","enum":["active","retiring"]}},"required":["kid","alg","kty","crv","x","y","pem","status"]}}},"required":["ok","keys"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/store/verify":{"post":{"tags":["store"],"security":[{"publicKey":[]}],"description":"Play ya da Apple satin almasini dogrular, kaydeder ve imzali bundle doner. Govde ayrisik birlesimdir: store=\"play\" purchaseToken, store=\"apple\" signedTransaction (StoreKit 2 JWS) ister. installId GIZLI bir yetenektir: pk_ + installId bilen herkes o cihaz adina hareket edebilir — SDK rastgele bir UUID uretip gizli saklamali ve `dev` alani kendi installId'sinden FARKLI olan hicbir bundle'i kabul etmemelidir.","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"store":{"type":"string","enum":["play"]},"productId":{"type":"string","minLength":1,"maxLength":120},"purchaseToken":{"type":"string","minLength":1,"maxLength":4096},"kind":{"type":"string","enum":["inapp","subs"],"default":"inapp"},"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]},"integrityToken":{"type":"string","maxLength":8192}},"required":["store","productId","purchaseToken","device"],"additionalProperties":false},{"type":"object","properties":{"store":{"type":"string","enum":["apple"]},"productId":{"type":"string","minLength":1,"maxLength":200},"signedTransaction":{"type":"string","minLength":1,"maxLength":16384},"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]}},"required":["store","productId","signedTransaction","device"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Dogrulandi; imzali bundle döner","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"purchase":{"type":"object","properties":{"state":{"anyOf":[{"type":"number"},{"type":"string"},{"nullable":true}]},"productId":{"type":"string"},"expiresAt":{"type":"number","nullable":true}},"required":["state","productId","expiresAt"]},"bundle":{"type":"string"},"support":{"type":"object","properties":{"totalMicros":{"type":"number"},"currency":{"type":"string"},"next":{"type":"object","nullable":true,"properties":{"productId":{"type":"string"},"priceMicros":{"type":"number"},"remainingMicros":{"type":"number"}},"required":["productId","priceMicros","remainingMicros"]},"paidTotal":{"type":"object","nullable":true,"properties":{"currency":{"type":"string"},"micros":{"type":"number"}},"required":["currency","micros"]}},"required":["totalMicros","currency","next","paidTotal"]},"integrity":{"type":"object","nullable":true,"properties":{"app":{"type":"boolean"},"device":{"type":"boolean"},"licensed":{"type":"boolean"}},"required":["app","device","licensed"]}},"required":["ok","purchase","bundle","support","integrity"]}}}},"400":{"description":"Gecersiz istek","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"402":{"description":"PURCHASE_INVALID | VOIDED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"403":{"description":"INTEGRITY_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"409":{"description":"DEVICE_LIMIT_REACHED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"502":{"description":"STORE_UNREACHABLE","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/devices/sync":{"post":{"tags":["devices"],"security":[{"publicKey":[]}],"description":"Heartbeat + guncel haklar. installId GIZLI bir yetenektir: pk_ + installId bilen herkes o cihaz adina hareket edebilir (bundle alir, sayac tuketir) — SDK rastgele bir UUID uretip gizli saklamali ve `dev` alani kendi installId'sinden FARKLI olan hicbir bundle'i kabul etmemelidir. Hediye esikleri bu ucta yalnizca EKLENIR, hicbir zaman silinmez.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]},"ownedStoreProducts":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":200,"description":"Magazanin SU AN bu kurulum icin listeledigi urun kimlikleri. YALNIZCA storeQueryOk:true ile birlikte dikkate alinir. Listede olmayan aktif satin almalar unlisted olur (KeyFlow pruneRevoked) — ama sadece consumable OLMAYAN ve bir entitlement'a eslenen urunler: bagislar/consumable'lar Play tarafindan hicbir zaman listelenmez ve asla dusurulmez."},"storeQueryOk":{"type":"boolean","description":"YALNIZCA magazanin TUM urun turleri (inapp + subs) icin yaptigi sorgu BASARILI oldugunda true gonderin. Yoksa/false ise ownedStoreProducts yok sayilir ve hicbir kayit dusurulmez — basarisiz bir magaza sorgusundan gelen bos liste kullanicinin haklarini silerdi."},"kid":{"type":"string","maxLength":40,"description":"Istemcinin dogrulamada kullandigi imza anahtarinin kid degeri — anahtar emekliligi guvenligi icin sayilir. Bu uygulamaya ait olmayan bir kid sessizce yok sayilir."}},"required":["device"]}}}},"responses":{"200":{"description":"Guncel haklar + imzali bundle","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"bundle":{"type":"string"},"entitlements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"src":{"type":"string","enum":["store","license","gift"]},"pid":{"type":"string"},"exp":{"type":"number","nullable":true}},"required":["id","src","exp"]}},"support":{"type":"object","properties":{"totalMicros":{"type":"number"},"currency":{"type":"string"},"next":{"type":"object","nullable":true,"properties":{"productId":{"type":"string"},"priceMicros":{"type":"number"},"remainingMicros":{"type":"number"}},"required":["productId","priceMicros","remainingMicros"]},"paidTotal":{"type":"object","nullable":true,"properties":{"currency":{"type":"string"},"micros":{"type":"number"}},"required":["currency","micros"]}},"required":["totalMicros","currency","next","paidTotal"]},"activations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"licensePrefix":{"type":"string"},"expiresAt":{"type":"number","nullable":true}},"required":["id","licensePrefix","expiresAt"]}},"serverTime":{"type":"number"}},"required":["ok","bundle","entitlements","support","activations","serverTime"]}}}},"400":{"description":"Gecersiz istek","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/meters/consume":{"post":{"tags":["meters"],"security":[{"publicKey":[]}],"description":"Deneme sayacini tuketir (`peek:true` ile yalnizca okur). Sayac CIHAZ BASINADIR: installId gizli tutulmazsa baskasi bu cihazin haklarini tuketebilir.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"feature":{"type":"string","minLength":1,"maxLength":64},"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]},"peek":{"type":"boolean"}},"required":["feature","device"]}}}},"responses":{"200":{"description":"Sayac durumu","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"feature":{"type":"string"},"limit":{"type":"number"},"used":{"type":"number"},"left":{"type":"number"},"allowed":{"type":"boolean"},"period":{"type":"string","enum":["lifetime","daily","monthly"]},"resetsAt":{"type":"number","nullable":true}},"required":["ok","feature","limit","used","left","allowed","period","resetsAt"]}}}},"400":{"description":"Gecersiz istek","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"404":{"description":"Taninmayan ozellik","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/licenses/activate":{"post":{"tags":["licenses"],"security":[{"publicKey":[]}],"description":"Lisans anahtarini bu cihaz icin aktive eder. AYNI cihazdan tekrar cagrilirsa yeni koltuk ACILMAZ (idempotent), yalnizca heartbeat tazelenir.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":8,"maxLength":64,"description":"Lisans anahtari. Bosluk/tire serbest, kucuk harf kabul edilir: KW-XXXX-XXXX-XXXX-XXXX"},"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]}},"required":["key","device"],"additionalProperties":false}}}},"responses":{"200":{"description":"Aktivasyon acildi ya da tazelendi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"activation":{"type":"object","properties":{"id":{"type":"string"},"licensePrefix":{"type":"string"},"expiresAt":{"type":"number","nullable":true},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["id","licensePrefix","expiresAt","seats"]},"bundle":{"type":"string","nullable":true}},"required":["ok","activation","bundle"]}}}},"400":{"description":"Gecersiz istek veya anahtar bicimi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"404":{"description":"NOT_FOUND — anahtar bulunamadi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"409":{"description":"NO_SEATS_AVAILABLE — koltuklar dolu (gövdede seats)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"410":{"description":"LICENSE_REVOKED | LICENSE_EXPIRED | LICENSE_SUSPENDED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/licenses/validate":{"post":{"tags":["licenses"],"security":[{"publicKey":[]}],"description":"Anahtarin durumunu okur. Koltuk ACMAZ; `device` verilirse yalnizca o cihaz ZATEN aktifse heartbeat tazelenir.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":8,"maxLength":64,"description":"Lisans anahtari. Bosluk/tire serbest, kucuk harf kabul edilir: KW-XXXX-XXXX-XXXX-XXXX"},"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]}},"required":["key"],"additionalProperties":false}}}},"responses":{"200":{"description":"Lisans durumu","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"license":{"type":"object","properties":{"status":{"type":"string","enum":["active","suspended","revoked","expired"]},"expiresAt":{"type":"number","nullable":true},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]},"entitlements":{"type":"array","items":{"type":"string"}}},"required":["status","expiresAt","seats","entitlements"]},"activated":{"type":"boolean"},"bundle":{"type":"string","nullable":true}},"required":["ok","license","activated","bundle"]}}}},"400":{"description":"Gecersiz istek veya anahtar bicimi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"404":{"description":"NOT_FOUND — anahtar bulunamadi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}},"/v1/licenses/deactivate":{"post":{"tags":["licenses"],"security":[{"publicKey":[]}],"description":"Bu cihazin bu lisanstaki koltugunu birakir.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"installId":{"type":"string","minLength":8,"maxLength":128,"description":"Kurulum basina rastgele UUID (donanim kimligi DEGIL). GIZLI TUTUN: pk_ + installId bilen herkes bu cihaz adina hareket edebilir. En az 8 karakter — legacy fixture'larindaki kisa installId'ler (ornegin 'inst-A') SDK uclarinda kullanilamaz."},"platform":{"type":"string","enum":["android","ios","macos","other"],"description":"Cihaz platformu. Verilmezse mevcut deger korunur; ilk kayitta 'other' olur."},"appVersion":{"type":"string","maxLength":64},"osVersion":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":120}},"required":["installId"]},"key":{"type":"string","minLength":8,"maxLength":64,"description":"Lisans anahtari. Bosluk/tire serbest, kucuk harf kabul edilir: KW-XXXX-XXXX-XXXX-XXXX"}},"required":["device","key"],"additionalProperties":false}}}},"responses":{"200":{"description":"Birakilan koltuk sayisi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"released":{"type":"number"}},"required":["ok","released"]}}}},"400":{"description":"Gecersiz istek veya anahtar bicimi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"401":{"description":"pk_ gerekli","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"404":{"description":"NOT_FOUND — anahtar bulunamadi","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"state":{"anyOf":[{"type":"number"},{"type":"string"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"max":{"type":"number"}},"required":["used","max"]}},"required":["ok","error"]}}}}}}}}}