{"openapi":"3.1.0","info":{"title":"Eksen 360 API","version":"1.0.0","description":"Eksen 360 REST API — yangın alarm + güvenlik bakım servisi platformu için dış sistem entegrasyonu. Kimlik doğrulama: Bearer token. Webhook event aboneliği ile asenkron event dinleyebilirsiniz.","contact":{"name":"Eksen Bilişim","email":"support@eksen.local"}},"servers":[{"url":"https://eksen-platform-eksen-bilisim-s-projects.vercel.app/api","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"eksen_*","description":"Admin panelinden üretilmiş API belirteci. `/admin/api-tokens` sayfasında oluşturulur."}},"schemas":{"Customer":{"type":"object","properties":{"id":{"type":"string"},"companyName":{"type":"string"},"contactPerson":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"groupId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ServiceForm":{"type":"object","properties":{"id":{"type":"string"},"formNo":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SIGNED"]},"customerId":{"type":"string"},"technicianId":{"type":"string"},"panelBrand":{"type":"string","nullable":true},"panelModel":{"type":"string","nullable":true},"systemType":{"type":"string","enum":["ADRESLI","KONVANSIYONEL"],"nullable":true},"signedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Device":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"type":{"type":"string","enum":["PANEL","DEDEKTOR","AKU","BUTON","SIREN","IZOLATOR","GAZ_DEDEKTORU","MODUL","DIGER"]},"brand":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"serialNo":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"installDate":{"type":"string","format":"date-time","nullable":true},"warrantyEnds":{"type":"string","format":"date-time","nullable":true}}},"Page":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"WebhookPayload":{"type":"object","properties":{"event":{"type":"string","enum":["FORM_SIGNED","INVOICE_PAID","ISSUE_CREATED","QUOTE_ACCEPTED"]},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","description":"Event-spesifik payload"}}}},"parameters":{"Limit":{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200},"description":"Sayfa boyutu"},"Offset":{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Başlangıç indexi"}}},"paths":{"/v1/customers":{"get":{"summary":"Müşterileri listele","tags":["Customers"],"security":[{"bearerAuth":["read:customers"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"Sayfalı müşteri listesi","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}}}]}}}},"401":{"description":"Eksik / geçersiz token"},"403":{"description":"Yetersiz kapsam (scope)"}}}},"/v1/forms":{"get":{"summary":"Servis formlarını listele","tags":["Forms"],"security":[{"bearerAuth":["read:forms"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"status","in":"query","schema":{"type":"string","enum":["DRAFT","SIGNED"]},"description":"Durum filtresi"},{"name":"customer_id","in":"query","schema":{"type":"string"},"description":"Belirli müşterinin formlarını filtrele"}],"responses":{"200":{"description":"Sayfalı form listesi","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceForm"}}}}]}}}}}}},"/v1/devices":{"get":{"summary":"Cihaz envanterini listele","tags":["Devices"],"security":[{"bearerAuth":["read:devices"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"name":"customer_id","in":"query","schema":{"type":"string"},"description":"Belirli müşterinin cihazları"}],"responses":{"200":{"description":"Sayfalı cihaz listesi","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Device"}}}}]}}}}}}}},"x-webhooks":{"description":"Webhook abonelikleri admin panelinden yapılandırılır (/admin/webhooks). Her gönderim şu header'larla gelir: X-Eksen-Event, X-Eksen-Delivery, X-Eksen-Signature (HMAC-SHA256 hex, \"sha256=...\" prefix'i ile).","events":["FORM_SIGNED","INVOICE_PAID","ISSUE_CREATED","QUOTE_ACCEPTED"],"payloadSchema":{"$ref":"#/components/schemas/WebhookPayload"}}}