{"openapi": "3.0.3", "info": {"title": "gunsview Bayi API", "version": "1.1.0", "description": "Sunucu taraf\u0131 bayi API. Sipari\u015fler idempotenttir; anahtar ba\u015f\u0131na dakikada 60 istek."}, "servers": [{"url": "https://gunsview.com"}], "security": [{"BearerAuth": []}], "components": {"securitySchemes": {"BearerAuth": {"type": "http", "scheme": "bearer"}}, "schemas": {"Error": {"type": "object", "properties": {"success": {"type": "boolean", "example": false}, "error": {"type": "object", "properties": {"code": {"type": "string"}, "message": {"type": "string"}}}, "requestId": {"type": "string"}}}, "Order": {"type": "object", "properties": {"id": {"type": "string", "format": "uuid"}, "number": {"type": "string"}, "target": {"type": "string"}, "quantity": {"type": "integer"}, "priceKurus": {"type": "integer"}, "status": {"type": "string", "enum": ["PENDING", "PROCESSING", "COMPLETED", "PARTIAL", "FAILED", "CANCELED", "CANCELLED"]}, "statusLabel": {"type": "string"}, "demo": {"type": "boolean"}, "createdAt": {"type": "string", "format": "date-time"}, "updatedAt": {"type": "string", "format": "date-time"}}}}}, "paths": {"/api/v1/packages": {"get": {"summary": "Bayiye ait indirimli paket fiyatlar\u0131", "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "integer"}, "quantity": {"type": "integer"}, "priceKurus": {"type": "integer"}}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/balance": {"get": {"summary": "Kullan\u0131labilir bakiye", "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "object", "properties": {"balanceKurus": {"type": "integer"}, "currency": {"type": "string"}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/validate": {"get": {"summary": "Sipari\u015f \u00f6ncesi hedef ve paket do\u011frulama", "parameters": [{"name": "target", "in": "query", "required": true, "schema": {"type": "string"}}, {"name": "packageId", "in": "query", "required": false, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "object", "properties": {"target": {"type": "string"}, "accepted": {"type": "boolean"}, "quantity": {"type": "integer"}, "priceKurus": {"type": "integer"}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/orders/search": {"get": {"summary": "Filtreli ve sayfal\u0131 bayi sipari\u015f aramas\u0131", "parameters": [{"name": "page", "in": "query", "schema": {"type": "integer", "minimum": 1}}, {"name": "pageSize", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100}}, {"name": "status", "in": "query", "schema": {"type": "string"}}, {"name": "target", "in": "query", "schema": {"type": "string"}}, {"name": "from", "in": "query", "schema": {"type": "string", "format": "date-time"}}, {"name": "to", "in": "query", "schema": {"type": "string", "format": "date-time"}}], "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "object", "properties": {"items": {"type": "array", "items": {"$ref": "#/components/schemas/Order"}}, "page": {"type": "integer"}, "pageSize": {"type": "integer"}, "total": {"type": "integer"}, "hasNext": {"type": "boolean"}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/orders": {"post": {"summary": "Tekrara dayan\u0131kl\u0131 sipari\u015f olu\u015ftur", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "minLength": 8, "maxLength": 128}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["packageId", "target"], "properties": {"packageId": {"type": "integer"}, "target": {"type": "string", "example": "profilim"}}}}}}, "responses": {"201": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"$ref": "#/components/schemas/Order"}, "requestId": {"type": "string"}}}}}}, "400": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "409": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "503": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/orders/{id}": {"get": {"summary": "Yaln\u0131zca kendi sipari\u015fini g\u00f6r\u00fcnt\u00fcle", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}}], "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"$ref": "#/components/schemas/Order"}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/orders/{id}/events": {"get": {"summary": "Sipari\u015f durum olaylar\u0131n\u0131 getir", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}}], "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "array", "items": {"type": "object", "properties": {"status": {"type": "string"}, "statusLabel": {"type": "string"}, "note": {"type": "string"}, "createdAt": {"type": "string", "format": "date-time"}}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/dealer/usage": {"get": {"summary": "Bayi API kullan\u0131m analiti\u011fi", "parameters": [{"name": "days", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 90}}], "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "object", "properties": {"windowDays": {"type": "integer"}, "totalRequests": {"type": "integer"}, "errorRequests": {"type": "integer"}, "averageResponseMs": {"type": "number", "nullable": true}, "daily": {"type": "array"}, "endpoints": {"type": "array"}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/api/v1/dealer/health": {"get": {"summary": "Bayi entegrasyon sa\u011fl\u0131k durumu", "responses": {"200": {"description": "Ba\u015far\u0131l\u0131 yan\u0131t", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"type": "boolean"}, "data": {"type": "object", "properties": {"service": {"type": "string"}, "status": {"type": "string"}, "mode": {"type": "string"}, "orders": {"type": "integer"}, "balanceKurus": {"type": "integer"}, "rateLimitPerMinute": {"type": "integer"}}}, "requestId": {"type": "string"}}}}}}, "401": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Tutarl\u0131 JSON hata yan\u0131t\u0131", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}}}