{"openapi":"3.1.0","info":{"title":"Flottix","description":"\n# Flottix API\n\n**Flottix** - A comprehensive IT Asset Management solution for tracking hardware assets, software licenses, and their assignments.\n\n## Features\n\n- **Asset Management**: Track hardware assets from procurement to retirement\n- **License Management**: Manage software licenses with seat-based tracking\n- **Assignment Tracking**: Checkout/checkin workflow for assets and license seats\n- **Audit Trail**: Complete history of all asset and license transactions\n- **QR Code Support**: Generate QR codes for quick asset lookup\n- **Dashboard Analytics**: Real-time statistics and alerts\n\n## Authentication\n\nTwo authentication mechanisms are available:\n\n### Browser sessions (HTTP-only cookie)\n\n1. Call `POST /api/v1/auth/login` with email and password\n2. The server sets an HTTP-only cookie containing a JWT token\n3. Cookies are sent automatically by browsers on subsequent requests\n\n### API keys (programmatic access & AI agents)\n\n1. Create a key via `POST /api/v1/api-keys` (or in the dashboard: Settings → API Keys)\n2. Send it as `Authorization: Bearer flottix_...` or `X-API-Key: flottix_...`\n3. Accepted by **all** `/api/v1` endpoints and the MCP endpoint `/api/mcp`\n\n**Scopes** are enforced per resource: GET requires `read:<resource>`, writes\nrequire `write:<resource>`, assignment operations accept `write:<resource>`\nor `checkout:<resource>`. The `admin` scope bypasses scope checks. Surfaces\nwithout a dedicated scope (settings, webhooks, billing, ...) and the\nauthentication endpoints require `admin` scope or reject keys. Plan\nentitlements apply: organizations whose plan disables API access are\nrejected with `403`.\n\n## MCP Integration (AI agents)\n\nFlottix ships a native Model Context Protocol server at **`/api/mcp`**\n(Streamable HTTP) exposing 55+ tools across all domain modules — assets,\nlicenses, kits, audits, reports — with structured typing and two-phase write\nconfirmation. Connect from Claude Desktop, Cursor, or any MCP client using an\nAPI key as the bearer token. Every agent action passes through the\ndeterministic state engine: multi-tenant isolation and the full audit trail\nare enforced server-side.\n\n## Rate Limiting\n\nRequests are rate-limited per identity (limits are configurable via server\nsettings). When the limit is hit, endpoints return `429` with a\n`Retry-After` header:\n\n| Identity  | Default limit        |\n|-----------|----------------------|\n| Anonymous | 60 requests/minute   |\n| User      | 300 requests/minute  |\n| Agent     | 3000 requests/minute |\n| Admin     | 6000 requests/minute |\n\n## Pagination\n\nList endpoints support pagination with the following query parameters:\n- `page`: Page number (default: 1)\n- `per_page`: Items per page (default: 20, max: 100)\n- `sort_by`: Field to sort by\n- `sort_order`: `asc` or `desc`\n\nResponse format:\n```json\n{\n  \"data\": [...],\n  \"meta\": {\n    \"page\": 1,\n    \"per_page\": 20,\n    \"total\": 150,\n    \"total_pages\": 8\n  }\n}\n```\n\n## Error Handling\n\nAll non-2xx JSON responses share a consistent envelope:\n\n```json\n{\n  \"detail\": \"Human-readable error message\",\n  \"request_id\": \"server log correlation ID (when applicable)\",\n  \"errors\": [{\"loc\": [\"body\", \"name\"], \"msg\": \"Field required\", \"type\": \"missing\"}]\n}\n```\n\n`422` responses always include field-level `errors` (input values are never\nreflected back). Common HTTP status codes:\n- `400` - Bad Request (invalid input, e.g. null bytes)\n- `401` - Unauthorized (not authenticated)\n- `403` - Forbidden (insufficient permissions or plan-level API restriction)\n- `404` - Not Found\n- `409` - Conflict\n- `422` - Validation Error\n- `429` - Rate Limit Exceeded (honor the `Retry-After` header)\n- `500` - Internal Server Error (sanitized message in production)\n\n## Roles & Permissions\n\n| Role | Description | Permissions |\n|------|-------------|------------|\n| **Admin** | Full system access | All operations including user management |\n| **Agent** | Asset manager | Create, update, checkout/checkin assets and licenses |\n| **User** | View only | View assets, request assignments |\n\n## Webhooks (outbound)\n\nSubscribe to platform events via `POST /api/v1/webhooks`. Deliveries are\n`POST` requests signed with HMAC-SHA256:\n\n- `X-Webhook-Event`: event name (e.g. `asset.checkout`)\n- `X-Webhook-Signature`: `sha256=<hex digest>`\n\nAvailable events: `asset.created`, `asset.updated`, `asset.deleted`,\n`asset.checkout`, `asset.checkin`, `license.created`, `license.updated`,\n`license.deleted`, `license.seat.checkout`, `license.seat.checkin`,\n`user.created`, `user.updated`, `user.deleted`, `warranty.expiring`,\n`license.expiring`.\n\nDelivery payloads follow the `WebhookEventPayload` schema: `event`,\n`timestamp`, `data` (event-specific), and `organization_id` when applicable.\n","version":"1.1.0","contact":{"name":"Flottix Support","email":"support@flottix.app"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Health check endpoint for load balancers.","operationId":"health-health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheck"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/api-keys":{"post":{"tags":["API Keys"],"summary":"Create a new API key","description":"Create a new API key for external integrations or programmatic access.\n\n**IMPORTANT:** The raw API key is only returned once in this response.\nStore it securely - it cannot be retrieved again.\n\n**Requires:** Admin role\n\n**Available scopes:**\n- Read scopes: `read:assets`, `read:licenses`, `read:consumables`, `read:accessories`,\n  `read:users`, `read:locations`, `read:departments`, `read:audits`, `read:reports`, `read:dashboard`\n- Write scopes: `write:assets`, `write:licenses`, `write:consumables`, `write:accessories`,\n  `write:users`, `write:locations`, `write:departments`, `write:audits`\n- Checkout scopes: `checkout:assets`, `checkout:licenses`, `checkout:consumables`, `checkout:accessories`\n- Special scopes: `import`, `admin` (bypasses all scope checks)","operationId":"api-keys-create_api_key","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}}},"responses":{"201":{"description":"API key created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyReadWithRawKey"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["API Keys"],"summary":"List API keys","description":"List all API keys with optional filtering.\n\n**Requires:** Admin role\n\nBy default, only active (non-revoked) keys are returned.\nUse `include_revoked=true` to include revoked keys.","operationId":"api-keys-list_api_keys","parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","description":"Include revoked API keys in the list","default":false,"title":"Include Revoked"},"description":"Include revoked API keys in the list"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyRead"},"title":"Response Api-Keys-List Api Keys"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/api-keys/scopes":{"get":{"tags":["API Keys"],"summary":"List available scopes","description":"List all available API key scopes with descriptions and categories.\n\n**Requires:** Admin role\n\nScopes are grouped by category:\n- **Read**: Read-only access to entities\n- **Write**: Create, update, delete access to entities\n- **Checkout**: Checkout/checkin operations on entities\n- **Special**: Import and admin scopes","operationId":"api-keys-list_scopes","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of available scopes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyScopeInfo"},"title":"Response Api-Keys-List Scopes"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/api-keys/{key_id}":{"get":{"tags":["API Keys"],"summary":"Get API key details","description":"Get details of a specific API key by ID.\n\n**Requires:** Admin role\n\nReturns key metadata, usage statistics, and scope information.\nThe raw key is never returned - it was only shown at creation time.","operationId":"api-keys-get_api_key","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"API key details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["API Keys"],"summary":"Update API key","description":"Update an API key's name, description, scopes, or active status.\n\n**Requires:** Admin role\n\nIf scopes are changed, an API_KEY_SCOPES_UPDATED action is logged.","operationId":"api-keys-update_api_key","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyUpdate"}}}},"responses":{"200":{"description":"API key updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["API Keys"],"summary":"Revoke API key","description":"Revoke an API key, making it permanently unusable.\n\n**Requires:** Admin role\n\nRevoked keys are soft-deleted and can be viewed with `include_revoked=true`\nin the list endpoint. The key cannot be reactivated after revocation.","operationId":"api-keys-revoke_api_key","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Api-Keys-Revoke Api Key"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/onboarding-status":{"get":{"tags":["Authentication","Authentication"],"summary":"Check onboarding status","description":"Check if initial setup has been completed.\n\nThis endpoint is used by the frontend to determine whether to show\nthe onboarding/setup flow or the normal login page.\n\nReturns:\n- is_setup_complete: True if at least one admin user exists\n- has_admin: True if an admin user exists","operationId":"authentication-get_onboarding_status","responses":{"200":{"description":"Onboarding status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatus"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/register":{"post":{"tags":["Authentication","Authentication"],"summary":"Self-serve freemium signup","description":"Create free org + admin user, then send email verification token.","operationId":"authentication-register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Registration created, verification email sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Invalid CAPTCHA or validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/resend-verification":{"post":{"tags":["Authentication","Authentication"],"summary":"Resend signup verification email","description":"Resend verification email for pending self-signup accounts.\n\nReturns a generic success message for all inputs to avoid account enumeration.","operationId":"authentication-resend_verification_email","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Resend request accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/verify-email":{"post":{"tags":["Authentication","Authentication"],"summary":"Verify signup email and activate account","description":"Consume verification token and activate org/admin account.","operationId":"authentication-verify_email","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Email verified, session started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/login":{"post":{"tags":["Authentication","Authentication"],"summary":"User login","description":"Authenticate user and start a new session.\n\nUpon successful authentication, JWT tokens are set as HTTP-only cookies:\n- `access_token`: Short-lived token for API requests\n- `refresh_token`: Long-lived token for refreshing access tokens\n\nThe response also includes user information for immediate use by the client.","operationId":"authentication-login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Account disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account temporarily locked due to too many failed attempts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/refresh":{"post":{"tags":["Authentication","Authentication"],"summary":"Refresh access token","description":"Refresh access token using refresh token.\n\nThis endpoint exchanges a valid refresh token for new access and refresh tokens.\nThe refresh token is read from the HTTP-only cookie automatically.\n\nCall this endpoint when the access token expires to maintain the session\nwithout requiring the user to log in again.","operationId":"authentication-refresh_token","parameters":[{"name":"refresh_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}}],"responses":{"200":{"description":"Token refreshed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"401":{"description":"Invalid or expired refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/logout":{"post":{"tags":["Authentication","Authentication"],"summary":"Logout user","description":"Logout user by clearing auth cookies and revoking tokens.\n\nClears both access and refresh tokens from cookies, effectively ending the session.\nTokens are also added to a revocation blacklist to prevent reuse.\nThe client should redirect to the login page after calling this endpoint.","operationId":"authentication-logout","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},{"name":"refresh_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}}],"responses":{"200":{"description":"Logged out successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Authentication-Logout"},"example":{"message":"Successfully logged out"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/me":{"get":{"tags":["Authentication","Authentication"],"summary":"Get current user","description":"Get current authenticated user information.\n\nReturns the user profile for the currently authenticated user, including\ntheir role, activation status, and organization with subscription plan info.\nThe organization data is needed for feature gating on the frontend.","operationId":"authentication-get_current_user_info","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Current user information with organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrganization"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/profile":{"get":{"tags":["Authentication","Authentication"],"summary":"Get own profile","description":"Get the current user's profile.\n\nReturns detailed profile information for the authenticated user.","operationId":"authentication-get_profile","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Profile retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Authentication","Authentication"],"summary":"Update own profile","description":"Update the current user's profile.\n\nUsers can update their own full name and avatar URL.\nEmail and role changes require admin privileges.","operationId":"authentication-update_profile","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/change-password":{"post":{"tags":["Authentication","Authentication"],"summary":"Change own password","description":"Change the current user's password.\n\nRequires the current password for verification before setting a new one.","operationId":"authentication-change_password","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Password changed successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Authentication-Change Password"}}}},"400":{"description":"Current password is incorrect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/validate-setup-token":{"post":{"tags":["Authentication","Authentication"],"summary":"Validate a password setup token without consuming it","description":"Check if a password setup token is valid without consuming it.","operationId":"authentication-validate_setup_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSetupTokenRequest"}}},"required":true},"responses":{"200":{"description":"Token is valid","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Authentication-Validate Setup Token"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/set-password":{"post":{"tags":["Authentication","Authentication"],"summary":"Set initial password via setup token","description":"Set initial password using a password setup token.\n\nThis endpoint is used by new users who received a setup link via email.\nThe token is a secure, one-time-use token that expires after 24 hours.\n\n**COMP-06: Secure Password Setup**\n- Replaces temporary passwords sent in plaintext emails\n- Token is single-use and time-limited\n- User is automatically logged in after setting password\n\n**Password requirements:**\n- Minimum 8 characters\n- Maximum 128 characters\n- Must meet complexity requirements","operationId":"authentication-set_password","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Password set successfully, user logged in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/recover":{"post":{"tags":["Authentication","Authentication"],"summary":"Recover account using recovery code","description":"Recover account access using a previously generated recovery code.\n\n**Use this endpoint when:**\n- You have lost your password AND your MFA device\n- You have previously generated recovery codes\n\n**How it works:**\n1. Enter your email and a valid recovery code\n2. Receive a temporary token valid for 15 minutes\n3. Use the token to reset your password or disable MFA\n\n**Security notes:**\n- Each recovery code can only be used ONCE\n- Rate limited to prevent brute force attacks\n- The temporary token has LIMITED permissions (password/MFA reset only)","operationId":"authentication-recover_account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoverAccountRequest"}}},"required":true},"responses":{"200":{"description":"Recovery successful, temporary token issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryTokenResponse"}}}},"400":{"description":"Invalid recovery code or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Account is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts, try again later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/demo-login":{"get":{"tags":["Authentication","Demo Authentication"],"summary":"Magic link demo login","description":"Authenticate demo prospect via magic link token.\n\nThis endpoint:\n1. Validates the magic link token\n2. Logs the prospect in as the demo admin user (admin@novatech.io)\n3. Sets JWT cookies with demo session context for tracking\n4. Records the login activity\n\nThe JWT token includes additional claims for demo tracking:\n- is_demo_session: true\n- demo_session_id: UUID of the DemoProspectSession\n- prospect_email: The prospect's actual email","operationId":"authentication-demo_login","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Magic link token from email","title":"Token"},"description":"Magic link token from email"}],"responses":{"200":{"description":"Login successful, redirecting to dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/demo-token-status":{"get":{"tags":["Authentication","Demo Authentication"],"summary":"Check demo token validity","description":"Check if a demo token is still valid.\n\nUsed by frontend to verify token before attempting login,\nallowing it to show appropriate messaging for expired tokens.","operationId":"authentication-check_demo_token_status","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Magic link token to check","title":"Token"},"description":"Magic link token to check"}],"responses":{"200":{"description":"Token status returned","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Authentication-Check Demo Token Status"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/ldap/providers":{"get":{"tags":["LDAP Authentication"],"summary":"List enabled LDAP providers","description":"Returns a list of enabled LDAP providers for the login page.\n\n**NOTE:** SSO provider discovery is temporarily disabled. This endpoint currently\nreturns an empty list.","operationId":"ldap-authentication-list_ldap_providers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LDAPProviderInfo"},"type":"array","title":"Response Ldap-Authentication-List Ldap Providers"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/ldap/providers/defaults/{provider_type}":{"get":{"tags":["LDAP Authentication"],"summary":"Get provider defaults","description":"Returns default configuration values for a specific LDAP provider type.","operationId":"ldap-authentication-get_provider_defaults","parameters":[{"name":"provider_type","in":"path","required":true,"schema":{"type":"string","title":"Provider Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ldap-Authentication-Get Provider Defaults"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/ldap/{config_id}/authenticate":{"post":{"tags":["LDAP Authentication"],"summary":"Authenticate via LDAP","description":"Authenticate a user using LDAP credentials. Returns JWT tokens on success.","operationId":"ldap-authentication-authenticate_ldap","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPAuthRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ldap-Authentication-Authenticate Ldap"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/ldap/configs":{"post":{"tags":["LDAP Authentication"],"summary":"Create LDAP configuration","description":"Create a new LDAP server configuration. Requires admin privileges.","operationId":"ldap-authentication-create_ldap_config","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPConfigCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPConfigRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["LDAP Authentication"],"summary":"List LDAP configurations","description":"List all LDAP configurations. Requires admin privileges.","operationId":"ldap-authentication-list_ldap_configs","parameters":[{"name":"include_disabled","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Disabled"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LDAPConfigRead"},"title":"Response Ldap-Authentication-List Ldap Configs"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/ldap/configs/{config_id}":{"get":{"tags":["LDAP Authentication"],"summary":"Get LDAP configuration","description":"Get a specific LDAP configuration by ID. Requires admin privileges.","operationId":"ldap-authentication-get_ldap_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPConfigRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["LDAP Authentication"],"summary":"Update LDAP configuration","description":"Update an LDAP configuration. Requires admin privileges.","operationId":"ldap-authentication-update_ldap_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPConfigRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["LDAP Authentication"],"summary":"Delete LDAP configuration","description":"Delete an LDAP configuration. Requires admin privileges.","operationId":"ldap-authentication-delete_ldap_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/ldap/configs/{config_id}/test":{"post":{"tags":["LDAP Authentication"],"summary":"Test LDAP connection","description":"Test the LDAP connection for a configuration. Requires admin privileges.","operationId":"ldap-authentication-test_ldap_connection","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPTestResult"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/ldap/configs/{config_id}/sync":{"post":{"tags":["LDAP Authentication"],"summary":"Sync users from LDAP","description":"Manually trigger user synchronization from LDAP. Requires admin privileges.","operationId":"ldap-authentication-sync_ldap_users","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LDAPSyncResult"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/mfa/setup":{"post":{"tags":["MFA"],"summary":"Initiate MFA setup","description":"Start MFA setup process by generating a new TOTP secret and QR code.\n\n    The user should:\n    1. Scan the QR code with an authenticator app (Google Authenticator, Authy, etc.)\n    2. Or manually enter the secret into their authenticator app\n    3. Then call /verify to enable MFA with a code from the app\n\n    **Note:** MFA is not enabled until the code is verified via /verify endpoint.","operationId":"mfa-setup_mfa","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"MFA setup initiated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFASetupResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/mfa/verify":{"post":{"tags":["MFA"],"summary":"Verify and enable MFA","description":"Verify TOTP code and enable MFA for the account.\n\n    After calling /setup, the user enters a 6-digit code from their\n    authenticator app. If the code is valid, MFA is enabled and recovery\n    codes are generated.\n\n    **CRITICAL:** Recovery codes are only returned ONCE. The user MUST\n    save them in a secure location. They can be used if the authenticator\n    device is lost.","operationId":"mfa-verify_mfa","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAVerifyRequest"}}}},"responses":{"200":{"description":"MFA enabled successfully, recovery codes returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAEnableResponse"}}}},"400":{"description":"Invalid code or MFA setup not initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/mfa/disable":{"post":{"tags":["MFA"],"summary":"Disable MFA","description":"Disable MFA after code verification.\n\n    Requires a valid TOTP code or recovery code to disable MFA. This prevents\n    unauthorized disabling of the security feature.\n\n    All MFA data (secret, recovery codes) will be permanently deleted.","operationId":"mfa-disable_mfa","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAVerifyRequest"}}}},"responses":{"200":{"description":"MFA disabled successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Mfa-Disable Mfa"}}}},"400":{"description":"Invalid code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/mfa/status":{"get":{"tags":["MFA"],"summary":"Check MFA status","description":"Check if MFA is enabled for the current user.\n\n    Use this to determine whether to show MFA setup or management UI.","operationId":"mfa-get_mfa_status","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"MFA status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAStatusResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/oidc/providers":{"get":{"tags":["OIDC Authentication","OIDC Authentication"],"summary":"List enabled OIDC providers","description":"List all enabled OIDC providers for display on the login page.\n\n**No authentication required.**\n\nReturns only basic provider information (id, name, provider_type) needed\nto render SSO login buttons. Sensitive configuration details are not exposed.\n\n**NOTE:** SSO provider discovery is temporarily disabled. This endpoint currently\nreturns an empty list.","operationId":"oidc-authentication-list_providers","responses":{"200":{"description":"List of enabled OIDC providers","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OIDCProviderInfo"},"type":"array","title":"Response Oidc-Authentication-List Providers"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/oidc/providers/defaults/{provider_type}":{"get":{"tags":["OIDC Authentication","OIDC Authentication"],"summary":"Get provider default configuration","description":"Get default configuration values for a specific OIDC provider type.\n\n**No authentication required.**\n\nReturns recommended scopes, claim mappings, and discovery URL hints\nfor the specified provider type. Used by the frontend to pre-populate\nconfiguration forms when creating new OIDC configurations.\n\nSupported provider types: `generic`, `google`, `auth0`, `okta`, `azure`","operationId":"oidc-authentication-get_defaults","parameters":[{"name":"provider_type","in":"path","required":true,"schema":{"type":"string","title":"Provider Type"}}],"responses":{"200":{"description":"Provider default configuration","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Oidc-Authentication-Get Defaults"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/oidc/{config_id}/login":{"get":{"tags":["OIDC Authentication","OIDC Authentication"],"summary":"Initiate OIDC login flow","description":"Start the OAuth2 authorization code flow for a specific OIDC provider.\n\n**No authentication required.**\n\nThis endpoint:\n1. Generates a unique state token and stores it in Redis\n2. Builds the authorization URL with required parameters\n3. Redirects the user to the identity provider's login page\n\nAfter authentication, the provider will redirect back to the callback endpoint.","operationId":"oidc-authentication-initiate_login","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}}],"responses":{"307":{"description":"Successful Response"},"302":{"description":"Redirect to OIDC provider authorization URL"},"404":{"description":"OIDC config not found or disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/oidc/{config_id}/callback":{"get":{"tags":["OIDC Authentication","OIDC Authentication"],"summary":"Handle OIDC callback","description":"Handle the OAuth2 callback from the identity provider.\n\n**No authentication required.**\n\nThis endpoint:\n1. Validates the state token from Redis\n2. Handles any errors from the provider\n3. Exchanges the authorization code for tokens\n4. Retrieves user information from the provider\n5. Creates or updates the local user account\n6. Generates JWT tokens and sets auth cookies\n7. Redirects to the dashboard\n\nOn error, redirects to the login page with error details.","operationId":"oidc-authentication-handle_callback","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Authorization code from provider","title":"Code"},"description":"Authorization code from provider"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State token for CSRF protection","title":"State"},"description":"State token for CSRF protection"},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error code from provider","title":"Error"},"description":"Error code from provider"},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error description from provider","title":"Error Description"},"description":"Error description from provider"}],"responses":{"307":{"description":"Successful Response"},"302":{"description":"Redirect to dashboard on success, login on error"},"404":{"description":"OIDC config not found or disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/oidc/configs":{"post":{"tags":["OIDC Authentication"],"summary":"Create OIDC configuration","description":"Create a new OIDC provider configuration.\n\n**Requires:** Admin role\n\nConfigure SSO with identity providers like:\n- Google Workspace\n- Microsoft Entra ID (Azure AD)\n- Okta\n- Auth0\n- Generic OIDC providers\n\nThe client_secret is encrypted at rest.","operationId":"oidc-authentication-create_config","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OIDCConfigCreate"}}}},"responses":{"201":{"description":"OIDC configuration created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OIDCConfigRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Configuration with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["OIDC Authentication"],"summary":"List OIDC configurations","description":"List all OIDC provider configurations.\n\n**Requires:** Admin role\n\nBy default, only enabled configurations are returned.\nUse `include_disabled=true` to include disabled configurations.","operationId":"oidc-authentication-list_configs","parameters":[{"name":"include_disabled","in":"query","required":false,"schema":{"type":"boolean","description":"Include disabled OIDC configurations","default":false,"title":"Include Disabled"},"description":"Include disabled OIDC configurations"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of OIDC configurations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OIDCConfigRead"},"title":"Response Oidc-Authentication-List Configs"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/oidc/configs/{config_id}":{"get":{"tags":["OIDC Authentication"],"summary":"Get OIDC configuration details","description":"Get details of a specific OIDC configuration.\n\n**Requires:** Admin role\n\nReturns configuration details including endpoints and settings.\nClient secret is never returned.","operationId":"oidc-authentication-get_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"OIDC configuration details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OIDCConfigRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"OIDC configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["OIDC Authentication"],"summary":"Update OIDC configuration","description":"Update an OIDC provider configuration.\n\n**Requires:** Admin role\n\nAll fields are optional. Only provided fields will be updated.\nTo update the client_secret, provide the new value.","operationId":"oidc-authentication-update_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OIDCConfigUpdate"}}}},"responses":{"200":{"description":"OIDC configuration updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OIDCConfigRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"OIDC configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["OIDC Authentication"],"summary":"Delete OIDC configuration","description":"Delete an OIDC provider configuration.\n\n**Requires:** Admin role\n\nThis action is permanent and cannot be undone.\nUsers who have authenticated via this provider will need to use\nanother authentication method (password or another SSO provider).","operationId":"oidc-authentication-delete_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"OIDC configuration deleted","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Oidc-Authentication-Delete Config"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"OIDC configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/oidc/configs/{config_id}/test":{"post":{"tags":["OIDC Authentication"],"summary":"Test OIDC provider connection","description":"Test connectivity and configuration of an OIDC provider.\n\n**Requires:** Admin role\n\nThis endpoint:\n1. Attempts to fetch the provider's discovery document\n2. Validates the configuration endpoints\n3. Returns connection status and discovered endpoints\n\nDoes not perform actual authentication.","operationId":"oidc-authentication-test_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Test results","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Oidc-Authentication-Test Config"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"OIDC configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/saml/providers":{"get":{"tags":["SAML Authentication"],"summary":"List enabled SAML providers","description":"List all enabled SAML providers for display on the login page.\n\n**No authentication required.**\n\nReturns only basic provider information (id, name, provider_type) needed\nto render SSO login buttons. Sensitive configuration details are not exposed.\n\n**NOTE:** SSO provider discovery is temporarily disabled. This endpoint currently\nreturns an empty list.","operationId":"saml-authentication-list_providers","responses":{"200":{"description":"List of enabled SAML providers","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SAMLProviderInfo"},"type":"array","title":"Response Saml-Authentication-List Providers"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/saml/providers/defaults/{provider_type}":{"get":{"tags":["SAML Authentication"],"summary":"Get provider default configuration","description":"Get default configuration values for a specific SAML provider type.\n\n**No authentication required.**\n\nReturns recommended attribute mappings and security settings\nfor the specified provider type.\n\nSupported provider types: `generic`, `azure_ad`, `okta`, `adfs`, `onelogin`, `ping`","operationId":"saml-authentication-get_defaults","parameters":[{"name":"provider_type","in":"path","required":true,"schema":{"type":"string","title":"Provider Type"}}],"responses":{"200":{"description":"Provider default configuration","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Saml-Authentication-Get Defaults"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/saml/{config_id}/metadata":{"get":{"tags":["SAML Authentication"],"summary":"Get SP metadata XML","description":"Generate and return the Service Provider (SP) metadata XML.\n\n**No authentication required.**\n\nThe metadata contains:\n- SP Entity ID\n- Assertion Consumer Service (ACS) URL\n- NameID format\n- Signing preferences\n\nConfigure this URL in your Identity Provider to enable SSO.","operationId":"saml-authentication-get_sp_metadata","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}}],"responses":{"200":{"description":"SP metadata XML","content":{"application/xml":{}}},"404":{"description":"SAML config not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/saml/{config_id}/login":{"get":{"tags":["SAML Authentication"],"summary":"Initiate SAML login flow","description":"Start the SAML authentication flow by redirecting to the Identity Provider.\n\n**No authentication required.**\n\nThis endpoint:\n1. Builds the AuthnRequest XML\n2. Redirects the user to the IdP's SSO URL\n\nAfter authentication, the IdP will POST the SAML response to the ACS endpoint.","operationId":"saml-authentication-initiate_login","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}}],"responses":{"307":{"description":"Successful Response"},"302":{"description":"Redirect to SAML IdP SSO URL"},"404":{"description":"SAML config not found or disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/saml/{config_id}/acs":{"post":{"tags":["SAML Authentication"],"summary":"Assertion Consumer Service (ACS)","description":"Handle the SAML Response from the Identity Provider.\n\n**No authentication required** (called by IdP).\n\nThis endpoint:\n1. Validates the SAML Response signature\n2. Extracts user attributes from the assertion\n3. Creates or updates the local user account\n4. Generates JWT tokens and sets auth cookies\n5. Redirects to the dashboard\n\nOn error, redirects to the login page with error details.","operationId":"saml-authentication-assertion_consumer_service","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_saml-authentication-assertion_consumer_service"}}}},"responses":{"307":{"description":"Successful Response"},"302":{"description":"Redirect to dashboard on success, login on error"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/auth/saml/configs":{"post":{"tags":["SAML Authentication"],"summary":"Create SAML configuration","description":"Create a new SAML provider configuration.\n\n**Requires:** Admin role\n\nConfigure SSO with identity providers like:\n- Microsoft Entra ID (Azure AD)\n- Okta\n- ADFS\n- OneLogin\n- Ping Identity\n- Generic SAML 2.0 providers\n\nThe IdP certificate is encrypted at rest.","operationId":"saml-authentication-create_config","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigCreate"}}}},"responses":{"201":{"description":"SAML configuration created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["SAML Authentication"],"summary":"List SAML configurations","description":"List all SAML provider configurations.\n\n**Requires:** Admin role\n\nBy default, only enabled configurations are returned.\nUse `include_disabled=true` to include disabled configurations.","operationId":"saml-authentication-list_configs","parameters":[{"name":"include_disabled","in":"query","required":false,"schema":{"type":"boolean","description":"Include disabled SAML configurations","default":false,"title":"Include Disabled"},"description":"Include disabled SAML configurations"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of SAML configurations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SAMLConfigRead"},"title":"Response Saml-Authentication-List Configs"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/saml/configs/{config_id}":{"get":{"tags":["SAML Authentication"],"summary":"Get SAML configuration details","description":"Get details of a specific SAML configuration.\n\n**Requires:** Admin role\n\nReturns configuration details including IdP settings.\nIdP certificate is never returned.","operationId":"saml-authentication-get_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"SAML configuration details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"SAML configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["SAML Authentication"],"summary":"Update SAML configuration","description":"Update a SAML provider configuration.\n\n**Requires:** Admin role\n\nAll fields are optional. Only provided fields will be updated.\nTo update the IdP certificate, provide the new value.","operationId":"saml-authentication-update_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigUpdate"}}}},"responses":{"200":{"description":"SAML configuration updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLConfigRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"SAML configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["SAML Authentication"],"summary":"Delete SAML configuration","description":"Delete a SAML provider configuration.\n\n**Requires:** Admin role\n\nThis action is permanent and cannot be undone.\nUsers who have authenticated via this provider will need to use\nanother authentication method (password or another SSO provider).","operationId":"saml-authentication-delete_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"SAML configuration deleted","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Saml-Authentication-Delete Config"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"SAML configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/auth/saml/configs/{config_id}/test":{"post":{"tags":["SAML Authentication"],"summary":"Test SAML configuration","description":"Test validity of a SAML configuration.\n\n**Requires:** Admin role\n\nThis endpoint:\n1. Validates the configuration settings\n2. Returns SP URLs for IdP configuration\n3. Does not perform actual authentication\n\nUse the returned SP URLs to configure your Identity Provider.","operationId":"saml-authentication-test_config","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Test results with SP URLs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAMLTestResult"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"SAML configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/stats":{"get":{"tags":["Dashboard"],"summary":"Get dashboard statistics","description":"Retrieve aggregated statistics about assets, licenses, and users for the current organization.","operationId":"dashboard-get_dashboard_stats","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/activity":{"get":{"tags":["Dashboard"],"summary":"Get recent activity stream","description":"Retrieve a stream of recent actions (checkouts, checkins, creates, etc.) across the organization.","operationId":"dashboard-get_recent_activity","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of activities to return","default":20,"title":"Limit"},"description":"Number of activities to return"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Dashboard-Get Recent Activity"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/expiring":{"get":{"tags":["Dashboard"],"summary":"Get expiring items","description":"Retrieve assets with warranties expiring and licenses expiring within the specified number of days.","operationId":"dashboard-get_expiring_items","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days ahead to check","default":30,"title":"Days"},"description":"Days ahead to check"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardExpiringItems"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/refresh-cache":{"post":{"tags":["Dashboard"],"summary":"Refresh dashboard cache","description":"Forcefully invalidate all cached dashboard data for the organization. Requires Admin role.","operationId":"dashboard-refresh_dashboard_cache","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/summary":{"get":{"tags":["Dashboard"],"summary":"Get dashboard summary","description":"Retrieve a compact summary of key metrics, alerts, and recent activity for a quick overview.","operationId":"dashboard-get_dashboard_summary","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardSummary"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/kits":{"get":{"tags":["Dashboard"],"summary":"Get kits widget stats","description":"Retrieve statistics for the kits dashboard widget.","operationId":"dashboard-get_kits_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Kits Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/chart-data":{"get":{"tags":["Dashboard"],"summary":"Get dynamic chart data","description":"Retrieve dynamic aggregation data (label/value) for custom dashboard charts. Enforces multi-tenancy.","operationId":"dashboard-get_chart_data","parameters":[{"name":"entity","in":"query","required":true,"schema":{"type":"string","description":"Target entity (assets, licenses, consumables)","title":"Entity"},"description":"Target entity (assets, licenses, consumables)"},{"name":"group_by","in":"query","required":true,"schema":{"type":"string","description":"Column to group by (status_id, category_id, location_id, manufacturer)","title":"Group By"},"description":"Column to group by (status_id, category_id, location_id, manufacturer)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Dashboard-Get Chart Data"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/first-visit":{"post":{"tags":["Dashboard"],"summary":"Record first dashboard visit","description":"Record a user's first dashboard visit and trigger a welcome email.\n\nThis endpoint should be called when a user visits the dashboard for the first time.\nIf the user hasn't received a welcome email yet, one will be queued for delivery.\n\nThe endpoint is idempotent - calling it multiple times will have no effect after\nthe first successful call.","operationId":"dashboard-record_first_visit","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"First visit recorded successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Record First Visit"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/assets":{"get":{"tags":["Dashboard"],"summary":"Get Assets Widget","description":"Get asset statistics for dashboard widget.","operationId":"dashboard-get_assets_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Assets Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/licenses":{"get":{"tags":["Dashboard"],"summary":"Get Licenses Widget","description":"Get license statistics for dashboard widget.","operationId":"dashboard-get_licenses_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Licenses Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/consumables":{"get":{"tags":["Dashboard"],"summary":"Get Consumables Widget","description":"Get consumables statistics for dashboard widget.","operationId":"dashboard-get_consumables_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Consumables Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/accessories":{"get":{"tags":["Dashboard"],"summary":"Get Accessories Widget","description":"Get accessories statistics for dashboard widget.\n\nReturns statistics for accessories (items assigned to users like keyboards, mice, etc.).\nFor components (items installed in assets), use /widgets/components.","operationId":"dashboard-get_accessories_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Accessories Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/components":{"get":{"tags":["Dashboard"],"summary":"Get Components Widget","description":"Get components statistics for dashboard widget.\n\nReturns statistics for components (items installed in assets like RAM, SSDs, etc.).\nIncludes stock levels, checkout counts, and total value.","operationId":"dashboard-get_components_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Components Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/users":{"get":{"tags":["Dashboard"],"summary":"Get Users Widget","description":"Get user statistics for dashboard widget.","operationId":"dashboard-get_users_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Users Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/locations":{"get":{"tags":["Dashboard"],"summary":"Get Locations Widget","description":"Get location statistics for dashboard widget.","operationId":"dashboard-get_locations_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Locations Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/departments":{"get":{"tags":["Dashboard"],"summary":"Get Departments Widget","description":"Get department statistics for dashboard widget.","operationId":"dashboard-get_departments_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Departments Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/computers":{"get":{"tags":["Dashboard"],"summary":"Get Computers Widget","description":"Get computers by manufacturer for dashboard chart widget.","operationId":"dashboard-get_computers_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Computers Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/alerts":{"get":{"tags":["Dashboard"],"summary":"Get Alerts Widget","description":"Get combined alerts (expiring items + low stock) for dashboard widget.","operationId":"dashboard-get_alerts_widget","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days ahead to check","default":30,"title":"Days"},"description":"Days ahead to check"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Alerts Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/maintenance":{"get":{"tags":["Dashboard"],"summary":"Get Maintenance Widget","description":"Get maintenance alerts (overdue and upcoming) for dashboard widget.","operationId":"dashboard-get_maintenance_widget","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Days ahead to check","default":30,"title":"Days"},"description":"Days ahead to check"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Maintenance Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/activity":{"get":{"tags":["Dashboard"],"summary":"Get Activity Widget","description":"Get paginated recent activity for dashboard widget.","operationId":"dashboard-get_activity_widget","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Items per page","default":5,"title":"Page Size"},"description":"Items per page"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Activity Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/config":{"get":{"tags":["Dashboard"],"summary":"Get user's dashboard config","description":"Retrieves the authenticated user's dashboard configuration. Creates a default configuration if none exists.","operationId":"dashboard-get_dashboard_config","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardConfigRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Dashboard"],"summary":"Update user's dashboard config","description":"Updates the authenticated user's dashboard configuration. Only provided fields will be updated. Creates configuration if none exists.","operationId":"dashboard-update_dashboard_config","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardConfigRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/layouts":{"get":{"tags":["Dashboard"],"summary":"Get available layout presets","description":"Returns available layout presets and all valid widget identifiers.","operationId":"dashboard-get_layout_presets","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Layout Presets"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/asset-value-trend":{"get":{"tags":["Dashboard"],"summary":"Get asset value trend","description":"Returns asset value and count trend over time, grouped by month. Useful for visualizing asset growth and investment over time.","operationId":"dashboard-get_asset_value_trend_widget","parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to include","default":12,"title":"Months"},"description":"Number of months to include"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Asset Value Trend Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/system-health":{"get":{"tags":["Dashboard"],"summary":"Get system health status","description":"Returns live status of system components: database, cache (Valkey), and Celery workers. This endpoint is NOT cached to always return current status.","operationId":"dashboard-get_system_health_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get System Health Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/license-compliance":{"get":{"tags":["Dashboard"],"summary":"Get license compliance stats","description":"Returns license compliance statistics including compliant, at-limit, over-allocated, and expired license counts with breakdown.","operationId":"dashboard-get_license_compliance_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get License Compliance Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/my-assignments":{"get":{"tags":["Dashboard"],"summary":"Get current user's assignments","description":"Returns assets, license seats, and accessories assigned to the current user. Limited to 10 items per category with total counts.","operationId":"dashboard-get_my_assignments_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get My Assignments Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/servers":{"get":{"tags":["Dashboard"],"summary":"Get servers by manufacturer","description":"Returns server assets grouped by manufacturer. Identifies servers by category names containing 'server', 'rack', or 'blade'.","operationId":"dashboard-get_servers_widget","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Servers Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/dashboard/widgets/stock-tracker/{consumable_id}":{"get":{"tags":["Dashboard"],"summary":"Get stock tracker for a consumable","description":"Returns detailed stock information for a specific consumable including stock levels, status, recent checkouts, and reorder information.","operationId":"dashboard-get_stock_tracker_widget","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"UUID of the consumable to track","title":"Consumable Id"},"description":"UUID of the consumable to track"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dashboard-Get Stock Tracker Widget"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/bulk/update":{"post":{"tags":["Assets"],"summary":"Bulk update assets","description":"Update multiple assets at once.\n\n**Requires:** Agent or Admin role\n\nUpdate common properties (status, model, location) for multiple assets\nin a single operation. Maximum 100 assets per request.","operationId":"assets-bulk_update_assets","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequest"}}}},"responses":{"200":{"description":"Bulk update completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResult"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/bulk/delete":{"post":{"tags":["Assets"],"summary":"Bulk delete assets","description":"Delete multiple assets at once.\n\n**Requires:** Agent or Admin role\n\n**Note:** Assets that are currently checked out will fail to delete.\nMaximum 100 assets per request.","operationId":"assets-bulk_delete_assets","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}}},"responses":{"200":{"description":"Bulk delete completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResult"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/bulk/checkout":{"post":{"tags":["Assets"],"summary":"Bulk checkout assets","description":"Check out multiple assets to a single user.\n\n**Requires:** Agent or Admin role\n\nAssign multiple assets to the same user in a single operation.\nMaximum 50 assets per request.","operationId":"assets-bulk_checkout_assets","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCheckoutRequest"}}}},"responses":{"200":{"description":"Bulk checkout completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResult"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/bulk/checkin":{"post":{"tags":["Assets"],"summary":"Bulk checkin assets","description":"Check in multiple assets at once.\n\n**Requires:** Agent or Admin role\n\nReturn multiple assets to inventory in a single operation.\nMaximum 50 assets per request.","operationId":"assets-bulk_checkin_assets","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCheckinRequest"}}}},"responses":{"200":{"description":"Bulk checkin completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResult"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/deleted":{"get":{"tags":["Assets"],"summary":"List deleted assets","description":"Retrieve a paginated list of soft-deleted assets. Admin only.","operationId":"assets-list_deleted_assets","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by tag, serial, or name","title":"Search"},"description":"Search by tag, serial, or name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of deleted assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AssetReadWithRelations_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/restore":{"post":{"tags":["Assets"],"summary":"Restore deleted asset","description":"Restore a soft-deleted asset. Admin only.","operationId":"assets-restore_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Asset restored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetRead"}}}},"400":{"description":"Asset is not deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/permanent":{"delete":{"tags":["Assets"],"summary":"Permanently delete an asset","description":"Permanently and irreversibly delete an asset. Admin only.","operationId":"assets-permanent_delete_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermanentDeleteConfirmation"}}}},"responses":{"204":{"description":"Asset permanently deleted"},"400":{"description":"Confirmation required or asset is assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/qrcode":{"get":{"tags":["Assets"],"summary":"Generate QR code","description":"Generate a QR code image containing the asset tag","operationId":"assets-get_asset_qrcode","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":100,"description":"QR code size in pixels","default":200,"title":"Size"},"description":"QR code size in pixels"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"QR code image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/label":{"get":{"tags":["Assets"],"summary":"Get label data","description":"Get asset data formatted for label printing","operationId":"assets-get_asset_label","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Label data","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Assets-Get Asset Label"},"example":{"asset_tag":"AST-001","name":"John's MacBook","serial":"SN123456","model":"MacBook Pro 16\"","manufacturer":"Apple","qr_data":"AST-001"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/barcode":{"get":{"tags":["Assets"],"summary":"Generate barcode","description":"Generate a barcode image (Code128 or Code39) for the asset","operationId":"assets-get_asset_barcode","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"barcode_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(code128)$","description":"Barcode type: code128","default":"code128","title":"Barcode Type"},"description":"Barcode type: code128"},{"name":"width","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":50,"description":"Barcode width in mm","default":50,"title":"Width"},"description":"Barcode width in mm"},{"name":"height","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":10,"description":"Barcode height in mm","default":15,"title":"Height"},"description":"Barcode height in mm"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Barcode image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/label/pdf":{"get":{"tags":["Assets"],"summary":"Generate label PDF","description":"Generate a printable label PDF for the asset","operationId":"assets-get_asset_label_pdf","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"template","in":"query","required":false,"schema":{"type":"string","description":"Label template ID (DK-11202, DK-11208, DK-11209)","default":"DK-11202","title":"Template"},"description":"Label template ID (DK-11202, DK-11208, DK-11209)"},{"name":"code_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(qr|code128)$","description":"Code type: qr or code128","default":"qr","title":"Code Type"},"description":"Code type: qr or code128"},{"name":"include_serial","in":"query","required":false,"schema":{"type":"boolean","description":"Include serial number","default":true,"title":"Include Serial"},"description":"Include serial number"},{"name":"include_model","in":"query","required":false,"schema":{"type":"boolean","description":"Include model name","default":true,"title":"Include Model"},"description":"Include model name"},{"name":"show_logo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show logo (None = use global settings)","title":"Show Logo"},"description":"Override: show logo (None = use global settings)"},{"name":"show_company_name","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show company name (None = use global settings)","title":"Show Company Name"},"description":"Override: show company name (None = use global settings)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Label PDF file","content":{"application/json":{"schema":{}},"application/pdf":{}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/bulk/labels":{"post":{"tags":["Assets"],"summary":"Generate bulk labels PDF","description":"Generate a multi-page PDF with labels for selected assets","operationId":"assets-bulk_generate_labels","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__assets__schemas__BulkLabelRequest"}}}},"responses":{"200":{"description":"Multi-page label PDF","content":{"application/json":{"schema":{}},"application/pdf":{}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/":{"get":{"tags":["Assets"],"summary":"List all assets","description":"Retrieve a paginated list of assets with optional filtering by status, model, category, or assignment.","operationId":"assets-list_assets","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by tag, serial, or name","title":"Search"},"description":"Search by tag, serial, or name"},{"name":"status_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by status ID","title":"Status Id"},"description":"Filter by status ID"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by model ID","title":"Model Id"},"description":"Filter by model ID"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"assigned_to_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by assigned user ID","title":"Assigned To Id"},"description":"Filter by assigned user ID"},{"name":"is_assigned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by assignment status","title":"Is Assigned"},"description":"Filter by assignment status"},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by location","title":"Location"},"description":"Filter by location"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AssetReadWithRelations_"},"example":{"data":[{"id":"123e4567-e89b-12d3-a456-426614174000","asset_tag":"AST-001","serial":"SN123456","name":"John's MacBook","status":{"id":"...","name":"In Use","color":"#22c55e"},"model":{"id":"...","name":"MacBook Pro 16\""},"assigned_to":{"id":"...","email":"john@example.com"}}],"meta":{"page":1,"per_page":20,"total":150,"total_pages":8}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Assets"],"summary":"Create a new asset","description":"Create a new asset in the system.\n\n**Requires:** Agent or Admin role\n\nThe asset tag must be unique across all assets. Serial number is optional\nbut should be unique if provided.\n\n**Plan Limits:**\n- Checks asset count against subscription plan's max_total_items limit","operationId":"assets-create_asset","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCreate"}}}},"responses":{"201":{"description":"Asset created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions or plan limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/scan/{asset_tag}":{"get":{"tags":["Assets"],"summary":"Scan asset by tag","description":"Quick lookup for QR code scanner integration","operationId":"assets-scan_asset","parameters":[{"name":"asset_tag","in":"path","required":true,"schema":{"type":"string","title":"Asset Tag"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Asset found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReadWithRelations"}}}},"404":{"description":"Asset not found with this tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}":{"get":{"tags":["Assets"],"summary":"Get asset details","description":"Get detailed information about a specific asset.\n\nReturns the asset with all related data including:\n- Current status\n- Model and category information\n- Current assignment (if any)\n- Warranty expiration status","operationId":"assets-get_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Asset details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReadWithRelations"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Assets"],"summary":"Update an asset","description":"Update an existing asset.\n\n**Requires:** Agent or Admin role\n\nOnly provided fields will be updated. Omitted fields retain their current values.","operationId":"assets-update_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUpdate"}}}},"responses":{"200":{"description":"Asset updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetRead"}}}},"403":{"description":"Insufficient permissions or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Assets"],"summary":"Delete an asset","description":"Delete an asset from the system.\n\n**Requires:** Agent or Admin role\n\n**Note:** Assets that are currently checked out must be checked in before deletion.","operationId":"assets-delete_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Asset deleted successfully"},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Asset is currently assigned and cannot be deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/checkout":{"post":{"tags":["Assets"],"summary":"Check out asset to user","description":"Check out an asset to a user.\n\n**Requires:** Agent or Admin role\n\nCreates an audit log entry and optionally requires EULA acceptance if the\nasset's category has EULA requirements enabled.\n\nThe asset status will be automatically updated to reflect it's in use.","operationId":"assets-checkout_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCheckout"}}}},"responses":{"200":{"description":"Asset checked out successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReadWithRelations"}}}},"400":{"description":"Asset is already checked out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/checkin":{"post":{"tags":["Assets"],"summary":"Check in an asset","description":"Check in an asset (return from assignment).\n\n**Requires:** Agent or Admin role\n\nClears the assignment and creates an audit log entry. Optionally include\na note about the condition or reason for check-in.","operationId":"assets-checkin_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCheckin"}}}},"responses":{"200":{"description":"Asset checked in successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReadWithRelations"}}}},"400":{"description":"Asset is not currently checked out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets/{asset_id}/history":{"get":{"tags":["Assets"],"summary":"Get asset history","description":"Retrieve the audit trail for an asset including all checkout/checkin events","operationId":"assets-get_asset_history","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of history entries","default":50,"title":"Limit"},"description":"Maximum number of history entries"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Asset history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Assets-Get Asset History"},"example":[{"id":"...","action_type":"checkout","user":{"email":"admin@example.com"},"assigned_to":{"email":"user@example.com"},"note":"Issued for remote work","created_at":"2024-01-15T10:30:00Z"}]}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/asset-models":{"get":{"tags":["Asset Models"],"summary":"List Asset Models","description":"List all asset models with category info and asset counts.","operationId":"asset-models-list_asset_models","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or manufacturer","title":"Search"},"description":"Search by name or manufacturer"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AssetModelReadWithCategory_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Asset Models"],"summary":"Create Asset Model","description":"Create a new asset model. Requires admin role.","operationId":"asset-models-create_asset_model","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetModelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetModelRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/asset-models/{model_id}":{"get":{"tags":["Asset Models"],"summary":"Get Asset Model","description":"Get asset model details by ID.","operationId":"asset-models-get_asset_model","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetModelReadWithCategory"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Asset Models"],"summary":"Update Asset Model","description":"Update an asset model. Requires admin role.","operationId":"asset-models-update_asset_model","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetModelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetModelRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Asset Models"],"summary":"Delete Asset Model","description":"Delete an asset model. Requires admin role.","operationId":"asset-models-delete_asset_model","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/asset-models/{model_id}/assets":{"get":{"tags":["Asset Models"],"summary":"Get Model Assets","description":"Get all assets for a specific model.","operationId":"asset-models-get_model_assets","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_dict_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/categories":{"get":{"tags":["Categories"],"summary":"List Categories","description":"List all categories with pagination, search, and type filtering.","operationId":"categories-list_categories","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name","title":"Search"},"description":"Search by name"},{"name":"category_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category type","title":"Category Type"},"description":"Filter by category type"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_CategoryReadWithCount_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Categories"],"summary":"Create Category","description":"Create a new category. Requires admin role.","operationId":"categories-create_category","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/categories/{category_id}":{"get":{"tags":["Categories"],"summary":"Get Category","description":"Get category details by ID.","operationId":"categories-get_category","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryReadWithCount"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Categories"],"summary":"Update Category","description":"Update a category. Requires admin role.","operationId":"categories-update_category","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Categories"],"summary":"Delete Category","description":"Delete a category. Requires admin role.","operationId":"categories-delete_category","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/status-labels":{"get":{"tags":["Status Labels"],"summary":"List Status Labels","description":"List all status labels with pagination, search, and type filtering.","operationId":"status-labels-list_status_labels","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name","title":"Search"},"description":"Search by name"},{"name":"status_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/StatusType"},{"type":"null"}],"description":"Filter by status type","title":"Status Type"},"description":"Filter by status type"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_StatusLabelReadWithCount_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Status Labels"],"summary":"Create Status Label","description":"Create a new status label. Requires admin role.","operationId":"status-labels-create_status_label","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusLabelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusLabelRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/status-labels/types":{"get":{"tags":["Status Labels"],"summary":"List Status Types","description":"List available status types.","operationId":"status-labels-list_status_types","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Status-Labels-List Status Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/status-labels/{status_id}":{"get":{"tags":["Status Labels"],"summary":"Get Status Label","description":"Get status label details by ID.","operationId":"status-labels-get_status_label","parameters":[{"name":"status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Status Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusLabelReadWithCount"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Status Labels"],"summary":"Update Status Label","description":"Update a status label. Requires admin role.","operationId":"status-labels-update_status_label","parameters":[{"name":"status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Status Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusLabelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusLabelRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Status Labels"],"summary":"Delete Status Label","description":"Delete a status label. Requires admin role.","operationId":"status-labels-delete_status_label","parameters":[{"name":"status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Status Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/status-labels/{status_id}/set-default":{"post":{"tags":["Status Labels"],"summary":"Set Default Status","description":"Set a status label as the default. Requires admin role.","operationId":"status-labels-set_default_status","parameters":[{"name":"status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Status Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusLabelRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/me/recovery-codes/generate":{"post":{"tags":["Users"],"summary":"Generate account recovery codes","description":"Generate 10 single-use recovery codes for account recovery.\n\n**IMPORTANT:** These codes are shown ONLY ONCE. Save them in a secure location.\n\nUse these codes if you:\n- Lose access to your password AND your MFA device\n- Need to regain access to your account without admin assistance\n\n**Security notes:**\n- Generating new codes invalidates all previous codes\n- Each code can only be used once\n- Codes are 8 characters (alphanumeric, case-insensitive)","operationId":"users-generate_recovery_codes","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Recovery codes generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/me/recovery-codes/status":{"get":{"tags":["Users"],"summary":"Get recovery codes status","description":"Get the status of your account recovery codes.\n\nReturns:\n- Whether you have recovery codes generated\n- How many codes are remaining (unused)\n- When the codes were generated\n- How many codes have been used","operationId":"users-get_recovery_codes_status","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Recovery codes status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesStatusResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/me/recovery-codes":{"delete":{"tags":["Users"],"summary":"Revoke all recovery codes","description":"Revoke all recovery codes for your account.\n\nUse this if:\n- You believe your recovery codes may have been compromised\n- You want to disable recovery code access\n\nAfter revoking, you can generate new codes at any time.","operationId":"users-revoke_recovery_codes","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Recovery codes revoked successfully"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/":{"get":{"tags":["Users"],"summary":"List Users","description":"List all users with stats.\n\nUsers are filtered to only show users within the current organization context.\nSystem admins can use X-Organization-ID header to view users from any org.\nSystem admins (is_system_admin=True) are always excluded from org user lists.","operationId":"users-list_users","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or email","title":"Search"},"description":"Search by name or email"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}],"description":"Filter by role","title":"Role"},"description":"Filter by role"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserReadWithStats_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Users"],"summary":"Create a new user","description":"Create a new user account.\n\n**Requires:** Admin role\n\nCreates a new user with the specified email, password, and role.\nThe password will be hashed before storage.\n\n**Plan Limits:**\n- Checks user count against subscription plan's max_users limit\n- For admin role: also checks against max_admins limit\n- For agent role: checks if agent role is enabled in the plan","operationId":"users-create_user","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreateRequest"}}}},"responses":{"201":{"description":"User created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"400":{"description":"Invalid role specified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit exceeded (users, admins, or agent role not available)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Email already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/roles":{"get":{"tags":["Users"],"summary":"List Roles","description":"List available user roles.","operationId":"users-list_roles","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Users-List Roles"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}":{"get":{"tags":["Users"],"summary":"Get User","description":"Get user details by ID.\n\nSystem admins can view any user. Regular users can only view users\nwithin their own organization. Returns 404 for other-org users to\nprevent enumeration attacks.","operationId":"users-get_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithStats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Users"],"summary":"Update User","description":"Update a user. Requires admin role.\n\n**Plan Limits:**\n- Blocked when at or over user quota (delete users to continue editing)","operationId":"users-update_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Users"],"summary":"Delete a user","description":"Delete a user from the system.\n\n**Requires:** Admin role\n\nBy default, users with assigned assets or licenses cannot be deleted.\nUse `force=true` to unassign all items and delete the user.\n\n**Note:** Cannot delete yourself or the last admin user.","operationId":"users-delete_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Force delete even if user has assignments (will unassign all)","default":false,"title":"Force"},"description":"Force delete even if user has assignments (will unassign all)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"User deleted successfully"},"400":{"description":"Cannot delete user with assignments or self","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/set-role":{"post":{"tags":["Users"],"summary":"Set user role","description":"Set user role.\n\n**Requires:** Admin role\n\n**Plan Limits:**\n- For admin role: checks against max_admins limit\n- For agent role: checks if agent role is enabled in the plan","operationId":"users-set_user_role","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"role","in":"query","required":true,"schema":{"$ref":"#/components/schemas/UserRole"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Role updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"403":{"description":"Plan limit exceeded or role not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Cannot remove own admin role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/activate":{"post":{"tags":["Users"],"summary":"Activate User","description":"Activate a user. Requires admin role.","operationId":"users-activate_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/deactivate":{"post":{"tags":["Users"],"summary":"Deactivate User","description":"Deactivate a user. Requires admin role.","operationId":"users-deactivate_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/reset-password":{"post":{"tags":["Users"],"summary":"Reset a user's password","description":"Reset a user's password.\n\n**Requires:** Admin role\n\nSets a new password for the specified user. The user will need to use\nthis new password on their next login.","operationId":"users-reset_user_password","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}}},"responses":{"200":{"description":"Password reset successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/assets":{"get":{"tags":["Users"],"summary":"Get User Assets","description":"Get assets assigned to a user.","operationId":"users-get_user_assets","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Users-Get User Assets"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/licenses":{"get":{"tags":["Users"],"summary":"Get User Licenses","description":"Get licenses assigned to a user.","operationId":"users-get_user_licenses","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Users-Get User Licenses"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/accessories":{"get":{"tags":["Users"],"summary":"Get User Accessories","description":"Get accessories assigned to a user.","operationId":"users-get_user_accessories","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Users-Get User Accessories"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/users/{user_id}/history":{"get":{"tags":["Users"],"summary":"Get User History","description":"Get activity history for a user.\n\nReturns all actions performed on or by this user, ordered by most recent first.","operationId":"users-get_user_history","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum entries to return","default":50,"title":"Limit"},"description":"Maximum entries to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of entries to skip","default":0,"title":"Offset"},"description":"Number of entries to skip"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Users-Get User History"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/bulk/assign":{"post":{"tags":["Licenses"],"summary":"Bulk assign license seats","description":"Assign license seats to multiple users at once.\n\n**Requires:** Agent or Admin role\n\n**Behavior:**\n- Validates the license exists and is not expired\n- Checks sufficient seats are available for all users\n- Skips users who already have a seat for this license\n- Creates seat assignments for each valid user\n- Logs each assignment with ActionType.LICENSE_CHECKOUT\n- Does NOT send notifications (to avoid notification spam)\n\n**Maximum:** 50 users per request\n\n**Error Handling:**\n- Each user is processed independently\n- Failures for individual users are captured in the errors array\n- Successfully assigned seats are not rolled back if later users fail","operationId":"licenses-bulk_assign_seats","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSeatAssignRequest"}}}},"responses":{"200":{"description":"Bulk assignment completed (check success_count and failure_count)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResult"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"License not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"License is expired or has insufficient seats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/bulk/release":{"post":{"tags":["Licenses"],"summary":"Bulk release license seats","description":"Release license seats from multiple users at once.\n\n**Requires:** Agent or Admin role\n\n**Behavior:**\n- Validates the license exists\n- Finds seat assignments for each user\n- Releases each seat via checkin_seat\n- Logs each release with ActionType.LICENSE_CHECKIN\n- Does NOT send notifications (to avoid notification spam)\n\n**Maximum:** 50 users per request\n\n**Error Handling:**\n- Each user is processed independently\n- Users without a seat for this license are captured as errors\n- Successfully released seats are not affected by later failures","operationId":"licenses-bulk_release_seats","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSeatReleaseRequest"}}}},"responses":{"200":{"description":"Bulk release completed (check success_count and failure_count)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResult"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"License not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/deleted":{"get":{"tags":["Licenses"],"summary":"List deleted licenses","description":"Retrieve a paginated list of soft-deleted licenses. Admin only.","operationId":"licenses-list_deleted_licenses","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or manufacturer","title":"Search"},"description":"Search by name or manufacturer"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of deleted licenses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_LicenseReadWithSeats_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}/restore":{"post":{"tags":["Licenses"],"summary":"Restore deleted license","description":"Restore a soft-deleted license. Admin only.","operationId":"licenses-restore_license","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"License restored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseRead"}}}},"400":{"description":"License is not deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"License not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}/permanent":{"delete":{"tags":["Licenses"],"summary":"Permanently delete a license","description":"Permanently and irreversibly delete a license. Admin only.","operationId":"licenses-permanent_delete_license","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermanentDeleteConfirmation"}}}},"responses":{"204":{"description":"License permanently deleted"},"400":{"description":"Confirmation required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"License not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/expiring/soon":{"get":{"tags":["Licenses"],"summary":"Get Expiring Licenses","description":"Get licenses expiring within specified days.","operationId":"licenses-get_expiring_licenses","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpiringLicenseEntry"},"title":"Response Licenses-Get Expiring Licenses"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/":{"get":{"tags":["Licenses"],"summary":"List Licenses","description":"List all licenses with seat information.","operationId":"licenses-list_licenses","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or manufacturer","title":"Search"},"description":"Search by name or manufacturer"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category","title":"Category Id"},"description":"Filter by category"},{"name":"is_expired","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter expired licenses","title":"Is Expired"},"description":"Filter expired licenses"},{"name":"has_available_seats","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by seat availability","title":"Has Available Seats"},"description":"Filter by seat availability"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_LicenseReadWithSeats_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Licenses"],"summary":"Create License","description":"Create a new license. Requires admin role.\n\n**Plan Limits:**\n- Checks total item count against subscription plan's max_total_items limit","operationId":"licenses-create_license","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}":{"get":{"tags":["Licenses"],"summary":"Get License","description":"Get license details by ID.","operationId":"licenses-get_license","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseReadWithSeats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Licenses"],"summary":"Update License","description":"Update a license. Requires admin role.\n\n**Plan Limits:**\n- Blocked when at or over license quota (delete items to continue editing)","operationId":"licenses-update_license","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Licenses"],"summary":"Delete License","description":"Delete a license. Requires admin role.","operationId":"licenses-delete_license","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}/history":{"get":{"tags":["Licenses"],"summary":"Get License History","description":"Get action history for a license.","operationId":"licenses-get_license_history","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicenseHistoryEntry"},"title":"Response Licenses-Get License History"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}/seats":{"get":{"tags":["Licenses"],"summary":"Get License Seats","description":"Get all seat assignments for a license.","operationId":"licenses-get_license_seats","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicenseSeatRead"},"title":"Response Licenses-Get License Seats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}/checkout":{"post":{"tags":["Licenses"],"summary":"Checkout License Seat","description":"Check out a license seat. Requires agent or admin role.","operationId":"licenses-checkout_license_seat","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseSeatCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseSeatRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/licenses/{license_id}/seats/{seat_id}/checkin":{"post":{"tags":["Licenses"],"summary":"Checkin License Seat","description":"Check in (release) a license seat. Requires agent or admin role.","operationId":"licenses-checkin_license_seat","parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}},{"name":"seat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Seat Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/bulk/labels":{"post":{"tags":["Consumables"],"summary":"Generate bulk labels PDF","description":"Generate a multi-page PDF with labels for selected consumables","operationId":"consumables-bulk_generate_consumable_labels","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkConsumableLabelRequest"}}}},"responses":{"200":{"description":"Multi-page label PDF","content":{"application/json":{"schema":{}},"application/pdf":{}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/qrcode":{"get":{"tags":["Consumables"],"summary":"Generate QR code","description":"Generate a QR code image for the consumable","operationId":"consumables-get_consumable_qrcode","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":100,"description":"QR code size in pixels","default":200,"title":"Size"},"description":"QR code size in pixels"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"QR code image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/barcode":{"get":{"tags":["Consumables"],"summary":"Generate barcode","description":"Generate a barcode image (Code128 or Code39) for the consumable","operationId":"consumables-get_consumable_barcode","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"barcode_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(code128)$","description":"Barcode type: code128","default":"code128","title":"Barcode Type"},"description":"Barcode type: code128"},{"name":"width","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":50,"description":"Barcode width in mm","default":50,"title":"Width"},"description":"Barcode width in mm"},{"name":"height","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":10,"description":"Barcode height in mm","default":15,"title":"Height"},"description":"Barcode height in mm"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Barcode image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/label/pdf":{"get":{"tags":["Consumables"],"summary":"Generate label PDF","description":"Generate a printable label PDF for the consumable","operationId":"consumables-get_consumable_label_pdf","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"template","in":"query","required":false,"schema":{"type":"string","description":"Label template ID (DK-11202, DK-11208, DK-11209)","default":"DK-11202","title":"Template"},"description":"Label template ID (DK-11202, DK-11208, DK-11209)"},{"name":"code_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(qr|code128)$","description":"Code type: qr or code128","default":"qr","title":"Code Type"},"description":"Code type: qr or code128"},{"name":"include_serial","in":"query","required":false,"schema":{"type":"boolean","description":"Include serial number","default":true,"title":"Include Serial"},"description":"Include serial number"},{"name":"include_model","in":"query","required":false,"schema":{"type":"boolean","description":"Include model name","default":true,"title":"Include Model"},"description":"Include model name"},{"name":"show_logo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show logo (None = use global settings)","title":"Show Logo"},"description":"Override: show logo (None = use global settings)"},{"name":"show_company_name","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show company name (None = use global settings)","title":"Show Company Name"},"description":"Override: show company name (None = use global settings)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Label PDF file","content":{"application/json":{"schema":{}},"application/pdf":{}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/deleted":{"get":{"tags":["Consumables"],"summary":"List deleted consumables","description":"Retrieve a paginated list of soft-deleted consumables. Admin only.","operationId":"consumables-list_deleted_consumables","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or SKU","title":"Search"},"description":"Search by name or SKU"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of deleted consumables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ConsumableReadWithRelations_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/restore":{"post":{"tags":["Consumables"],"summary":"Restore deleted consumable","description":"Restore a soft-deleted consumable. Admin only.","operationId":"consumables-restore_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Consumable restored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableRead"}}}},"400":{"description":"Consumable is not deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/permanent":{"delete":{"tags":["Consumables"],"summary":"Permanently delete a consumable","description":"Permanently and irreversibly delete a consumable. Admin only.","operationId":"consumables-permanent_delete_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermanentDeleteConfirmation"}}}},"responses":{"204":{"description":"Consumable permanently deleted"},"400":{"description":"Confirmation required or consumable has active checkouts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/":{"get":{"tags":["Consumables"],"summary":"List all consumables","description":"Retrieve a paginated list of consumables with optional filtering by category, location, or stock status.","operationId":"consumables-list_consumables","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, SKU, or manufacturer","title":"Search"},"description":"Search by name, SKU, or manufacturer"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"stock_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by stock status: 'ok', 'low', or 'out'","title":"Stock Status"},"description":"Filter by stock status: 'ok', 'low', or 'out'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of consumables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ConsumableReadWithRelations_"},"example":{"data":[{"id":"123e4567-e89b-12d3-a456-426614174000","name":"HP 45A Toner Cartridge","sku":"HP-45A-BLK","quantity":15,"minimum_stock_level":5,"stock_status":"ok"}],"meta":{"page":1,"per_page":20,"total":50,"total_pages":3}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Consumables"],"summary":"Create a new consumable","description":"Create a new consumable in the system.\n\n**Requires:** Agent or Admin role\n\nThe SKU must be unique if provided.","operationId":"consumables-create_consumable","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableCreate"}}}},"responses":{"201":{"description":"Consumable created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions or consumable limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Consumable with this SKU already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/low-stock":{"get":{"tags":["Consumables"],"summary":"Get low stock items","description":"Retrieve consumables that are at or below their minimum stock level","operationId":"consumables-get_low_stock_consumables","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of items","default":50,"title":"Limit"},"description":"Maximum number of items"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of low stock consumables","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConsumableReadWithRelations"},"title":"Response Consumables-Get Low Stock Consumables"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}":{"get":{"tags":["Consumables"],"summary":"Get consumable details","description":"Get detailed information about a specific consumable.\n\nReturns the consumable with all related data including:\n- Category and location information\n- Current stock status\n- Checked out quantities","operationId":"consumables-get_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Consumable details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableReadWithRelations"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Consumables"],"summary":"Update a consumable","description":"Update an existing consumable.\n\n**Requires:** Agent or Admin role\n\nOnly provided fields will be updated. Omitted fields retain their current values.\n\n**Plan Limits:**\n- Blocked when at or over consumable quota (delete items to continue editing)","operationId":"consumables-update_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableUpdate"}}}},"responses":{"200":{"description":"Consumable updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableRead"}}}},"403":{"description":"Insufficient permissions or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"SKU already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Consumables"],"summary":"Delete a consumable","description":"Delete a consumable from the system.\n\n**Requires:** Agent or Admin role\n\n**Note:** Consumables with active checkouts must have all items checked in before deletion.","operationId":"consumables-delete_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Consumable deleted successfully"},"400":{"description":"Consumable has active checkouts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/consume":{"post":{"tags":["Consumables"],"summary":"Consume stock (permanent)","description":"Consume stock (permanent decrement).\n\n**Requires:** Agent or Admin role\n\nUse this when items are consumed and will not be returned (e.g., toner used,\ncables given out permanently). Creates an audit log entry tracking who consumed\nthe items and when.","operationId":"consumables-consume_stock","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableConsumeRequest"}}}},"responses":{"200":{"description":"Stock consumed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableReadWithRelations"}}}},"400":{"description":"Insufficient stock available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/restock":{"post":{"tags":["Consumables"],"summary":"Add stock","description":"Add stock to a consumable.\n\n**Requires:** Agent or Admin role\n\nUse this when new inventory arrives. Include a note with PO number or\nsupplier information for audit purposes.","operationId":"consumables-restock_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableRestockRequest"}}}},"responses":{"200":{"description":"Stock added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableReadWithRelations"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/adjust":{"post":{"tags":["Consumables"],"summary":"Manual stock adjustment","description":"Manual stock adjustment.\n\n**Requires:** Agent or Admin role\n\nUse this for inventory corrections after physical counts. Always include\na note explaining the reason for the adjustment.","operationId":"consumables-adjust_stock","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableAdjustRequest"}}}},"responses":{"200":{"description":"Stock adjusted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableReadWithRelations"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/checkout":{"post":{"tags":["Consumables"],"summary":"Checkout to user (returnable)","description":"Check out consumable to a user (returnable assignment).\n\n**Requires:** Agent or Admin role\n\nUse this when items are temporarily assigned to a user and expected to be\nreturned (e.g., tools, equipment). The checked out quantity is tracked\nseparately from consumed stock.","operationId":"consumables-checkout_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableCheckoutRequest"}}}},"responses":{"200":{"description":"Consumable checked out successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableCheckoutReadWithUser"}}}},"400":{"description":"Insufficient stock available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/checkouts":{"get":{"tags":["Consumables"],"summary":"List active checkouts","description":"List all active checkouts for a consumable.\n\nReturns checkout records with user details for items currently assigned.","operationId":"consumables-list_checkouts","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of active checkouts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConsumableCheckoutReadWithUser"},"title":"Response Consumables-List Checkouts"}}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/checkouts/{checkout_id}/checkin":{"post":{"tags":["Consumables"],"summary":"Check in consumable","description":"Check in consumable (return assigned items).\n\n**Requires:** Agent or Admin role\n\nReturns items that were previously checked out to a user. The checkout\nrecord is deleted and items become available again.","operationId":"consumables-checkin_consumable","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"checkout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Checkout Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableCheckinRequest"}}}},"responses":{"200":{"description":"Consumable checked in successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumableReadWithRelations"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Consumable or checkout not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consumables/{consumable_id}/history":{"get":{"tags":["Consumables"],"summary":"Get consumable history","description":"Retrieve the audit trail for a consumable including all stock operations","operationId":"consumables-get_consumable_history","parameters":[{"name":"consumable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Consumable Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of history entries","default":50,"title":"Limit"},"description":"Maximum number of history entries"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Consumable history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Consumables-Get Consumable History"},"example":[{"id":"...","action_type":"consumable_consume","user":{"email":"admin@example.com"},"note":"Used for printer maintenance","meta":{"quantity_consumed":2,"stock_before":10,"stock_after":8},"created_at":"2024-01-15T10:30:00Z"}]}}},"404":{"description":"Consumable not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/deleted":{"get":{"tags":["Components"],"summary":"List deleted components","description":"Retrieve a paginated list of soft-deleted components. Admin only.","operationId":"components-list_deleted_components","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or serial","title":"Search"},"description":"Search by name or serial"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of deleted components","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ComponentReadWithRelations_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/restore":{"post":{"tags":["Components"],"summary":"Restore deleted component","description":"Restore a soft-deleted component. Admin only.","operationId":"components-restore_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Component restored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"400":{"description":"Component is not deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Component not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/permanent":{"delete":{"tags":["Components"],"summary":"Permanently delete a component","description":"Permanently and irreversibly delete a component. Admin only.","operationId":"components-permanent_delete_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermanentDeleteConfirmation"}}}},"responses":{"204":{"description":"Component permanently deleted"},"400":{"description":"Confirmation required or component is assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Component not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/":{"get":{"tags":["Components"],"summary":"List all components","description":"Retrieve a paginated list of components with optional filtering.","operationId":"components-list_components","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, manufacturer, etc.","title":"Search"},"description":"Search by name, manufacturer, etc."},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"stock_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by stock status: 'ok', 'low', or 'out'","title":"Stock Status"},"description":"Filter by stock status: 'ok', 'low', or 'out'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ComponentReadWithRelations_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Components"],"summary":"Create a new component","description":"Create a new component.","operationId":"components-create_component","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}":{"get":{"tags":["Components"],"summary":"Get component details","description":"Get component details.","operationId":"components-get_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Components"],"summary":"Delete a component","description":"Delete a component.","operationId":"components-delete_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Components"],"summary":"Update a component","description":"Update a component.","operationId":"components-update_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/restock":{"post":{"tags":["Components"],"summary":"Add stock","description":"Add stock to a component.","operationId":"components-restock_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentRestockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/checkout":{"post":{"tags":["Components"],"summary":"Checkout to asset","description":"Check out component to an asset.","operationId":"components-checkout_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCheckoutRequest"}}}},"responses":{"200":{"description":"Component checked out successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCheckoutReadWithAsset"}}}},"400":{"description":"Insufficient stock available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Component or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/checkouts":{"get":{"tags":["Components"],"summary":"List active checkouts","description":"List all active checkouts for a component.","operationId":"components-list_checkouts","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentCheckoutReadWithAsset"},"title":"Response Components-List Checkouts"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/checkouts/{checkout_id}/checkin":{"post":{"tags":["Components"],"summary":"Check in component","description":"Check in component (uninstall from asset).","operationId":"components-checkin_component","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"checkout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Checkout Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentCheckinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/history":{"get":{"tags":["Components"],"summary":"Get component history","description":"Get action history for a component.","operationId":"components-get_component_history","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Components-Get Component History"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/by-asset/{asset_id}":{"get":{"tags":["Components"],"summary":"Get components installed in asset","description":"Get all component checkouts for a specific asset.\n\nReturns component checkouts that are currently installed in the specified asset.","operationId":"components-get_checkouts_by_asset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentCheckoutReadWithAsset"},"title":"Response Components-Get Checkouts By Asset"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/qrcode":{"get":{"tags":["Components"],"summary":"Generate QR code","description":"Generate a QR code image containing the component tag","operationId":"components-get_component_qrcode","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":100,"description":"QR code size in pixels","default":200,"title":"Size"},"description":"QR code size in pixels"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"QR code image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Component not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/label":{"get":{"tags":["Components"],"summary":"Get label data","description":"Get component data formatted for label printing","operationId":"components-get_component_label","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Label data","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Components-Get Component Label"},"example":{"tag":"CMP-DA48D793","name":"Network Card 10GbE","serial":"NIC10G-SP1","model":"X710-DA2","manufacturer":"Intel","qr_data":"NIC10G-SP1"}}}},"404":{"description":"Component not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/barcode":{"get":{"tags":["Components"],"summary":"Generate barcode","description":"Generate a barcode image (Code128) for the component","operationId":"components-get_component_barcode","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"barcode_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(code128)$","description":"Barcode type: code128","default":"code128","title":"Barcode Type"},"description":"Barcode type: code128"},{"name":"width","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":50,"description":"Barcode width in mm","default":50,"title":"Width"},"description":"Barcode width in mm"},{"name":"height","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":10,"description":"Barcode height in mm","default":15,"title":"Height"},"description":"Barcode height in mm"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Barcode image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Component not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/components/{component_id}/label/pdf":{"get":{"tags":["Components"],"summary":"Generate label PDF","description":"Generate a printable label PDF for the component","operationId":"components-get_component_label_pdf","parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}},{"name":"template","in":"query","required":false,"schema":{"type":"string","description":"Label template ID (DK-11202, DK-11208, DK-11209)","default":"DK-11202","title":"Template"},"description":"Label template ID (DK-11202, DK-11208, DK-11209)"},{"name":"code_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(qr|code128)$","description":"Code type: qr or code128","default":"qr","title":"Code Type"},"description":"Code type: qr or code128"},{"name":"include_serial","in":"query","required":false,"schema":{"type":"boolean","description":"Include serial number","default":true,"title":"Include Serial"},"description":"Include serial number"},{"name":"include_model","in":"query","required":false,"schema":{"type":"boolean","description":"Include model name","default":true,"title":"Include Model"},"description":"Include model name"},{"name":"show_logo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show logo (None = use global settings)","title":"Show Logo"},"description":"Override: show logo (None = use global settings)"},{"name":"show_company_name","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show company name (None = use global settings)","title":"Show Company Name"},"description":"Override: show company name (None = use global settings)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Label PDF file","content":{"application/json":{"schema":{}},"application/pdf":{}}},"404":{"description":"Component not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/types/components":{"get":{"tags":["Accessories"],"summary":"Get component types","description":"Get the list of available component types (cpu, ram, ssd, etc.)","operationId":"accessories-get_component_types","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Accessories-Get Component Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/types/accessories":{"get":{"tags":["Accessories"],"summary":"Get accessory types","description":"Get the list of available accessory types (keyboard, mouse, etc.)","operationId":"accessories-get_accessory_types","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Accessories-Get Accessory Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/deleted":{"get":{"tags":["Accessories"],"summary":"List deleted accessories","description":"Retrieve a paginated list of soft-deleted accessories. Admin only.","operationId":"accessories-list_deleted_accessories","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, serial, or asset tag","title":"Search"},"description":"Search by name, serial, or asset tag"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of deleted accessories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AccessoryReadWithRelations_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/restore":{"post":{"tags":["Accessories"],"summary":"Restore deleted accessory","description":"Restore a soft-deleted accessory. Admin only.","operationId":"accessories-restore_accessory","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Accessory restored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryRead"}}}},"400":{"description":"Accessory is not deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/permanent":{"delete":{"tags":["Accessories"],"summary":"Permanently delete an accessory","description":"Permanently and irreversibly delete an accessory. Admin only.","operationId":"accessories-permanent_delete_accessory","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermanentDeleteConfirmation"}}}},"responses":{"204":{"description":"Accessory permanently deleted"},"400":{"description":"Confirmation required or accessory is assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/bulk/labels":{"post":{"tags":["Accessories"],"summary":"Generate bulk labels PDF","description":"Generate a multi-page PDF with labels for selected accessories","operationId":"accessories-bulk_generate_accessory_labels","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAccessoryLabelRequest"}}}},"responses":{"200":{"description":"Multi-page label PDF","content":{"application/json":{"schema":{}},"application/pdf":{}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/qrcode":{"get":{"tags":["Accessories"],"summary":"Generate QR code","description":"Generate a QR code image for the accessory","operationId":"accessories-get_accessory_qrcode","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":100,"description":"QR code size in pixels","default":200,"title":"Size"},"description":"QR code size in pixels"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"QR code image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/barcode":{"get":{"tags":["Accessories"],"summary":"Generate barcode","description":"Generate a barcode image (Code128 or Code39) for the accessory","operationId":"accessories-get_accessory_barcode","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"barcode_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(code128)$","description":"Barcode type: code128","default":"code128","title":"Barcode Type"},"description":"Barcode type: code128"},{"name":"width","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":50,"description":"Barcode width in mm","default":50,"title":"Width"},"description":"Barcode width in mm"},{"name":"height","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":10,"description":"Barcode height in mm","default":15,"title":"Height"},"description":"Barcode height in mm"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Barcode image (PNG)","content":{"application/json":{"schema":{}},"image/png":{}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/label/pdf":{"get":{"tags":["Accessories"],"summary":"Generate label PDF","description":"Generate a printable label PDF for the accessory","operationId":"accessories-get_accessory_label_pdf","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"template","in":"query","required":false,"schema":{"type":"string","description":"Label template ID (DK-11202, DK-11208, DK-11209)","default":"DK-11202","title":"Template"},"description":"Label template ID (DK-11202, DK-11208, DK-11209)"},{"name":"code_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(qr|code128)$","description":"Code type: qr or code128","default":"qr","title":"Code Type"},"description":"Code type: qr or code128"},{"name":"include_serial","in":"query","required":false,"schema":{"type":"boolean","description":"Include serial number","default":true,"title":"Include Serial"},"description":"Include serial number"},{"name":"include_model","in":"query","required":false,"schema":{"type":"boolean","description":"Include model name","default":true,"title":"Include Model"},"description":"Include model name"},{"name":"show_logo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show logo (None = use global settings)","title":"Show Logo"},"description":"Override: show logo (None = use global settings)"},{"name":"show_company_name","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Override: show company name (None = use global settings)","title":"Show Company Name"},"description":"Override: show company name (None = use global settings)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Label PDF file","content":{"application/json":{"schema":{}},"application/pdf":{}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/":{"get":{"tags":["Accessories"],"summary":"List all accessories","description":"Retrieve a paginated list of accessories/components with optional filtering.","operationId":"accessories-list_accessories","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, serial, asset tag, manufacturer","title":"Search"},"description":"Search by name, serial, asset tag, manufacturer"},{"name":"accessory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by accessory type (keyboard, mouse, etc.)","title":"Accessory Type"},"description":"Filter by accessory type (keyboard, mouse, etc.)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AccessoryStatus"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of accessories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AccessoryReadWithRelations_"},"example":{"data":[{"id":"123e4567-e89b-12d3-a456-426614174000","name":"Kingston Fury 32GB DDR5","status":"deployed"}],"meta":{"page":1,"per_page":20,"total":50,"total_pages":3}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Accessories"],"summary":"Create a new accessory/component","description":"Create a new accessory or component.\n\n**Requires:** Agent or Admin role","operationId":"accessories-create_accessory","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryCreate"}}}},"responses":{"201":{"description":"Accessory created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions or accessory limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/available":{"get":{"tags":["Accessories"],"summary":"Get available items","description":"Retrieve accessories/components that are available for checkout","operationId":"accessories-get_available_accessories","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessoryReadWithRelations"},"title":"Response Accessories-Get Available Accessories"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/by-user/{user_id}":{"get":{"tags":["Accessories"],"summary":"Get accessories by user","description":"Retrieve all accessories assigned to a specific user","operationId":"accessories-get_accessories_by_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessoryReadWithRelations"},"title":"Response Accessories-Get Accessories By User"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/stats":{"get":{"tags":["Accessories"],"summary":"Get accessory statistics","description":"Get statistics about accessories and components for dashboard","operationId":"accessories-get_accessory_stats","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Accessories-Get Accessory Stats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}":{"get":{"tags":["Accessories"],"summary":"Get accessory details","description":"Get detailed information about a specific accessory/component.\n\nReturns the item with all related data including:\n- Category and location information\n- Current assignment (if deployed)\n- Warranty status","operationId":"accessories-get_accessory","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Accessory details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryReadWithRelations"}}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Accessories"],"summary":"Update an accessory","description":"Update an existing accessory/component.\n\n**Requires:** Agent or Admin role\n\nOnly provided fields will be updated. Omitted fields retain their current values.\n\n**Plan Limits:**\n- Blocked when at or over accessory quota (delete items to continue editing)","operationId":"accessories-update_accessory","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryUpdate"}}}},"responses":{"200":{"description":"Accessory updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryRead"}}}},"403":{"description":"Insufficient permissions or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Accessories"],"summary":"Delete an accessory","description":"Delete an accessory/component from the system.\n\n**Requires:** Agent or Admin role\n\n**Note:** Items that are currently assigned must be checked in before deletion.","operationId":"accessories-delete_accessory","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Accessory deleted successfully"},"400":{"description":"Accessory is currently assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/checkout/user":{"post":{"tags":["Accessories"],"summary":"Checkout accessory to user","description":"Check out an accessory to a user.\n\n**Requires:** Agent or Admin role\n\nOnly accessories (item_type=accessory) can be checked out to users.\nUse this for assigning peripherals like keyboards, mice, headsets, webcams, etc.","operationId":"accessories-checkout_to_user","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryCheckoutToUserRequest"}}}},"responses":{"200":{"description":"Accessory checked out to user successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryAssignmentReadWithDetails"}}}},"400":{"description":"Invalid checkout (wrong item type or already assigned)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Accessory or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/checkin":{"post":{"tags":["Accessories"],"summary":"Check in accessory/component","description":"Check in an accessory/component.\n\n**Requires:** Agent or Admin role\n\nReturns the item from its current assignment (either asset or user).\nThe item status will be set back to \"available\".","operationId":"accessories-checkin_accessory","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AccessoryCheckinRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Item checked in successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryReadWithRelations"}}}},"400":{"description":"Item is not currently assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessories/{accessory_id}/history":{"get":{"tags":["Accessories"],"summary":"Get accessory history","description":"Retrieve the audit trail for an accessory including all assignments","operationId":"accessories-get_accessory_history","parameters":[{"name":"accessory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Accessory Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of history entries","default":50,"title":"Limit"},"description":"Maximum number of history entries"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Accessory history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Accessories-Get Accessory History"},"example":[{"id":"...","action_type":"accessory_checkout","user":{"email":"admin@example.com"},"meta":{"assigned_to_type":"user","assigned_to_name":"John Smith"},"created_at":"2024-01-15T10:30:00Z"}]}}},"404":{"description":"Accessory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessory-types/components":{"get":{"tags":["Accessory Types"],"summary":"List all component types","description":"Get all component types, optionally filtered by active status.","operationId":"accessory-types-list_component_types","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentTypeRead"},"title":"Response Accessory-Types-List Component Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Accessory Types"],"summary":"Create a new component type","description":"Create a new component type. Requires admin role.","operationId":"accessory-types-create_component_type","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentTypeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentTypeRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessory-types/components/{type_id}":{"get":{"tags":["Accessory Types"],"summary":"Get a component type by ID","description":"Get a specific component type by ID.","operationId":"accessory-types-get_component_type","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentTypeRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Accessory Types"],"summary":"Update a component type","description":"Update a component type. Requires admin role.","operationId":"accessory-types-update_component_type","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentTypeRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Accessory Types"],"summary":"Delete a component type","description":"Delete a component type. Requires admin role.","operationId":"accessory-types-delete_component_type","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessory-types/accessories":{"get":{"tags":["Accessory Types"],"summary":"List all accessory types","description":"Get all accessory types, optionally filtered by active status.","operationId":"accessory-types-list_accessory_types","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessoryTypeRead"},"title":"Response Accessory-Types-List Accessory Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Accessory Types"],"summary":"Create a new accessory type","description":"Create a new accessory type. Requires admin role.","operationId":"accessory-types-create_accessory_type","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryTypeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryTypeRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accessory-types/accessories/{type_id}":{"get":{"tags":["Accessory Types"],"summary":"Get an accessory type by ID","description":"Get a specific accessory type by ID.","operationId":"accessory-types-get_accessory_type","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryTypeRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Accessory Types"],"summary":"Update an accessory type","description":"Update an accessory type. Requires admin role.","operationId":"accessory-types-update_accessory_type","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessoryTypeRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Accessory Types"],"summary":"Delete an accessory type","description":"Delete an accessory type. Requires admin role.","operationId":"accessory-types-delete_accessory_type","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"Get a paginated list of configured webhooks","operationId":"webhooks-list_webhooks","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of webhooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_WebhookRead_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create webhook","description":"Create a new webhook.\n\n**Requires:** Admin role\n\nConfigure a webhook to receive notifications for specific events.\n\n**Available events:**\n- Asset: `asset.created`, `asset.updated`, `asset.deleted`, `asset.checkout`, `asset.checkin`\n- License: `license.created`, `license.updated`, `license.deleted`, `license.seat.checkout`, `license.seat.checkin`\n- User: `user.created`, `user.updated`, `user.deleted`\n- Alerts: `warranty.expiring`, `license.expiring`\n- Use `*` to subscribe to all events","operationId":"webhooks-create_webhook","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Webhook created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not authorized - admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks/events":{"get":{"tags":["Webhooks"],"summary":"List available events","description":"Get a list of all available webhook events","operationId":"webhooks-list_webhook_events","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"title":"Response Webhooks-List Webhook Events"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get webhook","description":"Get webhook details by ID.\n\n**Requires:** Admin role","operationId":"webhooks-get_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Webhook details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRead"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update webhook","description":"Update a webhook configuration.\n\n**Requires:** Admin role","operationId":"webhooks-update_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Webhook updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRead"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","description":"Delete a webhook.\n\n**Requires:** Admin role\n\nThis also deletes all delivery history for the webhook.","operationId":"webhooks-delete_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Webhook deleted"},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Test webhook","description":"Test a webhook by sending a test payload.\n\n**Requires:** Admin role\n\nSends a test event to the webhook URL and returns the result.\nThis does not create a delivery log entry.","operationId":"webhooks-test_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Test result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Get delivery history","description":"Get delivery history for a webhook.\n\n**Requires:** Admin role\n\nReturns a paginated list of delivery attempts with status and timing.","operationId":"webhooks-get_webhook_deliveries","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Delivery history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_WebhookDeliveryRead_"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/assets/inventory":{"get":{"tags":["Reports"],"summary":"Export asset inventory","description":"Export complete asset inventory to CSV with optional filtering","operationId":"reports-export_asset_inventory","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by tag, serial, name, model, or manufacturer","title":"Search"},"description":"Search by tag, serial, name, model, or manufacturer"},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by location name","title":"Location"},"description":"Filter by location name"},{"name":"status_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by status ID","title":"Status Id"},"description":"Filter by status ID"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by model ID","title":"Model Id"},"description":"Filter by model ID"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"assigned_to_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by assigned user","title":"Assigned To Id"},"description":"Filter by assigned user"},{"name":"is_assigned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by assignment status","title":"Is Assigned"},"description":"Filter by assignment status"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/assets/expiring-warranty":{"get":{"tags":["Reports"],"summary":"Export expiring warranties","description":"Export assets with warranties expiring within N days","operationId":"reports-export_expiring_warranties","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days until warranty expiration","default":30,"title":"Days"},"description":"Days until warranty expiration"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/assets/by-status":{"get":{"tags":["Reports"],"summary":"Export assets by status","description":"Export asset counts grouped by status","operationId":"reports-export_assets_by_status","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/assets/by-category":{"get":{"tags":["Reports"],"summary":"Export assets by category","description":"Export asset counts grouped by category","operationId":"reports-export_assets_by_category","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/licenses/summary":{"get":{"tags":["Reports"],"summary":"Export license summary","description":"Export all licenses with seat utilization","operationId":"reports-export_license_summary","parameters":[{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category","title":"Category Id"},"description":"Filter by category"},{"name":"is_expired","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter expired licenses","title":"Is Expired"},"description":"Filter expired licenses"},{"name":"has_available_seats","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by seat availability","title":"Has Available Seats"},"description":"Filter by seat availability"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/licenses/expiring":{"get":{"tags":["Reports"],"summary":"Export expiring licenses","description":"Export licenses expiring within N days","operationId":"reports-export_expiring_licenses","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days until expiration","default":30,"title":"Days"},"description":"Days until expiration"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/audit/trail":{"get":{"tags":["Reports"],"summary":"Export audit trail","description":"Export action log for compliance and auditing","operationId":"reports-export_audit_trail","parameters":[{"name":"action_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by action type","title":"Action Type"},"description":"Filter by action type"},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by target type (asset, license, user)","title":"Target Type"},"description":"Filter by target type (asset, license, user)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by user who performed the action","title":"User Id"},"description":"Filter by user who performed the action"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by date (from)","title":"Date From"},"description":"Filter by date (from)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by date (to)","title":"Date To"},"description":"Filter by date (to)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/audit/checkouts":{"get":{"tags":["Reports"],"summary":"Export checkout history","description":"Export checkout/checkin history for assets and licenses","operationId":"reports-export_checkout_history","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Number of days to look back","default":90,"title":"Days"},"description":"Number of days to look back"},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type (asset or license)","title":"Target Type"},"description":"Filter by type (asset or license)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by user ID","title":"User Id"},"description":"Filter by user ID"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/users/assignments":{"get":{"tags":["Reports"],"summary":"Export user assignments","description":"Export assets and licenses assigned per user","operationId":"reports-export_user_assignments","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by specific user ID","title":"User Id"},"description":"Filter by specific user ID"},{"name":"include_assets","in":"query","required":false,"schema":{"type":"boolean","description":"Include asset assignments","default":true,"title":"Include Assets"},"description":"Include asset assignments"},{"name":"include_licenses","in":"query","required":false,"schema":{"type":"boolean","description":"Include license assignments","default":true,"title":"Include Licenses"},"description":"Include license assignments"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/consumables/inventory":{"get":{"tags":["Reports"],"summary":"Export consumable inventory","description":"Export complete consumable inventory to CSV with optional filtering","operationId":"reports-export_consumable_inventory","parameters":[{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"stock_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by stock status (ok, low, out)","title":"Stock Status"},"description":"Filter by stock status (ok, low, out)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/consumables/low-stock":{"get":{"tags":["Reports"],"summary":"Export low stock consumables","description":"Export consumables that are low or out of stock","operationId":"reports-export_low_stock_consumables","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/components/inventory":{"get":{"tags":["Reports"],"summary":"Export component inventory","description":"Export complete component inventory to CSV with optional filtering","operationId":"reports-export_component_inventory","parameters":[{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"stock_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by stock status (ok, deployed)","title":"Stock Status"},"description":"Filter by stock status (ok, deployed)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/components/deployed":{"get":{"tags":["Reports"],"summary":"Export deployed components","description":"Export components that are fully deployed (no available quantity)","operationId":"reports-export_deployed_components","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/accessories/inventory":{"get":{"tags":["Reports"],"summary":"Export accessory inventory","description":"Export complete accessory/component inventory to CSV with optional filtering","operationId":"reports-export_accessory_inventory","parameters":[{"name":"item_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by item type (component or accessory)","title":"Item Type"},"description":"Filter by item type (component or accessory)"},{"name":"component_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by component type (cpu, ram, etc.)","title":"Component Type"},"description":"Filter by component type (cpu, ram, etc.)"},{"name":"accessory_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by accessory type (keyboard, mouse, etc.)","title":"Accessory Type"},"description":"Filter by accessory type (keyboard, mouse, etc.)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"is_deployed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by deployment status","title":"Is Deployed"},"description":"Filter by deployment status"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/accessories/expiring-warranty":{"get":{"tags":["Reports"],"summary":"Export expiring accessory warranties","description":"Export accessories/components with warranties expiring within N days","operationId":"reports-export_expiring_accessory_warranties","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days until warranty expiration","default":30,"title":"Days"},"description":"Days until warranty expiration"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/accessories/by-status":{"get":{"tags":["Reports"],"summary":"Export accessories by status","description":"Export accessory counts grouped by status and item type","operationId":"reports-export_accessories_by_status","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/accessories/by-type":{"get":{"tags":["Reports"],"summary":"Export accessories by type","description":"Export accessory counts grouped by component/accessory type","operationId":"reports-export_accessories_by_type","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/analytics/costs":{"get":{"tags":["Reports"],"summary":"Get cost analysis","description":"Get cost analysis breakdown by category and status","operationId":"reports-get_cost_analysis","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Cost analysis data (JSON)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reports-Get Cost Analysis"},"example":{"totals":{"total_assets":150,"total_cost":250000.0,"average_cost":1666.67},"by_category":[{"category":"Laptops","total_assets":100,"total_cost":200000.0}],"by_status":[{"status":"In Use","total_assets":120,"total_cost":220000.0}]}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reports/analytics/costs/export":{"get":{"tags":["Reports"],"summary":"Export cost analysis","description":"Export cost analysis breakdown to CSV","operationId":"reports-export_cost_analysis","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/status/{batch_id}":{"get":{"tags":["Import"],"summary":"Get import status","description":"Get the current status and results of a background import batch","operationId":"import-get_import_status","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchDetail"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/migration":{"post":{"tags":["Import"],"summary":"Full Migration from Snipe-IT","description":"Upload multiple Snipe-IT CSV files to perform a full workspace migration (Asynchronous)","operationId":"import-import_migration","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_migration"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/assets":{"post":{"tags":["Import"],"summary":"Import assets from CSV","description":"Import hardware assets from a CSV file (Asynchronous)","operationId":"import-import_assets","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_assets"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/licenses":{"post":{"tags":["Import"],"summary":"Import licenses from CSV","description":"Import software licenses from a CSV file (Asynchronous)","operationId":"import-import_licenses","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_licenses"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/users":{"post":{"tags":["Import"],"summary":"Import users from CSV","description":"Import user accounts from a CSV file (Asynchronous, Admin only)","operationId":"import-import_users","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_users"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions - Admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/models":{"post":{"tags":["Import"],"summary":"Import asset models from CSV","description":"Import asset model definitions from a CSV file (Asynchronous)","operationId":"import-import_models","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_models"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/categories":{"post":{"tags":["Import"],"summary":"Import categories from CSV","description":"Import category definitions from a CSV file (Asynchronous)","operationId":"import-import_categories","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_categories"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/consumables":{"post":{"tags":["Import"],"summary":"Import consumables from CSV","description":"Import consumable items from a CSV file (Asynchronous)","operationId":"import-import_consumables","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_consumables"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/accessories":{"post":{"tags":["Import"],"summary":"Import accessories/components from CSV","description":"Import accessories and components from a CSV file (Asynchronous)","operationId":"import-import_accessories","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_accessories"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/components":{"post":{"tags":["Import"],"summary":"Import components from CSV","description":"Import hardware components from a CSV file (Asynchronous)","operationId":"import-import_components","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportMode","description":"Import mode: dry_run (validate only) or import","default":"dry_run"},"description":"Import mode: dry_run (validate only) or import"},{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImportProvider","description":"Import source provider","default":"standard"},"description":"Import source provider"},{"name":"auto_create_dependencies","in":"query","required":false,"schema":{"type":"boolean","description":"Automatically create missing dependencies (models, categories, locations, users)","default":false,"title":"Auto Create Dependencies"},"description":"Automatically create missing dependencies (models, categories, locations, users)"},{"name":"update_existing","in":"query","required":false,"schema":{"type":"boolean","description":"Update existing records matching the unique identifier instead of failing","default":false,"title":"Update Existing"},"description":"Update existing records matching the unique identifier instead of failing"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import-import_components"}}}},"responses":{"202":{"description":"Import batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatchRead"}}}},"400":{"description":"Invalid CSV file or validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/import/templates/{entity_type}":{"get":{"tags":["Import"],"summary":"Download import template","description":"Download a CSV template with correct headers for importing","operationId":"import-download_import_template","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"enum":["assets","licenses","users","models","categories","consumables","accessories","components"],"type":"string","title":"Entity Type"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV template file","content":{"application/json":{"schema":{}},"text/csv":{}}},"400":{"description":"Invalid entity type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notifications/types":{"get":{"tags":["Notifications"],"summary":"Get available notification types","description":"Retrieve a list of all notification types available in the system with their metadata.","operationId":"notifications-get_notification_types","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationTypeInfo"},"title":"Response Notifications-Get Notification Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notifications/preferences":{"get":{"tags":["Notifications"],"summary":"Get my notification preferences","description":"Retrieve the notification preferences explicitly set by the current user.","operationId":"notifications-get_my_preferences","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationPreferenceRead"},"title":"Response Notifications-Get My Preferences"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Notifications"],"summary":"Reset all preferences","description":"Reset all notification preferences to their system default values.","operationId":"notifications-reset_all_preferences","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notifications/preferences/all":{"get":{"tags":["Notifications"],"summary":"Get all preferences with defaults","description":"Retrieve all notification preferences, including default values for types the user hasn't explicitly configured.","operationId":"notifications-get_my_preferences_with_defaults","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationPreferenceFull"},"title":"Response Notifications-Get My Preferences With Defaults"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notifications/preferences/{notification_type}":{"put":{"tags":["Notifications"],"summary":"Update a notification preference","description":"Update or create a notification preference for a specific type.","operationId":"notifications-update_preference","parameters":[{"name":"notification_type","in":"path","required":true,"schema":{"type":"string","title":"Notification Type"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferenceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferenceRead"}}}},"400":{"description":"Invalid notification type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin-only notification type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Notifications"],"summary":"Reset a preference","description":"Reset a notification preference to its default value.","operationId":"notifications-reset_preference","parameters":[{"name":"notification_type","in":"path","required":true,"schema":{"type":"string","title":"Notification Type"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notifications/preferences/bulk":{"post":{"tags":["Notifications"],"summary":"Bulk update preferences","description":"Update multiple notification preferences in a single request.","operationId":"notifications-bulk_update_preferences","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Preferences"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Notifications-Bulk Update Preferences"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox":{"get":{"tags":["Inbox"],"summary":"Get My Notifications","description":"Get current user's notifications.\n\nReturns paginated list of notifications with unread count.","operationId":"inbox-get_my_notifications","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Page Size"},"description":"Items per page"},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","description":"Filter to unread only","default":false,"title":"Unread Only"},"description":"Filter to unread only"},{"name":"notification_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by notification type","title":"Notification Type"},"description":"Filter by notification type"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationList"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox/unread-count":{"get":{"tags":["Inbox"],"summary":"Get Unread Count","description":"Get count of unread notifications.\n\nLightweight endpoint for updating the notification badge.","operationId":"inbox-get_unread_count","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox/{notification_id}":{"get":{"tags":["Inbox"],"summary":"Get Notification","description":"Get a specific notification by ID.","operationId":"inbox-get_notification","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Inbox"],"summary":"Delete Notification","description":"Delete a notification.","operationId":"inbox-delete_notification","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox/{notification_id}/read":{"patch":{"tags":["Inbox"],"summary":"Mark Notification Read","description":"Mark a notification as read.","operationId":"inbox-mark_notification_read","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox/{notification_id}/unread":{"patch":{"tags":["Inbox"],"summary":"Mark Notification Unread","description":"Mark a notification as unread.","operationId":"inbox-mark_notification_unread","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox/read-all":{"post":{"tags":["Inbox"],"summary":"Mark All As Read","description":"Mark all notifications as read.","operationId":"inbox-mark_all_as_read","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Inbox-Mark All As Read"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/inbox/sync-alerts":{"post":{"tags":["Inbox"],"summary":"Sync Expiring Alerts","description":"DEPRECATED: Alerts are now generated by a background task.\n\nThis endpoint is kept for backwards compatibility but does nothing.\nSystem alerts (low stock, expiring warranties, expiring licenses) are\nnow generated automatically every hour by the sync_system_alerts task.","operationId":"inbox-sync_expiring_alerts","deprecated":true,"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Inbox-Sync Expiring Alerts"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/global":{"get":{"tags":["Search"],"summary":"Global Search","description":"Search across all entity types using PostgreSQL full-text search.\n\nReturns results grouped by entity type (assets, licenses, users, models, categories).\nEach result includes highlighted match snippets when available.\nMinimum query length is 2 characters.","operationId":"search-global_search","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100,"description":"Search query (minimum 2 characters required for matches)","default":"","title":"Q"},"description":"Search query (minimum 2 characters required for matches)"},{"name":"entity_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Entity types to search (asset, license, consumable, accessory, component, user, model, category)","title":"Entity Types"},"description":"Entity types to search (asset, license, consumable, accessory, component, user, model, category)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max results per entity type","default":10,"title":"Limit"},"description":"Max results per entity type"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalSearchResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/assets/advanced":{"get":{"tags":["Search"],"summary":"Advanced Asset Search","description":"Advanced search for assets with multiple filters.\n\nSupports full-text search and filtering by status, model, category, assignment, location, and dates.\nAll filters are combined with AND logic.","operationId":"search-advanced_asset_search","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Text search query","title":"Q"},"description":"Text search query"},{"name":"status_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by status ID","title":"Status Id"},"description":"Filter by status ID"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by model ID","title":"Model Id"},"description":"Filter by model ID"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"assigned_to_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by assigned user ID","title":"Assigned To Id"},"description":"Filter by assigned user ID"},{"name":"is_assigned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by assignment status","title":"Is Assigned"},"description":"Filter by assignment status"},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Filter by location","title":"Location"},"description":"Filter by location"},{"name":"purchase_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Purchase date from","title":"Purchase Date From"},"description":"Purchase date from"},{"name":"purchase_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Purchase date to","title":"Purchase Date To"},"description":"Purchase date to"},{"name":"warranty_expiring_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Warranty expiring within days","title":"Warranty Expiring Days"},"description":"Warranty expiring within days"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedSearchResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/licenses/advanced":{"get":{"tags":["Search"],"summary":"Advanced License Search","description":"Advanced search for licenses with multiple filters.\n\nSupports full-text search and filtering by category, expiration, seats, and manufacturer.\nAll filters are combined with AND logic.","operationId":"search-advanced_license_search","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Text search query","title":"Q"},"description":"Text search query"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"is_expired","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by expiration status","title":"Is Expired"},"description":"Filter by expiration status"},{"name":"expiring_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"Filter licenses expiring within N days","title":"Expiring Days"},"description":"Filter licenses expiring within N days"},{"name":"has_available_seats","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by seat availability","title":"Has Available Seats"},"description":"Filter by seat availability"},{"name":"manufacturer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Filter by manufacturer","title":"Manufacturer"},"description":"Filter by manufacturer"},{"name":"purchase_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Purchase date from","title":"Purchase Date From"},"description":"Purchase date from"},{"name":"purchase_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Purchase date to","title":"Purchase Date To"},"description":"Purchase date to"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedSearchResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/users/advanced":{"get":{"tags":["Search"],"summary":"Advanced User Search","description":"Advanced search for users with multiple filters.\n\nSupports full-text search and filtering by role, status, and asset/license assignments.\nAll filters are combined with AND logic.","operationId":"search-advanced_user_search","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Text search query","title":"Q"},"description":"Text search query"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by role (admin, agent, user)","title":"Role"},"description":"Filter by role (admin, agent, user)"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"has_assets","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter users with assigned assets","title":"Has Assets"},"description":"Filter users with assigned assets"},{"name":"has_licenses","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter users with assigned licenses","title":"Has Licenses"},"description":"Filter users with assigned licenses"},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Created date from","title":"Created From"},"description":"Created date from"},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Created date to","title":"Created To"},"description":"Created date to"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedSearchResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/assets/export":{"get":{"tags":["Search"],"summary":"Export Asset Search Results","description":"Export asset search results as CSV.\n\nUses the same filters as advanced search but exports all matching results.","operationId":"search-export_asset_search_results","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}},{"name":"status_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id"}},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"}},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"}},{"name":"assigned_to_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"}},{"name":"is_assigned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Assigned"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"}},{"name":"purchase_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date From"}},{"name":"purchase_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date To"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/licenses/export":{"get":{"tags":["Search"],"summary":"Export License Search Results","description":"Export license search results as CSV.\n\nUses the same filters as advanced search but exports all matching results.","operationId":"search-export_license_search_results","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"}},{"name":"is_expired","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Expired"}},{"name":"expiring_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"title":"Expiring Days"}},{"name":"has_available_seats","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Available Seats"}},{"name":"manufacturer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"}},{"name":"purchase_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date From"}},{"name":"purchase_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date To"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/users/export":{"get":{"tags":["Search"],"summary":"Export User Search Results","description":"Export user search results as CSV (admin only).\n\nUses the same filters as advanced search but exports all matching results.","operationId":"search-export_user_search_results","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"has_assets","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Assets"}},{"name":"has_licenses","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Licenses"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/filters":{"get":{"tags":["Search"],"summary":"List Saved Filters","description":"List saved filters for the current user.\n\nReturns user's own filters plus any global filters.","operationId":"search-list_saved_filters","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entity type (asset, license, user, all)","title":"Entity Type"},"description":"Filter by entity type (asset, license, user, all)"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SavedFilterRead"},"title":"Response Search-List Saved Filters"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Search"],"summary":"Create Saved Filter","description":"Create a new saved filter.\n\nOnly admins can create global filters (visible to all users).","operationId":"search-create_saved_filter","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/search/filters/{filter_id}":{"get":{"tags":["Search"],"summary":"Get Saved Filter","description":"Get a specific saved filter by ID.","operationId":"search-get_saved_filter","parameters":[{"name":"filter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Filter Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Search"],"summary":"Update Saved Filter","description":"Update a saved filter.\n\nUsers can only update their own filters. Admins can update any filter.","operationId":"search-update_saved_filter","parameters":[{"name":"filter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Filter Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Search"],"summary":"Delete Saved Filter","description":"Delete a saved filter.\n\nUsers can only delete their own filters. Admins can delete any filter.","operationId":"search-delete_saved_filter","parameters":[{"name":"filter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Filter Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance":{"get":{"tags":["Maintenance"],"summary":"List Maintenance","description":"List maintenance records.\n\nReturns paginated list of maintenance records with optional filters.","operationId":"maintenance-list_maintenance","parameters":[{"name":"asset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by asset ID","title":"Asset Id"},"description":"Filter by asset ID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"maintenance_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type","title":"Maintenance Type"},"description":"Filter by type"},{"name":"assigned_to_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by assignee","title":"Assigned To Id"},"description":"Filter by assignee"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Date range start","title":"Date From"},"description":"Date range start"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Date range end","title":"Date To"},"description":"Date range end"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by title or asset tag","title":"Search"},"description":"Search by title or asset tag"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenancePaginatedResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Maintenance"],"summary":"Create Maintenance","description":"Create a new maintenance record.\n\n**Requires:** Agent or Admin role\n\nCreates a new maintenance record for an asset.","operationId":"maintenance-create_maintenance","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Maintenance-Create Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/upcoming":{"get":{"tags":["Maintenance"],"summary":"Get Upcoming Maintenance","description":"Get upcoming scheduled maintenance.\n\nReturns maintenance tasks scheduled within the specified number of days.","operationId":"maintenance-get_upcoming_maintenance","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days ahead","default":30,"title":"Days"},"description":"Days ahead"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaintenanceSchedule"},"title":"Response Maintenance-Get Upcoming Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/overdue":{"get":{"tags":["Maintenance"],"summary":"Get Overdue Maintenance","description":"Get overdue maintenance tasks.\n\nReturns maintenance tasks past their scheduled date.","operationId":"maintenance-get_overdue_maintenance","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaintenanceSchedule"},"title":"Response Maintenance-Get Overdue Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/stats":{"get":{"tags":["Maintenance"],"summary":"Get Maintenance Stats","description":"Get maintenance statistics.\n\nReturns aggregated statistics about maintenance records.","operationId":"maintenance-get_maintenance_stats","parameters":[{"name":"asset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by asset ID","title":"Asset Id"},"description":"Filter by asset ID"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Date range start","title":"Date From"},"description":"Date range start"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Date range end","title":"Date To"},"description":"Date range end"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceStats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/types":{"get":{"tags":["Maintenance"],"summary":"Get Maintenance Types","description":"Get available maintenance types.\n\nReturns list of maintenance type options for forms.","operationId":"maintenance-get_maintenance_types","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"title":"Response Maintenance-Get Maintenance Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/statuses":{"get":{"tags":["Maintenance"],"summary":"Get Maintenance Statuses","description":"Get available maintenance statuses.\n\nReturns list of status options for forms.","operationId":"maintenance-get_maintenance_statuses","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"title":"Response Maintenance-Get Maintenance Statuses"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/{maintenance_id}":{"get":{"tags":["Maintenance"],"summary":"Get Maintenance","description":"Get a single maintenance record.\n\nReturns detailed maintenance information.","operationId":"maintenance-get_maintenance","parameters":[{"name":"maintenance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Maintenance Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Maintenance-Get Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Maintenance"],"summary":"Update Maintenance","description":"Update a maintenance record.\n\n**Requires:** Agent or Admin role\n\nUpdates maintenance record fields.","operationId":"maintenance-update_maintenance","parameters":[{"name":"maintenance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Maintenance Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Maintenance-Update Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Maintenance"],"summary":"Delete Maintenance","description":"Delete a maintenance record.\n\n**Requires:** Agent or Admin role\n\nPermanently deletes the maintenance record.","operationId":"maintenance-delete_maintenance","parameters":[{"name":"maintenance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Maintenance Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/{maintenance_id}/start":{"post":{"tags":["Maintenance"],"summary":"Start Maintenance","description":"Start a maintenance task.\n\n**Requires:** Agent or Admin role\n\nTransitions maintenance from 'scheduled' to 'in_progress'.","operationId":"maintenance-start_maintenance","parameters":[{"name":"maintenance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Maintenance Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Maintenance-Start Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/{maintenance_id}/complete":{"post":{"tags":["Maintenance"],"summary":"Complete Maintenance","description":"Complete a maintenance task.\n\n**Requires:** Agent or Admin role\n\nMarks maintenance as completed. If recurring, creates next occurrence.","operationId":"maintenance-complete_maintenance","parameters":[{"name":"maintenance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Maintenance Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMaintenanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Maintenance-Complete Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/{maintenance_id}/cancel":{"post":{"tags":["Maintenance"],"summary":"Cancel Maintenance","description":"Cancel a maintenance task.\n\n**Requires:** Agent or Admin role\n\nMarks maintenance as cancelled with optional reason.","operationId":"maintenance-cancel_maintenance","parameters":[{"name":"maintenance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Maintenance Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelMaintenanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Maintenance-Cancel Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/asset/{asset_id}/active":{"get":{"tags":["Maintenance"],"summary":"Get Active Maintenance","description":"Get active maintenance for an asset.\n\nReturns SCHEDULED or IN_PROGRESS maintenance record for the asset,\nor null if no active maintenance exists.","operationId":"maintenance-get_active_maintenance","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Response Maintenance-Get Active Maintenance"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/maintenance/asset/{asset_id}":{"get":{"tags":["Maintenance"],"summary":"Get Asset Maintenance History","description":"Get maintenance history for an asset.\n\nReturns paginated maintenance records for a specific asset.","operationId":"maintenance-get_asset_maintenance_history","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenancePaginatedResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/locations/tree":{"get":{"tags":["Locations"],"summary":"Get Location Tree","description":"Get full location hierarchy as a tree.","operationId":"locations-get_location_tree","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocationTree"},"title":"Response Locations-Get Location Tree"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/locations":{"get":{"tags":["Locations"],"summary":"List Locations","description":"List locations with optional filtering.","operationId":"locations-list_locations","parameters":[{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by parent location","title":"Parent Id"},"description":"Filter by parent location"},{"name":"flat","in":"query","required":false,"schema":{"type":"boolean","description":"Return flat list instead of tree roots","default":false,"title":"Flat"},"description":"Return flat list instead of tree roots"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, city, or country","title":"Search"},"description":"Search by name, city, or country"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_LocationRead_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Locations"],"summary":"Create Location","description":"Create a new location. Requires admin role.","operationId":"locations-create_location","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/locations/{location_id}":{"get":{"tags":["Locations"],"summary":"Get Location","description":"Get location details by ID.","operationId":"locations-get_location","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Locations"],"summary":"Update Location","description":"Update a location. Requires admin role.","operationId":"locations-update_location","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Locations"],"summary":"Delete Location","description":"Delete a location. Requires admin role.","operationId":"locations-delete_location","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/locations/{location_id}/assets":{"get":{"tags":["Locations"],"summary":"Get Location Assets","description":"Get assets assigned to a location.","operationId":"locations-get_location_assets","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}},{"name":"include_children","in":"query","required":false,"schema":{"type":"boolean","description":"Include assets from child locations","default":false,"title":"Include Children"},"description":"Include assets from child locations"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Locations-Get Location Assets"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/locations/{location_id}/move-assets":{"post":{"tags":["Locations"],"summary":"Move Assets","description":"Move all assets from this location to another. Requires admin role.","operationId":"locations-move_assets","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}},{"name":"to_location_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Destination location ID","title":"To Location Id"},"description":"Destination location ID"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Locations-Move Assets"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/mcp/tools":{"get":{"tags":["MCP"],"summary":"Browse the MCP tool catalog","description":"Catalog of the agent-facing MCP tools visible to the caller's role: name,\ndomain, description, actions (for domain tools), required scope and\nannotations (read-only / destructive). System-admin-only tools are listed\nonly for system admins.\n\n**Requires:** Admin role","operationId":"mcp-list_mcp_tools","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPToolCatalog"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/departments/tree":{"get":{"tags":["Departments"],"summary":"Get Department Tree","description":"Get full department hierarchy as a tree.","operationId":"departments-get_department_tree","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentTree"},"title":"Response Departments-Get Department Tree"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/departments":{"get":{"tags":["Departments"],"summary":"List Departments","description":"List departments with optional filtering.","operationId":"departments-list_departments","parameters":[{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by parent department","title":"Parent Id"},"description":"Filter by parent department"},{"name":"flat","in":"query","required":false,"schema":{"type":"boolean","description":"Return flat list instead of tree roots","default":false,"title":"Flat"},"description":"Return flat list instead of tree roots"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name","title":"Search"},"description":"Search by name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_DepartmentRead_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Departments"],"summary":"Create Department","description":"Create a new department. Requires admin role.","operationId":"departments-create_department","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/departments/{department_id}":{"get":{"tags":["Departments"],"summary":"Get Department","description":"Get department details by ID.","operationId":"departments-get_department","parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Departments"],"summary":"Update Department","description":"Update a department. Requires admin role.","operationId":"departments-update_department","parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Departments"],"summary":"Delete Department","description":"Delete a department. Requires admin role.","operationId":"departments-delete_department","parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/departments/{department_id}/users":{"get":{"tags":["Departments"],"summary":"Get Department Users","description":"Get users assigned to a department.","operationId":"departments-get_department_users","parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}},{"name":"include_children","in":"query","required":false,"schema":{"type":"boolean","description":"Include users from child departments","default":false,"title":"Include Children"},"description":"Include users from child departments"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Departments-Get Department Users"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits":{"get":{"tags":["Physical Audits"],"summary":"List audit sessions","description":"Retrieve a paginated list of audit sessions with optional filtering.","operationId":"physical-audits-list_audit_sessions","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by location ID","title":"Location Id"},"description":"Filter by location ID"},{"name":"auditor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by auditor ID","title":"Auditor Id"},"description":"Filter by auditor ID"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AuditSessionReadWithRelations_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Physical Audits"],"summary":"Create audit session","description":"Create a new physical audit session.","operationId":"physical-audits-create_audit_session","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/active":{"get":{"tags":["Physical Audits"],"summary":"Get user's active audit session","description":"Get the currently active audit session for the current user.","operationId":"physical-audits-get_active_session","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AuditSessionReadWithRelations"},{"type":"null"}],"title":"Response Physical-Audits-Get Active Session"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}":{"get":{"tags":["Physical Audits"],"summary":"Get audit session","description":"Get details of a specific audit session.","operationId":"physical-audits-get_audit_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Physical Audits"],"summary":"Update audit session","description":"Update an audit session's details.","operationId":"physical-audits-update_audit_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Physical Audits"],"summary":"Delete audit session","description":"Delete a pending audit session.","operationId":"physical-audits-delete_audit_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/start":{"post":{"tags":["Physical Audits"],"summary":"Start audit session","description":"Start an audit session (changes status from pending to in_progress).","operationId":"physical-audits-start_audit_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/complete":{"post":{"tags":["Physical Audits"],"summary":"Complete audit session","description":"Complete an audit session and calculate final stats.","operationId":"physical-audits-complete_audit_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/cancel":{"post":{"tags":["Physical Audits"],"summary":"Cancel audit session","description":"Cancel an audit session.","operationId":"physical-audits-cancel_audit_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/scan":{"post":{"tags":["Physical Audits"],"summary":"Record asset scan","description":"Record an asset scan during an audit session.","operationId":"physical-audits-record_scan","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEntryCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/scan/{asset_tag}":{"post":{"tags":["Physical Audits"],"summary":"Scan asset by tag","description":"Scan an asset by its tag (used for QR code scanning).","operationId":"physical-audits-scan_by_tag","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"asset_tag","in":"path","required":true,"schema":{"type":"string","title":"Asset Tag"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanByTagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/entries":{"get":{"tags":["Physical Audits"],"summary":"Get audit entries","description":"Get all scanned entries for an audit session.","operationId":"physical-audits-get_entries","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AuditEntryReadWithAsset_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/expected":{"get":{"tags":["Physical Audits"],"summary":"Get expected assets","description":"Get assets expected in this audit that haven't been scanned yet.","operationId":"physical-audits-get_expected_not_scanned","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AssetReadWithRelations_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/missing":{"get":{"tags":["Physical Audits"],"summary":"Get missing assets","description":"Get assets that were expected but not scanned in this audit.","operationId":"physical-audits-get_missing_assets","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditMissingAsset"},"title":"Response Physical-Audits-Get Missing Assets"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audits/{session_id}/report":{"get":{"tags":["Physical Audits"],"summary":"Get audit report","description":"Generate a comprehensive report for an audit session.","operationId":"physical-audits-get_audit_report","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditReportFull"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/custom-fields":{"get":{"tags":["Custom Fields"],"summary":"List custom field definitions","description":"List all custom field definitions with optional filtering by entity type, category, and active status. Results include the category name for each field.","operationId":"custom-fields-list_custom_fields","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or field_key","title":"Search"},"description":"Search by name or field_key"},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entity type (asset/license/consumable/accessory)","title":"Entity Type"},"description":"Filter by entity type (asset/license/consumable/accessory)"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_CustomFieldReadWithCategory_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Custom Fields"],"summary":"Create custom field definition","description":"Create a new custom field definition. Requires admin role. The field_key must be unique within the same category and entity_type combination.","operationId":"custom-fields-create_custom_field","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/custom-fields/field-types":{"get":{"tags":["Custom Fields"],"summary":"List available field types","description":"Returns all available field types for custom field definitions.","operationId":"custom-fields-list_field_types","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"title":"Response Custom-Fields-List Field Types"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/custom-fields/by-category/{category_id}":{"get":{"tags":["Custom Fields"],"summary":"Get custom fields for a category","description":"Get all active custom field definitions for a specific category. Returns fields ordered by display_order. Used when rendering entity forms.","operationId":"custom-fields-get_fields_by_category","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entity type","title":"Entity Type"},"description":"Filter by entity type"},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","description":"Include inactive fields","default":false,"title":"Include Inactive"},"description":"Include inactive fields"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldRead"},"title":"Response Custom-Fields-Get Fields By Category"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/custom-fields/{definition_id}":{"get":{"tags":["Custom Fields"],"summary":"Get custom field definition","description":"Get a single custom field definition by ID, including its category name.","operationId":"custom-fields-get_custom_field","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldReadWithCategory"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Custom Fields"],"summary":"Update custom field definition","description":"Update an existing custom field definition. Requires admin role. If changing field_key, it must remain unique within the category/entity_type.","operationId":"custom-fields-update_custom_field","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Custom Fields"],"summary":"Delete custom field definition","description":"Delete a custom field definition. Requires admin role. Warning: This will remove the field definition but existing custom_fields data on entities will remain (orphaned).","operationId":"custom-fields-delete_custom_field","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/custom-fields/reorder":{"post":{"tags":["Custom Fields"],"summary":"Reorder custom field definitions","description":"Update the display_order for multiple custom field definitions at once. Requires admin role. Used for drag-and-drop reordering in the UI.","operationId":"custom-fields-reorder_custom_fields","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldRead"},"title":"Response Custom-Fields-Reorder Custom Fields"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/settings/app":{"get":{"tags":["Application Settings"],"summary":"Get all application settings","description":"Retrieve all application settings with their current values.\n\nIncludes both settings stored in the database and default settings.\nDatabase values take precedence over defaults.\n\n**Requires admin role.**","operationId":"application-settings-get_all_settings","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Settings retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllSettingsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/settings/app/{key}":{"get":{"tags":["Application Settings"],"summary":"Get a specific setting","description":"Retrieve a specific application setting by its key.\n\nReturns the setting value from the database if it exists,\notherwise returns the default value if one is defined.\n\n**Requires admin role.**","operationId":"application-settings-get_setting","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Setting retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Setting not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Application Settings"],"summary":"Update a setting","description":"Update an application setting value.\n\nIf the setting doesn't exist in the database, it will be created.\nThe value can be any JSON-serializable type (string, number, boolean, array, object).\n\n**Requires admin role.**\n\n**Available settings:**\n- `allow_user_login` (boolean): Whether users with role='user' can log in\n- `allow_user_registration` (boolean): Whether new user registration is allowed","operationId":"application-settings-update_setting","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingUpdate"}}}},"responses":{"200":{"description":"Setting updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/deployments":{"get":{"tags":["Kits"],"summary":"Get kit deployments","description":"Get all deployments for a specific kit.\n\nReturns a list of all times this kit has been deployed, including:\n- Who it was deployed to\n- When it was deployed\n- Current status (completed, partial, pending)\n- Whether it has been returned","operationId":"kits-get_deployments","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of kit deployments","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KitDeploymentRead"},"title":"Response Kits-Get Deployments"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/deployments/{deployment_id}":{"get":{"tags":["Kits"],"summary":"Get deployment details","description":"Get detailed information about a specific kit deployment.\n\nReturns the deployment with:\n- Kit information\n- User who received the kit\n- User who deployed it\n- All deployed items with their current status\n- Entity details for each item","operationId":"kits-get_deployment","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Deployment details with full relations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitDeploymentReadWithRelations"}}}},"404":{"description":"Deployment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/deployments/{deployment_id}/return":{"post":{"tags":["Kits"],"summary":"Return deployed kit","description":"Return all items from a kit deployment.\n\n**Requires:** Agent or Admin role\n\nThis will:\n1. Check in each deployed item (asset, license seat, accessory, consumable)\n2. Update deployment item statuses to 'returned'\n3. Update deployment status and returned_at timestamp\n4. Log all actions for audit trail\n\n**Note:** Already returned items are skipped.","operationId":"kits-return_deployment","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_kits-return_deployment"}}}},"responses":{"200":{"description":"Kit returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitDeploymentReadWithItems"}}}},"400":{"description":"All items already returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Deployment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/deployments/{deployment_id}/items/{item_id}/return":{"post":{"tags":["Kits"],"summary":"Return single deployment item","description":"Return a single item from a kit deployment.\n\n**Requires:** Agent or Admin role\n\nUseful for partial returns when only some items need to be returned.","operationId":"kits-return_item","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Item returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitDeploymentItemRead"}}}},"400":{"description":"Item already returned or not deployed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Deployment or item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/":{"get":{"tags":["Kits"],"summary":"List all asset kits","description":"Retrieve a paginated list of asset kits with optional filtering.\n\n**Filters:**\n- `search`: Search by kit name or description\n- `is_template`: Filter by template status (true = templates only, false = non-templates only)\n\nReturns kits with basic item count information.","operationId":"kits-list_kits","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or description","title":"Search"},"description":"Search by name or description"},{"name":"is_template","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by template status","title":"Is Template"},"description":"Filter by template status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of asset kits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AssetKitReadWithItems_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Kits"],"summary":"Create a new asset kit","description":"Create a new asset kit (template or one-off bundle).\n\n**Requires:** Agent or Admin role\n\nOptionally include initial items in the request. Items can be added/removed later\nvia the kit items endpoints.\n\n**Kit Types:**\n- `is_template=true` (default): Reusable kit template for deploying to multiple users\n- `is_template=false`: One-off bundle for a specific deployment","operationId":"kits-create_kit","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitCreate"}}}},"responses":{"201":{"description":"Kit created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions - requires agent or admin role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Kit with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}":{"get":{"tags":["Kits"],"summary":"Get asset kit details","description":"Get detailed information about a specific asset kit.\n\nReturns the kit with:\n- All items with resolved entity details (names, availability)\n- Creator information\n- Deployment count","operationId":"kits-get_kit","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Kit details with full relations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitReadWithRelations"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Kits"],"summary":"Update an asset kit","description":"Update an existing asset kit.\n\n**Requires:** Agent or Admin role\n\nOnly provided fields will be updated. Use kit items endpoints to modify items.","operationId":"kits-update_kit","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitUpdate"}}}},"responses":{"200":{"description":"Kit updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitRead"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Kit with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Kits"],"summary":"Delete an asset kit","description":"Delete an asset kit from the system.\n\n**Requires:** Agent or Admin role\n\n**Note:** Kits with active deployments (non-returned items) cannot be deleted.\nThe deployment history is preserved for audit purposes.","operationId":"kits-delete_kit","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Kit deleted successfully"},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Kit has active deployments and cannot be deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/items":{"post":{"tags":["Kits"],"summary":"Add item to kit","description":"Add a new item to an asset kit.\n\n**Requires:** Agent or Admin role\n\n**Item Types:**\n- `asset`: Hardware asset (specific or by model)\n- `license`: Software license seat\n- `accessory`: Accessory item (keyboard, mouse, etc.)\n- `consumable`: Consumable item (toner, cables, etc.)\n\n**Specificity:**\n- `is_specific=true`: Deploy this exact entity (entity_id = asset/license ID)\n- `is_specific=false`: Deploy any available entity of this type (entity_id = model/category ID)","operationId":"kits-add_item","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitItemCreate"}}}},"responses":{"201":{"description":"Item added to kit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitItemRead"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit or referenced entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/items/{item_id}":{"patch":{"tags":["Kits"],"summary":"Update kit item","description":"Update an item within an asset kit.\n\n**Requires:** Agent or Admin role\n\nOnly provided fields will be updated.","operationId":"kits-update_item","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitItemUpdate"}}}},"responses":{"200":{"description":"Item updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitItemRead"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit or item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Kits"],"summary":"Remove item from kit","description":"Remove an item from an asset kit.\n\n**Requires:** Agent or Admin role\n\n**Note:** Items that have been deployed cannot be removed (they are part of deployment history).","operationId":"kits-remove_item","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Item removed successfully"},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit or item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Item has active deployments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/items/reorder":{"post":{"tags":["Kits"],"summary":"Reorder kit items","description":"Reorder items within an asset kit.\n\n**Requires:** Agent or Admin role\n\nPass an ordered list of item IDs. Items not in the list will be placed at the end.","operationId":"kits-reorder_items","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemReorderRequest"}}}},"responses":{"200":{"description":"Items reordered successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetKitItemRead"},"title":"Response Kits-Reorder Items"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/availability":{"get":{"tags":["Kits"],"summary":"Check kit availability","description":"Check availability of all items in a kit for deployment.\n\nReturns detailed availability information for each item including:\n- Whether the item is available for checkout\n- Quantity available vs. quantity required\n- Reason for unavailability (if applicable)\n\nUse this before deploying to ensure all items can be checked out.","operationId":"kits-check_availability","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Availability check results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitAvailabilityResponse"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/deploy":{"post":{"tags":["Kits"],"summary":"Deploy kit to user","description":"Deploy an asset kit to a user.\n\n**Requires:** Agent or Admin role\n\nThis will:\n1. Check availability of all kit items\n2. Check out each item (asset, license seat, accessory, consumable) to the user\n3. Create a deployment record linking all checkouts\n4. Log all actions for audit trail\n\n**Partial Deployment:**\nIf some items fail to check out (e.g., already assigned), the deployment\ncontinues with available items and returns a partial status.","operationId":"kits-deploy_kit","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitDeployRequest"}}}},"responses":{"201":{"description":"Kit deployed successfully (or partially)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitDeploymentReadWithItems"}}}},"400":{"description":"No items available for deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/duplicate":{"post":{"tags":["Kits"],"summary":"Duplicate a kit","description":"Create a copy of an existing kit with a new name.\n\n**Requires:** Agent or Admin role\n\nDuplicates:\n- Kit name and description (with new name)\n- All kit items with their configurations\n- Sets `is_template=true` for the new kit\n\nDoes NOT duplicate:\n- Deployment history\n- Created by (set to current user)","operationId":"kits-duplicate_kit","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateKitRequest"}}}},"responses":{"201":{"description":"Kit duplicated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetKitRead"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Kit with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/kits/{kit_id}/history":{"get":{"tags":["Kits"],"summary":"Get kit history","description":"Get action history for a kit.\n\nReturns a chronological list of all actions performed on this kit,\nincluding creation, updates, item changes, and deployments.","operationId":"kits-get_kit_history","parameters":[{"name":"kit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kit Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of history entries","default":50,"title":"Limit"},"description":"Maximum number of history entries"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Kit action history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Kits-Get Kit History"}}}},"404":{"description":"Kit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/labels/templates":{"get":{"tags":["Labels"],"summary":"List label templates","description":"Get all available label templates with their specifications","operationId":"labels-list_label_templates","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of available label templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LabelTemplateRead"},"title":"Response Labels-List Label Templates"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/labels/settings":{"get":{"tags":["Labels"],"summary":"Get label settings","description":"Get current label branding settings","operationId":"labels-get_label_settings","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Current label settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelSettingsRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Labels"],"summary":"Update label settings","description":"Update label branding settings (Admin only)","operationId":"labels-update_label_settings","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelSettingsUpdate"}}}},"responses":{"200":{"description":"Updated label settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelSettingsRead"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/labels/settings/logo":{"post":{"tags":["Labels"],"summary":"Upload logo","description":"Upload company logo for labels (Admin only)","operationId":"labels-upload_logo","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_labels-upload_logo"}}}},"responses":{"200":{"description":"Logo uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelSettingsRead"}}}},"400":{"description":"Invalid file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Labels"],"summary":"Delete logo","description":"Remove company logo (Admin only)","operationId":"labels-delete_logo","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Logo removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelSettingsRead"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No logo configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/labels/settings/logo/image":{"get":{"tags":["Labels"],"summary":"Get logo image","description":"Retrieve the company logo image file","operationId":"labels-get_logo_image","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Logo image file","content":{"application/json":{"schema":{}},"image/*":{}}},"404":{"description":"No logo configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/labels/generate":{"post":{"tags":["Labels"],"summary":"Generate single label PDF","description":"Generate a printable label PDF for any entity type","operationId":"labels-generate_label","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelGenerateRequest"}}}},"responses":{"200":{"description":"Label PDF file","content":{"application/json":{"schema":{}},"application/pdf":{}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/labels/generate/bulk":{"post":{"tags":["Labels"],"summary":"Generate bulk labels PDF","description":"Generate a multi-page PDF with labels for multiple entities","operationId":"labels-generate_bulk_labels","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__labels__BulkLabelRequest"}}}},"responses":{"200":{"description":"Multi-page label PDF file","content":{"application/json":{"schema":{}},"application/pdf":{}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"One or more entities not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/plans":{"get":{"tags":["Subscription Plans"],"summary":"List active subscription plans","description":"List all active subscription plans for public display and plan comparison.\nReturns plans ordered by their display order.","operationId":"subscription-plans-list_active_plans","responses":{"200":{"description":"List of active subscription plans","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionPlanRead"},"type":"array","title":"Response Subscription-Plans-List Active Plans"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/organizations/current":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization","description":"Get the current user's organization details with usage statistics.","operationId":"organizations-get_current_organization","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Current organization details with stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationReadPublicWithStats"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Update current organization","description":"Update the current organization. Org Admin only. Limited to name and description.","operationId":"organizations-update_current_organization","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdatePublic"}}}},"responses":{"200":{"description":"Organization updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationReadPublic"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/logo":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization logo","description":"Get the current organization's logo image.","operationId":"organizations-get_current_organization_logo","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Logo image","content":{"application/json":{"schema":{}},"image/png":{},"image/jpeg":{}}},"404":{"description":"Organization has no logo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Upload current organization logo","description":"Upload or update the current organization's logo. Admin only.","operationId":"organizations-upload_current_organization_logo","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_organizations-upload_current_organization_logo"}}}},"responses":{"200":{"description":"Logo uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationReadPublic"}}}},"400":{"description":"Invalid file type or size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Organizations","Organizations"],"summary":"Delete current organization logo","description":"Delete the current organization's logo. Admin only.","operationId":"organizations-delete_current_organization_logo","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Logo deleted"},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/features":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization features","description":"Get the feature status for the current organization, including plan values and overrides.","operationId":"organizations-get_current_organization_features","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of all features with their status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureStatus"},"title":"Response Organizations-Get Current Organization Features"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/usage":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization usage","description":"Get usage statistics for the current organization including user/asset counts and limits.","operationId":"organizations-get_current_organization_usage","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Usage statistics for current organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUsageStats"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/stats":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization statistics","description":"Get comprehensive statistics for the current organization including counts for all entity types.","operationId":"organizations-get_current_organization_stats","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Organization statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationStats"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/trial-status":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization trial status","description":"Get trial status information for the current organization.","operationId":"organizations-get_current_organization_trial_status","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Trial status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialStatus"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/checkout":{"post":{"tags":["Organizations","Organizations"],"summary":"Generate a checkout URL","description":"Returns a LemonSqueezy checkout URL for a specific tier.","operationId":"organizations-generate_checkout_url","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Checkout URL generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"400":{"description":"Invalid tier requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Checkout configuration missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/limit-status":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization limit status","description":"Get resource usage vs limits with percentages for the current organization.","operationId":"organizations-get_current_organization_limit_status","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Limit status for all resource types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitStatusResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/grace-period":{"get":{"tags":["Organizations","Organizations"],"summary":"Get grace period status","description":"Get grace period status for the current organization.","operationId":"organizations-get_current_organization_grace_period","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Organizations-Get Current Organization Grace Period"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/settings/users-can-login":{"get":{"tags":["Organizations","Organizations"],"summary":"Get users can login setting","description":"Get the current users_can_login setting and count of affected users.","operationId":"organizations-get_users_can_login_setting","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Current setting and affected user count","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Organizations-Get Users Can Login Setting"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Update users can login setting","description":"Enable or disable login for users with User role.","operationId":"organizations-update_users_can_login_setting","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersCanLoginRequest"}}}},"responses":{"200":{"description":"Setting updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersCanLoginResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/request-deletion":{"post":{"tags":["Organizations","Organizations"],"summary":"Request organization deletion","description":"Immediately suspends access and schedules data deletion. Org Admin only.","operationId":"organizations-request_organization_deletion","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Deletion requested successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationReadPublic"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/billing":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization billing info","description":"Get billing information for the current organization including plan, limits, and usage. Requires admin role.","operationId":"organizations-get_current_organization_billing","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Billing information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingInfo"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/portal":{"get":{"tags":["Organizations","Organizations"],"summary":"Get billing portal URL","description":"Get the billing customer portal URL for managing subscription, payments, and invoices. Supports both LemonSqueezy and Polar.","operationId":"organizations-get_billing_portal","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Portal URL","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Organizations-Get Billing Portal"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No billing account linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/billing/upgrade-promo":{"get":{"tags":["Organizations","Organizations"],"summary":"Get active upgrade promo","description":"Returns upgrade promo metadata and any currently active promo codes for checkout.","operationId":"organizations-get_upgrade_promo_for_current_org","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradePromoPublic"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/current/credits":{"get":{"tags":["Organizations","Organizations"],"summary":"Get current organization credits","description":"Get credit balance and recent credit entries for the current organization.\n\nReturns:\n- `balance`: Summary of available credits\n- `recent_credits`: Last 10 credit entries (unapplied only)\n\n**Requires:** Admin role","operationId":"organizations-get_current_organization_credits","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Credit balance and recent entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCreditsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/":{"get":{"tags":["Organizations","Organizations"],"summary":"List all organizations","description":"List all organizations with usage statistics. System Admin only.","operationId":"organizations-list_organizations","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by organization name or slug","title":"Search"},"description":"Search by organization name or slug"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of organizations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_OrganizationReadWithStats_"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Organizations","Organizations"],"summary":"Create organization","description":"Create a new organization. System Admin only.","operationId":"organizations-create_organization","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}},"responses":{"201":{"description":"Organization created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Organization slug already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}":{"get":{"tags":["Organizations","Organizations"],"summary":"Get organization by ID","description":"Get organization details with usage statistics. System Admin only.","operationId":"organizations-get_organization","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Organization details with stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationReadWithStats"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Update organization","description":"Update an organization. System Admin only.","operationId":"organizations-update_organization","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Organization updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Organization slug already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/hard-delete":{"delete":{"tags":["Organizations","Organizations"],"summary":"Immediately delete organization","description":"Immediately and permanently deletes an organization with no reminder email side effects. Creates a pre-delete backup valid for 30 days. System Admin only.","operationId":"organizations-hard_delete_organization","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Organization deleted permanently"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/logo":{"get":{"tags":["Organizations","Organizations"],"summary":"Get organization logo","description":"Get an organization's logo. System Admin only.","operationId":"organizations-get_organization_logo","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Logo image","content":{"application/json":{"schema":{}},"image/png":{},"image/jpeg":{}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or logo not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Upload organization logo","description":"Upload or update an organization's logo. System Admin only.","operationId":"organizations-upload_organization_logo","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_organizations-upload_organization_logo"}}}},"responses":{"200":{"description":"Logo uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"400":{"description":"Invalid file type or size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/features":{"get":{"tags":["Organizations","Organizations"],"summary":"Get organization features","description":"Get the feature status for a specific organization. System Admin only.","operationId":"organizations-get_organization_features","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of all features with their status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureStatus"},"title":"Response Organizations-Get Organization Features"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Update organization feature override","description":"Update a feature override for a specific organization. System Admin only.","operationId":"organizations-update_organization_feature_override","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureOverrideUpdate"}}}},"responses":{"200":{"description":"Updated list of all features with their status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureStatus"},"title":"Response Organizations-Update Organization Feature Override"}}}},"400":{"description":"Invalid feature key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/feature-flags/{flag_key}":{"put":{"tags":["Organizations","Organizations"],"summary":"Toggle a specific feature flag","description":"Update a single feature flag for an organization. System Admin only.","operationId":"organizations-update_feature_flag","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"flag_key","in":"path","required":true,"schema":{"type":"string","title":"Flag Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagUpdate"}}}},"responses":{"200":{"description":"Updated feature status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureStatus"}}}},"400":{"description":"Invalid feature key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/item-limit-override":{"get":{"tags":["Organizations","Organizations"],"summary":"Get item limit override status","description":"Get the current item limit override status for an organization. System Admin only.","operationId":"organizations-get_item_limit_override","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Current item limit override status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemLimitOverrideResponse"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Organizations","Organizations"],"summary":"Set item limit override","description":"Set a temporary item limit override for an organization. System Admin only.","operationId":"organizations-set_item_limit_override","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemLimitOverrideRequest"}}}},"responses":{"200":{"description":"Item limit override set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemLimitOverrideResponse"}}}},"400":{"description":"Invalid request (e.g., expires_at in the past)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Organizations","Organizations"],"summary":"Remove item limit override","description":"Remove the item limit override for an organization. System Admin only.","operationId":"organizations-remove_item_limit_override","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Item limit override removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemLimitOverrideResponse"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/trial/start":{"post":{"tags":["Organizations","Organizations"],"summary":"Start trial for organization","description":"Force start a 14-day professional trial for an organization. System Admin only.","operationId":"organizations-start_trial","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":14,"title":"Days"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/trial/extend":{"post":{"tags":["Organizations","Organizations"],"summary":"Extend existing trial","description":"Extend an active trial by a number of days. If the organization has a billing provider (LS/Polar), it will also be updated there. System Admin only.","operationId":"organizations-extend_trial","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialExtensionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{org_id}/trial/terminate":{"post":{"tags":["Organizations","Organizations"],"summary":"Terminate trial","description":"Immediately end an active trial and revert to free plan. System Admin only.","operationId":"organizations-terminate_trial","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/stats":{"get":{"tags":["Admin Dashboard"],"summary":"Get platform-wide statistics","description":"Returns aggregated statistics across all organizations including user counts, asset counts, and per-organization breakdowns. Requires system administrator privileges.","operationId":"admin-dashboard-get_global_stats","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Platform statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalStatsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/freemium/metrics":{"get":{"tags":["Admin Dashboard"],"summary":"Get freemium KPI and advisory guardrail metrics","description":"Returns flattened freemium KPI and guardrail metrics using backend-owned contract keys. Requires system administrator privileges.","operationId":"admin-dashboard-get_freemium_metrics","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Freemium metrics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreemiumMetricsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/freemium/cleanup/status":{"get":{"tags":["Admin Dashboard"],"summary":"Get freemium cleanup status summary","description":"Returns free-tier cleanup candidate counts and reminder scheduling status for superadmin dashboard cards.","operationId":"admin-dashboard-get_freemium_cleanup_status","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Freemium cleanup status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreemiumCleanupStatusResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/freemium/cleanup/candidates":{"get":{"tags":["Admin Dashboard"],"summary":"List freemium cleanup candidates","description":"Returns currently classified free-tier cleanup candidates for superadmin review and manual deletion actions.","operationId":"admin-dashboard-list_freemium_cleanup_candidates","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of cleanup candidates to return","default":10,"title":"Limit"},"description":"Maximum number of cleanup candidates to return"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Freemium cleanup candidates retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FreemiumCleanupCandidateResponse"},"title":"Response Admin-Dashboard-List Freemium Cleanup Candidates"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/freemium/cleanup/candidates/{org_id}":{"delete":{"tags":["Admin Dashboard"],"summary":"Immediately delete freemium cleanup candidate","description":"Immediately and permanently deletes a free organization from the freemium cleanup dashboard with no reminder-email side effects. System Admin only.","operationId":"admin-dashboard-delete_freemium_cleanup_candidate","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Organization deleted permanently"},"400":{"description":"Invalid request (own org or non-free org)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/activity":{"get":{"tags":["Admin Dashboard"],"summary":"Get recent activity across all organizations","description":"Returns recent action log entries from all organizations, including organization context for each action. Requires system administrator privileges.","operationId":"admin-dashboard-get_recent_activity","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of activity entries to return","default":50,"title":"Limit"},"description":"Maximum number of activity entries to return"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Activity log retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionLogWithOrgInfo"},"title":"Response Admin-Dashboard-Get Recent Activity"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/dashboard/alerts":{"get":{"tags":["Admin Dashboard"],"summary":"Get system alerts","description":"Returns system-wide alerts requiring admin attention, such as organizations approaching resource limits, security warnings, or maintenance notifications. Requires system administrator privileges.","operationId":"admin-dashboard-get_system_alerts","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"System alerts retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SystemAlert"},"title":"Response Admin-Dashboard-Get System Alerts"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/revenue/trial-prospects/stats":{"get":{"tags":["Admin Command Center"],"summary":"Get trial prospect stats","description":"Get KPIs for trial prospects.","operationId":"admin-command-center-get_trial_prospect_stats","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialProspectStats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/revenue/trial-prospects":{"get":{"tags":["Admin Command Center"],"summary":"Get trial prospects","description":"Get list of organizations tracked as trial prospects. System Admin only.","operationId":"admin-command-center-get_trial_prospects","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subscription status","title":"Status"},"description":"Filter by subscription status"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_OrganizationRead_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/overview":{"get":{"tags":["Admin Command Center"],"summary":"Get command center overview","description":"Returns top-level platform command center metrics. System Admin only.","operationId":"admin-command-center-get_command_center_overview","parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Rolling window in days for windowed metrics","default":30,"title":"Window Days"},"description":"Rolling window in days for windowed metrics"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandCenterOverviewResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/search":{"get":{"tags":["Admin Command Center"],"summary":"Search organizations and users","description":"Cross-organization search for command center workflows. System Admin only.","operationId":"admin-command-center-search_command_center","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of results","default":20,"title":"Limit"},"description":"Maximum number of results"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandCenterSearchResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/customers/queue":{"get":{"tags":["Admin Command Center"],"summary":"Get prioritized customer queue","description":"Returns prioritized customer queue items by backend rule engine. System Admin only.","operationId":"admin-command-center-get_customers_queue","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"rule","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/QueueRuleKey"},{"type":"null"}],"description":"Optional queue rule filter","title":"Rule"},"description":"Optional queue rule filter"},{"name":"subscription_tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Optional subscription tier filter","title":"Subscription Tier"},"description":"Optional subscription tier filter"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}],"description":"Optional name/slug filter","title":"Q"},"description":"Optional name/slug filter"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersQueueResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/customers/health":{"get":{"tags":["Admin Command Center"],"summary":"Get customer health list","description":"Returns customer health scoring and reason signals. System Admin only.","operationId":"admin-command-center-get_customers_health","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"subscription_tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Optional subscription tier filter","title":"Subscription Tier"},"description":"Optional subscription tier filter"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}],"description":"Optional name/slug filter","title":"Q"},"description":"Optional name/slug filter"},{"name":"min_health_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Optional minimum health score filter","title":"Min Health Score"},"description":"Optional minimum health score filter"},{"name":"max_health_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"description":"Optional maximum health score filter","title":"Max Health Score"},"description":"Optional maximum health score filter"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersHealthResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/revenue/summary":{"get":{"tags":["Admin Command Center"],"summary":"Get revenue summary","description":"Returns high-level revenue snapshot and conversion metrics. System Admin only.","operationId":"admin-command-center-get_revenue_summary","parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Rolling window in days for conversion and churn metrics","default":30,"title":"Window Days"},"description":"Rolling window in days for conversion and churn metrics"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSummaryResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/revenue/trends":{"get":{"tags":["Admin Command Center"],"summary":"Get revenue trends","description":"Returns daily revenue trend points over fixed windows. System Admin only.","operationId":"admin-command-center-get_revenue_trends","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Trend window in days. Allowed values: 7, 30, 90.","default":30,"title":"Window"},"description":"Trend window in days. Allowed values: 7, 30, 90."},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueTrendsResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/revenue/funnel":{"get":{"tags":["Admin Command Center"],"summary":"Get revenue funnel","description":"Returns signup-to-revenue funnel metrics. System Admin only.","operationId":"admin-command-center-get_revenue_funnel","parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Rolling funnel window in days","default":30,"title":"Window Days"},"description":"Rolling funnel window in days"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueFunnelResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/operations/health":{"get":{"tags":["Admin Command Center"],"summary":"Get operations health","description":"Returns operations health metrics for command center. System Admin only.","operationId":"admin-command-center-get_operations_health","parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Rolling operations window in days","default":30,"title":"Window Days"},"description":"Rolling operations window in days"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsHealthResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/security/health":{"get":{"tags":["Admin Command Center"],"summary":"Get security health","description":"Returns security health and risk metrics. System Admin only.","operationId":"admin-command-center-get_security_health","parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Rolling security window in days","default":30,"title":"Window Days"},"description":"Rolling security window in days"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityHealthResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/command-center/agent-analytics":{"get":{"tags":["Admin Command Center"],"summary":"Get agent adoption analytics (M1 funnel)","description":"Operator view of the AI-agent adoption funnel: organizations with keys, daily MCP activation series, keys by plan, top keys by usage, and proposal counts. System Admin only.","operationId":"admin-command-center-get_agent_adoption_analytics","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAdoptionAnalytics"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/impersonation/start":{"post":{"tags":["Admin Impersonation"],"summary":"Start user impersonation","description":"Start impersonating a user for support purposes.\n\n**Requirements:**\n- Caller must be a system administrator\n- Target user must be active\n- Cannot impersonate another system administrator\n\n**Security:**\n- Creates a time-limited impersonation session (5-480 minutes)\n- All impersonation actions are logged to the audit trail\n- The generated JWT includes special claims to identify it as impersonation\n\n**Returns:**\n- Access token for impersonating the target user (also set as HTTP-only cookie)\n- Session details including expiration time\n- Target user and organization information","operationId":"admin-impersonation-start_impersonation","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationStartRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationTokenResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/impersonation/status":{"get":{"tags":["Admin Impersonation"],"summary":"Check impersonation status","description":"Check if the current session is an impersonation session.\n\nThis endpoint reads the JWT claims to determine if the current user\nis being impersonated by a system admin. It returns the impersonation\nstatus and the original admin user if applicable.\n\n**Note:** This endpoint can be called by any authenticated user,\nnot just system admins.","operationId":"admin-impersonation-get_impersonation_status","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationStatusResponse"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/admin/impersonation/end":{"post":{"tags":["Admin Impersonation"],"summary":"End current impersonation session","description":"End the current impersonation session.\n\nThis endpoint reads the session ID from the JWT claims and ends\nthat impersonation session. After calling this endpoint, the client\nshould discard the impersonation token and either use the original\nadmin token or re-authenticate.\n\n**Requirements:**\n- Current session must be an impersonation session\n- Session must not already be ended\n\n**Effects:**\n- Marks the session as ended with timestamp\n- Invalidates further use of the impersonation token\n- Logs the session end to the audit trail","operationId":"admin-impersonation-end_current_impersonation","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationSessionRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/impersonation/sessions/{session_id}/end":{"post":{"tags":["Admin Impersonation"],"summary":"End impersonation session","description":"End an active impersonation session.\n\n**Requirements:**\n- Caller must be a system administrator\n- Session must not already be ended\n\n**Effects:**\n- Marks the session as ended with timestamp\n- Invalidates further use of the impersonation token\n- Logs the session end to the audit trail\n\n**Note:** System admins can end any session, not just their own.","operationId":"admin-impersonation-end_impersonation","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationSessionRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/impersonation/sessions":{"get":{"tags":["Admin Impersonation"],"summary":"Get active impersonation sessions","description":"Retrieve all currently active impersonation sessions.\n\n**Active sessions** are those that:\n- Have not been manually ended\n- Have not expired\n\n**Use cases:**\n- Monitor ongoing impersonation activities\n- Identify sessions that need to be ended\n- Security oversight and compliance","operationId":"admin-impersonation-get_active_sessions","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImpersonationSessionRead"},"title":"Response Admin-Impersonation-Get Active Sessions"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/impersonation/sessions/history":{"get":{"tags":["Admin Impersonation"],"summary":"Get impersonation session history","description":"Retrieve historical impersonation sessions with filtering and pagination.\n\n**Filters:**\n- `admin_user_id`: Filter by the admin who performed impersonation\n- `target_user_id`: Filter by the user who was impersonated\n\n**Ordering:**\n- Results are ordered by creation time, newest first\n\n**Use cases:**\n- Audit trail review\n- Compliance reporting\n- Investigating specific user impersonations","operationId":"admin-impersonation-get_session_history","parameters":[{"name":"admin_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by admin who performed impersonation","title":"Admin User Id"},"description":"Filter by admin who performed impersonation"},{"name":"target_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by user who was impersonated","title":"Target User Id"},"description":"Filter by user who was impersonated"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ImpersonationSessionRead_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/plans":{"get":{"tags":["Admin Subscription Plans"],"summary":"List all subscription plans","description":"List all subscription plans with optional filtering and pagination.\n\n**Requires:** System Admin role\n\nReturns plans ordered by sort_order (ascending), each including\nan `organization_count` showing how many active organizations use that plan.\nUse `include_inactive=true` to include deactivated plans.","operationId":"admin-subscription-plans-list_plans","parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","description":"Include inactive/deactivated plans","default":false,"title":"Include Inactive"},"description":"Include inactive/deactivated plans"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of subscription plans with org counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SubscriptionPlanReadWithStats_"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Admin Subscription Plans"],"summary":"Create a new subscription plan","description":"Create a new subscription plan.\n\n**Requires:** System Admin role\n\nThe plan `name` must be unique and follow the naming convention:\nlowercase alphanumeric with underscores or hyphens, starting with a letter\n(e.g., 'free', 'professional', 'custom-plan').","operationId":"admin-subscription-plans-create_plan","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanCreate"}}}},"responses":{"201":{"description":"Subscription plan created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Plan with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/plans/upgrade-promo":{"get":{"tags":["Admin Subscription Plans"],"summary":"Get upgrade promo configuration","description":"Get the currently configured upgrade promo metadata and active status.","operationId":"admin-subscription-plans-get_upgrade_promo","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradePromoPublic"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Admin Subscription Plans"],"summary":"Update upgrade promo configuration","description":"Configure a temporary promo code campaign for Starter/Professional checkout.","operationId":"admin-subscription-plans-update_upgrade_promo","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradePromoConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradePromoPublic"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/plans/{plan_id}":{"get":{"tags":["Admin Subscription Plans"],"summary":"Get subscription plan by ID","description":"Get detailed information about a specific subscription plan.\n\n**Requires:** System Admin role","operationId":"admin-subscription-plans-get_plan","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Subscription plan details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Subscription plan not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Admin Subscription Plans"],"summary":"Update subscription plan","description":"Update an existing subscription plan.\n\n**Requires:** System Admin role\n\nChanges to limits and features will affect all organizations on this plan.\nConsider the impact before modifying production plans.\n\n**Warning:** Reducing limits may cause organizations to exceed their quotas.","operationId":"admin-subscription-plans-update_plan","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanUpdate"}}}},"responses":{"200":{"description":"Subscription plan updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanRead"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Subscription plan not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Plan with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Admin Subscription Plans"],"summary":"Deactivate subscription plan","description":"Deactivate a subscription plan (soft delete).\n\n**Requires:** System Admin role\n\nThe plan will be marked as inactive and will no longer be available\nfor new organization subscriptions. Existing organizations on this\nplan will retain their access.\n\n**Note:** Plans in use by active organizations cannot be deactivated.\nMigrate organizations to a different plan first.","operationId":"admin-subscription-plans-delete_plan","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Subscription plan deactivated"},"400":{"description":"Plan is in use by active organizations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Subscription plan not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/plans/{plan_id}/usage":{"get":{"tags":["Admin Subscription Plans"],"summary":"Get plan usage statistics","description":"Get usage statistics for organizations on this plan.\n\n**Requires:** System Admin role\n\nReturns aggregate statistics including:\n- Number of organizations on this plan\n- Total users across all organizations\n- Total assets across all organizations","operationId":"admin-subscription-plans-get_plan_usage","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Plan usage statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUsageStats"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Subscription plan not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/audit":{"get":{"tags":["Admin Audit Logs"],"summary":"Search audit logs across organizations","description":"Search and filter audit logs across all organizations. System Admin only.\n\nSupports filtering by:\n- Organization ID\n- User ID (the user who performed the action)\n- Action type (create, update, delete, checkout, checkin, etc.)\n- Target type (asset, license, user, etc.)\n- Date range (start_date and end_date)\n- Free-text search in the note field\n\nResults are paginated and sorted by timestamp descending by default.","operationId":"admin-audit-logs-search_audit_logs","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization ID","title":"Organization Id"},"description":"Filter by organization ID"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by user who performed the action","title":"User Id"},"description":"Filter by user who performed the action"},{"name":"action_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by action type (create, update, delete, checkout, checkin)","title":"Action Type"},"description":"Filter by action type (create, update, delete, checkout, checkin)"},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by target entity type (asset, license, user, etc.)","title":"Target Type"},"description":"Filter by target entity type (asset, license, user, etc.)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter logs from this date (inclusive)","title":"Start Date"},"description":"Filter logs from this date (inclusive)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter logs until this date (inclusive)","title":"End Date"},"description":"Filter logs until this date (inclusive)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in note field","title":"Search"},"description":"Search in note field"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AuditLogWithDetails_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/audit/export":{"get":{"tags":["Admin Audit Logs"],"summary":"Export audit logs","description":"Export audit logs as CSV or JSON file. System Admin only.\n\nSupports filtering by:\n- Organization ID\n- Date range (start_date and end_date)\n\nReturns a downloadable file with the exported data.","operationId":"admin-audit-logs-export_audit_logs","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization ID","title":"Organization Id"},"description":"Filter by organization ID"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter logs from this date (inclusive)","title":"Start Date"},"description":"Filter logs from this date (inclusive)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter logs until this date (inclusive)","title":"End Date"},"description":"Filter logs until this date (inclusive)"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(csv|json)$","description":"Export format: csv or json","default":"csv","title":"Format"},"description":"Export format: csv or json"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Exported audit logs file","content":{"application/json":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/audit/stats":{"get":{"tags":["Admin Audit Logs"],"summary":"Get audit statistics","description":"Get aggregated audit statistics. System Admin only.\n\nReturns:\n- Total log count\n- Counts by action type\n- Counts by target type\n- Most active users\n- Most active organizations\n\nSupports filtering by:\n- Organization ID\n- Date range (start_date and end_date)","operationId":"admin-audit-logs-get_audit_stats","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization ID","title":"Organization Id"},"description":"Filter by organization ID"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter stats from this date (inclusive)","title":"Start Date"},"description":"Filter stats from this date (inclusive)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter stats until this date (inclusive)","title":"End Date"},"description":"Filter stats until this date (inclusive)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditStats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/stats":{"get":{"tags":["Admin Demo Prospects"],"summary":"Get demo prospect statistics","description":"Get comprehensive statistics about demo prospects. System Admin only.\n\nReturns metrics in three categories:\n- **Conversion**: Total prospects, login rate, session duration, most active company\n- **Engagement**: Total logins, visitors today, activities per session, popular features\n- **Marketing**: Breakdown by UTM source, campaign, and team size","operationId":"admin-demo-prospects-get_demo_stats","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter prospects created from this date","title":"Start Date"},"description":"Filter prospects created from this date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter prospects created until this date","title":"End Date"},"description":"Filter prospects created until this date"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoProspectStats"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/filter-options":{"get":{"tags":["Admin Demo Prospects"],"summary":"Get filter options","description":"Get distinct values for filter dropdowns.","operationId":"admin-demo-prospects-get_demo_filter_options","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterOptions"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/prospects":{"get":{"tags":["Admin Demo Prospects"],"summary":"Search demo prospects","description":"Search and filter demo prospects. System Admin only.\n\nSupports filtering by:\n- Search term (email, name, company)\n- UTM source and campaign\n- Login status (has logged in or not)\n- Team size\n- Date range (prospect creation date)\n\nResults include computed statistics like session count, activity count, and login times.","operationId":"admin-demo-prospects-search_prospects","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in email, name, company","title":"Search"},"description":"Search in email, name, company"},{"name":"utm_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by UTM source","title":"Utm Source"},"description":"Filter by UTM source"},{"name":"utm_campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by UTM campaign","title":"Utm Campaign"},"description":"Filter by UTM campaign"},{"name":"has_logged_in","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by login status","title":"Has Logged In"},"description":"Filter by login status"},{"name":"team_size","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by team size","title":"Team Size"},"description":"Filter by team size"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this date","title":"Start Date"},"description":"Filter from this date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter until this date","title":"End Date"},"description":"Filter until this date"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ProspectWithStats_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/prospects/{prospect_id}":{"get":{"tags":["Admin Demo Prospects"],"summary":"Get prospect detail","description":"Get full details for a specific prospect including all sessions.","operationId":"admin-demo-prospects-get_prospect_detail","parameters":[{"name":"prospect_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prospect Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectDetail"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/prospects/invite":{"post":{"tags":["Admin Demo Prospects"],"summary":"Create and invite new prospect","description":"Manually create a new prospect and send a demo invitation email. System Admin only.","operationId":"admin-demo-prospects-create_and_invite_demo_prospect","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoProspectCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin-Demo-Prospects-Create And Invite Demo Prospect"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/prospects/{prospect_id}/invite":{"post":{"tags":["Admin Demo Prospects"],"summary":"Manually invite prospect","description":"Manually send a demo invitation email to a prospect. System Admin only.","operationId":"admin-demo-prospects-invite_demo_prospect","parameters":[{"name":"prospect_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prospect Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin-Demo-Prospects-Invite Demo Prospect"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/magic-link":{"post":{"tags":["Admin Demo Prospects"],"summary":"Generate a demo magic link","description":"Generate a magic authentication link for the demo environment. System Admin only.\n\nProvide a prospect email and receive the full login link including the auth token.\nThe prospect record is created automatically if it does not already exist. The link\nis NOT emailed — it is returned once so the operator can deliver it manually. The raw\ntoken is never stored, so it cannot be retrieved again after this call.","operationId":"admin-demo-prospects-generate_demo_magic_link","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkResult"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/sessions/{session_id}/revoke":{"post":{"tags":["Admin Demo Prospects"],"summary":"Disable a demo magic link","description":"Disable a magic link so it can no longer be used to log in. System Admin only.","operationId":"admin-demo-prospects-revoke_demo_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionWithDetails"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/sessions":{"get":{"tags":["Admin Demo Prospects"],"summary":"Search demo sessions","description":"Search and filter demo sessions. System Admin only.\n\nSupports filtering by:\n- Search term (prospect email, company)\n- Login status\n- Expiration status\n- Date range","operationId":"admin-demo-prospects-search_sessions","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in prospect email/company","title":"Search"},"description":"Search in prospect email/company"},{"name":"has_logged_in","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by login status","title":"Has Logged In"},"description":"Filter by login status"},{"name":"is_expired","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by expiration status","title":"Is Expired"},"description":"Filter by expiration status"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(pending|active|expired|revoked)$"},{"type":"null"}],"description":"Filter by lifecycle status","title":"Status"},"description":"Filter by lifecycle status"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this date","title":"Start Date"},"description":"Filter from this date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter until this date","title":"End Date"},"description":"Filter until this date"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SessionWithDetails_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/sessions/{session_id}":{"get":{"tags":["Admin Demo Prospects"],"summary":"Get session detail","description":"Get full details for a specific session including all activities.","operationId":"admin-demo-prospects-get_session_detail","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetail"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/activities":{"get":{"tags":["Admin Demo Prospects"],"summary":"Search demo activities","description":"Search and filter demo activities. System Admin only.\n\nSupports filtering by:\n- Search term (prospect email, company)\n- Activity type\n- Date range","operationId":"admin-demo-prospects-search_activities","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in prospect email/company","title":"Search"},"description":"Search in prospect email/company"},{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by activity type (comma-separated for multiple)","title":"Activity Type"},"description":"Filter by activity type (comma-separated for multiple)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this date","title":"Start Date"},"description":"Filter from this date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter until this date","title":"End Date"},"description":"Filter until this date"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ActivityWithContext_"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/export/prospects":{"get":{"tags":["Admin Demo Prospects"],"summary":"Export prospects to CSV","description":"Export all prospects to CSV file.","operationId":"admin-demo-prospects-export_prospects","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this date","title":"Start Date"},"description":"Filter from this date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter until this date","title":"End Date"},"description":"Filter until this date"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/demo-prospects/export/activities":{"get":{"tags":["Admin Demo Prospects"],"summary":"Export activities to CSV","description":"Export all activities to CSV file.","operationId":"admin-demo-prospects-export_activities","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this date","title":"Start Date"},"description":"Filter from this date"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter until this date","title":"End Date"},"description":"Filter until this date"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"CSV file download","content":{"application/json":{"schema":{}},"text/csv":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/system-admins/list":{"get":{"tags":["Admin Users"],"summary":"List all system administrators","description":"List all users with system administrator privileges.\n\n**Requires:** System Admin access\n\nReturns all users who have the is_system_admin flag set to true.","operationId":"admin-users-list_system_admins","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of system admins","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserReadWithOrg_"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/promote-to-system-admin":{"post":{"tags":["Admin Users"],"summary":"Promote user to system administrator","description":"Grant system administrator privileges to a user.\n\n**Requires:** System Admin access\n\nThe user will gain platform-wide access across all organizations.","operationId":"admin-users-promote_to_system_admin","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"User promoted to system admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"400":{"description":"User is already a system admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/demote-from-system-admin":{"post":{"tags":["Admin Users"],"summary":"Remove system administrator privileges","description":"Remove system administrator privileges from a user.\n\n**Requires:** System Admin access\n\nThe user will lose platform-wide access and return to their regular role.\nNote: You cannot demote yourself.","operationId":"admin-users-demote_from_system_admin","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"System admin privileges removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"400":{"description":"User is not a system admin or trying to demote self","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/system-admins":{"post":{"tags":["Admin Users"],"summary":"Create a new system administrator","description":"Create a new user with system administrator privileges.\n\n**Requires:** System Admin access\n\nSystem administrators have platform-wide access across all organizations.\nIf an organization_id is provided, the user will be assigned to that organization\nwhile still having cross-org access.","operationId":"admin-users-create_system_admin","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAdminCreate"}}}},"responses":{"201":{"description":"System admin created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"400":{"description":"Invalid data or email already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}":{"patch":{"tags":["Admin Users"],"summary":"Update system administrator details","description":"Update a system administrator's details.\n\n**Requires:** System Admin access","operationId":"admin-users-update_system_admin","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Admin Users"],"summary":"Delete a user permanently","description":"Permanently delete a user from the system.\n\n**Requires:** System Admin access\n\n**Validations:**\n- Cannot delete yourself\n- Cannot delete if this would leave no system administrators\n\nThis action is irreversible. The user and all their direct associations will be removed.","operationId":"admin-users-delete_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"User deleted successfully"},"400":{"description":"Cannot delete self or last system admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Admin Users"],"summary":"Get user by ID from any organization","description":"Retrieve detailed information about a specific user from any organization.\n\n**Requires:** System Admin access\n\nReturns the user's full profile including their organization details.","operationId":"admin-users-get_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"User details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/send-password-reset":{"post":{"tags":["Admin Users"],"summary":"Send password reset email to a user","description":"Trigger a password reset email for any user in the system.\n\n**Requires:** System Admin access\n\nGenerates a secure password reset token and sends an email to the user\nwith a link to set a new password. The token is valid for 24 hours.\n\n**Rate limit:** 1 request per minute per user to prevent spam.","operationId":"admin-users-send_password_reset_email","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Password reset email sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"400":{"description":"User is inactive or email could not be sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded - try again later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/set-password":{"post":{"tags":["Admin Users"],"summary":"Set a user's password directly","description":"Set a new password for any user in the system.\n\n**Requires:** System Admin access\n\nDirectly sets the user's password hash. The user will need to use\nthe new password on their next login.\n\n**Password requirements:**\n- Minimum 8 characters\n- Must include uppercase, lowercase, number, and special character","operationId":"admin-users-set_user_password","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetPasswordRequest"}}}},"responses":{"200":{"description":"Password set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"400":{"description":"Password does not meet complexity requirements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/reset-mfa":{"post":{"tags":["Admin Users"],"summary":"Reset MFA for a user","description":"Reset multi-factor authentication for a user, clearing their TOTP secret\nand recovery codes. The user will need to set up MFA again.\n\n**Requires:** System Admin access\n\n**Validations:**\n- Cannot reset your own MFA (use /settings/security instead)","operationId":"admin-users-reset_user_mfa","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"MFA reset successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReadWithOrg"}}}},"400":{"description":"Cannot reset own MFA","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/organizations/{org_id}/users/{user_id}/grant-admin-role":{"post":{"tags":["Admin Users"],"summary":"Grant admin role to a user within an organization","description":"Promote a user to admin role within their organization.\n\n**Requires:** System Admin access\n\n**Use case:** When all org admins have lost access and a superadmin needs to\npromote a regular user to admin so they can reset passwords/access for others.\n\n**Security:**\n- Full audit trail with required reason\n- Email notification to user (and existing admins if any)\n- Cannot promote users from a different organization\n- Cannot promote inactive users","operationId":"admin-users-grant_admin_role","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantAdminRoleRequest"}}}},"responses":{"200":{"description":"User promoted to admin successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleChangeResponse"}}}},"400":{"description":"Invalid request (user already admin, inactive, or wrong org)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/organizations/{org_id}/users/{user_id}/revoke-admin-role":{"post":{"tags":["Admin Users"],"summary":"Revoke admin role from a user within an organization","description":"Demote an admin to a lower role within their organization.\n\n**Requires:** System Admin access\n\n**Security:**\n- Full audit trail with required reason\n- Email notification to user\n- Cannot demote if this would leave the organization with no admins (unless emergency_override=true)\n- Demoted user will lose admin capabilities immediately","operationId":"admin-users-revoke_admin_role","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeAdminRoleRequest"}}}},"responses":{"200":{"description":"Admin role revoked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleChangeResponse"}}}},"400":{"description":"Invalid request (user not admin, last admin without override)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/":{"get":{"tags":["Admin Users"],"summary":"Search users across all organizations","description":"Search and list users across all organizations in the system.\n\n**Requires:** System Admin access\n\nSupports filtering by:\n- Search term (matches name or email)\n- Organization ID\n- User role\n- Active status\n\nResults include organization name and slug for each user.","operationId":"admin-users-search_users","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Search by user name or email address","title":"Search"},"description":"Search by user name or email address"},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization ID","title":"Organization Id"},"description":"Filter by organization ID"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(admin|agent|user)$"},{"type":"null"}],"description":"Filter by user role (admin, agent, user)","title":"Role"},"description":"Filter by user role (admin, agent, user)"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserReadWithOrg_"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/activity":{"get":{"tags":["Admin Users"],"summary":"Get user's activity timeline","description":"Retrieve the activity timeline for a specific user across the system.\n\n**Requires:** System Admin access\n\nReturns all actions performed BY this user, ordered by most recent first.\nIncludes actions from all organizations the user may have interacted with\n(for system admins with cross-org access).","operationId":"admin-users-get_user_activity","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated activity timeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ActionLogSummary_"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/assets":{"get":{"tags":["Admin Users"],"summary":"Get user assets (Admin)","description":"Retrieve all assets assigned to a user across any organization. System Admin only.","operationId":"admin-users-get_user_assets","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Admin-Users-Get User Assets"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/licenses":{"get":{"tags":["Admin Users"],"summary":"Get user licenses (Admin)","description":"Retrieve all licenses assigned to a user across any organization. System Admin only.","operationId":"admin-users-get_user_licenses","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Admin-Users-Get User Licenses"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/{user_id}/accessories":{"get":{"tags":["Admin Users"],"summary":"Get user accessories (Admin)","description":"Retrieve all accessories assigned to a user across any organization. System Admin only.","operationId":"admin-users-get_user_accessories","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Admin-Users-Get User Accessories"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/users/organizations/{org_id}/users/bulk-deactivate":{"post":{"tags":["Admin Users"],"summary":"Bulk deactivate users within an organization","description":"Deactivate multiple users at once within an organization.\n\n**Requires:** System Admin access\n\n**Safety checks:**\n- Cannot deactivate all admins (at least one must remain active)\n- Skips users already inactive\n- Skips users from different organizations\n- Full audit trail with reason\n\n**Returns:** Summary of deactivated and skipped users.","operationId":"admin-users-bulk_deactivate_users","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeactivateRequest"}}}},"responses":{"200":{"description":"Bulk deactivation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeactivateResponse"}}}},"400":{"description":"Invalid request (empty list, would deactivate all admins)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/announcements":{"post":{"tags":["Admin Announcements"],"summary":"Create announcement","description":"Create a new platform-wide announcement.\n\n**Targeting options:**\n- `all`: All users across all organizations\n- `organization`: Users in specific organizations (provide `target_organization_ids`)\n- `plan`: Users on specific subscription plans (provide `target_plan_ids`)\n\n**Priority levels:**\n- `low`: Minor informational notices\n- `normal`: Standard announcements\n- `high`: Important announcements requiring attention\n- `critical`: Urgent notices (displayed prominently, often non-dismissible)\n\n**Types:**\n- `info`: General information\n- `warning`: Warnings about potential issues\n- `maintenance`: Scheduled maintenance notices\n- `feature`: New feature announcements","operationId":"admin-announcements-create_announcement","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementCreate"}}}},"responses":{"201":{"description":"Announcement created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Admin Announcements"],"summary":"List announcements","description":"List all announcements with optional filtering.\n\nReturns announcements ordered by creation date (newest first).","operationId":"admin-announcements-list_announcements","parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"announcement_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type (info, warning, maintenance, feature)","title":"Announcement Type"},"description":"Filter by type (info, warning, maintenance, feature)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order","default":"asc","title":"Sort Order"},"description":"Sort order"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of announcements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_AnnouncementRead_"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/announcements/{announcement_id}":{"get":{"tags":["Admin Announcements"],"summary":"Get announcement","description":"Get a specific announcement by ID.","operationId":"admin-announcements-get_announcement","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Announcement details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Announcement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Admin Announcements"],"summary":"Update announcement","description":"Update an existing announcement.\n\nOnly provided fields will be updated. You can update:\n- Content (title, content)\n- Targeting (target_type, target_organization_ids, target_plan_ids)\n- Scheduling (starts_at, ends_at)\n- Status (is_active, dismissible)\n- Type and priority","operationId":"admin-announcements-update_announcement","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementUpdate"}}}},"responses":{"200":{"description":"Announcement updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Announcement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Admin Announcements"],"summary":"Delete announcement","description":"Permanently delete an announcement.\n\nThe announcement and all associated dismissal records will be removed\nfrom the database. This action cannot be undone.","operationId":"admin-announcements-delete_announcement","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Announcement deleted"},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Announcement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/announcements/{announcement_id}/stats":{"get":{"tags":["Admin Announcements"],"summary":"Get announcement statistics","description":"Get engagement statistics for an announcement.\n\nReturns:\n- `total_target_users`: Number of users who can see this announcement\n- `total_views`: Users who have seen but not dismissed\n- `total_dismissals`: Users who have dismissed\n- `dismissal_rate`: Percentage of target users who dismissed (0-100)","operationId":"admin-announcements-get_announcement_stats","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Announcement statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementStats"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Announcement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/organizations/{org_id}/credits":{"post":{"tags":["Admin Credits"],"summary":"Add credit to organization","description":"Add a billing credit to an organization's account.\n\n**Credit types:**\n- `refund`: Refund for overcharges or billing errors\n- `compensation`: Compensation for service issues\n- `promotion`: Promotional credits (e.g., referral bonus)\n- `adjustment`: Manual billing adjustments\n\n**Currency:**\nCredits are stored in cents. For example, 10.00 EUR = 1000 cents.\n\n**Expiration:**\nCredits can optionally have an expiration date. Expired credits\nare not included in the available balance.","operationId":"admin-credits-add_credit","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCreate"}}}},"responses":{"201":{"description":"Credit added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Admin Credits"],"summary":"Get credit history","description":"Get the complete credit history for an organization.\n\nReturns all credit entries (including applied and voided) along with\nthe current balance summary.\n\n**Balance includes:**\n- `total_credits_cents`: Sum of available (unapplied, non-voided, non-expired) credits\n- `pending_credits`: Count of available credit entries\n- `expiring_soon_cents`: Credits expiring within 30 days","operationId":"admin-credits-get_credit_history","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"include_voided","in":"query","required":false,"schema":{"type":"boolean","description":"Include voided credits","default":true,"title":"Include Voided"},"description":"Include voided credits"},{"name":"include_applied","in":"query","required":false,"schema":{"type":"boolean","description":"Include applied credits","default":true,"title":"Include Applied"},"description":"Include applied credits"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Credit history with balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditHistory"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/organizations/{org_id}/credits/balance":{"get":{"tags":["Admin Credits"],"summary":"Get credit balance","description":"Get the current credit balance for an organization.\n\nReturns:\n- `total_credits_cents`: Total available credits in cents\n- `pending_credits`: Number of unapplied credit entries\n- `expiring_soon_cents`: Credits expiring within 30 days","operationId":"admin-credits-get_credit_balance","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Credit balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/organizations/{org_id}/credits/{credit_id}":{"delete":{"tags":["Admin Credits"],"summary":"Void credit","description":"Void a credit before it has been applied.\n\nVoiding a credit cancels it and prevents it from being used.\nOnly credits that have not yet been applied can be voided.\n\nA reason must be provided for audit purposes.","operationId":"admin-credits-void_credit","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"credit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credit Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditVoid"}}}},"responses":{"200":{"description":"Credit voided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditRead"}}}},"400":{"description":"Credit already applied or voided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Credit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Admin Credits"],"summary":"Get credit details","description":"Get details of a specific credit entry.","operationId":"admin-credits-get_credit","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"credit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credit Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Credit details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditRead"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Credit not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/email/status":{"get":{"tags":["Admin Email"],"summary":"Get email configuration status","description":"Check the current email configuration status.\n\n**Requires:** System Admin access\n\nReturns information about which email provider(s) are configured and active.","operationId":"admin-email-get_email_status","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Email configuration status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigStatus"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/email/test":{"post":{"tags":["Admin Email"],"summary":"Send a test email","description":"Send a test email to verify email configuration is working.\n\n**Requires:** System Admin access\n\nThis endpoint sends a test email to the specified address to verify that\nthe email configuration (Resend or SMTP) is working correctly.\n\n**Rate limit:** Emails are not rate-limited for system admins, but please\nuse responsibly.","operationId":"admin-email-send_test_email","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailRequest"}}}},"responses":{"200":{"description":"Test email sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailResponse"}}}},"400":{"description":"Email sending failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/backups":{"get":{"tags":["Admin Backups"],"summary":"List organization snapshots","description":"List all snapshots with optional organization filter.\n\nSnapshots are returned sorted by creation date (newest first).","operationId":"admin-backups-list_snapshots","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization","title":"Organization Id"},"description":"Filter by organization"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Paginated list of snapshots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SnapshotReadWithDetails_"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Admin Backups"],"summary":"Create manual snapshot","description":"Create a manual snapshot of an organization's data.\n\nThe snapshot captures all organization-scoped data including:\n- Users, locations, departments\n- Assets, asset models, categories\n- Licenses, license seats\n- Consumables, accessories, components\n- Maintenance records\n- Audit sessions and entries\n- API keys, webhooks\n- Notifications and preferences\n- Action logs\n- Custom fields and saved filters\n\nThe data is compressed and stored in the database.","operationId":"admin-backups-create_snapshot","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Organization to snapshot","title":"Organization Id"},"description":"Organization to snapshot"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SnapshotCreate"},{"type":"null"}],"title":"Data"}}}},"responses":{"201":{"description":"Snapshot created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotReadWithDetails"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/backups/storage":{"get":{"tags":["Admin Backups"],"summary":"Get storage statistics","description":"Get storage usage statistics for all snapshots.\n\nReturns:\n- Total bytes used across all snapshots\n- Maximum allowed storage (15GB default)\n- Usage percentage\n- Warning indicator (true if above 85%)\n- Breakdown by organization","operationId":"admin-backups-get_storage_stats","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Storage statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__models__organization_snapshot__StorageStats"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/backups/{snapshot_id}":{"get":{"tags":["Admin Backups"],"summary":"Get snapshot details","description":"Get detailed information about a specific snapshot.","operationId":"admin-backups-get_snapshot","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Snapshot Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Snapshot details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotReadWithDetails"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Snapshot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Admin Backups"],"summary":"Delete a snapshot","description":"Soft-delete a snapshot.\n\nThe snapshot data is marked as deleted but not immediately removed\nfrom the database. This allows for potential recovery if needed.\n\nDeleted snapshots do not count towards storage limits.","operationId":"admin-backups-delete_snapshot","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Snapshot Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Snapshot deleted"},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Snapshot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/backups/{snapshot_id}/restore":{"post":{"tags":["Admin Backups"],"summary":"Restore organization from snapshot","description":"Restore an organization from a snapshot.\n\n**Warning:** This is a destructive operation that:\n1. Creates a pre-restore backup (unless skipped)\n2. Deletes ALL current organization data\n3. Restores data from the snapshot\n4. Sends email notification to organization admins\n\nThe operation is atomic - if any step fails, the database\ntransaction is rolled back and no data is changed.\n\nAfter restore, users will see data as it was at the time\nthe snapshot was created.","operationId":"admin-backups-restore_snapshot","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Snapshot Id"}},{"name":"skip_pre_restore_backup","in":"query","required":false,"schema":{"type":"boolean","description":"Skip creating backup before restore (not recommended)","default":false,"title":"Skip Pre Restore Backup"},"description":"Skip creating backup before restore (not recommended)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Organization restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreResult"}}}},"400":{"description":"Invalid request or snapshot cannot be restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Snapshot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/admin/backups/demo/reset":{"post":{"tags":["Admin Backups"],"summary":"Reset demo environment (NovaTech)","description":"Reset the NovaTech demo organization to fresh state.\n\nThis operation:\n1. Clears all current demo data\n2. Re-seeds fresh demo data with 40 users, assets, licenses, etc.\n3. Resets the admin password to the demo password\n\nNote: No backup is created for demo resets since demo data\nis reproducible from the seed scripts.\n\nUse this when the demo environment becomes cluttered from\nuser testing and needs to be restored to a clean state.","operationId":"admin-backups-reset_demo_environment","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Demo environment reset","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin-Backups-Reset Demo Environment"}}}},"403":{"description":"System admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NovaTech organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/announcements":{"get":{"tags":["Announcements"],"summary":"Get active announcements","description":"Get all active announcements visible to the current user.\n\nReturns announcements that:\n- Are currently active\n- Are within their scheduled time window\n- Target the user (all users, user's organization, or user's subscription plan)\n- Have not been dismissed by the user\n\nAnnouncements are ordered by priority (critical first) then by creation date.","operationId":"announcements-get_active_announcements","parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"List of visible announcements","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementReadForUser"},"title":"Response Announcements-Get Active Announcements"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/announcements/{announcement_id}/dismiss":{"post":{"tags":["Announcements"],"summary":"Dismiss announcement","description":"Dismiss an announcement so it no longer appears for the current user.\n\nOnly dismissible announcements can be dismissed. Critical announcements\nmay be configured as non-dismissible by system administrators.\n\n**Note:** Dismissals are user-specific. Other users will still see\nthe announcement if it targets them.","operationId":"announcements-dismiss_announcement","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Announcement dismissed"},"400":{"description":"Announcement cannot be dismissed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Announcement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/billing/webhooks/lemonsqueezy":{"post":{"tags":["Billing Webhooks"],"summary":"LemonSqueezy webhook handler","description":"Receives and processes webhook events from LemonSqueezy.\n\n    Handles the following events:\n    - order_created: Provision new organization and admin user\n    - subscription_updated: Update subscription plan and status\n    - subscription_cancelled: Mark subscription as cancelled\n    - subscription_payment_failed: Mark subscription as past_due\n    - subscription_payment_recovered: Restore active status after payment recovery\n    - subscription_payment_success: Confirm payment and restore active status\n    - subscription_resumed: Reactivate subscription after cancellation\n    - subscription_expired: Deactivate organization when subscription expires\n    - subscription_paused: Mark subscription as paused\n    - subscription_unpaused: Restore active status after unpausing\n    - subscription_plan_changed: Update plan tier on upgrade/downgrade\n\n    Security:\n    - Signature verification via X-Signature header (HMAC-SHA256)\n    - Idempotency via event_id deduplication\n    - No authentication required (webhooks are public endpoints)\n\n    Returns:\n    - 200 OK: Event processed successfully\n    - 400 Bad Request: Invalid signature or malformed payload\n    - 500 Internal Server Error: Processing error","operationId":"billing-webhooks-lemonsqueezy_webhook","parameters":[{"name":"X-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Signature"}},{"name":"X-Event-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Event-Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Billing-Webhooks-Lemonsqueezy Webhook"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/billing/webhooks/polar":{"post":{"tags":["Billing Webhooks"],"summary":"Polar webhook handler","description":"Receives and processes webhook events from Polar.\n\n    Handles the following events:\n    - subscription.created: Provision new organization and admin user\n    - subscription.active: Activate subscription after payment\n    - subscription.updated: Update subscription plan and status\n    - subscription.canceled: Mark subscription as cancelled, start grace period\n    - subscription.revoked: Mark subscription as revoked\n    - order.paid: Confirm payment and restore active status\n\n    Security:\n    - Signature verification via X-Polar-Signature header\n    - Idempotency via event_id deduplication\n    - No authentication required (webhooks are public endpoints)\n\n    Returns:\n    - 200 OK: Event processed successfully\n    - 400 Bad Request: Invalid signature or malformed payload\n    - 500 Internal Server Error: Processing error","operationId":"billing-webhooks-polar_webhook","parameters":[{"name":"X-Polar-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Polar-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Billing-Webhooks-Polar Webhook"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/gdpr/deletion-request":{"post":{"tags":["GDPR"],"summary":"Create GDPR deletion request","description":"Create a request to delete personal data under GDPR Article 17 (Right to be Forgotten).\n\n    **Request Types:**\n    - `self_deletion`: User requesting deletion of their own data\n    - `admin_deletion`: Admin requesting deletion of another user's data (requires admin role)\n\n    **Data Categories:**\n    - `profile`: Name, email, avatar\n    - `activity_logs`: User activity in audit logs\n    - `notifications`: User notifications\n    - `assignments`: Asset/license assignments\n    - `all`: All personal data (default)\n\n    **Workflow:**\n    1. Request is created with status `pending`\n    2. A different admin must approve the request\n    3. 7-day waiting period after approval\n    4. Automatic execution after waiting period\n\n    Users can cancel their request any time before execution.","operationId":"gdpr-create_deletion_request","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/deletion-requests":{"get":{"tags":["GDPR"],"summary":"List GDPR deletion requests","description":"List all GDPR deletion requests for the organization.\n\n    Requires admin role. Supports filtering by status.","operationId":"gdpr-list_deletion_requests","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: pending, approved, rejected, scheduled, completed, cancelled","title":"Status"},"description":"Filter by status: pending, approved, rejected, scheduled, completed, cancelled"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GDPRDeletionRequestReadWithUsers"},"title":"Response Gdpr-List Deletion Requests"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/admin/deletion-requests":{"get":{"tags":["GDPR"],"summary":"List all GDPR deletion requests (superadmin)","description":"List all GDPR deletion requests across all organizations.\n\n    **Requires system admin role.**\n\n    Returns requests from all organizations with organization details.\n    Supports filtering by status.","operationId":"gdpr-list_all_deletion_requests","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: pending, approved, rejected, scheduled, completed, cancelled","title":"Status"},"description":"Filter by status: pending, approved, rejected, scheduled, completed, cancelled"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GDPRDeletionRequestReadWithOrganization"},"title":"Response Gdpr-List All Deletion Requests"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/deletion-requests/{request_id}":{"get":{"tags":["GDPR"],"summary":"Get GDPR deletion request","description":"Get details of a specific GDPR deletion request.","operationId":"gdpr-get_deletion_request","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestReadWithUsers"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/deletion-requests/{request_id}/approve":{"post":{"tags":["GDPR"],"summary":"Approve GDPR deletion request","description":"Approve a GDPR deletion request.\n\n    **Requirements:**\n    - Requires admin role\n\n    **After Approval:**\n    - Request status changes to `approved`\n    - 7-day waiting period begins\n    - Deletion is scheduled for execution after waiting period\n    - User can still cancel during waiting period","operationId":"gdpr-approve_deletion_request","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GDPRDeletionRequestApprove"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/deletion-requests/{request_id}/reject":{"post":{"tags":["GDPR"],"summary":"Reject GDPR deletion request","description":"Reject a GDPR deletion request with a reason.\n\n    Requires admin role. A rejection reason must be provided.","operationId":"gdpr-reject_deletion_request","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestReject"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/deletion-requests/{request_id}/cancel":{"post":{"tags":["GDPR"],"summary":"Cancel GDPR deletion request","description":"Cancel a GDPR deletion request before execution.\n\n    Can be cancelled by:\n    - The target user\n    - The user who created the request\n    - Any admin\n\n    Can only be cancelled while status is: pending, approved, or scheduled.","operationId":"gdpr-cancel_deletion_request","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDeletionRequestRead"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/my-data":{"get":{"tags":["GDPR"],"summary":"Export my personal data","description":"Export all personal data for the current user (GDPR Article 15 - Right of Access).\n\n    Returns a structured export containing:\n    - Profile information (email, name, role)\n    - Organization and department\n    - Assigned assets and licenses\n    - Activity count\n\n    This endpoint allows users to exercise their right to access their personal data\n    as required by GDPR Article 15.","operationId":"gdpr-export_my_data","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDataExport"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/gdpr/users/{user_id}/data":{"get":{"tags":["GDPR"],"summary":"Export user data (admin)","description":"Export all personal data for a specific user (admin only).\n\n    Requires admin role. Used for GDPR data access requests\n    where an admin needs to provide the data export to a user.","operationId":"gdpr-export_user_data","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GDPRDataExport"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/organization":{"post":{"tags":["Export"],"summary":"Request full organization export","description":"Request a complete export of all organization data (async).\n\nThis endpoint starts a background job to generate a comprehensive export including:\n- Users (without sensitive fields like passwords)\n- Assets\n- Licenses (without product keys)\n- Accessories\n- Consumables\n- Audit logs\n\n**GDPR Compliance:** This fulfills GDPR Article 20 (Right to data portability).\n\n**Requires:** Admin role\n\nThe export is generated in the background. Use the returned job_id to check status\nand download the file when ready.","operationId":"export-request_organization_export","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationExportRequest"}}}},"responses":{"200":{"description":"Export job started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobResponse"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/organization/status/{job_id}":{"get":{"tags":["Export"],"summary":"Check export status","description":"Check the status of an async organization export job.","operationId":"export-get_organization_export_status","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Export job status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportStatusResponse"}}}},"404":{"description":"Export job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/organization/download/{job_id}":{"get":{"tags":["Export"],"summary":"Download organization export","description":"Download a completed organization export file.","operationId":"export-download_organization_export","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Export file (JSON)","content":{"application/json":{"schema":{}}}},"400":{"description":"Export not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Export job or file not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/assets":{"post":{"tags":["Export"],"summary":"Export assets","description":"Export all assets for the organization (direct download).","operationId":"export-export_assets","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Assets export file","content":{"application/json":{"schema":{}},"text/csv":{}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/licenses":{"post":{"tags":["Export"],"summary":"Export licenses","description":"Export all licenses for the organization (direct download).","operationId":"export-export_licenses","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Licenses export file","content":{"application/json":{"schema":{}},"text/csv":{}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/accessories":{"post":{"tags":["Export"],"summary":"Export accessories","description":"Export all accessories for the organization (direct download).","operationId":"export-export_accessories","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Accessories export file","content":{"application/json":{"schema":{}},"text/csv":{}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/consumables":{"post":{"tags":["Export"],"summary":"Export consumables","description":"Export all consumables for the organization (direct download).","operationId":"export-export_consumables","parameters":[{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Consumables export file","content":{"application/json":{"schema":{}},"text/csv":{}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/users":{"post":{"tags":["Export"],"summary":"Export users","description":"Export all users for the organization (direct download).","operationId":"export-export_users","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: json or csv","default":"json","title":"Format"},"description":"Export format: json or csv"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Users export file","content":{"application/json":{"schema":{}},"text/csv":{}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/export/audit-logs":{"post":{"tags":["Export"],"summary":"Export audit logs","description":"Export audit logs for the organization (direct download).","operationId":"export-export_audit_logs","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: json or csv","default":"json","title":"Format"},"description":"Export format: json or csv"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":100,"description":"Maximum number of logs","default":10000,"title":"Limit"},"description":"Maximum number of logs"},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Audit logs export file","content":{"application/json":{"schema":{}},"text/csv":{}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/pending-actions":{"get":{"tags":["Pending Actions"],"summary":"List pending-action proposals","description":"List agent-proposed workflow executions for the organization, newest first. Filter by status (pending, rejected, executed, failed).","operationId":"pending-actions-list_pending_actions","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: pending, rejected, executed, failed","title":"Status"},"description":"Filter by status: pending, rejected, executed, failed"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pending-Actions-List Pending Actions"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/pending-actions/{proposal_id}":{"get":{"tags":["Pending Actions"],"summary":"Inspect a pending-action proposal","description":"Full detail: manifest, params, execution result or rejection reason.","operationId":"pending-actions-get_pending_action","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pending-Actions-Get Pending Action"}}}},"404":{"description":"Proposal not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/pending-actions/{proposal_id}/approve":{"post":{"tags":["Pending Actions"],"summary":"Approve and execute a proposal","description":"Executes the proposed workflow as the approving admin. Best-effort execution with itemized outcomes.","operationId":"pending-actions-approve_pending_action","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Proposal executed (see status: executed|failed)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pending-Actions-Approve Pending Action"}}}},"404":{"description":"Proposal not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/pending-actions/{proposal_id}/reject":{"post":{"tags":["Pending Actions"],"summary":"Reject a proposal","description":"Rejects the proposal without executing. Optionally provide a reason.","operationId":"pending-actions-reject_pending_action","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Organization-Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Proposal rejected","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pending-Actions-Reject Pending Action"}}}},"404":{"description":"Proposal not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/oauth/token":{"post":{"tags":["OAuth"],"summary":"OAuth 2.1 token endpoint (client_credentials)","description":"Exchange a Flottix API key for a short-lived, audience-bound MCP access token. Authenticate with HTTP Basic (client_id / client_secret = your API key) or client_secret_post. Requested scopes are narrowed to the key's scopes. The token is valid for 1 hour against /api/mcp.","operationId":"oauth-issue_token","responses":{"200":{"description":"Token issued","content":{"application/json":{"schema":{"properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer"},"scope":{"type":"string","description":"Space-separated granted scopes"}},"type":"object","required":["access_token","token_type","expires_in","scope"]}}}},"400":{"description":"Unsupported grant type or no acceptable scope","content":{"application/json":{"schema":{"properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"type":"object","required":["error"]}}}},"401":{"description":"Invalid client credentials","content":{"application/json":{"schema":{"properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"type":"object","required":["error"]}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/oauth/register":{"post":{"tags":["OAuth"],"summary":"Dynamic client registration (RFC 7591)","description":"Register an OAuth client for the authorization-code flow (with PKCE). Public clients (token_endpoint_auth_method=none) authenticate with PKCE only; confidential clients receive a one-time client_secret. Open registration, rate-limited to 10/hour/IP.","operationId":"oauth-register_client","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRegistrationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/v1/oauth/consent/{req_id}":{"get":{"tags":["OAuth"],"summary":"Consent screen information","operationId":"oauth-consent_info","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"string","title":"Req Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Oauth-Consent Info"}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/oauth/consent/{req_id}/approve":{"post":{"tags":["OAuth"],"summary":"Approve an authorization request","operationId":"oauth-consent_approve","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"string","title":"Req Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsentDecisionRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/oauth/consent/{req_id}/deny":{"post":{"tags":["OAuth"],"summary":"Deny an authorization request","operationId":"oauth-consent_deny","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"string","title":"Req Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error - request parameters or body invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized - missing, invalid, or expired credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - insufficient permissions or plan-level API restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/oauth/revoke":{"post":{"tags":["OAuth"],"summary":"Token revocation (RFC 7009)","description":"Revoke a refresh token (and its rotation family). Per RFC 7009, responds 200 even when the token is unknown.","operationId":"oauth-revoke_token","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"429":{"description":"Too Many Requests - rate limit exceeded; honor Retry-After","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying the request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error - sanitized generic message with a request_id for log correlation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable name for the API key"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional description of the key's purpose"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"List of permission scopes for this key"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Optional expiration timestamp (timezone-aware)"}},"type":"object","required":["name"],"title":"APIKeyCreate","description":"Schema for creating a new API key."},"APIKeyCreatorInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email"],"title":"APIKeyCreatorInfo","description":"Minimal user info for embedding in API key responses."},"APIKeyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_by_id":{"type":"string","format":"uuid","title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/APIKeyCreatorInfo"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"last_used_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used Ip"},"use_count":{"type":"integer","title":"Use Count"},"is_active":{"type":"boolean","title":"Is Active"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revoked_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revoked By Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","organization_id","name","description","key_prefix","scopes","created_by_id","expires_at","last_used_at","last_used_ip","use_count","is_active","revoked_at","revoked_by_id","created_at"],"title":"APIKeyRead","description":"Schema for reading API key data (excludes sensitive fields)."},"APIKeyReadWithRawKey":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_by_id":{"type":"string","format":"uuid","title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/APIKeyCreatorInfo"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"last_used_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used Ip"},"use_count":{"type":"integer","title":"Use Count"},"is_active":{"type":"boolean","title":"Is Active"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revoked_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revoked By Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"raw_key":{"type":"string","title":"Raw Key","description":"The full API key - only shown once after creation","default":""}},"type":"object","required":["id","organization_id","name","description","key_prefix","scopes","created_by_id","expires_at","last_used_at","last_used_ip","use_count","is_active","revoked_at","revoked_by_id","created_at"],"title":"APIKeyReadWithRawKey","description":"API key read schema with the raw key (shown only once after creation)."},"APIKeyScopeInfo":{"properties":{"scope":{"type":"string","title":"Scope","description":"The scope identifier"},"description":{"type":"string","title":"Description","description":"Human-readable description of the scope"},"category":{"type":"string","title":"Category","description":"Category grouping (Read, Write, Checkout, Special)"}},"type":"object","required":["scope","description","category"],"title":"APIKeyScopeInfo","description":"Schema for listing available API key scopes."},"APIKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Human-readable name for the API key"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional description of the key's purpose"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"List of permission scopes for this key"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether the key is active"}},"type":"object","title":"APIKeyUpdate","description":"Schema for updating an API key."},"AccessoryAssignmentReadWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"accessory_id":{"type":"string","format":"uuid","title":"Accessory Id"},"assigned_to_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To User Id"},"assigned_by_id":{"type":"string","format":"uuid","title":"Assigned By Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"},"expected_checkin":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Checkin"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"assigned_to_user":{"anyOf":[{},{"type":"null"}],"title":"Assigned To User"},"assigned_by":{"anyOf":[{},{"type":"null"}],"title":"Assigned By"}},"type":"object","required":["id","accessory_id","assigned_to_user_id","assigned_by_id","notes","assigned_at","expected_checkin","created_at"],"title":"AccessoryAssignmentReadWithDetails","description":"Assignment with full details."},"AccessoryCheckinRequest":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"AccessoryCheckinRequest","description":"Schema for checking in an accessory."},"AccessoryCheckoutToUserRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"expected_checkin":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Checkin"}},"type":"object","required":["user_id"],"title":"AccessoryCheckoutToUserRequest","description":"Schema for checking out an accessory to a user."},"AccessoryCountStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of accessories"},"deployed":{"type":"integer","title":"Deployed","description":"Number of deployed accessories"},"available":{"type":"integer","title":"Available","description":"Number of available accessories"}},"type":"object","required":["total","deployed","available"],"title":"AccessoryCountStats","description":"Statistics for accessory counts."},"AccessoryCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial"},"asset_tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Asset Tag"},"item_type":{"$ref":"#/components/schemas/ItemType"},"accessory_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Accessory Type"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Warranty Months"},"status":{"$ref":"#/components/schemas/AccessoryStatus","default":"available"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","required":["name","item_type"],"title":"AccessoryCreate","description":"Schema for creating an accessory."},"AccessoryRead":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial"},"asset_tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Asset Tag"},"item_type":{"$ref":"#/components/schemas/ItemType"},"accessory_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Accessory Type"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Warranty Months"},"status":{"$ref":"#/components/schemas/AccessoryStatus","default":"available"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["name","item_type","id","organization_id","category_id","location_id","purchase_date","custom_fields","created_at","updated_at"],"title":"AccessoryRead","description":"Schema for reading an accessory."},"AccessoryReadWithRelations":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial"},"asset_tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Asset Tag"},"item_type":{"$ref":"#/components/schemas/ItemType"},"accessory_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Accessory Type"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Warranty Months"},"status":{"$ref":"#/components/schemas/AccessoryStatus","default":"available"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"category":{"anyOf":[{},{"type":"null"}],"title":"Category"},"location":{"anyOf":[{},{"type":"null"}],"title":"Location"},"assignment":{"anyOf":[{"$ref":"#/components/schemas/AccessoryAssignmentReadWithDetails"},{"type":"null"}]},"is_deployed":{"type":"boolean","title":"Is Deployed","default":false},"specific_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specific Type"},"warranty_expires":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Warranty Expires"},"is_warranty_expired":{"type":"boolean","title":"Is Warranty Expired","default":false}},"type":"object","required":["name","item_type","id","organization_id","category_id","location_id","purchase_date","custom_fields","created_at","updated_at"],"title":"AccessoryReadWithRelations","description":"Accessory with full relation details."},"AccessoryStatus":{"type":"string","enum":["available","deployed","damaged","retired"],"title":"AccessoryStatus","description":"Status of an accessory item."},"AccessoryTypeCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"slug":{"type":"string","maxLength":100,"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["name","slug"],"title":"AccessoryTypeCreate","description":"Schema for creating an accessory type."},"AccessoryTypeRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"slug":{"type":"string","maxLength":100,"title":"Slug"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","slug","id","created_at","updated_at"],"title":"AccessoryTypeRead","description":"Schema for reading an accessory type."},"AccessoryTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"AccessoryTypeUpdate","description":"Schema for updating an accessory type."},"AccessoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"asset_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Tag"},"item_type":{"anyOf":[{"$ref":"#/components/schemas/ItemType"},{"type":"null"}]},"accessory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accessory Type"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Warranty Months"},"status":{"anyOf":[{"$ref":"#/components/schemas/AccessoryStatus"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"AccessoryUpdate","description":"Schema for updating an accessory."},"ActionLogSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action_type":{"type":"string","title":"Action Type"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"created_at":{"type":"string","title":"Created At"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"}},"type":"object","required":["id","action_type","target_type","target_id","note","meta","created_at","ip_address"],"title":"ActionLogSummary","description":"Summarized action log entry for user activity timeline."},"ActionLogWithOrgInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"action_type":{"type":"string","title":"Action Type"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"item_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Item Id"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"eula_accepted":{"type":"boolean","title":"Eula Accepted"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name","description":"Name of the organization where action occurred"},"org_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Slug","description":"Slug of the organization where action occurred"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of the user who performed the action"},"user_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Full Name","description":"Full name of the user who performed the action"}},"type":"object","required":["id","action_type","target_type","target_id","user_id","item_id","assigned_to_id","note","eula_accepted","meta","created_at","ip_address"],"title":"ActionLogWithOrgInfo","description":"Action log entry with organization information for cross-org viewing."},"ActionTypeCount":{"properties":{"action_type":{"type":"string","title":"Action Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["action_type","count"],"title":"ActionTypeCount","description":"Count of actions by type."},"ActivityWithContext":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"prospect_email":{"type":"string","title":"Prospect Email"},"prospect_company":{"type":"string","title":"Prospect Company"},"activity_type":{"type":"string","title":"Activity Type"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","prospect_email","prospect_company","activity_type","target_type","target_id","path","meta","created_at"],"title":"ActivityWithContext","description":"Demo activity with session and prospect context."},"AdminRoleChangeResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"user":{"$ref":"#/components/schemas/UserReadWithOrg"}},"type":"object","required":["success","message","user"],"title":"AdminRoleChangeResponse","description":"Response for admin role changes."},"AdminSetPasswordRequest":{"properties":{"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password","description":"New password for the user (min 8 characters)"}},"type":"object","required":["new_password"],"title":"AdminSetPasswordRequest","description":"Request schema for directly setting a user's password."},"AdvancedSearchResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","per_page","total_pages"],"title":"AdvancedSearchResponse","description":"Response for advanced search."},"AgentAdoptionAnalytics":{"properties":{"summary":{"$ref":"#/components/schemas/AgentAdoptionSummary"},"daily_activations":{"items":{"$ref":"#/components/schemas/DailyActivationPoint"},"type":"array","title":"Daily Activations"},"keys_by_plan":{"items":{"$ref":"#/components/schemas/KeysByPlanBucket"},"type":"array","title":"Keys By Plan"},"top_keys":{"items":{"$ref":"#/components/schemas/TopAgentKey"},"type":"array","title":"Top Keys"}},"type":"object","required":["summary","daily_activations","keys_by_plan","top_keys"],"title":"AgentAdoptionAnalytics"},"AgentAdoptionSummary":{"properties":{"orgs_with_keys":{"type":"integer","minimum":0.0,"title":"Orgs With Keys","description":"Organizations with at least one active key"},"orgs_active_7d":{"type":"integer","minimum":0.0,"title":"Orgs Active 7D","description":"Organizations with agent activity in the last 7 days"},"active_keys":{"type":"integer","minimum":0.0,"title":"Active Keys","description":"Non-revoked API keys"},"keys_used_7d":{"type":"integer","minimum":0.0,"title":"Keys Used 7D","description":"Active keys used in the last 7 days"},"proposals_pending":{"type":"integer","minimum":0.0,"title":"Proposals Pending","description":"Workflow proposals awaiting approval"},"proposals_executed":{"type":"integer","minimum":0.0,"title":"Proposals Executed","description":"Workflow proposals approved and executed"}},"type":"object","required":["orgs_with_keys","orgs_active_7d","active_keys","keys_used_7d","proposals_pending","proposals_executed"],"title":"AgentAdoptionSummary","description":"M1 funnel headline numbers (pivot 2026)."},"AlertSeverity":{"type":"string","enum":["info","warning","critical"],"title":"AlertSeverity","description":"Severity levels for system alerts."},"AllSettingsResponse":{"properties":{"settings":{"items":{"$ref":"#/components/schemas/AppSettingRead"},"type":"array","title":"Settings","description":"List of all application settings"}},"type":"object","title":"AllSettingsResponse","description":"Response schema for all settings."},"AnnouncementCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content"},"announcement_type":{"type":"string","title":"Announcement Type","default":"info"},"priority":{"type":"string","title":"Priority","default":"normal"},"target_type":{"type":"string","title":"Target Type","default":"all"},"target_organization_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Target Organization Ids"},"target_plan_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Target Plan Ids"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"dismissible":{"type":"boolean","title":"Dismissible","default":true}},"type":"object","required":["title","content"],"title":"AnnouncementCreate","description":"Schema for creating an announcement."},"AnnouncementRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"announcement_type":{"type":"string","title":"Announcement Type"},"priority":{"type":"string","title":"Priority"},"target_type":{"type":"string","title":"Target Type"},"target_organization_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Organization Ids"},"target_plan_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Plan Ids"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/app__models__announcement__UserInfo"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"is_active":{"type":"boolean","title":"Is Active"},"dismissible":{"type":"boolean","title":"Dismissible"}},"type":"object","required":["id","title","content","announcement_type","priority","target_type","target_organization_ids","target_plan_ids","starts_at","ends_at","created_by_id","created_at","updated_at","is_active","dismissible"],"title":"AnnouncementRead","description":"Schema for reading announcement data."},"AnnouncementReadForUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"announcement_type":{"type":"string","title":"Announcement Type"},"priority":{"type":"string","title":"Priority"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"dismissible":{"type":"boolean","title":"Dismissible"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","content","announcement_type","priority","starts_at","ends_at","dismissible","created_at"],"title":"AnnouncementReadForUser","description":"Simplified announcement schema for regular users."},"AnnouncementStats":{"properties":{"total_target_users":{"type":"integer","title":"Total Target Users","description":"Total number of users who can see this announcement"},"total_views":{"type":"integer","title":"Total Views","description":"Number of users who have viewed (not dismissed) the announcement"},"total_dismissals":{"type":"integer","title":"Total Dismissals","description":"Number of users who have dismissed the announcement"},"dismissal_rate":{"type":"number","title":"Dismissal Rate","description":"Percentage of target users who dismissed (0-100)"}},"type":"object","required":["total_target_users","total_views","total_dismissals","dismissal_rate"],"title":"AnnouncementStats","description":"Statistics for an announcement."},"AnnouncementUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Content"},"announcement_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Announcement Type"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_organization_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Target Organization Ids"},"target_plan_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Target Plan Ids"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"dismissible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dismissible"}},"type":"object","title":"AnnouncementUpdate","description":"Schema for updating an announcement."},"AppSettingRead":{"properties":{"key":{"type":"string","title":"Key","description":"Setting key name"},"value":{"title":"Value","description":"Setting value (deserialized from JSON)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"}},"type":"object","required":["key","value"],"title":"AppSettingRead","description":"Schema for reading a single app setting."},"AppSettingUpdate":{"properties":{"value":{"title":"Value","description":"New value for the setting"}},"type":"object","required":["value"],"title":"AppSettingUpdate","description":"Schema for updating a setting value."},"AssetCheckin":{"properties":{"checkin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkin Notes"},"status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id"}},"type":"object","title":"AssetCheckin","description":"Schema for asset checkin."},"AssetCheckout":{"properties":{"assigned_to_id":{"type":"string","format":"uuid","title":"Assigned To Id"},"expected_checkin":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Checkin"},"checkout_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Notes"},"eula_accepted":{"type":"boolean","title":"Eula Accepted","default":false},"signature_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Data"}},"type":"object","required":["assigned_to_id"],"title":"AssetCheckout","description":"Schema for asset checkout."},"AssetCountStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of assets across all organizations"},"deployed":{"type":"integer","title":"Deployed","description":"Number of deployed assets"},"available":{"type":"integer","title":"Available","description":"Number of available assets"}},"type":"object","required":["total","deployed","available"],"title":"AssetCountStats","description":"Statistics for asset counts."},"AssetCreate":{"properties":{"asset_tag":{"type":"string","maxLength":50,"title":"Asset Tag"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Warranty Months"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"},"requestable":{"type":"boolean","title":"Requestable","default":true},"model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"},"status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","required":["asset_tag"],"title":"AssetCreate","description":"Schema for creating an asset."},"AssetKitCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_template":{"type":"boolean","title":"Is Template","default":true},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetKitItemCreate"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","required":["name"],"title":"AssetKitCreate","description":"Schema for creating an asset kit."},"AssetKitItemCreate":{"properties":{"entity_type":{"$ref":"#/components/schemas/KitEntityType"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"is_specific":{"type":"boolean","title":"Is Specific","default":false},"quantity":{"type":"integer","minimum":1.0,"title":"Quantity","default":1},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["entity_type","entity_id"],"title":"AssetKitItemCreate","description":"Schema for creating a kit item."},"AssetKitItemRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kit_id":{"type":"string","format":"uuid","title":"Kit Id"},"entity_type":{"$ref":"#/components/schemas/KitEntityType"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"is_specific":{"type":"boolean","title":"Is Specific"},"quantity":{"type":"integer","title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"display_order":{"type":"integer","title":"Display Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","kit_id","entity_type","entity_id","is_specific","quantity","notes","display_order","created_at","updated_at"],"title":"AssetKitItemRead","description":"Schema for reading a kit item."},"AssetKitItemReadWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kit_id":{"type":"string","format":"uuid","title":"Kit Id"},"entity_type":{"$ref":"#/components/schemas/KitEntityType"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"is_specific":{"type":"boolean","title":"Is Specific"},"quantity":{"type":"integer","title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"display_order":{"type":"integer","title":"Display Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"entity_details":{"anyOf":[{},{"type":"null"}],"title":"Entity Details"}},"type":"object","required":["id","kit_id","entity_type","entity_id","is_specific","quantity","notes","display_order","created_at","updated_at"],"title":"AssetKitItemReadWithDetails","description":"Kit item with resolved entity details."},"AssetKitItemUpdate":{"properties":{"entity_type":{"anyOf":[{"$ref":"#/components/schemas/KitEntityType"},{"type":"null"}]},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"is_specific":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Specific"},"quantity":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"AssetKitItemUpdate","description":"Schema for updating a kit item."},"AssetKitRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_template":{"type":"boolean","title":"Is Template"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","name","description","is_template","created_by_id","created_at","updated_at"],"title":"AssetKitRead","description":"Schema for reading an asset kit."},"AssetKitReadWithItems":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_template":{"type":"boolean","title":"Is Template"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"items":{"items":{"$ref":"#/components/schemas/AssetKitItemRead"},"type":"array","title":"Items","default":[]},"item_count":{"type":"integer","title":"Item Count","default":0}},"type":"object","required":["id","organization_id","name","description","is_template","created_by_id","created_at","updated_at"],"title":"AssetKitReadWithItems","description":"Asset kit with items included."},"AssetKitReadWithRelations":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_template":{"type":"boolean","title":"Is Template"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"items":{"items":{"$ref":"#/components/schemas/AssetKitItemReadWithDetails"},"type":"array","title":"Items","default":[]},"item_count":{"type":"integer","title":"Item Count","default":0},"created_by":{"anyOf":[{},{"type":"null"}],"title":"Created By"},"deployment_count":{"type":"integer","title":"Deployment Count","default":0}},"type":"object","required":["id","organization_id","name","description","is_template","created_by_id","created_at","updated_at"],"title":"AssetKitReadWithRelations","description":"Asset kit with full relations."},"AssetKitUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_template":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Template"}},"type":"object","title":"AssetKitUpdate","description":"Schema for updating an asset kit."},"AssetModelCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Number"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"requestable":{"type":"boolean","title":"Requestable","default":true},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"}},"type":"object","required":["name"],"title":"AssetModelCreate","description":"Schema for creating an asset model."},"AssetModelRead":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Number"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"requestable":{"type":"boolean","title":"Requestable","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"eol_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Eol Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","id","organization_id","category_id","eol_date","created_at","updated_at"],"title":"AssetModelRead","description":"Schema for reading an asset model."},"AssetModelReadWithCategory":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Number"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"requestable":{"type":"boolean","title":"Requestable","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"eol_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Eol Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"category":{"anyOf":[{},{"type":"null"}],"title":"Category"},"asset_count":{"type":"integer","title":"Asset Count","default":0}},"type":"object","required":["name","id","organization_id","category_id","eol_date","created_at","updated_at"],"title":"AssetModelReadWithCategory","description":"Asset model with category details.\n\nUses Any type for category to avoid forward reference issues with Pydantic."},"AssetModelUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Number"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"eol_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Eol Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"requestable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requestable"}},"type":"object","title":"AssetModelUpdate","description":"Schema for updating an asset model."},"AssetRead":{"properties":{"asset_tag":{"type":"string","maxLength":50,"title":"Asset Tag"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Warranty Months"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"},"requestable":{"type":"boolean","title":"Requestable","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"},"status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_checkout":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checkout"},"expected_checkin":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Checkin"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["asset_tag","id","organization_id","model_id","status_id","assigned_to_id","location_id","custom_fields","purchase_date","created_at","updated_at","last_checkout","expected_checkin"],"title":"AssetRead","description":"Schema for reading an asset."},"AssetReadWithRelations":{"properties":{"asset_tag":{"type":"string","maxLength":50,"title":"Asset Tag"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Warranty Months"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Location"},"requestable":{"type":"boolean","title":"Requestable","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"},"status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_checkout":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checkout"},"expected_checkin":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Checkin"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"model":{"anyOf":[{},{"type":"null"}],"title":"Model"},"status":{"anyOf":[{},{"type":"null"}],"title":"Status"},"assigned_to":{"anyOf":[{},{"type":"null"}],"title":"Assigned To"},"location_ref":{"anyOf":[{},{"type":"null"}],"title":"Location Ref"},"warranty_expires":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Warranty Expires"},"is_warranty_expired":{"type":"boolean","title":"Is Warranty Expired","default":false}},"type":"object","required":["asset_tag","id","organization_id","model_id","status_id","assigned_to_id","location_id","custom_fields","purchase_date","created_at","updated_at","last_checkout","expected_checkin"],"title":"AssetReadWithRelations","description":"Asset with full relation details.\n\nUses Any type for relations to avoid forward reference issues with Pydantic.\nThe actual types are AssetModelRead, StatusLabelRead, and UserRead."},"AssetUpdate":{"properties":{"asset_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Tag"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"},"status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"warranty_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Warranty Months"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"requestable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requestable"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"AssetUpdate","description":"Schema for updating an asset."},"AuditDiscrepancy":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_tag":{"type":"string","title":"Asset Tag"},"discrepancy_type":{"type":"string","title":"Discrepancy Type"},"expected_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Value"},"found_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Found Value"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["asset_id","asset_tag","discrepancy_type","expected_value","found_value","notes"],"title":"AuditDiscrepancy","description":"Discrepancy found during audit."},"AuditEntryCreate":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"condition":{"type":"string","title":"Condition","default":"good"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"found_location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Found Location Id"},"scan_method":{"type":"string","title":"Scan Method","default":"qr"}},"type":"object","required":["asset_id"],"title":"AuditEntryCreate","description":"Schema for recording an audit scan."},"AuditEntryReadWithAsset":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"scanned_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scanned By Id"},"condition":{"type":"string","title":"Condition"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"expected_location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expected Location Id"},"found_location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Found Location Id"},"location_mismatch":{"type":"boolean","title":"Location Mismatch"},"was_expected":{"type":"boolean","title":"Was Expected"},"scan_method":{"type":"string","title":"Scan Method"},"scanned_at":{"type":"string","format":"date-time","title":"Scanned At"},"asset":{"anyOf":[{},{"type":"null"}],"title":"Asset"},"scanned_by":{"anyOf":[{},{"type":"null"}],"title":"Scanned By"},"expected_location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Location Name"},"found_location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Found Location Name"}},"type":"object","required":["id","session_id","asset_id","scanned_by_id","condition","notes","expected_location_id","found_location_id","location_mismatch","was_expected","scan_method","scanned_at"],"title":"AuditEntryReadWithAsset","description":"Audit entry with asset details."},"AuditLogWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name","description":"Name of the organization"},"organization_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Slug","description":"Slug of the organization"},"action_type":{"type":"string","title":"Action Type"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"Email of the user who performed the action"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","description":"Full name of the user who performed the action"},"item_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Item Id"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"assigned_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Email","description":"Email of the assigned user"},"assigned_to_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Name","description":"Full name of the assigned user"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"eula_accepted":{"type":"boolean","title":"Eula Accepted","default":false},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"}},"type":"object","required":["id","organization_id","action_type","target_type","target_id","user_id"],"title":"AuditLogWithDetails","description":"ActionLog with organization name and user details included."},"AuditMissingAsset":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_tag":{"type":"string","title":"Asset Tag"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"last_known_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Known Location"},"last_known_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Known User"}},"type":"object","required":["asset_id","asset_tag","name","serial","last_known_location","last_known_user"],"title":"AuditMissingAsset","description":"Missing asset in audit report."},"AuditReportFull":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"session_name":{"type":"string","title":"Session Name"},"status":{"type":"string","title":"Status"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name"},"auditor_name":{"type":"string","title":"Auditor Name"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"expected_count":{"type":"integer","title":"Expected Count"},"scanned_count":{"type":"integer","title":"Scanned Count"},"missing_count":{"type":"integer","title":"Missing Count"},"unexpected_count":{"type":"integer","title":"Unexpected Count"},"discrepancy_count":{"type":"integer","title":"Discrepancy Count"},"progress_percent":{"type":"number","title":"Progress Percent"},"condition_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Condition Breakdown"},"location_mismatches":{"type":"integer","title":"Location Mismatches"},"missing_assets":{"items":{"$ref":"#/components/schemas/AuditMissingAsset"},"type":"array","title":"Missing Assets","default":[]},"unexpected_assets":{"items":{},"type":"array","title":"Unexpected Assets","default":[]},"discrepancies":{"items":{"$ref":"#/components/schemas/AuditDiscrepancy"},"type":"array","title":"Discrepancies","default":[]},"scanned_assets":{"items":{"$ref":"#/components/schemas/AuditScannedAsset"},"type":"array","title":"Scanned Assets","default":[]}},"type":"object","required":["session_id","session_name","status","location_name","auditor_name","started_at","completed_at","duration_minutes","expected_count","scanned_count","missing_count","unexpected_count","discrepancy_count","progress_percent","condition_breakdown","location_mismatches"],"title":"AuditReportFull","description":"Full audit report with details."},"AuditScannedAsset":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_tag":{"type":"string","title":"Asset Tag"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"condition":{"type":"string","title":"Condition"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name"},"scanned_at":{"type":"string","format":"date-time","title":"Scanned At"}},"type":"object","required":["asset_id","asset_tag","name","serial","condition","location_name","scanned_at"],"title":"AuditScannedAsset","description":"Scanned asset in audit report."},"AuditSessionCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"include_child_locations":{"type":"boolean","title":"Include Child Locations","default":true},"auditor_id":{"type":"string","format":"uuid","title":"Auditor Id"},"scheduled_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","auditor_id"],"title":"AuditSessionCreate","description":"Schema for creating an audit session."},"AuditSessionReadWithRelations":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"scheduled_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Date"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"include_child_locations":{"type":"boolean","title":"Include Child Locations"},"auditor_id":{"type":"string","format":"uuid","title":"Auditor Id"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"expected_count":{"type":"integer","title":"Expected Count"},"scanned_count":{"type":"integer","title":"Scanned Count"},"missing_count":{"type":"integer","title":"Missing Count"},"unexpected_count":{"type":"integer","title":"Unexpected Count"},"location":{"anyOf":[{},{"type":"null"}],"title":"Location"},"auditor":{"anyOf":[{},{"type":"null"}],"title":"Auditor"},"created_by":{"anyOf":[{},{"type":"null"}],"title":"Created By"},"progress_percent":{"type":"number","title":"Progress Percent","default":0.0}},"type":"object","required":["name","id","organization_id","location_id","include_child_locations","auditor_id","created_by_id","status","created_at","started_at","completed_at","expected_count","scanned_count","missing_count","unexpected_count"],"title":"AuditSessionReadWithRelations","description":"Audit session with expanded relations."},"AuditSessionUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"auditor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Auditor Id"},"scheduled_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Date"}},"type":"object","title":"AuditSessionUpdate","description":"Schema for updating an audit session."},"AuditStats":{"properties":{"total_actions":{"type":"integer","title":"Total Actions","description":"Total number of audit log entries"},"unique_actors":{"type":"integer","title":"Unique Actors","description":"Number of unique users who performed actions"},"unique_organizations":{"type":"integer","title":"Unique Organizations","description":"Number of organizations with activity"},"actions_by_type":{"items":{"$ref":"#/components/schemas/ActionTypeCount"},"type":"array","title":"Actions By Type","description":"Breakdown of actions by type"},"actions_per_day":{"items":{"$ref":"#/components/schemas/DailyActionCount"},"type":"array","title":"Actions Per Day","description":"Actions grouped by day"},"top_actors":{"items":{"$ref":"#/components/schemas/TopActor"},"type":"array","title":"Top Actors","description":"Top 10 users by action count"},"actions_by_organization":{"items":{"$ref":"#/components/schemas/OrganizationActionCount"},"type":"array","title":"Actions By Organization","description":"Actions grouped by organization"},"date_range_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date Range Start","description":"Start of the analyzed date range"},"date_range_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date Range End","description":"End of the analyzed date range"}},"type":"object","required":["total_actions","unique_actors","unique_organizations"],"title":"AuditStats","description":"Statistics about audit logs."},"BillingInfo":{"properties":{"plan_name":{"type":"string","title":"Plan Name","description":"Display name of the subscription plan"},"plan_tier":{"type":"string","title":"Plan Tier","description":"Subscription tier (free, starter, professional)"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Subscription status"},"renews_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renews At","description":"Next renewal date ISO string"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ends At","description":"Subscription end date ISO string (for cancelled)"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email","description":"Billing email address"},"limits":{"$ref":"#/components/schemas/BillingLimits","description":"Plan limits"},"usage":{"$ref":"#/components/schemas/BillingUsage","description":"Current usage"},"has_billing_portal":{"type":"boolean","title":"Has Billing Portal","description":"Whether the organization has a billing portal linked","default":false},"portal_is_presigned":{"type":"boolean","title":"Portal Is Presigned","description":"Whether the portal URL is pre-authenticated (True if API fetched a customer_portal URL)","default":false}},"type":"object","required":["plan_name","plan_tier","status","renews_at","ends_at","billing_email","limits","usage"],"title":"BillingInfo","description":"Billing information for the organization."},"BillingLimits":{"properties":{"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users","description":"Maximum users (null = unlimited)"},"max_admins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Admins","description":"Maximum admin users (null = unlimited)"},"max_total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Items","description":"Maximum total items - unified limit (null = unlimited)"},"max_custom_fields":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Custom Fields","description":"Maximum custom field definitions (null = unlimited)"},"max_storage_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Storage Mb","description":"Maximum storage in MB (null = unlimited)"}},"type":"object","required":["max_users","max_admins","max_total_items","max_custom_fields","max_storage_mb"],"title":"BillingLimits","description":"Subscription plan limits with unified items."},"BillingUsage":{"properties":{"users":{"type":"integer","title":"Users","description":"Current user count"},"users_breakdown":{"anyOf":[{"$ref":"#/components/schemas/UserUsageBreakdown"},{"type":"null"}],"description":"Optional breakdown of users by role"},"total_items":{"type":"integer","title":"Total Items","description":"Current total item count (unified)"},"items_breakdown":{"anyOf":[{"$ref":"#/components/schemas/ItemUsageBreakdown"},{"type":"null"}],"description":"Optional breakdown of items by type"},"storage_used_mb":{"type":"integer","title":"Storage Used Mb","description":"Current storage used in MB"}},"type":"object","required":["users","total_items","storage_used_mb"],"title":"BillingUsage","description":"Current usage statistics for billing with unified items."},"Body_import-import_accessories":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_accessories"},"Body_import-import_assets":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_assets"},"Body_import-import_categories":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_categories"},"Body_import-import_components":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_components"},"Body_import-import_consumables":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_consumables"},"Body_import-import_licenses":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_licenses"},"Body_import-import_migration":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Multiple CSV files or a ZIP"}},"type":"object","required":["files"],"title":"Body_import-import_migration"},"Body_import-import_models":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_models"},"Body_import-import_users":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import-import_users"},"Body_kits-return_deployment":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"Body_kits-return_deployment"},"Body_labels-upload_logo":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Logo image file (PNG, JPG, or SVG)"}},"type":"object","required":["file"],"title":"Body_labels-upload_logo"},"Body_organizations-upload_current_organization_logo":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Logo image (PNG or JPEG, max 2MB)"}},"type":"object","required":["file"],"title":"Body_organizations-upload_current_organization_logo"},"Body_organizations-upload_organization_logo":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Logo image (PNG or JPEG, max 2MB)"}},"type":"object","required":["file"],"title":"Body_organizations-upload_organization_logo"},"Body_saml-authentication-assertion_consumer_service":{"properties":{"SAMLResponse":{"type":"string","title":"Samlresponse"},"RelayState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relaystate"}},"type":"object","required":["SAMLResponse"],"title":"Body_saml-authentication-assertion_consumer_service"},"BulkAccessoryLabelRequest":{"properties":{"accessory_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Accessory Ids"},"template":{"type":"string","title":"Template","description":"Label template ID","default":"DK-11202"},"code_type":{"type":"string","title":"Code Type","description":"Code type: qr or code128","default":"qr"},"include_serial":{"type":"boolean","title":"Include Serial","description":"Include serial number","default":true},"include_model":{"type":"boolean","title":"Include Model","description":"Include model name","default":true}},"type":"object","required":["accessory_ids"],"title":"BulkAccessoryLabelRequest","description":"Request schema for bulk accessory label generation."},"BulkCheckinRequest":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Asset Ids"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"}},"type":"object","required":["asset_ids"],"title":"BulkCheckinRequest","description":"Request schema for bulk checkin operations."},"BulkCheckoutRequest":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Asset Ids"},"assigned_to_id":{"type":"string","format":"uuid","title":"Assigned To Id","description":"User to assign all assets to"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"},"expected_checkin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Checkin","description":"Expected return date"}},"type":"object","required":["asset_ids","assigned_to_id"],"title":"BulkCheckoutRequest","description":"Request schema for bulk checkout operations."},"BulkConsumableLabelRequest":{"properties":{"consumable_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Consumable Ids"},"template":{"type":"string","title":"Template","description":"Label template ID","default":"DK-11202"},"code_type":{"type":"string","title":"Code Type","description":"Code type: qr or code128","default":"qr"},"include_serial":{"type":"boolean","title":"Include Serial","description":"Include serial number","default":true},"include_model":{"type":"boolean","title":"Include Model","description":"Include model name","default":true}},"type":"object","required":["consumable_ids"],"title":"BulkConsumableLabelRequest","description":"Request schema for bulk consumable label generation."},"BulkDeactivateRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"User Ids","description":"List of user IDs to deactivate (max 100)"},"reason":{"type":"string","maxLength":500,"minLength":10,"title":"Reason","description":"Reason for bulk deactivation","examples":["Organization offboarding","Security incident response"]},"notify_users":{"type":"boolean","title":"Notify Users","description":"Whether to send email notification to affected users","default":true}},"type":"object","required":["user_ids","reason"],"title":"BulkDeactivateRequest","description":"Request schema for bulk user deactivation."},"BulkDeactivateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"deactivated_count":{"type":"integer","title":"Deactivated Count"},"skipped_count":{"type":"integer","title":"Skipped Count"},"skipped_users":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped Users","description":"Users that were skipped (already inactive, last admin, etc.)"}},"type":"object","required":["success","message","deactivated_count","skipped_count"],"title":"BulkDeactivateResponse","description":"Response for bulk deactivation operation."},"BulkDeleteRequest":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Asset Ids"}},"type":"object","required":["asset_ids"],"title":"BulkDeleteRequest","description":"Request schema for bulk delete operations."},"BulkOperationResult":{"properties":{"success_count":{"type":"integer","title":"Success Count","description":"Number of successful operations"},"failure_count":{"type":"integer","title":"Failure Count","description":"Number of failed operations"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors","description":"Details of failures"}},"type":"object","required":["success_count","failure_count"],"title":"BulkOperationResult","description":"Result of a bulk operation.\n\nShared across: assets, licenses."},"BulkSeatAssignRequest":{"properties":{"license_id":{"type":"string","format":"uuid","title":"License Id","description":"License to assign seats from"},"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"User Ids","description":"User IDs to assign seats to (max 50)"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note","description":"Optional note for the assignment"}},"type":"object","required":["license_id","user_ids"],"title":"BulkSeatAssignRequest","description":"Request schema for bulk license seat assignment.","example":{"license_id":"550e8400-e29b-41d4-a716-446655440000","note":"Bulk assignment for new team members","user_ids":["550e8400-e29b-41d4-a716-446655440001","550e8400-e29b-41d4-a716-446655440002"]}},"BulkSeatReleaseRequest":{"properties":{"license_id":{"type":"string","format":"uuid","title":"License Id","description":"License to release seats from"},"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"User Ids","description":"User IDs to release seats from (max 50)"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note","description":"Optional note for the release"}},"type":"object","required":["license_id","user_ids"],"title":"BulkSeatReleaseRequest","description":"Request schema for bulk license seat release.","example":{"license_id":"550e8400-e29b-41d4-a716-446655440000","note":"Bulk release - team transition","user_ids":["550e8400-e29b-41d4-a716-446655440001","550e8400-e29b-41d4-a716-446655440002"]}},"BulkUpdateRequest":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Asset Ids"},"status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Status Id","description":"New status for all assets"},"model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id","description":"New model for all assets"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"New location for all assets"}},"type":"object","required":["asset_ids"],"title":"BulkUpdateRequest","description":"Request schema for bulk update operations.","example":{"asset_ids":["uuid1","uuid2","uuid3"],"location":"Building A, Floor 2","status_id":"status-uuid"}},"CampaignCount":{"properties":{"campaign":{"type":"string","title":"Campaign"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["campaign","count"],"title":"CampaignCount","description":"Count of prospects by campaign."},"CancelMaintenanceRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"CancelMaintenanceRequest","description":"Request body for cancelling maintenance."},"CategoryCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"category_type":{"type":"string","maxLength":50,"title":"Category Type","default":"asset"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"eula_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eula Text"},"require_acceptance":{"type":"boolean","title":"Require Acceptance","default":false},"use_default_eula":{"type":"boolean","title":"Use Default Eula","default":true}},"type":"object","required":["name"],"title":"CategoryCreate","description":"Schema for creating a category."},"CategoryRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"category_type":{"type":"string","maxLength":50,"title":"Category Type","default":"asset"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"eula_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eula Text"},"require_acceptance":{"type":"boolean","title":"Require Acceptance","default":false},"use_default_eula":{"type":"boolean","title":"Use Default Eula","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","id","organization_id","created_at","updated_at"],"title":"CategoryRead","description":"Schema for reading a category."},"CategoryReadWithCount":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"category_type":{"type":"string","maxLength":50,"title":"Category Type","default":"asset"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"eula_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eula Text"},"require_acceptance":{"type":"boolean","title":"Require Acceptance","default":false},"use_default_eula":{"type":"boolean","title":"Use Default Eula","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"asset_count":{"type":"integer","title":"Asset Count","default":0}},"type":"object","required":["name","id","organization_id","created_at","updated_at"],"title":"CategoryReadWithCount","description":"Category with asset count."},"CategoryUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"eula_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eula Text"},"require_acceptance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Acceptance"},"use_default_eula":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Default Eula"}},"type":"object","title":"CategoryUpdate","description":"Schema for updating a category."},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","minLength":1,"title":"Current Password","description":"Current password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password","description":"New password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest","description":"Schema for changing own password."},"CheckoutRequest":{"properties":{"plan_tier":{"type":"string","title":"Plan Tier","description":"Subscription tier to trial (starter, professional)","default":"professional"},"use_trial":{"type":"boolean","title":"Use Trial","description":"Whether to request a trial variant if eligible","default":true},"base_checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Checkout Url","description":"Optional base checkout URL to use for the trial link"}},"type":"object","title":"CheckoutRequest","description":"Request to generate a checkout URL."},"CheckoutResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"checkout_url":{"type":"string","title":"Checkout Url","description":"LemonSqueezy checkout URL to start the trial"},"plan_tier":{"type":"string","title":"Plan Tier","description":"Requested plan tier"}},"type":"object","required":["message","checkout_url","plan_tier"],"title":"CheckoutResponse","description":"Response for explicit checkout action."},"ClientRegistrationRequest":{"properties":{"client_name":{"type":"string","maxLength":255,"minLength":1,"title":"Client Name"},"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","title":"Token Endpoint Auth Method","default":"none"},"grant_types":{"items":{"type":"string"},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"scope":{"type":"string","title":"Scope","default":""},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Uri"}},"type":"object","required":["client_name","redirect_uris"],"title":"ClientRegistrationRequest","description":"RFC 7591 §2 registration request (JSON). Unknown fields are ignored."},"CommandCenterOverviewResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"window_days":{"type":"integer","minimum":1.0,"title":"Window Days"},"organizations_total":{"type":"integer","minimum":0.0,"title":"Organizations Total"},"organizations_active":{"type":"integer","minimum":0.0,"title":"Organizations Active"},"organizations_suspended":{"type":"integer","minimum":0.0,"title":"Organizations Suspended"},"queue":{"$ref":"#/components/schemas/QueueSummary"},"revenue_mrr_estimate_eur":{"type":"number","minimum":0.0,"title":"Revenue Mrr Estimate Eur"},"operations_webhook_failures_recent":{"type":"integer","minimum":0.0,"title":"Operations Webhook Failures Recent"},"security_auth_failures_window":{"type":"integer","minimum":0.0,"title":"Security Auth Failures Window"}},"type":"object","required":["generated_at","window_days","organizations_total","organizations_active","organizations_suspended","queue","revenue_mrr_estimate_eur","operations_webhook_failures_recent","security_auth_failures_window"],"title":"CommandCenterOverviewResponse","description":"Top-level command center overview metrics."},"CommandCenterSearchItem":{"properties":{"kind":{"$ref":"#/components/schemas/SearchResultKind"},"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"match_field":{"type":"string","title":"Match Field"}},"type":"object","required":["kind","id","title","match_field"],"title":"CommandCenterSearchItem","description":"One global search match for command center."},"CommandCenterSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"limit":{"type":"integer","minimum":1.0,"title":"Limit"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"items":{"items":{"$ref":"#/components/schemas/CommandCenterSearchItem"},"type":"array","title":"Items"}},"type":"object","required":["query","limit","total"],"title":"CommandCenterSearchResponse","description":"Search response payload."},"CompleteMaintenanceRequest":{"properties":{"cost":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"CompleteMaintenanceRequest","description":"Request body for completing maintenance."},"ComponentCheckinRequest":{"properties":{"quantity":{"type":"integer","minimum":1.0,"title":"Quantity","default":1},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ComponentCheckinRequest","description":"Schema for checking in component (uninstall)."},"ComponentCheckoutReadWithAsset":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"component_id":{"type":"string","format":"uuid","title":"Component Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"quantity":{"type":"integer","title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_permanent":{"type":"boolean","title":"Is Permanent"},"checkout_date":{"type":"string","format":"date-time","title":"Checkout Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"asset":{"anyOf":[{},{"type":"null"}],"title":"Asset"},"component":{"anyOf":[{"$ref":"#/components/schemas/ComponentRead"},{"type":"null"}]}},"type":"object","required":["id","component_id","asset_id","quantity","notes","is_permanent","checkout_date","created_at"],"title":"ComponentCheckoutReadWithAsset","description":"Checkout record with asset and component details."},"ComponentCheckoutRequest":{"properties":{"quantity":{"type":"integer","minimum":1.0,"title":"Quantity","default":1},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_permanent":{"type":"boolean","title":"Is Permanent","default":false}},"type":"object","required":["asset_id"],"title":"ComponentCheckoutRequest","description":"Schema for checking out component to asset."},"ComponentCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial","description":"Optional serial if tracking single high-value item"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","default":0},"minimum_stock_level":{"type":"integer","minimum":0.0,"title":"Minimum Stock Level","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","required":["name"],"title":"ComponentCreate","description":"Schema for creating a component."},"ComponentRead":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial","description":"Optional serial if tracking single high-value item"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","default":0},"minimum_stock_level":{"type":"integer","minimum":0.0,"title":"Minimum Stock Level","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["name","id","organization_id","category_id","location_id","purchase_date","custom_fields","created_at","updated_at"],"title":"ComponentRead","description":"Schema for reading a component."},"ComponentReadWithRelations":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"serial":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Serial","description":"Optional serial if tracking single high-value item"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","default":0},"minimum_stock_level":{"type":"integer","minimum":0.0,"title":"Minimum Stock Level","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"category":{"anyOf":[{},{"type":"null"}],"title":"Category"},"location_ref":{"anyOf":[{},{"type":"null"}],"title":"Location Ref"},"stock_status":{"type":"string","title":"Stock Status","default":"ok"},"needs_reorder":{"type":"boolean","title":"Needs Reorder","default":false},"total_checked_out":{"type":"integer","title":"Total Checked Out","default":0},"available_quantity":{"type":"integer","title":"Available Quantity","default":0}},"type":"object","required":["name","id","organization_id","category_id","location_id","purchase_date","custom_fields","created_at","updated_at"],"title":"ComponentReadWithRelations","description":"Component with full relation details."},"ComponentRestockRequest":{"properties":{"quantity":{"type":"integer","minimum":1.0,"title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["quantity"],"title":"ComponentRestockRequest","description":"Schema for adding stock."},"ComponentTypeCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"slug":{"type":"string","maxLength":100,"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["name","slug"],"title":"ComponentTypeCreate","description":"Schema for creating a component type."},"ComponentTypeRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"slug":{"type":"string","maxLength":100,"title":"Slug"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","slug","id","created_at","updated_at"],"title":"ComponentTypeRead","description":"Schema for reading a component type."},"ComponentTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"ComponentTypeUpdate","description":"Schema for updating a component type."},"ComponentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"},"minimum_stock_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Stock Level"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"ComponentUpdate","description":"Schema for updating a component."},"ConsentDecisionRequest":{"properties":{"remember":{"type":"boolean","title":"Remember","default":false}},"type":"object","title":"ConsentDecisionRequest"},"ConsumableAdjustRequest":{"properties":{"new_quantity":{"type":"integer","minimum":0.0,"title":"New Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["new_quantity"],"title":"ConsumableAdjustRequest","description":"Schema for manual stock adjustment."},"ConsumableCheckinRequest":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ConsumableCheckinRequest","description":"Schema for checking in consumable (return assigned items)."},"ConsumableCheckoutReadWithUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"consumable_id":{"type":"string","format":"uuid","title":"Consumable Id"},"assigned_to_id":{"type":"string","format":"uuid","title":"Assigned To Id"},"quantity":{"type":"integer","title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"checkout_date":{"type":"string","format":"date-time","title":"Checkout Date"},"expected_checkin":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Checkin"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"assigned_to":{"anyOf":[{},{"type":"null"}],"title":"Assigned To"}},"type":"object","required":["id","consumable_id","assigned_to_id","quantity","notes","checkout_date","expected_checkin","created_at"],"title":"ConsumableCheckoutReadWithUser","description":"Checkout record with user details."},"ConsumableCheckoutRequest":{"properties":{"quantity":{"type":"integer","minimum":1.0,"title":"Quantity"},"assigned_to_id":{"type":"string","format":"uuid","title":"Assigned To Id"},"expected_checkin":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Checkin"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["quantity","assigned_to_id"],"title":"ConsumableCheckoutRequest","description":"Schema for checking out consumable to user (returnable)."},"ConsumableConsumeRequest":{"properties":{"quantity":{"type":"integer","minimum":1.0,"title":"Quantity"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["quantity"],"title":"ConsumableConsumeRequest","description":"Schema for consuming stock (permanent decrement)."},"ConsumableCountStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of consumables"},"low_stock":{"type":"integer","title":"Low Stock","description":"Number of low stock items"},"out_of_stock":{"type":"integer","title":"Out Of Stock","description":"Number of out of stock items"}},"type":"object","required":["total","low_stock","out_of_stock"],"title":"ConsumableCountStats","description":"Statistics for consumable counts."},"ConsumableCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","default":0},"minimum_stock_level":{"type":"integer","minimum":0.0,"title":"Minimum Stock Level","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"requestable":{"type":"boolean","title":"Requestable","default":false},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","required":["name"],"title":"ConsumableCreate","description":"Schema for creating a consumable."},"ConsumableRead":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","default":0},"minimum_stock_level":{"type":"integer","minimum":0.0,"title":"Minimum Stock Level","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"requestable":{"type":"boolean","title":"Requestable","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["name","id","organization_id","category_id","location_id","purchase_date","custom_fields","created_at","updated_at"],"title":"ConsumableRead","description":"Schema for reading a consumable."},"ConsumableReadWithRelations":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","default":0},"minimum_stock_level":{"type":"integer","minimum":0.0,"title":"Minimum Stock Level","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Image Url"},"requestable":{"type":"boolean","title":"Requestable","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"category":{"anyOf":[{},{"type":"null"}],"title":"Category"},"location_ref":{"anyOf":[{},{"type":"null"}],"title":"Location Ref"},"stock_status":{"type":"string","title":"Stock Status","default":"ok"},"needs_reorder":{"type":"boolean","title":"Needs Reorder","default":false},"total_checked_out":{"type":"integer","title":"Total Checked Out","default":0},"available_quantity":{"type":"integer","title":"Available Quantity","default":0}},"type":"object","required":["name","id","organization_id","category_id","location_id","purchase_date","custom_fields","created_at","updated_at"],"title":"ConsumableReadWithRelations","description":"Consumable with full relation details."},"ConsumableRestockRequest":{"properties":{"quantity":{"type":"integer","minimum":1.0,"title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["quantity"],"title":"ConsumableRestockRequest","description":"Schema for adding stock."},"ConsumableUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Number"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"},"minimum_stock_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Stock Level"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"requestable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requestable"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"ConsumableUpdate","description":"Schema for updating a consumable."},"CreditBalance":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"total_credits_cents":{"type":"integer","title":"Total Credits Cents","description":"Total available credits in cents"},"currency":{"type":"string","title":"Currency","default":"EUR"},"pending_credits":{"type":"integer","title":"Pending Credits","description":"Number of unapplied credit entries"},"expiring_soon_cents":{"type":"integer","title":"Expiring Soon Cents","description":"Credits expiring within 30 days in cents"}},"type":"object","required":["organization_id","total_credits_cents","pending_credits","expiring_soon_cents"],"title":"CreditBalance","description":"Credit balance summary for an organization."},"CreditCreate":{"properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents","description":"Amount in cents (must be positive for new credits)"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"EUR"},"description":{"type":"string","maxLength":500,"minLength":1,"title":"Description"},"credit_type":{"type":"string","title":"Credit Type"},"reference_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Reference Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["amount_cents","description","credit_type"],"title":"CreditCreate","description":"Schema for creating a credit."},"CreditHistory":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"balance":{"$ref":"#/components/schemas/CreditBalance"},"credits":{"items":{"$ref":"#/components/schemas/CreditRead"},"type":"array","title":"Credits"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["organization_id","balance","credits","total","page","page_size"],"title":"CreditHistory","description":"Credit history response with summary."},"CreditRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"description":{"type":"string","title":"Description"},"credit_type":{"type":"string","title":"Credit Type"},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Id"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/app__models__organization_credit__UserInfo"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_applied":{"type":"boolean","title":"Is Applied"},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At"},"applied_to_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied To Invoice Id"},"is_voided":{"type":"boolean","title":"Is Voided"},"voided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Voided At"},"voided_by":{"anyOf":[{"$ref":"#/components/schemas/app__models__organization_credit__UserInfo"},{"type":"null"}]},"voided_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voided Reason"}},"type":"object","required":["id","organization_id","amount_cents","currency","description","credit_type","reference_id","created_by_id","created_at","expires_at","is_applied","applied_at","applied_to_invoice_id","is_voided","voided_at","voided_reason"],"title":"CreditRead","description":"Schema for reading credit data."},"CreditVoid":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"CreditVoid","description":"Schema for voiding a credit."},"CustomFieldCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"field_key":{"type":"string","maxLength":50,"minLength":1,"title":"Field Key"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"entity_type":{"type":"string","maxLength":20,"title":"Entity Type","default":"asset"},"required":{"type":"boolean","title":"Required","default":false},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"placeholder":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Placeholder"},"display_order":{"type":"integer","title":"Display Order","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true},"options":{"additionalProperties":true,"type":"object","title":"Options"}},"type":"object","required":["name","field_key","category_id"],"title":"CustomFieldCreate","description":"Schema for creating a custom field definition."},"CustomFieldRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Display name shown to users"},"field_key":{"type":"string","maxLength":50,"title":"Field Key","description":"JSON key used for storage (e.g., 'purchase_order_number')"},"field_type":{"$ref":"#/components/schemas/FieldType","description":"Type of field determining input and validation","default":"text"},"entity_type":{"type":"string","maxLength":20,"title":"Entity Type","description":"Entity type this field applies to (asset/license/consumable/accessory)","default":"asset"},"required":{"type":"boolean","title":"Required","description":"Whether field is required","default":false},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Help text shown to users"},"placeholder":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Placeholder","description":"Placeholder text for input fields"},"display_order":{"type":"integer","title":"Display Order","description":"Order in which field appears in forms","default":0},"is_active":{"type":"boolean","title":"Is Active","description":"Whether field is currently active and shown","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","field_key","id","organization_id","category_id","options","created_at","updated_at"],"title":"CustomFieldRead","description":"Schema for reading a custom field definition."},"CustomFieldReadWithCategory":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Display name shown to users"},"field_key":{"type":"string","maxLength":50,"title":"Field Key","description":"JSON key used for storage (e.g., 'purchase_order_number')"},"field_type":{"$ref":"#/components/schemas/FieldType","description":"Type of field determining input and validation","default":"text"},"entity_type":{"type":"string","maxLength":20,"title":"Entity Type","description":"Entity type this field applies to (asset/license/consumable/accessory)","default":"asset"},"required":{"type":"boolean","title":"Required","description":"Whether field is required","default":false},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Help text shown to users"},"placeholder":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Placeholder","description":"Placeholder text for input fields"},"display_order":{"type":"integer","title":"Display Order","description":"Order in which field appears in forms","default":0},"is_active":{"type":"boolean","title":"Is Active","description":"Whether field is currently active and shown","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"category_id":{"type":"string","format":"uuid","title":"Category Id"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"}},"type":"object","required":["name","field_key","id","organization_id","category_id","options","created_at","updated_at"],"title":"CustomFieldReadWithCategory","description":"Custom field definition with category name for display."},"CustomFieldUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"field_key":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Field Key"},"field_type":{"anyOf":[{"$ref":"#/components/schemas/FieldType"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"entity_type":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Entity Type"},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"placeholder":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Placeholder"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Options"}},"type":"object","title":"CustomFieldUpdate","description":"Schema for updating a custom field definition."},"CustomerHealthStatus":{"type":"string","enum":["healthy","warning","critical"],"title":"CustomerHealthStatus","description":"Health status for customer accounts."},"CustomersHealthItem":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"organization_slug":{"type":"string","title":"Organization Slug"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"is_active":{"type":"boolean","title":"Is Active"},"is_suspended":{"type":"boolean","title":"Is Suspended"},"health_status":{"$ref":"#/components/schemas/CustomerHealthStatus"},"health_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Health Score"},"reasons":{"items":{"$ref":"#/components/schemas/QueueRuleKey"},"type":"array","title":"Reasons"},"user_usage_percent":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"User Usage Percent"},"item_usage_percent":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Item Usage Percent"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["organization_id","organization_name","organization_slug","subscription_tier","is_active","is_suspended","health_status","health_score"],"title":"CustomersHealthItem","description":"One customer health row."},"CustomersHealthResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"data":{"items":{"$ref":"#/components/schemas/CustomersHealthItem"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"summary":{"$ref":"#/components/schemas/CustomersHealthSummary"}},"type":"object","required":["generated_at","meta","summary"],"title":"CustomersHealthResponse","description":"Paginated customers health response."},"CustomersHealthSummary":{"properties":{"healthy":{"type":"integer","minimum":0.0,"title":"Healthy"},"warning":{"type":"integer","minimum":0.0,"title":"Warning"},"critical":{"type":"integer","minimum":0.0,"title":"Critical"}},"type":"object","required":["healthy","warning","critical"],"title":"CustomersHealthSummary","description":"Aggregate health breakdown."},"CustomersQueueItem":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"organization_slug":{"type":"string","title":"Organization Slug"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"is_active":{"type":"boolean","title":"Is Active"},"is_suspended":{"type":"boolean","title":"Is Suspended"},"priority_reason":{"$ref":"#/components/schemas/QueueRuleKey"},"triggered_reasons":{"items":{"$ref":"#/components/schemas/QueueRuleKey"},"type":"array","title":"Triggered Reasons"},"priority_rank":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Priority Rank"},"trial_days_remaining":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Trial Days Remaining"},"active_users":{"type":"integer","minimum":0.0,"title":"Active Users"},"user_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"User Limit"},"user_usage_percent":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"User Usage Percent"},"total_items":{"type":"integer","minimum":0.0,"title":"Total Items"},"item_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Item Limit"},"item_usage_percent":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Item Usage Percent"},"webhook_failures_recent":{"type":"integer","minimum":0.0,"title":"Webhook Failures Recent"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["organization_id","organization_name","organization_slug","subscription_tier","is_active","is_suspended","priority_reason","priority_rank","active_users","total_items","webhook_failures_recent"],"title":"CustomersQueueItem","description":"One customer item in action queue."},"CustomersQueueResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"data":{"items":{"$ref":"#/components/schemas/CustomersQueueItem"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"rule_totals":{"items":{"$ref":"#/components/schemas/QueueRuleCount"},"type":"array","title":"Rule Totals"}},"type":"object","required":["generated_at","meta"],"title":"CustomersQueueResponse","description":"Paginated customer queue payload."},"DailyActionCount":{"properties":{"date":{"type":"string","title":"Date","description":"Date in YYYY-MM-DD format"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["date","count"],"title":"DailyActionCount","description":"Daily action count."},"DailyActivationPoint":{"properties":{"date":{"type":"string","title":"Date","description":"ISO date"},"orgs":{"type":"integer","minimum":0.0,"title":"Orgs","description":"Distinct organizations with agent activity that day"}},"type":"object","required":["date","orgs"],"title":"DailyActivationPoint"},"DashboardAssetStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of assets"},"deployed":{"type":"integer","title":"Deployed","description":"Number of deployed assets"},"available":{"type":"integer","title":"Available","description":"Number of available (deployable) assets"},"pending":{"type":"integer","title":"Pending","description":"Number of pending assets"},"undeployable":{"type":"integer","title":"Undeployable","description":"Number of undeployable assets"},"total_value":{"type":"number","title":"Total Value","description":"Total value of all assets"},"by_status":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Status","description":"Asset counts grouped by status"}},"type":"object","required":["total","deployed","available","pending","undeployable","total_value","by_status"],"title":"DashboardAssetStats","description":"Asset statistics for dashboard."},"DashboardConfigRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"layout_preset":{"type":"string","title":"Layout Preset"},"widget_order":{"items":{"type":"string"},"type":"array","title":"Widget Order"},"hidden_widgets":{"items":{"type":"string"},"type":"array","title":"Hidden Widgets"},"widget_settings":{"additionalProperties":true,"type":"object","title":"Widget Settings"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","layout_preset","widget_order","hidden_widgets","widget_settings","created_at","updated_at"],"title":"DashboardConfigRead","description":"Schema for reading a dashboard configuration."},"DashboardConfigUpdate":{"properties":{"layout_preset":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Layout Preset"},"widget_order":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Widget Order"},"hidden_widgets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hidden Widgets"},"widget_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Widget Settings"}},"type":"object","title":"DashboardConfigUpdate","description":"Schema for updating a dashboard configuration."},"DashboardExpiringItems":{"properties":{"expiring_warranties":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Expiring Warranties","description":"Assets with expiring warranties"},"expiring_licenses":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Expiring Licenses","description":"Licenses expiring soon"},"low_stock_consumables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Low Stock Consumables","description":"Consumables low in stock"}},"type":"object","required":["expiring_warranties","expiring_licenses","low_stock_consumables"],"title":"DashboardExpiringItems","description":"Items expiring soon."},"DashboardLicenseStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of licenses"},"used_seats":{"type":"integer","title":"Used Seats","description":"Number of assigned license seats"},"available_seats":{"type":"integer","title":"Available Seats","description":"Number of available license seats"}},"type":"object","required":["total","used_seats","available_seats"],"title":"DashboardLicenseStats","description":"License statistics for dashboard."},"DashboardStats":{"properties":{"assets":{"$ref":"#/components/schemas/DashboardAssetStats"},"licenses":{"$ref":"#/components/schemas/DashboardLicenseStats"},"users":{"$ref":"#/components/schemas/DashboardUserStats"},"consumables":{"additionalProperties":true,"type":"object","title":"Consumables","description":"Consumable statistics"},"accessories":{"additionalProperties":true,"type":"object","title":"Accessories","description":"Accessory statistics"},"components":{"additionalProperties":true,"type":"object","title":"Components","description":"Hardware component statistics"},"kits":{"additionalProperties":true,"type":"object","title":"Kits","description":"Asset kit statistics"},"by_category":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Category","description":"Asset counts by category"},"top_models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Models","description":"Top 10 asset models"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"Timestamp when stats were generated"}},"type":"object","required":["assets","licenses","users","consumables","accessories","components","kits","by_category","top_models","generated_at"],"title":"DashboardStats","description":"Full dashboard statistics response."},"DashboardSummary":{"properties":{"quick_stats":{"$ref":"#/components/schemas/DashboardSummaryQuickStats"},"alerts":{"$ref":"#/components/schemas/DashboardSummaryAlerts"},"recent_activity":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Activity"},"has_more_activity":{"type":"boolean","title":"Has More Activity"},"expiring_soon":{"$ref":"#/components/schemas/DashboardSummaryExpiringSoon"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["quick_stats","alerts","recent_activity","has_more_activity","expiring_soon","generated_at"],"title":"DashboardSummary","description":"Compact dashboard summary response."},"DashboardSummaryAlerts":{"properties":{"expiring_warranties":{"type":"integer","title":"Expiring Warranties"},"expiring_licenses":{"type":"integer","title":"Expiring Licenses"},"undeployable_assets":{"type":"integer","title":"Undeployable Assets"},"pending_assets":{"type":"integer","title":"Pending Assets"},"low_stock_consumables":{"type":"integer","title":"Low Stock Consumables"},"low_stock_components":{"type":"integer","title":"Low Stock Components"}},"type":"object","required":["expiring_warranties","expiring_licenses","undeployable_assets","pending_assets","low_stock_consumables","low_stock_components"],"title":"DashboardSummaryAlerts","description":"Alert counts for dashboard summary."},"DashboardSummaryExpiringSoon":{"properties":{"expiring_warranties":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Expiring Warranties"},"expiring_licenses":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Expiring Licenses"}},"type":"object","required":["expiring_warranties","expiring_licenses"],"title":"DashboardSummaryExpiringSoon","description":"Preview of items expiring soon."},"DashboardSummaryQuickStats":{"properties":{"total_assets":{"type":"integer","title":"Total Assets"},"deployed_assets":{"type":"integer","title":"Deployed Assets"},"available_assets":{"type":"integer","title":"Available Assets"},"total_value":{"type":"number","title":"Total Value"},"total_licenses":{"type":"integer","title":"Total Licenses"},"license_seats_used":{"type":"integer","title":"License Seats Used"},"license_seats_available":{"type":"integer","title":"License Seats Available"},"active_users":{"type":"integer","title":"Active Users"},"total_consumables":{"type":"integer","title":"Total Consumables"},"total_accessories":{"type":"integer","title":"Total Accessories"},"total_components":{"type":"integer","title":"Total Components"},"total_kits":{"type":"integer","title":"Total Kits"}},"type":"object","required":["total_assets","deployed_assets","available_assets","total_value","total_licenses","license_seats_used","license_seats_available","active_users","total_consumables","total_accessories","total_components","total_kits"],"title":"DashboardSummaryQuickStats","description":"Quick statistics for dashboard summary."},"DashboardUserStats":{"properties":{"active":{"type":"integer","title":"Active","description":"Number of active users"}},"type":"object","required":["active"],"title":"DashboardUserStats","description":"User statistics for dashboard."},"DemoProspectCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","title":"Name"},"company":{"type":"string","title":"Company"},"team_size":{"type":"string","title":"Team Size"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"}},"type":"object","required":["email","name","company","team_size"],"title":"DemoProspectCreate","description":"Schema for creating a demo prospect from website."},"DemoProspectStats":{"properties":{"total_prospects":{"type":"integer","title":"Total Prospects","description":"Total number of demo prospects"},"logged_in_count":{"type":"integer","title":"Logged In Count","description":"Number of prospects who logged in at least once"},"logged_in_percentage":{"type":"number","title":"Logged In Percentage","description":"Percentage of prospects who logged in"},"avg_session_duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Session Duration Minutes","description":"Average session duration in minutes (first login to last activity)"},"most_active_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Most Active Company","description":"Company with most activities"},"most_active_company_activities":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Most Active Company Activities","description":"Activity count for most active company"},"total_logins":{"type":"integer","title":"Total Logins","description":"Total number of logins across all sessions"},"unique_visitors_today":{"type":"integer","title":"Unique Visitors Today","description":"Unique prospects who logged in today"},"avg_activities_per_session":{"type":"number","title":"Avg Activities Per Session","description":"Average number of activities per session","default":0.0},"popular_features":{"items":{"$ref":"#/components/schemas/FeatureCount"},"type":"array","title":"Popular Features","description":"Top 5 most used features"},"prospects_by_utm_source":{"items":{"$ref":"#/components/schemas/UTMSourceCount"},"type":"array","title":"Prospects By Utm Source","description":"Prospects grouped by UTM source"},"prospects_by_campaign":{"items":{"$ref":"#/components/schemas/CampaignCount"},"type":"array","title":"Prospects By Campaign","description":"Prospects grouped by campaign"},"team_size_distribution":{"items":{"$ref":"#/components/schemas/TeamSizeCount"},"type":"array","title":"Team Size Distribution","description":"Prospects grouped by team size"}},"type":"object","required":["total_prospects","logged_in_count","logged_in_percentage","total_logins","unique_visitors_today"],"title":"DemoProspectStats","description":"Comprehensive statistics for demo prospect tracking."},"DepartmentCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name"],"title":"DepartmentCreate","description":"Schema for creating a department."},"DepartmentInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"DepartmentInfo","description":"Minimal department info for embedding in user responses."},"DepartmentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"user_count":{"type":"integer","title":"User Count","default":0},"children_count":{"type":"integer","title":"Children Count","default":0},"full_path":{"type":"string","title":"Full Path","default":""}},"type":"object","required":["id","organization_id","name","parent_id","manager_id","location_id","notes","created_at","updated_at"],"title":"DepartmentRead","description":"Schema for reading a department."},"DepartmentTree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"user_count":{"type":"integer","title":"User Count","default":0},"children_count":{"type":"integer","title":"Children Count","default":0},"children":{"items":{"$ref":"#/components/schemas/DepartmentTree"},"type":"array","title":"Children","default":[]}},"type":"object","required":["id","name","parent_id","manager_id","location_id"],"title":"DepartmentTree","description":"Schema for department tree display."},"DepartmentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"DepartmentUpdate","description":"Schema for updating a department."},"DuplicateKitRequest":{"properties":{"new_name":{"type":"string","maxLength":255,"minLength":1,"title":"New Name"}},"type":"object","required":["new_name"],"title":"DuplicateKitRequest","description":"Schema for duplicating a kit."},"EmailConfigStatus":{"properties":{"is_configured":{"type":"boolean","title":"Is Configured","description":"Whether any email provider is configured"},"provider":{"type":"string","title":"Provider","description":"Active email provider (resend, smtp, or none)"},"resend_configured":{"type":"boolean","title":"Resend Configured","description":"Whether Resend API is configured"},"smtp_configured":{"type":"boolean","title":"Smtp Configured","description":"Whether SMTP is configured"}},"type":"object","required":["is_configured","provider","resend_configured","smtp_configured"],"title":"EmailConfigStatus","description":"Response schema for email configuration status."},"ExpiringLicenseEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"},"seats":{"type":"integer","title":"Seats"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"}},"type":"object","required":["id","name","seats"],"title":"ExpiringLicenseEntry","description":"A license that is expiring soon."},"ExportJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Export job ID"},"status":{"type":"string","title":"Status","description":"Job status: pending, processing, completed, failed"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["job_id","status","message"],"title":"ExportJobResponse","description":"Response schema for async export job."},"ExportRequest":{"properties":{"format":{"type":"string","title":"Format","description":"Export format: json or csv","default":"json"},"include_deleted":{"type":"boolean","title":"Include Deleted","description":"Include soft-deleted items","default":false}},"type":"object","title":"ExportRequest","description":"Request schema for data export."},"ExportStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"progress":{"type":"integer","title":"Progress","description":"Progress percentage (0-100)"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status","progress","created_at","completed_at","file_size","error"],"title":"ExportStatusResponse","description":"Response schema for export status check."},"FeatureCount":{"properties":{"feature":{"type":"string","title":"Feature"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["feature","count"],"title":"FeatureCount","description":"Count of activities by feature/type."},"FeatureFlagUpdate":{"properties":{"value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Value","description":"Set to True/False to enable/disable the feature, or null to remove the override and fall back to plan default"}},"type":"object","title":"FeatureFlagUpdate","description":"Request body for updating a single feature flag via path-based endpoint."},"FeatureOverrideUpdate":{"properties":{"feature_key":{"type":"string","maxLength":100,"minLength":1,"title":"Feature Key","description":"Feature key to update","examples":["custom_fields","api_access","sso_oidc"]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Set to True/False to enable/disable, or None to remove the override"}},"type":"object","required":["feature_key","enabled"],"title":"FeatureOverrideUpdate","description":"Request to update a single feature override."},"FeatureStatus":{"properties":{"key":{"type":"string","title":"Key","description":"Feature key identifier"},"description":{"type":"string","title":"Description","description":"Human-readable feature description"},"plan_value":{"type":"boolean","title":"Plan Value","description":"Value from subscription plan"},"override_value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Override Value","description":"Per-organization override (None if not set)"},"effective_value":{"type":"boolean","title":"Effective Value","description":"Final computed value (override takes precedence)"},"source":{"type":"string","title":"Source","description":"Source of effective value: 'plan' or 'override'"}},"type":"object","required":["key","description","plan_value","override_value","effective_value","source"],"title":"FeatureStatus","description":"Feature status with plan value, override, and effective value."},"FieldType":{"type":"string","enum":["text","textarea","number","date","dropdown","checkbox","url","email"],"title":"FieldType","description":"Types of custom fields that can be defined."},"FilterOptions":{"properties":{"utm_sources":{"items":{"type":"string"},"type":"array","title":"Utm Sources"},"utm_campaigns":{"items":{"type":"string"},"type":"array","title":"Utm Campaigns"},"team_sizes":{"items":{"type":"string"},"type":"array","title":"Team Sizes"},"activity_types":{"items":{"type":"string"},"type":"array","title":"Activity Types"}},"type":"object","required":["utm_sources","utm_campaigns","team_sizes","activity_types"],"title":"FilterOptions","description":"Available filter options for the UI."},"FreemiumCleanupCandidateResponse":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"organization_slug":{"type":"string","title":"Organization Slug"},"classification":{"type":"string","enum":["free_inactive_empty_6m_candidates","free_inactive_used_12m_candidates"],"title":"Classification"},"inactivity_days":{"type":"integer","title":"Inactivity Days"},"total_records":{"type":"integer","title":"Total Records"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"}},"type":"object","required":["organization_id","organization_name","organization_slug","classification","inactivity_days","total_records","last_activity_at"],"title":"FreemiumCleanupCandidateResponse","description":"One freemium cleanup candidate row for superadmin actions."},"FreemiumCleanupStatusResponse":{"properties":{"free_inactive_empty_6m_candidates":{"type":"integer","title":"Free Inactive Empty 6M Candidates","default":0},"free_inactive_used_12m_candidates":{"type":"integer","title":"Free Inactive Used 12M Candidates","default":0},"reminders_queued":{"type":"integer","title":"Reminders Queued","default":0},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"}},"type":"object","title":"FreemiumCleanupStatusResponse","description":"Freemium cleanup status summary for superadmin cards."},"FreemiumGuardrailStats":{"properties":{"free_inactive_empty_6m_candidates":{"type":"integer","title":"Free Inactive Empty 6M Candidates","default":0},"free_inactive_used_12m_candidates":{"type":"integer","title":"Free Inactive Used 12M Candidates","default":0},"free_org_cost_pressure_score":{"type":"number","title":"Free Org Cost Pressure Score","default":0.0},"free_activation_below_threshold":{"type":"boolean","title":"Free Activation Below Threshold","default":false},"conversion_below_threshold":{"type":"boolean","title":"Conversion Below Threshold","default":false}},"type":"object","title":"FreemiumGuardrailStats","description":"Freemium advisory guardrail metrics (recommendation-only)."},"FreemiumKPIStats":{"properties":{"free_orgs_total":{"type":"integer","title":"Free Orgs Total","default":0},"free_orgs_activated_30d":{"type":"integer","title":"Free Orgs Activated 30D","default":0},"free_activation_rate_30d":{"type":"number","title":"Free Activation Rate 30D","default":0.0},"free_to_paid_conversion_rate_30d":{"type":"number","title":"Free To Paid Conversion Rate 30D","default":0.0},"free_to_trial_start_rate_30d":{"type":"number","title":"Free To Trial Start Rate 30D","default":0.0},"trial_to_paid_conversion_rate_30d":{"type":"number","title":"Trial To Paid Conversion Rate 30D","default":0.0},"monthly_recurring_revenue_eur":{"type":"number","title":"Monthly Recurring Revenue Eur","default":0.0},"churn_rate_30d":{"type":"number","title":"Churn Rate 30D","default":0.0}},"type":"object","title":"FreemiumKPIStats","description":"Freemium KPI metrics (backend-owned stable keys)."},"FreemiumMetricsResponse":{"properties":{"free_orgs_total":{"type":"integer","title":"Free Orgs Total","default":0},"free_orgs_activated_30d":{"type":"integer","title":"Free Orgs Activated 30D","default":0},"free_activation_rate_30d":{"type":"number","title":"Free Activation Rate 30D","default":0.0},"free_to_paid_conversion_rate_30d":{"type":"number","title":"Free To Paid Conversion Rate 30D","default":0.0},"free_to_trial_start_rate_30d":{"type":"number","title":"Free To Trial Start Rate 30D","default":0.0},"trial_to_paid_conversion_rate_30d":{"type":"number","title":"Trial To Paid Conversion Rate 30D","default":0.0},"monthly_recurring_revenue_eur":{"type":"number","title":"Monthly Recurring Revenue Eur","default":0.0},"churn_rate_30d":{"type":"number","title":"Churn Rate 30D","default":0.0},"free_inactive_empty_6m_candidates":{"type":"integer","title":"Free Inactive Empty 6M Candidates","default":0},"free_inactive_used_12m_candidates":{"type":"integer","title":"Free Inactive Used 12M Candidates","default":0},"free_org_cost_pressure_score":{"type":"number","title":"Free Org Cost Pressure Score","default":0.0},"free_activation_below_threshold":{"type":"boolean","title":"Free Activation Below Threshold","default":false},"conversion_below_threshold":{"type":"boolean","title":"Conversion Below Threshold","default":false}},"type":"object","title":"FreemiumMetricsResponse","description":"Flattened KPI + guardrail payload for freemium dashboard widgets."},"GDPRDataExport":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"type":"string","title":"Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"organization_name":{"type":"string","title":"Organization Name"},"assets_assigned":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Assets Assigned"},"licenses_assigned":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Licenses Assigned"},"activity_count":{"type":"integer","title":"Activity Count"},"export_generated_at":{"type":"string","format":"date-time","title":"Export Generated At"}},"type":"object","required":["user_id","email","full_name","role","created_at","last_login","department_name","organization_name","assets_assigned","licenses_assigned","activity_count","export_generated_at"],"title":"GDPRDataExport","description":"Schema for GDPR data export (user self-service)."},"GDPRDeletionRequestApprove":{"properties":{"admin_notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Admin Notes","description":"Admin notes about approval"}},"type":"object","title":"GDPRDeletionRequestApprove","description":"Schema for approving a GDPR deletion request."},"GDPRDeletionRequestCreate":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id","description":"Target user ID (required for admin_deletion, defaults to self for self_deletion)"},"request_type":{"type":"string","title":"Request Type","description":"Type: self_deletion or admin_deletion","default":"self_deletion"},"data_categories":{"items":{"type":"string"},"type":"array","title":"Data Categories","description":"Categories of data to delete"},"request_reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Request Reason","description":"Reason for requesting deletion"}},"type":"object","title":"GDPRDeletionRequestCreate","description":"Schema for creating a GDPR deletion request."},"GDPRDeletionRequestRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"request_type":{"type":"string","title":"Request Type"},"status":{"type":"string","title":"Status"},"requested_by_id":{"type":"string","format":"uuid","title":"Requested By Id"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"approved_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Approved By Id"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"rejected_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rejected By Id"},"scheduled_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled For"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"data_categories":{"items":{"type":"string"},"type":"array","title":"Data Categories"},"anonymization_complete":{"type":"boolean","title":"Anonymization Complete"},"profile_deleted":{"type":"boolean","title":"Profile Deleted"},"notifications_deleted":{"type":"boolean","title":"Notifications Deleted"},"assignments_cleared":{"type":"boolean","title":"Assignments Cleared"},"request_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Reason"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","request_type","status","requested_by_id","requested_at","approved_at","approved_by_id","rejection_reason","rejected_at","rejected_by_id","scheduled_for","completed_at","data_categories","anonymization_complete","profile_deleted","notifications_deleted","assignments_cleared","request_reason","admin_notes","created_at","updated_at"],"title":"GDPRDeletionRequestRead","description":"Schema for reading GDPR deletion request data."},"GDPRDeletionRequestReadWithOrganization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"request_type":{"type":"string","title":"Request Type"},"status":{"type":"string","title":"Status"},"requested_by_id":{"type":"string","format":"uuid","title":"Requested By Id"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"approved_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Approved By Id"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"rejected_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rejected By Id"},"scheduled_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled For"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"data_categories":{"items":{"type":"string"},"type":"array","title":"Data Categories"},"anonymization_complete":{"type":"boolean","title":"Anonymization Complete"},"profile_deleted":{"type":"boolean","title":"Profile Deleted"},"notifications_deleted":{"type":"boolean","title":"Notifications Deleted"},"assignments_cleared":{"type":"boolean","title":"Assignments Cleared"},"request_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Reason"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"requested_by":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"approved_by":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"rejected_by":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationNested"},{"type":"null"}]}},"type":"object","required":["id","organization_id","user_id","request_type","status","requested_by_id","requested_at","approved_at","approved_by_id","rejection_reason","rejected_at","rejected_by_id","scheduled_for","completed_at","data_categories","anonymization_complete","profile_deleted","notifications_deleted","assignments_cleared","request_reason","admin_notes","created_at","updated_at"],"title":"GDPRDeletionRequestReadWithOrganization","description":"GDPR deletion request with organization details (for superadmin view)."},"GDPRDeletionRequestReadWithUsers":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"request_type":{"type":"string","title":"Request Type"},"status":{"type":"string","title":"Status"},"requested_by_id":{"type":"string","format":"uuid","title":"Requested By Id"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"approved_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Approved By Id"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"rejected_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rejected By Id"},"scheduled_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled For"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"data_categories":{"items":{"type":"string"},"type":"array","title":"Data Categories"},"anonymization_complete":{"type":"boolean","title":"Anonymization Complete"},"profile_deleted":{"type":"boolean","title":"Profile Deleted"},"notifications_deleted":{"type":"boolean","title":"Notifications Deleted"},"assignments_cleared":{"type":"boolean","title":"Assignments Cleared"},"request_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Reason"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"requested_by":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"approved_by":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]},"rejected_by":{"anyOf":[{"$ref":"#/components/schemas/UserNested"},{"type":"null"}]}},"type":"object","required":["id","organization_id","user_id","request_type","status","requested_by_id","requested_at","approved_at","approved_by_id","rejection_reason","rejected_at","rejected_by_id","scheduled_for","completed_at","data_categories","anonymization_complete","profile_deleted","notifications_deleted","assignments_cleared","request_reason","admin_notes","created_at","updated_at"],"title":"GDPRDeletionRequestReadWithUsers","description":"GDPR deletion request with user details."},"GDPRDeletionRequestReject":{"properties":{"rejection_reason":{"type":"string","maxLength":2000,"minLength":10,"title":"Rejection Reason","description":"Reason for rejection (required)"}},"type":"object","required":["rejection_reason"],"title":"GDPRDeletionRequestReject","description":"Schema for rejecting a GDPR deletion request."},"GlobalSearchResponse":{"properties":{"assets":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Assets"},"licenses":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Licenses"},"consumables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Consumables"},"accessories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Accessories"},"components":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Components"},"users":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Users"},"models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Models"},"categories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Categories"},"total_results":{"type":"integer","title":"Total Results"}},"type":"object","required":["assets","licenses","consumables","accessories","components","users","models","categories","total_results"],"title":"GlobalSearchResponse","description":"Response for global search."},"GlobalStatsResponse":{"properties":{"organizations":{"$ref":"#/components/schemas/OrganizationCountStats","description":"Organization statistics"},"users":{"$ref":"#/components/schemas/UserCountStats","description":"User statistics"},"assets":{"$ref":"#/components/schemas/AssetCountStats","description":"Asset statistics"},"licenses":{"$ref":"#/components/schemas/LicenseCountStats","description":"License statistics"},"consumables":{"$ref":"#/components/schemas/ConsumableCountStats","description":"Consumable statistics"},"accessories":{"$ref":"#/components/schemas/AccessoryCountStats","description":"Accessory statistics"},"storage":{"$ref":"#/components/schemas/app__services__admin_dashboard_service__schemas__StorageStats","description":"Storage usage statistics"},"freemium_kpis":{"$ref":"#/components/schemas/FreemiumKPIStats","description":"Freemium KPI metrics"},"freemium_guardrails":{"$ref":"#/components/schemas/FreemiumGuardrailStats","description":"Freemium advisory guardrails (recommendation-only)"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"Timestamp when statistics were generated"}},"type":"object","required":["organizations","users","assets","licenses","consumables","accessories","storage","freemium_kpis","freemium_guardrails","generated_at"],"title":"GlobalStatsResponse","description":"Platform-wide statistics response for super admin dashboard."},"GrantAdminRoleRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":10,"title":"Reason","description":"Required explanation for granting admin role","examples":["Original admin left the company, promoting this user to maintain org access"]},"notify_user":{"type":"boolean","title":"Notify User","description":"Whether to send email notification to the user about their new role","default":true}},"type":"object","required":["reason"],"title":"GrantAdminRoleRequest","description":"Request schema for granting admin role to a user."},"HealthCheck":{"properties":{"status":{"type":"string","title":"Status","description":"Service health status","examples":["healthy"]},"version":{"type":"string","title":"Version","description":"API version","examples":["1.0.0"]},"environment":{"type":"string","title":"Environment","description":"Deployment environment","examples":["production","development"]}},"type":"object","required":["status","version","environment"],"title":"HealthCheck","description":"Health check response for monitoring.","example":{"environment":"production","status":"healthy","version":"1.0.0"}},"ImpersonationSessionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"admin_user_id":{"type":"string","format":"uuid","title":"Admin User Id"},"admin_user":{"anyOf":[{"$ref":"#/components/schemas/app__models__impersonation__UserInfo"},{"type":"null"}]},"target_user_id":{"type":"string","format":"uuid","title":"Target User Id"},"target_user":{"anyOf":[{"$ref":"#/components/schemas/app__models__impersonation__UserInfo"},{"type":"null"}]},"target_organization_id":{"type":"string","format":"uuid","title":"Target Organization Id"},"target_organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationInfo"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the session is currently active","default":true},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"Alias for created_at - when the impersonation session started.","readOnly":true},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds","description":"Calculate session duration in seconds.","readOnly":true},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationInfo"},{"type":"null"}],"description":"Alias for target_organization for frontend compatibility.","readOnly":true}},"type":"object","required":["id","admin_user_id","target_user_id","target_organization_id","reason","expires_at","ended_at","ip_address","user_agent","created_at","started_at","duration_seconds","organization"],"title":"ImpersonationSessionRead","description":"Schema for reading impersonation session data."},"ImpersonationStartRequest":{"properties":{"target_user_id":{"type":"string","format":"uuid","title":"Target User Id","description":"ID of the user to impersonate"},"reason":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Reason","description":"Reason for impersonation (e.g., 'Support ticket #12345', 'User requested assistance')"},"duration_minutes":{"type":"integer","maximum":480.0,"minimum":5.0,"title":"Duration Minutes","description":"Duration of the impersonation session in minutes (5-480)","default":60}},"type":"object","required":["target_user_id"],"title":"ImpersonationStartRequest","description":"API request body for starting an impersonation session."},"ImpersonationStatusResponse":{"properties":{"is_impersonating":{"type":"boolean","title":"Is Impersonating","description":"Whether the current session is an impersonation session"},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id","description":"ID of the impersonation session if active"},"original_user":{"anyOf":[{"$ref":"#/components/schemas/app__models__impersonation__UserInfo"},{"type":"null"}],"description":"The system admin who initiated the impersonation"}},"type":"object","required":["is_impersonating"],"title":"ImpersonationStatusResponse","description":"Response for impersonation status check."},"ImpersonationTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"JWT access token for impersonation session"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'bearer')","default":"bearer"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the impersonation session expires"},"session_id":{"type":"string","format":"uuid","title":"Session Id","description":"ID of the impersonation session for management"},"target_user":{"$ref":"#/components/schemas/app__models__impersonation__UserInfo","description":"Information about the impersonated user"},"target_organization":{"$ref":"#/components/schemas/OrganizationInfo","description":"Information about the target organization"}},"type":"object","required":["access_token","expires_at","session_id","target_user","target_organization"],"title":"ImpersonationTokenResponse","description":"API response containing the impersonation token."},"ImportBatchDetail":{"properties":{"entity_type":{"type":"string","title":"Entity Type","description":"Type of entity being imported (assets, licenses, etc.)"},"mode":{"type":"string","title":"Mode","default":"dry_run"},"provider":{"type":"string","title":"Provider","default":"standard"},"status":{"type":"string","title":"Status","default":"pending"},"update_existing":{"type":"boolean","title":"Update Existing","default":false},"total_rows":{"type":"integer","title":"Total Rows","default":0},"processed_rows":{"type":"integer","title":"Processed Rows","default":0},"successful_rows":{"type":"integer","title":"Successful Rows","default":0},"failed_rows":{"type":"integer","title":"Failed Rows","default":0},"skipped_rows":{"type":"integer","title":"Skipped Rows","default":0},"updated_rows":{"type":"integer","title":"Updated Rows","default":0},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"}},"type":"object","required":["entity_type","id","organization_id","user_id","created_at","started_at","completed_at","results"],"title":"ImportBatchDetail","description":"Schema for reading an import batch with results."},"ImportBatchRead":{"properties":{"entity_type":{"type":"string","title":"Entity Type","description":"Type of entity being imported (assets, licenses, etc.)"},"mode":{"type":"string","title":"Mode","default":"dry_run"},"provider":{"type":"string","title":"Provider","default":"standard"},"status":{"type":"string","title":"Status","default":"pending"},"update_existing":{"type":"boolean","title":"Update Existing","default":false},"total_rows":{"type":"integer","title":"Total Rows","default":0},"processed_rows":{"type":"integer","title":"Processed Rows","default":0},"successful_rows":{"type":"integer","title":"Successful Rows","default":0},"failed_rows":{"type":"integer","title":"Failed Rows","default":0},"skipped_rows":{"type":"integer","title":"Skipped Rows","default":0},"updated_rows":{"type":"integer","title":"Updated Rows","default":0},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["entity_type","id","organization_id","user_id","created_at","started_at","completed_at"],"title":"ImportBatchRead","description":"Schema for reading an import batch."},"ImportMode":{"type":"string","enum":["dry_run","import"],"title":"ImportMode","description":"Import operation modes."},"ImportProvider":{"type":"string","enum":["standard","snipe_it"],"title":"ImportProvider","description":"Supported import source formats."},"ItemLimitOverrideRequest":{"properties":{"limit":{"type":"integer","minimum":1.0,"title":"Limit","description":"New temporary item limit"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the override expires (must be in the future)"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note","description":"Reason for the override"}},"type":"object","required":["limit","expires_at"],"title":"ItemLimitOverrideRequest","description":"Request to set an item limit override for an organization."},"ItemLimitOverrideResponse":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id","description":"Organization ID"},"current_plan_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Plan Limit","description":"Maximum total items allowed by the subscription plan (null = unlimited)"},"override_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Override Limit","description":"Temporary item limit override (null if not set)"},"override_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Override Expires At","description":"When the override expires (null if not set)"},"override_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Note","description":"Reason for the override (null if not set)"},"override_set_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Override Set By","description":"User ID of the system admin who set the override (null if not set)"},"override_set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Override Set At","description":"When the override was set (null if not set)"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether an active (non-expired) override is in effect"},"effective_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effective Limit","description":"The effective item limit (override if active, otherwise plan limit; null = unlimited)"}},"type":"object","required":["organization_id","current_plan_limit","override_limit","override_expires_at","override_note","override_set_by","override_set_at","is_active","effective_limit"],"title":"ItemLimitOverrideResponse","description":"Response showing current item limit override status for an organization."},"ItemReorderRequest":{"properties":{"item_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Item Ids","description":"Ordered list of item IDs"}},"type":"object","required":["item_ids"],"title":"ItemReorderRequest","description":"Schema for reordering kit items."},"ItemType":{"type":"string","enum":["accessory"],"title":"ItemType","description":"Type of accessory item."},"ItemUsageBreakdown":{"properties":{"assets":{"type":"integer","title":"Assets","description":"Number of assets"},"licenses":{"type":"integer","title":"Licenses","description":"Number of licenses"},"accessories":{"type":"integer","title":"Accessories","description":"Number of accessories"},"consumables":{"type":"integer","title":"Consumables","description":"Number of consumables"},"components":{"type":"integer","title":"Components","description":"Number of components"},"total":{"type":"integer","title":"Total","description":"Total count of all items"}},"type":"object","required":["assets","licenses","accessories","consumables","components","total"],"title":"ItemUsageBreakdown","description":"Breakdown of items by type."},"KeysByPlanBucket":{"properties":{"plan":{"type":"string","title":"Plan"},"keys":{"type":"integer","minimum":0.0,"title":"Keys"},"orgs":{"type":"integer","minimum":0.0,"title":"Orgs"}},"type":"object","required":["plan","keys","orgs"],"title":"KeysByPlanBucket"},"KitAvailabilityItem":{"properties":{"item_id":{"type":"string","format":"uuid","title":"Item Id"},"entity_type":{"$ref":"#/components/schemas/KitEntityType"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"quantity_required":{"type":"integer","title":"Quantity Required"},"quantity_available":{"type":"integer","title":"Quantity Available"},"is_available":{"type":"boolean","title":"Is Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["item_id","entity_type","entity_id","quantity_required","quantity_available","is_available"],"title":"KitAvailabilityItem","description":"Availability status for a single kit item."},"KitAvailabilityResponse":{"properties":{"kit_id":{"type":"string","format":"uuid","title":"Kit Id"},"kit_name":{"type":"string","title":"Kit Name"},"is_fully_available":{"type":"boolean","title":"Is Fully Available"},"items":{"items":{"$ref":"#/components/schemas/KitAvailabilityItem"},"type":"array","title":"Items"},"unavailable_count":{"type":"integer","title":"Unavailable Count","default":0}},"type":"object","required":["kit_id","kit_name","is_fully_available","items"],"title":"KitAvailabilityResponse","description":"Response for kit availability check."},"KitDeployRequest":{"properties":{"deployed_to_id":{"type":"string","format":"uuid","title":"Deployed To Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["deployed_to_id"],"title":"KitDeployRequest","description":"Schema for deploying a kit to a user."},"KitDeploymentItemRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id"},"kit_item_id":{"type":"string","format":"uuid","title":"Kit Item Id"},"entity_type":{"$ref":"#/components/schemas/KitEntityType"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"quantity":{"type":"integer","title":"Quantity"},"status":{"$ref":"#/components/schemas/KitDeploymentItemStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"deployed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deployed At"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"}},"type":"object","required":["id","deployment_id","kit_item_id","entity_type","entity_id","quantity","status","error_message","deployed_at","returned_at"],"title":"KitDeploymentItemRead","description":"Schema for reading a deployment item."},"KitDeploymentItemReadWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id"},"kit_item_id":{"type":"string","format":"uuid","title":"Kit Item Id"},"entity_type":{"$ref":"#/components/schemas/KitEntityType"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"quantity":{"type":"integer","title":"Quantity"},"status":{"$ref":"#/components/schemas/KitDeploymentItemStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"deployed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deployed At"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"entity_details":{"anyOf":[{},{"type":"null"}],"title":"Entity Details"}},"type":"object","required":["id","deployment_id","kit_item_id","entity_type","entity_id","quantity","status","error_message","deployed_at","returned_at"],"title":"KitDeploymentItemReadWithDetails","description":"Deployment item with entity details."},"KitDeploymentItemStatus":{"type":"string","enum":["deployed","returned","failed"],"title":"KitDeploymentItemStatus","description":"Status of an individual deployment item."},"KitDeploymentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"kit_id":{"type":"string","format":"uuid","title":"Kit Id"},"deployed_to_id":{"type":"string","format":"uuid","title":"Deployed To Id"},"deployed_by_id":{"type":"string","format":"uuid","title":"Deployed By Id"},"status":{"$ref":"#/components/schemas/KitDeploymentStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"deployed_at":{"type":"string","format":"date-time","title":"Deployed At"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"}},"type":"object","required":["id","organization_id","kit_id","deployed_to_id","deployed_by_id","status","notes","deployed_at","returned_at"],"title":"KitDeploymentRead","description":"Schema for reading a kit deployment."},"KitDeploymentReadWithItems":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"kit_id":{"type":"string","format":"uuid","title":"Kit Id"},"deployed_to_id":{"type":"string","format":"uuid","title":"Deployed To Id"},"deployed_by_id":{"type":"string","format":"uuid","title":"Deployed By Id"},"status":{"$ref":"#/components/schemas/KitDeploymentStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"deployed_at":{"type":"string","format":"date-time","title":"Deployed At"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"},"items":{"items":{"$ref":"#/components/schemas/KitDeploymentItemRead"},"type":"array","title":"Items","default":[]},"deployed_count":{"type":"integer","title":"Deployed Count","default":0},"returned_count":{"type":"integer","title":"Returned Count","default":0},"failed_count":{"type":"integer","title":"Failed Count","default":0}},"type":"object","required":["id","organization_id","kit_id","deployed_to_id","deployed_by_id","status","notes","deployed_at","returned_at"],"title":"KitDeploymentReadWithItems","description":"Kit deployment with items."},"KitDeploymentReadWithRelations":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"kit_id":{"type":"string","format":"uuid","title":"Kit Id"},"deployed_to_id":{"type":"string","format":"uuid","title":"Deployed To Id"},"deployed_by_id":{"type":"string","format":"uuid","title":"Deployed By Id"},"status":{"$ref":"#/components/schemas/KitDeploymentStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"deployed_at":{"type":"string","format":"date-time","title":"Deployed At"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"},"items":{"items":{"$ref":"#/components/schemas/KitDeploymentItemReadWithDetails"},"type":"array","title":"Items","default":[]},"deployed_count":{"type":"integer","title":"Deployed Count","default":0},"returned_count":{"type":"integer","title":"Returned Count","default":0},"failed_count":{"type":"integer","title":"Failed Count","default":0},"kit":{"anyOf":[{"$ref":"#/components/schemas/AssetKitRead"},{"type":"null"}]},"deployed_to":{"anyOf":[{},{"type":"null"}],"title":"Deployed To"},"deployed_by":{"anyOf":[{},{"type":"null"}],"title":"Deployed By"}},"type":"object","required":["id","organization_id","kit_id","deployed_to_id","deployed_by_id","status","notes","deployed_at","returned_at"],"title":"KitDeploymentReadWithRelations","description":"Kit deployment with full relations."},"KitDeploymentStatus":{"type":"string","enum":["pending","completed","partial","failed"],"title":"KitDeploymentStatus","description":"Status of a kit deployment."},"KitEntityType":{"type":"string","enum":["asset","license","accessory","consumable"],"title":"KitEntityType","description":"Type of entity that can be included in a kit."},"LDAPAuthRequest":{"properties":{"username":{"type":"string","minLength":1,"title":"Username","description":"LDAP username"},"password":{"type":"string","minLength":1,"title":"Password","description":"LDAP password"}},"type":"object","required":["username","password"],"title":"LDAPAuthRequest","description":"Request schema for LDAP authentication."},"LDAPConfigCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Display name for the LDAP server (e.g., 'Corporate AD')"},"provider_type":{"type":"string","maxLength":50,"title":"Provider Type","description":"Provider type (active_directory, openldap, freeipa, generic)","default":"active_directory"},"is_enabled":{"type":"boolean","title":"Is Enabled","description":"Whether this LDAP server is enabled for authentication","default":false},"server_url":{"type":"string","maxLength":500,"minLength":1,"title":"Server Url","description":"LDAP server URL (ldap:// or ldaps://)"},"use_ssl":{"type":"boolean","title":"Use Ssl","description":"Use LDAPS (SSL on port 636)","default":true},"use_tls":{"type":"boolean","title":"Use Tls","description":"Use StartTLS on standard port 389","default":false},"tls_verify":{"type":"boolean","title":"Tls Verify","description":"Verify TLS/SSL certificates","default":true},"tls_ca_cert":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tls Ca Cert","description":"CA certificate in PEM format for TLS verification"},"bind_dn":{"type":"string","maxLength":500,"minLength":1,"title":"Bind Dn","description":"Bind DN for LDAP searches (e.g., cn=reader,ou=service,dc=example,dc=com)"},"bind_password":{"type":"string","minLength":1,"title":"Bind Password","description":"Bind password (will be encrypted at rest)"},"base_dn":{"type":"string","maxLength":500,"minLength":1,"title":"Base Dn","description":"Base DN for searches (e.g., dc=example,dc=com)"},"user_search_base":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"User Search Base","description":"User search base (defaults to base_dn)"},"user_search_filter":{"type":"string","maxLength":500,"title":"User Search Filter","description":"User search filter ({username} will be replaced)","default":"(sAMAccountName={username})"},"group_search_base":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Group Search Base","description":"Group search base (defaults to base_dn)"},"group_search_filter":{"type":"string","maxLength":500,"title":"Group Search Filter","description":"Group search filter","default":"(objectClass=group)"},"attr_username":{"type":"string","maxLength":100,"title":"Attr Username","description":"LDAP attribute for username","default":"sAMAccountName"},"attr_email":{"type":"string","maxLength":100,"title":"Attr Email","description":"LDAP attribute for email","default":"mail"},"attr_first_name":{"type":"string","maxLength":100,"title":"Attr First Name","description":"LDAP attribute for first name","default":"givenName"},"attr_last_name":{"type":"string","maxLength":100,"title":"Attr Last Name","description":"LDAP attribute for last name","default":"sn"},"attr_display_name":{"type":"string","maxLength":100,"title":"Attr Display Name","description":"LDAP attribute for display name","default":"displayName"},"attr_member_of":{"type":"string","maxLength":100,"title":"Attr Member Of","description":"LDAP attribute for group membership","default":"memberOf"},"group_role_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Group Role Mapping","description":"Mapping of LDAP group DNs to roles"},"auto_create_users":{"type":"boolean","title":"Auto Create Users","description":"Automatically create users on first LDAP login","default":true},"auto_update_users":{"type":"boolean","title":"Auto Update Users","description":"Automatically update user info from LDAP on login","default":true},"default_role":{"type":"string","maxLength":20,"title":"Default Role","description":"Default role for auto-created users","default":"user"},"sync_enabled":{"type":"boolean","title":"Sync Enabled","description":"Enable automatic user synchronization","default":false},"sync_interval_minutes":{"type":"integer","maximum":1440.0,"minimum":5.0,"title":"Sync Interval Minutes","description":"Sync interval in minutes (5-1440)","default":60},"sync_deactivate_missing":{"type":"boolean","title":"Sync Deactivate Missing","description":"Deactivate users not found in LDAP during sync","default":false}},"type":"object","required":["name","server_url","bind_dn","bind_password","base_dn"],"title":"LDAPConfigCreate","description":"Schema for creating a new LDAP configuration."},"LDAPConfigRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"provider_type":{"type":"string","title":"Provider Type"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"server_url":{"type":"string","title":"Server Url"},"use_ssl":{"type":"boolean","title":"Use Ssl"},"use_tls":{"type":"boolean","title":"Use Tls"},"tls_verify":{"type":"boolean","title":"Tls Verify"},"tls_ca_cert":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tls Ca Cert"},"bind_dn":{"type":"string","title":"Bind Dn"},"bind_password":{"type":"string","title":"Bind Password","default":"********"},"base_dn":{"type":"string","title":"Base Dn"},"user_search_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Search Base"},"user_search_filter":{"type":"string","title":"User Search Filter"},"group_search_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Search Base"},"group_search_filter":{"type":"string","title":"Group Search Filter"},"attr_username":{"type":"string","title":"Attr Username"},"attr_email":{"type":"string","title":"Attr Email"},"attr_first_name":{"type":"string","title":"Attr First Name"},"attr_last_name":{"type":"string","title":"Attr Last Name"},"attr_display_name":{"type":"string","title":"Attr Display Name"},"attr_member_of":{"type":"string","title":"Attr Member Of"},"group_role_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Group Role Mapping"},"auto_create_users":{"type":"boolean","title":"Auto Create Users"},"auto_update_users":{"type":"boolean","title":"Auto Update Users"},"default_role":{"type":"string","title":"Default Role"},"sync_enabled":{"type":"boolean","title":"Sync Enabled"},"sync_interval_minutes":{"type":"integer","title":"Sync Interval Minutes"},"sync_deactivate_missing":{"type":"boolean","title":"Sync Deactivate Missing"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_users_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Sync Users Created"},"last_sync_users_updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Sync Users Updated"},"last_sync_users_deactivated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Sync Users Deactivated"},"last_sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Error"},"created_by_id":{"type":"string","format":"uuid","title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/LDAPCreatorInfo"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","provider_type","is_enabled","server_url","use_ssl","use_tls","tls_verify","tls_ca_cert","bind_dn","base_dn","user_search_base","user_search_filter","group_search_base","group_search_filter","attr_username","attr_email","attr_first_name","attr_last_name","attr_display_name","attr_member_of","group_role_mapping","auto_create_users","auto_update_users","default_role","sync_enabled","sync_interval_minutes","sync_deactivate_missing","last_sync_at","last_sync_status","last_sync_users_created","last_sync_users_updated","last_sync_users_deactivated","last_sync_error","created_by_id","created_at","updated_at"],"title":"LDAPConfigRead","description":"Schema for reading LDAP configuration data (password masked)."},"LDAPConfigUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Display name for the LDAP server"},"provider_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Provider Type","description":"Provider type"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled","description":"Whether this LDAP server is enabled"},"server_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Server Url","description":"LDAP server URL"},"use_ssl":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Ssl","description":"Use LDAPS"},"use_tls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Tls","description":"Use StartTLS"},"tls_verify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tls Verify","description":"Verify TLS certificates"},"tls_ca_cert":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tls Ca Cert","description":"CA certificate in PEM format"},"bind_dn":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Bind Dn","description":"Bind DN"},"bind_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bind Password","description":"Bind password"},"base_dn":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Base Dn","description":"Base DN"},"user_search_base":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"User Search Base","description":"User search base"},"user_search_filter":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"User Search Filter","description":"User search filter"},"group_search_base":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Group Search Base","description":"Group search base"},"group_search_filter":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Group Search Filter","description":"Group search filter"},"attr_username":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Attr Username"},"attr_email":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Attr Email"},"attr_first_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Attr First Name"},"attr_last_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Attr Last Name"},"attr_display_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Attr Display Name"},"attr_member_of":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Attr Member Of"},"group_role_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Group Role Mapping","description":"Mapping of LDAP group DNs to roles"},"auto_create_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Users"},"auto_update_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Update Users"},"default_role":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Role"},"sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Enabled"},"sync_interval_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":5.0},{"type":"null"}],"title":"Sync Interval Minutes"},"sync_deactivate_missing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Deactivate Missing"}},"type":"object","title":"LDAPConfigUpdate","description":"Schema for updating an LDAP configuration."},"LDAPCreatorInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email"],"title":"LDAPCreatorInfo","description":"Minimal user info for embedding in LDAP config responses."},"LDAPProviderInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"provider_type":{"type":"string","title":"Provider Type"}},"type":"object","required":["id","name","provider_type"],"title":"LDAPProviderInfo","description":"Minimal LDAP provider info for login page display."},"LDAPSyncResult":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"users_created":{"type":"integer","title":"Users Created","default":0},"users_updated":{"type":"integer","title":"Users Updated","default":0},"users_deactivated":{"type":"integer","title":"Users Deactivated","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["success","message"],"title":"LDAPSyncResult","description":"Result of LDAP user sync operation."},"LDAPTestResult":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"server_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Server Info"},"user_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Count"}},"type":"object","required":["success","message"],"title":"LDAPTestResult","description":"Result of LDAP connection test."},"LabelGenerateRequest":{"properties":{"entity_type":{"type":"string","pattern":"^(asset|accessory|consumable|component)$","title":"Entity Type","description":"Entity type: asset, accessory, consumable, component"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id","description":"Entity UUID"},"template":{"type":"string","title":"Template","description":"Template ID","default":"DK-11202"},"code_type":{"type":"string","pattern":"^(qr|code128)$","title":"Code Type","description":"Code type: qr or code128","default":"qr"},"include_serial":{"type":"boolean","title":"Include Serial","description":"Include serial number if available","default":true},"include_model":{"type":"boolean","title":"Include Model","description":"Include model name if available","default":true},"show_logo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Logo","description":"Override: show logo on label (None = use global settings)"},"show_company_name":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Company Name","description":"Override: show company name on label (None = use global settings)"}},"type":"object","required":["entity_type","entity_id"],"title":"LabelGenerateRequest","description":"Request schema for generating a single label."},"LabelSettingsRead":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name","description":"Company name for labels"},"logo_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Filename","description":"Logo filename"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url","description":"Full URL to logo image"},"show_company_name":{"type":"boolean","title":"Show Company Name","description":"Show company name on labels","default":false},"show_logo":{"type":"boolean","title":"Show Logo","description":"Show logo on labels","default":false},"default_template":{"type":"string","title":"Default Template","description":"Default template ID","default":"DK-11202"},"default_code_type":{"type":"string","title":"Default Code Type","description":"Default code type","default":"qr"}},"type":"object","title":"LabelSettingsRead","description":"Schema for reading label settings."},"LabelSettingsUpdate":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Name"},"show_company_name":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Company Name"},"show_logo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Logo"},"default_template":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Default Template"},"default_code_type":{"anyOf":[{"type":"string","pattern":"^(qr|code128)$"},{"type":"null"}],"title":"Default Code Type"}},"type":"object","title":"LabelSettingsUpdate","description":"Schema for updating label settings."},"LabelTemplateRead":{"properties":{"id":{"type":"string","title":"Id","description":"Template ID (e.g., DK-11202)"},"name":{"type":"string","title":"Name","description":"Human-readable name"},"width_mm":{"type":"number","title":"Width Mm","description":"Label width in millimeters"},"height_mm":{"type":"number","title":"Height Mm","description":"Label height in millimeters"},"description":{"type":"string","title":"Description","description":"Template description"},"supports_serial":{"type":"boolean","title":"Supports Serial","description":"Whether template has space for serial number"},"supports_model":{"type":"boolean","title":"Supports Model","description":"Whether template has space for model name"},"supports_branding":{"type":"boolean","title":"Supports Branding","description":"Whether template has space for branding"}},"type":"object","required":["id","name","width_mm","height_mm","description","supports_serial","supports_model","supports_branding"],"title":"LabelTemplateRead","description":"Schema for label template response."},"LicenseCountStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of licenses across all organizations"},"total_seats":{"type":"integer","title":"Total Seats","description":"Total number of license seats"},"used_seats":{"type":"integer","title":"Used Seats","description":"Number of used license seats"}},"type":"object","required":["total","total_seats","used_seats"],"title":"LicenseCountStats","description":"Statistics for license counts."},"LicenseCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"product_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Product Key"},"seats":{"type":"integer","minimum":1.0,"title":"Seats","default":1},"manufacturer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Manufacturer"},"license_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"License Name"},"license_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"License Email"},"order_number":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Purchase Cost"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"termination_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Termination Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reassignable":{"type":"boolean","title":"Reassignable","default":true},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","required":["name"],"title":"LicenseCreate","description":"Schema for creating a license."},"LicenseHistoryEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action_type":{"type":"string","title":"Action Type"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserBrief"},{"type":"null"}]},"assigned_to":{"anyOf":[{"$ref":"#/components/schemas/UserBrief"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","action_type","target_type","target_id","created_at"],"title":"LicenseHistoryEntry","description":"A single entry in a license's action history."},"LicenseRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"product_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Key"},"seats":{"type":"integer","title":"Seats"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"license_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Name"},"license_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Email"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"termination_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Termination Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reassignable":{"type":"boolean","title":"Reassignable"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["id","organization_id","name","seats","manufacturer","license_name","license_email","order_number","purchase_date","purchase_cost","expiration_date","termination_date","notes","reassignable","category_id","custom_fields","created_at","updated_at"],"title":"LicenseRead","description":"Schema for reading a license."},"LicenseReadWithSeats":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"product_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Key"},"seats":{"type":"integer","title":"Seats"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"license_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Name"},"license_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Email"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"termination_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Termination Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reassignable":{"type":"boolean","title":"Reassignable"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"custom_fields":{"additionalProperties":true,"type":"object","title":"Custom Fields"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"seats_used":{"type":"integer","title":"Seats Used","default":0},"seats_available":{"type":"integer","title":"Seats Available","default":0},"is_expired":{"type":"boolean","title":"Is Expired","default":false}},"type":"object","required":["id","organization_id","name","seats","manufacturer","license_name","license_email","order_number","purchase_date","purchase_cost","expiration_date","termination_date","notes","reassignable","category_id","custom_fields","created_at","updated_at"],"title":"LicenseReadWithSeats","description":"License with seat information."},"LicenseSeatAssetRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"asset_tag":{"type":"string","title":"Asset Tag"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","asset_tag","name"],"title":"LicenseSeatAssetRead","description":"Minimal asset info for license seat display."},"LicenseSeatCreate":{"properties":{"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"LicenseSeatCreate","description":"Schema for assigning a license seat."},"LicenseSeatRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"license_id":{"type":"string","format":"uuid","title":"License Id"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"assigned_to":{"anyOf":[{"$ref":"#/components/schemas/LicenseSeatUserRead"},{"type":"null"}]},"asset":{"anyOf":[{"$ref":"#/components/schemas/LicenseSeatAssetRead"},{"type":"null"}]}},"type":"object","required":["id","license_id","assigned_to_id","asset_id","notes","created_at","updated_at"],"title":"LicenseSeatRead","description":"Schema for reading a license seat."},"LicenseSeatUserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email","full_name"],"title":"LicenseSeatUserRead","description":"Minimal user info for license seat display."},"LicenseUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"product_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Key"},"seats":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Seats"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"license_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Name"},"license_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Email"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Number"},"purchase_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purchase Date"},"purchase_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Cost"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"termination_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Termination Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reassignable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reassignable"},"custom_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Fields"}},"type":"object","title":"LicenseUpdate","description":"Schema for updating a license."},"LimitBreakdown":{"properties":{"assets":{"type":"integer","title":"Assets","description":"Number of assets"},"licenses":{"type":"integer","title":"Licenses","description":"Number of licenses"},"accessories":{"type":"integer","title":"Accessories","description":"Number of accessories"},"consumables":{"type":"integer","title":"Consumables","description":"Number of consumables"},"components":{"type":"integer","title":"Components","description":"Number of components"}},"type":"object","required":["assets","licenses","accessories","consumables","components"],"title":"LimitBreakdown","description":"Breakdown of items by type for total_items limit."},"LimitStatusItem":{"properties":{"limit_type":{"type":"string","title":"Limit Type","description":"Type of limit (total_items, users, custom_fields)"},"current":{"type":"integer","title":"Current","description":"Current count of the resource"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max","description":"Maximum allowed by subscription (null = unlimited)"},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percentage","description":"Usage percentage (null if unlimited)"},"breakdown":{"anyOf":[{"$ref":"#/components/schemas/LimitBreakdown"},{"type":"null"}],"description":"Item type breakdown (only for total_items limit)"}},"type":"object","required":["limit_type","current","max","percentage"],"title":"LimitStatusItem","description":"Status of a single resource limit."},"LimitStatusResponse":{"properties":{"limits":{"items":{"$ref":"#/components/schemas/LimitStatusItem"},"type":"array","title":"Limits","description":"List of all resource limits with usage"}},"type":"object","required":["limits"],"title":"LimitStatusResponse","description":"Response containing all limit statuses for an organization."},"LocationCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Country"},"zip_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Zip Code"},"currency":{"type":"string","maxLength":10,"title":"Currency","default":"USD"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"}},"type":"object","required":["name"],"title":"LocationCreate","description":"Schema for creating a location."},"LocationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"currency":{"type":"string","title":"Currency"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"asset_count":{"type":"integer","title":"Asset Count","default":0},"children_count":{"type":"integer","title":"Children Count","default":0},"full_path":{"type":"string","title":"Full Path","default":""}},"type":"object","required":["id","organization_id","name","parent_id","address","city","state","country","zip_code","currency","manager_id","created_at","updated_at"],"title":"LocationRead","description":"Schema for reading a location."},"LocationTree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"asset_count":{"type":"integer","title":"Asset Count","default":0},"children_count":{"type":"integer","title":"Children Count","default":0},"children":{"items":{"$ref":"#/components/schemas/LocationTree"},"type":"array","title":"Children","default":[]}},"type":"object","required":["id","name","parent_id","address","city","country"],"title":"LocationTree","description":"Schema for location tree display."},"LocationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"manager_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"}},"type":"object","title":"LocationUpdate","description":"Schema for updating a location."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User email address","examples":["user@example.com"]},"password":{"type":"string","minLength":1,"title":"Password","description":"User password"},"mfa_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Code","description":"6-digit MFA code (required if MFA is enabled for this user)"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Login request schema.","example":{"email":"user@example.com","password":"password123"}},"MCPToolAction":{"properties":{"name":{"type":"string","title":"Name"},"summary":{"type":"string","title":"Summary"},"default":{"type":"boolean","title":"Default","default":false}},"type":"object","required":["name","summary"],"title":"MCPToolAction","description":"One action of a domain tool (mapped to an internal implementation)."},"MCPToolCatalog":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/MCPToolInfo"},"type":"array","title":"Tools"}},"type":"object","required":["tools"],"title":"MCPToolCatalog"},"MCPToolInfo":{"properties":{"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"domain":{"type":"string","title":"Domain"},"description":{"type":"string","title":"Description"},"actions":{"items":{"$ref":"#/components/schemas/MCPToolAction"},"type":"array","title":"Actions","default":[]},"required_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Scope"},"min_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Role"},"read_only":{"type":"boolean","title":"Read Only","default":false},"destructive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Destructive"},"compound":{"type":"boolean","title":"Compound","default":false}},"type":"object","required":["name","domain","description"],"title":"MCPToolInfo","description":"One catalog entry describing an agent-callable tool."},"MFAEnableResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Success message"},"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes","description":"Recovery codes (SAVE THESE! They are only shown once)"}},"type":"object","required":["message","recovery_codes"],"title":"MFAEnableResponse","description":"Response after successfully enabling MFA."},"MFASetupResponse":{"properties":{"secret":{"type":"string","title":"Secret","description":"Base32 encoded TOTP secret (for manual entry)"},"qr_code":{"type":"string","title":"Qr Code","description":"QR code as data URL (scan with authenticator app)"},"provisioning_uri":{"type":"string","title":"Provisioning Uri","description":"TOTP provisioning URI"}},"type":"object","required":["secret","qr_code","provisioning_uri"],"title":"MFASetupResponse","description":"Response for MFA setup initiation."},"MFAStatusResponse":{"properties":{"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","description":"Whether MFA is enabled for this user"}},"type":"object","required":["mfa_enabled"],"title":"MFAStatusResponse","description":"Response for MFA status check."},"MFAVerifyRequest":{"properties":{"code":{"type":"string","maxLength":9,"minLength":6,"title":"Code","description":"6-digit TOTP code or 8-character recovery code (format: XXXX-XXXX)"}},"type":"object","required":["code"],"title":"MFAVerifyRequest","description":"Request to verify MFA code."},"MagicLinkCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"team_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Size"},"expiry_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiry Days"}},"type":"object","required":["email"],"title":"MagicLinkCreate","description":"Request body for generating a demo magic link."},"MagicLinkResult":{"properties":{"prospect_id":{"type":"string","format":"uuid","title":"Prospect Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"prospect_email":{"type":"string","title":"Prospect Email"},"magic_link":{"type":"string","title":"Magic Link"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"validity_days":{"type":"integer","title":"Validity Days"}},"type":"object","required":["prospect_id","session_id","prospect_email","magic_link","validity_days"],"title":"MagicLinkResult","description":"Result of generating a demo magic link for a prospect."},"MaintenanceCreate":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"title":{"type":"string","maxLength":200,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"maintenance_type":{"type":"string","title":"Maintenance Type","default":"corrective"},"scheduled_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Date"},"cost":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"supplier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier"},"supplier_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Contact"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"warranty_covered":{"type":"boolean","title":"Warranty Covered","default":false},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence_interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurrence Interval Days"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"}},"type":"object","required":["asset_id","title"],"title":"MaintenanceCreate","description":"Schema for creating a maintenance record."},"MaintenancePaginatedResponse":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["data","meta"],"title":"MaintenancePaginatedResponse","description":"Paginated maintenance response."},"MaintenanceSchedule":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_tag":{"type":"string","title":"Asset Tag"},"asset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Name"},"title":{"type":"string","title":"Title"},"maintenance_type":{"type":"string","title":"Maintenance Type"},"scheduled_date":{"type":"string","format":"date-time","title":"Scheduled Date"},"status":{"type":"string","title":"Status"},"assigned_to_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Name"}},"type":"object","required":["id","asset_id","asset_tag","asset_name","title","maintenance_type","scheduled_date","status"],"title":"MaintenanceSchedule","description":"Schema for maintenance schedule item."},"MaintenanceStats":{"properties":{"total_records":{"type":"integer","title":"Total Records","default":0},"scheduled_count":{"type":"integer","title":"Scheduled Count","default":0},"in_progress_count":{"type":"integer","title":"In Progress Count","default":0},"completed_count":{"type":"integer","title":"Completed Count","default":0},"overdue_count":{"type":"integer","title":"Overdue Count","default":0},"total_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost","default":"0.00"},"warranty_covered_count":{"type":"integer","title":"Warranty Covered Count","default":0}},"type":"object","title":"MaintenanceStats","description":"Statistics about maintenance records."},"MaintenanceUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"maintenance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maintenance Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"scheduled_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Date"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"completion_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completion Date"},"cost":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"supplier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier"},"supplier_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Contact"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"warranty_covered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Warranty Covered"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"},"recurrence_interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurrence Interval Days"},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"}},"type":"object","title":"MaintenanceUpdate","description":"Schema for updating a maintenance record."},"NotificationList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationRead"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"unread_count":{"type":"integer","title":"Unread Count"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","unread_count","page","page_size"],"title":"NotificationList","description":"Schema for paginated notification list."},"NotificationPreferenceFull":{"properties":{"notification_type":{"type":"string","title":"Notification Type","description":"The notification type identifier"},"label":{"type":"string","title":"Label","description":"Human-readable label"},"description":{"type":"string","title":"Description","description":"Description of the notification"},"category":{"type":"string","title":"Category","description":"Grouping category"},"email_enabled":{"type":"boolean","title":"Email Enabled","description":"User's email preference"},"in_app_enabled":{"type":"boolean","title":"In App Enabled","description":"User's in-app preference"},"configured":{"type":"boolean","title":"Configured","description":"Whether the user has explicitly set this preference"}},"type":"object","required":["notification_type","label","description","category","email_enabled","in_app_enabled","configured"],"title":"NotificationPreferenceFull","description":"Schema for notification preference combined with type metadata."},"NotificationPreferenceRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"notification_type":{"type":"string","title":"Notification Type"},"email_enabled":{"type":"boolean","title":"Email Enabled"},"in_app_enabled":{"type":"boolean","title":"In App Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","notification_type","email_enabled","in_app_enabled","created_at","updated_at"],"title":"NotificationPreferenceRead","description":"Schema for reading notification preference."},"NotificationPreferenceUpdate":{"properties":{"email_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Enabled"},"in_app_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In App Enabled"}},"type":"object","title":"NotificationPreferenceUpdate","description":"Schema for updating notification preference."},"NotificationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"notification_type":{"type":"string","title":"Notification Type"},"severity":{"type":"string","title":"Severity"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"is_read":{"type":"boolean","title":"Is Read"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","organization_id","user_id","notification_type","severity","title","message","target_type","target_id","is_read","read_at","created_at"],"title":"NotificationRead","description":"Schema for reading a notification."},"NotificationTypeInfo":{"properties":{"type":{"type":"string","title":"Type","description":"The unique identifier for the notification type"},"label":{"type":"string","title":"Label","description":"Human-readable label for the notification"},"description":{"type":"string","title":"Description","description":"Description of when this notification is triggered"},"category":{"type":"string","title":"Category","description":"Category for grouping notifications (e.g., Assets, Account)"},"admin_only":{"type":"boolean","title":"Admin Only","description":"Whether this type is only available to admins","default":false}},"type":"object","required":["type","label","description","category"],"title":"NotificationTypeInfo","description":"Schema for notification type metadata."},"OIDCConfigCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Display name for the OIDC provider (e.g., 'Corporate SSO')"},"provider_type":{"type":"string","maxLength":50,"title":"Provider Type","description":"Provider type for provider-specific handling","default":"generic"},"is_enabled":{"type":"boolean","title":"Is Enabled","description":"Whether this provider is enabled for authentication","default":false},"discovery_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Discovery Url","description":"OpenID Connect discovery URL (.well-known/openid-configuration)"},"authorization_endpoint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Authorization Endpoint","description":"Manual authorization endpoint URL (fallback if no discovery)"},"token_endpoint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Token Endpoint","description":"Manual token endpoint URL (fallback if no discovery)"},"userinfo_endpoint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Userinfo Endpoint","description":"Manual userinfo endpoint URL (fallback if no discovery)"},"jwks_uri":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Jwks Uri","description":"Manual JWKS URI (fallback if no discovery)"},"client_id":{"type":"string","maxLength":255,"minLength":1,"title":"Client Id","description":"OAuth 2.0 client ID"},"client_secret":{"type":"string","maxLength":500,"minLength":1,"title":"Client Secret","description":"OAuth 2.0 client secret (will be encrypted at rest)"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"OAuth 2.0 scopes to request"},"claim_username":{"type":"string","maxLength":100,"title":"Claim Username","description":"Claim name for username","default":"preferred_username"},"claim_email":{"type":"string","maxLength":100,"title":"Claim Email","description":"Claim name for email","default":"email"},"claim_first_name":{"type":"string","maxLength":100,"title":"Claim First Name","description":"Claim name for first name","default":"given_name"},"claim_last_name":{"type":"string","maxLength":100,"title":"Claim Last Name","description":"Claim name for last name","default":"family_name"},"claim_groups":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Claim Groups","description":"Claim name for group membership","default":"groups"},"group_role_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Group Role Mapping","description":"Mapping of group names to roles (e.g., {'Admins': 'admin'})"},"auto_create_users":{"type":"boolean","title":"Auto Create Users","description":"Automatically create users on first OIDC login","default":true},"auto_update_users":{"type":"boolean","title":"Auto Update Users","description":"Automatically update user info from OIDC claims on login","default":true},"default_role":{"type":"string","maxLength":20,"title":"Default Role","description":"Default role for auto-created users","default":"user"}},"type":"object","required":["name","client_id","client_secret"],"title":"OIDCConfigCreate","description":"Schema for creating a new OIDC configuration."},"OIDCConfigRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"name":{"type":"string","title":"Name"},"provider_type":{"type":"string","title":"Provider Type"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"discovery_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovery Url"},"authorization_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Endpoint"},"token_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Endpoint"},"userinfo_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userinfo Endpoint"},"jwks_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwks Uri"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret","default":"********"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"claim_username":{"type":"string","title":"Claim Username"},"claim_email":{"type":"string","title":"Claim Email"},"claim_first_name":{"type":"string","title":"Claim First Name"},"claim_last_name":{"type":"string","title":"Claim Last Name"},"claim_groups":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Groups"},"group_role_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Group Role Mapping"},"auto_create_users":{"type":"boolean","title":"Auto Create Users"},"auto_update_users":{"type":"boolean","title":"Auto Update Users"},"default_role":{"type":"string","title":"Default Role"},"created_by_id":{"type":"string","format":"uuid","title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/OIDCCreatorInfo"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","name","provider_type","is_enabled","discovery_url","authorization_endpoint","token_endpoint","userinfo_endpoint","jwks_uri","client_id","scopes","claim_username","claim_email","claim_first_name","claim_last_name","claim_groups","group_role_mapping","auto_create_users","auto_update_users","default_role","created_by_id","created_at","updated_at"],"title":"OIDCConfigRead","description":"Schema for reading OIDC configuration data (client_secret masked)."},"OIDCConfigUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Display name for the OIDC provider"},"provider_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Provider Type","description":"Provider type for provider-specific handling"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled","description":"Whether this provider is enabled for authentication"},"discovery_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Discovery Url","description":"OpenID Connect discovery URL"},"authorization_endpoint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Authorization Endpoint","description":"Manual authorization endpoint URL"},"token_endpoint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Token Endpoint","description":"Manual token endpoint URL"},"userinfo_endpoint":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Userinfo Endpoint","description":"Manual userinfo endpoint URL"},"jwks_uri":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Jwks Uri","description":"Manual JWKS URI"},"client_id":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Client Id","description":"OAuth 2.0 client ID"},"client_secret":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Client Secret","description":"OAuth 2.0 client secret (will be encrypted at rest)"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"OAuth 2.0 scopes to request"},"claim_username":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Claim Username","description":"Claim name for username"},"claim_email":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Claim Email","description":"Claim name for email"},"claim_first_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Claim First Name","description":"Claim name for first name"},"claim_last_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Claim Last Name","description":"Claim name for last name"},"claim_groups":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Claim Groups","description":"Claim name for group membership"},"group_role_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Group Role Mapping","description":"Mapping of group names to roles"},"auto_create_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Users","description":"Automatically create users on first OIDC login"},"auto_update_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Update Users","description":"Automatically update user info from OIDC claims on login"},"default_role":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Role","description":"Default role for auto-created users"}},"type":"object","title":"OIDCConfigUpdate","description":"Schema for updating an OIDC configuration."},"OIDCCreatorInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email"],"title":"OIDCCreatorInfo","description":"Minimal user info for embedding in OIDC config responses."},"OIDCProviderInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"provider_type":{"type":"string","title":"Provider Type"}},"type":"object","required":["id","name","provider_type"],"title":"OIDCProviderInfo","description":"Minimal OIDC provider info for login page display."},"OnboardingStatus":{"properties":{"is_setup_complete":{"type":"boolean","title":"Is Setup Complete","description":"Whether initial setup is complete"},"has_admin":{"type":"boolean","title":"Has Admin","description":"Whether an admin user exists"}},"type":"object","required":["is_setup_complete","has_admin"],"title":"OnboardingStatus","description":"Onboarding status response."},"OperationsHealthResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"window_days":{"type":"integer","minimum":1.0,"title":"Window Days"},"active_organizations":{"type":"integer","minimum":0.0,"title":"Active Organizations"},"stale_organizations":{"type":"integer","minimum":0.0,"title":"Stale Organizations"},"recent_actions_total":{"type":"integer","minimum":0.0,"title":"Recent Actions Total"},"organizations_with_activity":{"type":"integer","minimum":0.0,"title":"Organizations With Activity"},"actions_per_active_org":{"type":"number","minimum":0.0,"title":"Actions Per Active Org"},"webhooks_total":{"type":"integer","minimum":0.0,"title":"Webhooks Total"},"webhooks_active":{"type":"integer","minimum":0.0,"title":"Webhooks Active"},"webhook_failures_recent":{"type":"integer","minimum":0.0,"title":"Webhook Failures Recent"},"low_stock_consumables":{"type":"integer","minimum":0.0,"title":"Low Stock Consumables"},"low_stock_components":{"type":"integer","minimum":0.0,"title":"Low Stock Components"},"status":{"$ref":"#/components/schemas/OperationsStatus"}},"type":"object","required":["generated_at","window_days","active_organizations","stale_organizations","recent_actions_total","organizations_with_activity","actions_per_active_org","webhooks_total","webhooks_active","webhook_failures_recent","low_stock_consumables","low_stock_components","status"],"title":"OperationsHealthResponse","description":"Operational health metrics."},"OperationsStatus":{"type":"string","enum":["healthy","needs_attention"],"title":"OperationsStatus","description":"Overall operations status."},"OrgCreditBalance":{"properties":{"total_credits_cents":{"type":"integer","title":"Total Credits Cents","description":"Total available credits in cents"},"currency":{"type":"string","title":"Currency","default":"EUR"},"pending_credits":{"type":"integer","title":"Pending Credits","description":"Number of unapplied credit entries"},"expiring_soon_cents":{"type":"integer","title":"Expiring Soon Cents","description":"Credits expiring within 30 days in cents"}},"type":"object","required":["total_credits_cents","pending_credits","expiring_soon_cents"],"title":"OrgCreditBalance","description":"Credit balance for organization admin view."},"OrgCreditEntry":{"properties":{"id":{"type":"string","title":"Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"description":{"type":"string","title":"Description"},"credit_type":{"type":"string","title":"Credit Type"},"created_at":{"type":"string","title":"Created At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","amount_cents","currency","description","credit_type","created_at","expires_at"],"title":"OrgCreditEntry","description":"Simplified credit entry for organization admin view."},"OrgCreditsResponse":{"properties":{"balance":{"$ref":"#/components/schemas/OrgCreditBalance"},"recent_credits":{"items":{"$ref":"#/components/schemas/OrgCreditEntry"},"type":"array","title":"Recent Credits"}},"type":"object","required":["balance","recent_credits"],"title":"OrgCreditsResponse","description":"Credits response for organization admin view."},"OrganizationActionCount":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["organization_id","organization_name","count"],"title":"OrganizationActionCount","description":"Action count per organization."},"OrganizationBasic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["id","name","slug"],"title":"OrganizationBasic","description":"Basic organization info for embedding in user responses."},"OrganizationCountStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of organizations"},"active":{"type":"integer","title":"Active","description":"Number of active organizations"},"inactive":{"type":"integer","title":"Inactive","description":"Number of inactive organizations"},"new_this_month":{"type":"integer","title":"New This Month","description":"Organizations created this month"}},"type":"object","required":["total","active","inactive","new_this_month"],"title":"OrganizationCountStats","description":"Statistics for organization counts."},"OrganizationCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Organization display name"},"slug":{"type":"string","maxLength":50,"title":"Slug","description":"URL-friendly unique identifier"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Organization description"},"subscription_plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Plan Id","description":"Subscription plan ID to assign"},"subscription_tier":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Subscription Tier","description":"Subscription tier","default":"free"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users","description":"Maximum users (None = unlimited)"},"users_can_login":{"type":"boolean","title":"Users Can Login","description":"Whether users with User role can login","default":false}},"type":"object","required":["name","slug"],"title":"OrganizationCreate","description":"Schema for creating an organization."},"OrganizationExportRequest":{"properties":{"include_deleted":{"type":"boolean","title":"Include Deleted","description":"Include soft-deleted items","default":true},"send_email":{"type":"boolean","title":"Send Email","description":"Send email when export is ready","default":true}},"type":"object","title":"OrganizationExportRequest","description":"Request schema for full organization export."},"OrganizationForAuth":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Organization ID"},"name":{"type":"string","title":"Name","description":"Organization name"},"subscription_plan":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionPlanBasic"},{"type":"null"}],"description":"Current subscription plan"},"feature_overrides":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Feature Overrides","description":"Per-organization feature flag overrides"}},"type":"object","required":["id","name"],"title":"OrganizationForAuth","description":"Organization info embedded in user for auth responses.\n\nThis provides the organization context needed for feature gating\nwithout requiring a separate API call."},"OrganizationInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["id","name","slug"],"title":"OrganizationInfo","description":"Minimal organization info for embedding in impersonation responses."},"OrganizationNested":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["id","name","slug"],"title":"OrganizationNested","description":"Nested organization info for GDPR request responses."},"OrganizationRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Organization display name"},"slug":{"type":"string","maxLength":50,"title":"Slug","description":"URL-friendly unique identifier"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Organization description"},"id":{"type":"string","format":"uuid","title":"Id"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Plan Id"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"is_active":{"type":"boolean","title":"Is Active"},"users_can_login":{"type":"boolean","title":"Users Can Login"},"feature_overrides":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Feature Overrides"},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspended At"},"suspended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspended Reason"},"lemonsqueezy_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemonsqueezy Customer Id"},"lemonsqueezy_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemonsqueezy Subscription Id"},"billing_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Provider"},"polar_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polar Customer Id"},"polar_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polar Subscription Id"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"ls_subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ls Subscription Plan"},"billing_cycle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Cycle","default":"monthly"},"subscription_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Renews At"},"subscription_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Ends At"},"deletion_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Requested At"},"scheduled_deletion_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Deletion At"},"deletion_requested_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deletion Requested By"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Used At"},"trial_reminder_sent":{"type":"boolean","title":"Trial Reminder Sent"},"conversion_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conversion Probability"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"},"grace_period_days":{"type":"integer","title":"Grace Period Days"},"is_read_only":{"type":"boolean","title":"Is Read Only"},"item_limit_override":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item Limit Override"},"item_limit_override_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Item Limit Override Expires At"},"item_limit_override_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Limit Override Note"},"item_limit_override_set_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Item Limit Override Set By"},"item_limit_override_set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Item Limit Override Set At"},"audit_log_retention_days":{"type":"integer","title":"Audit Log Retention Days"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","slug","id","subscription_tier","subscription_plan_id","max_users","billing_email","storage_used_bytes","admin_notes","is_active","users_can_login","feature_overrides","suspended_at","suspended_reason","ls_subscription_plan","subscription_renews_at","subscription_ends_at","deletion_requested_at","scheduled_deletion_at","trial_started_at","trial_used_at","trial_reminder_sent","grace_period_ends_at","grace_period_days","is_read_only","item_limit_override","item_limit_override_expires_at","item_limit_override_note","item_limit_override_set_by","item_limit_override_set_at","audit_log_retention_days","created_at","updated_at"],"title":"OrganizationRead","description":"Schema for reading organization data."},"OrganizationReadPublic":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Organization display name"},"slug":{"type":"string","maxLength":50,"title":"Slug","description":"URL-friendly unique identifier"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Organization description"},"id":{"type":"string","format":"uuid","title":"Id"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Plan Id"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes"},"is_active":{"type":"boolean","title":"Is Active"},"users_can_login":{"type":"boolean","title":"Users Can Login"},"feature_overrides":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Feature Overrides"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"ls_subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ls Subscription Plan"},"billing_cycle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Cycle","default":"monthly"},"subscription_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Renews At"},"subscription_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Ends At"},"deletion_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Requested At"},"scheduled_deletion_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Deletion At"},"deletion_requested_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deletion Requested By"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Used At"},"trial_reminder_sent":{"type":"boolean","title":"Trial Reminder Sent"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"},"grace_period_days":{"type":"integer","title":"Grace Period Days"},"is_read_only":{"type":"boolean","title":"Is Read Only"},"audit_log_retention_days":{"type":"integer","title":"Audit Log Retention Days"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","slug","id","subscription_tier","subscription_plan_id","max_users","storage_used_bytes","is_active","users_can_login","feature_overrides","subscription_status","ls_subscription_plan","subscription_renews_at","subscription_ends_at","deletion_requested_at","scheduled_deletion_at","trial_started_at","trial_used_at","trial_reminder_sent","grace_period_ends_at","grace_period_days","is_read_only","audit_log_retention_days","created_at","updated_at"],"title":"OrganizationReadPublic","description":"Schema for reading organization data by regular (non-system-admin) users.\n\nExcludes billing IDs, admin notes, suspension details, and item limit overrides."},"OrganizationReadPublicWithStats":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Organization display name"},"slug":{"type":"string","maxLength":50,"title":"Slug","description":"URL-friendly unique identifier"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Organization description"},"id":{"type":"string","format":"uuid","title":"Id"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Plan Id"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes"},"is_active":{"type":"boolean","title":"Is Active"},"users_can_login":{"type":"boolean","title":"Users Can Login"},"feature_overrides":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Feature Overrides"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"ls_subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ls Subscription Plan"},"billing_cycle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Cycle","default":"monthly"},"subscription_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Renews At"},"subscription_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Ends At"},"deletion_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Requested At"},"scheduled_deletion_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Deletion At"},"deletion_requested_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deletion Requested By"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Used At"},"trial_reminder_sent":{"type":"boolean","title":"Trial Reminder Sent"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"},"grace_period_days":{"type":"integer","title":"Grace Period Days"},"is_read_only":{"type":"boolean","title":"Is Read Only"},"audit_log_retention_days":{"type":"integer","title":"Audit Log Retention Days"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"user_count":{"type":"integer","title":"User Count","default":0},"asset_count":{"type":"integer","title":"Asset Count","default":0},"total_item_count":{"type":"integer","title":"Total Item Count","default":0},"has_logo":{"type":"boolean","title":"Has Logo","default":false},"subscription_plan":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionPlanNested"},{"type":"null"}]}},"type":"object","required":["name","slug","id","subscription_tier","subscription_plan_id","max_users","storage_used_bytes","is_active","users_can_login","feature_overrides","subscription_status","ls_subscription_plan","subscription_renews_at","subscription_ends_at","deletion_requested_at","scheduled_deletion_at","trial_started_at","trial_used_at","trial_reminder_sent","grace_period_ends_at","grace_period_days","is_read_only","audit_log_retention_days","created_at","updated_at"],"title":"OrganizationReadPublicWithStats","description":"Organization with usage statistics (regular user view).\n\nSame stats as OrganizationReadWithStats but without billing/admin fields."},"OrganizationReadWithStats":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Organization display name"},"slug":{"type":"string","maxLength":50,"title":"Slug","description":"URL-friendly unique identifier"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Organization description"},"id":{"type":"string","format":"uuid","title":"Id"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Plan Id"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"is_active":{"type":"boolean","title":"Is Active"},"users_can_login":{"type":"boolean","title":"Users Can Login"},"feature_overrides":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Feature Overrides"},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspended At"},"suspended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspended Reason"},"lemonsqueezy_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemonsqueezy Customer Id"},"lemonsqueezy_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemonsqueezy Subscription Id"},"billing_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Provider"},"polar_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polar Customer Id"},"polar_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polar Subscription Id"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"ls_subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ls Subscription Plan"},"billing_cycle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Cycle","default":"monthly"},"subscription_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Renews At"},"subscription_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Ends At"},"deletion_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Requested At"},"scheduled_deletion_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Deletion At"},"deletion_requested_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deletion Requested By"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Used At"},"trial_reminder_sent":{"type":"boolean","title":"Trial Reminder Sent"},"conversion_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conversion Probability"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"},"grace_period_days":{"type":"integer","title":"Grace Period Days"},"is_read_only":{"type":"boolean","title":"Is Read Only"},"item_limit_override":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item Limit Override"},"item_limit_override_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Item Limit Override Expires At"},"item_limit_override_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Limit Override Note"},"item_limit_override_set_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Item Limit Override Set By"},"item_limit_override_set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Item Limit Override Set At"},"audit_log_retention_days":{"type":"integer","title":"Audit Log Retention Days"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"user_count":{"type":"integer","title":"User Count","default":0},"asset_count":{"type":"integer","title":"Asset Count","default":0},"total_item_count":{"type":"integer","title":"Total Item Count","default":0},"has_logo":{"type":"boolean","title":"Has Logo","default":false},"subscription_plan":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionPlanNested"},{"type":"null"}]}},"type":"object","required":["name","slug","id","subscription_tier","subscription_plan_id","max_users","billing_email","storage_used_bytes","admin_notes","is_active","users_can_login","feature_overrides","suspended_at","suspended_reason","ls_subscription_plan","subscription_renews_at","subscription_ends_at","deletion_requested_at","scheduled_deletion_at","trial_started_at","trial_used_at","trial_reminder_sent","grace_period_ends_at","grace_period_days","is_read_only","item_limit_override","item_limit_override_expires_at","item_limit_override_note","item_limit_override_set_by","item_limit_override_set_at","audit_log_retention_days","created_at","updated_at"],"title":"OrganizationReadWithStats","description":"Organization with usage statistics (system admin view)."},"OrganizationStats":{"properties":{"location_count":{"type":"integer","title":"Location Count","description":"Number of locations"},"asset_count":{"type":"integer","title":"Asset Count","description":"Number of assets"},"user_count":{"type":"integer","title":"User Count","description":"Number of users"},"license_count":{"type":"integer","title":"License Count","description":"Number of licenses"},"accessory_count":{"type":"integer","title":"Accessory Count","description":"Number of accessories"},"consumable_count":{"type":"integer","title":"Consumable Count","description":"Number of consumables"}},"type":"object","required":["location_count","asset_count","user_count","license_count","accessory_count","consumable_count"],"title":"OrganizationStats","description":"Full organization statistics for onboarding."},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"subscription_tier":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Subscription Tier"},"subscription_plan_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Plan Id"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users"},"users_can_login":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Users Can Login"},"billing_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Billing Email"},"storage_used_bytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Storage Used Bytes"},"admin_notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Admin Notes"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"feature_overrides":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Feature Overrides","description":"Per-organization feature flag overrides. Takes precedence over plan features."},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspended At"},"suspended_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Suspended Reason"},"conversion_probability":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Conversion Probability"},"item_limit_override":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Item Limit Override","description":"Temporary total items limit override set by superadmin"},"item_limit_override_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Item Limit Override Expires At","description":"When the item limit override expires (None = permanent)"},"item_limit_override_note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Item Limit Override Note","description":"Reason for the item limit override"}},"type":"object","title":"OrganizationUpdate","description":"Schema for updating an organization (system admin only)."},"OrganizationUpdatePublic":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","title":"OrganizationUpdatePublic","description":"Schema for org admins updating their own organization (SEC-11).\n\nSystem admins use OrganizationUpdate for full access via admin endpoints."},"OrganizationUsageStats":{"properties":{"user_count":{"type":"integer","title":"User Count","description":"Current number of users in the organization"},"total_item_count":{"type":"integer","title":"Total Item Count","description":"Current number of total items in the organization"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users","description":"Maximum allowed users (null = unlimited)"},"max_total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Items","description":"Maximum allowed total items (null = unlimited)"}},"type":"object","required":["user_count","total_item_count","max_users","max_total_items"],"title":"OrganizationUsageStats","description":"Current organization usage statistics."},"PageMeta":{"properties":{"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total":{"type":"integer","title":"Total"},"total_pages":{"type":"integer","title":"Total Pages"},"has_next":{"type":"boolean","title":"Has Next"},"has_prev":{"type":"boolean","title":"Has Prev"}},"type":"object","required":["page","per_page","total","total_pages","has_next","has_prev"],"title":"PageMeta","description":"Metadata for paginated response."},"PaginatedResponse_AccessoryReadWithRelations_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AccessoryReadWithRelations"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AccessoryReadWithRelations]"},"PaginatedResponse_ActionLogSummary_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ActionLogSummary"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ActionLogSummary]"},"PaginatedResponse_ActivityWithContext_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ActivityWithContext"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ActivityWithContext]"},"PaginatedResponse_AnnouncementRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AnnouncementRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AnnouncementRead]"},"PaginatedResponse_AssetKitReadWithItems_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AssetKitReadWithItems"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AssetKitReadWithItems]"},"PaginatedResponse_AssetModelReadWithCategory_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AssetModelReadWithCategory"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AssetModelReadWithCategory]"},"PaginatedResponse_AssetReadWithRelations_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AssetReadWithRelations"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AssetReadWithRelations]"},"PaginatedResponse_AuditEntryReadWithAsset_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditEntryReadWithAsset"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AuditEntryReadWithAsset]"},"PaginatedResponse_AuditLogWithDetails_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditLogWithDetails"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AuditLogWithDetails]"},"PaginatedResponse_AuditSessionReadWithRelations_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditSessionReadWithRelations"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[AuditSessionReadWithRelations]"},"PaginatedResponse_CategoryReadWithCount_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CategoryReadWithCount"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[CategoryReadWithCount]"},"PaginatedResponse_ComponentReadWithRelations_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ComponentReadWithRelations"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ComponentReadWithRelations]"},"PaginatedResponse_ConsumableReadWithRelations_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ConsumableReadWithRelations"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ConsumableReadWithRelations]"},"PaginatedResponse_CustomFieldReadWithCategory_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomFieldReadWithCategory"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[CustomFieldReadWithCategory]"},"PaginatedResponse_DepartmentRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DepartmentRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[DepartmentRead]"},"PaginatedResponse_ImpersonationSessionRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ImpersonationSessionRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ImpersonationSessionRead]"},"PaginatedResponse_LicenseReadWithSeats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LicenseReadWithSeats"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[LicenseReadWithSeats]"},"PaginatedResponse_LocationRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LocationRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[LocationRead]"},"PaginatedResponse_OrganizationReadWithStats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrganizationReadWithStats"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[OrganizationReadWithStats]"},"PaginatedResponse_OrganizationRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrganizationRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[OrganizationRead]"},"PaginatedResponse_ProspectWithStats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProspectWithStats"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ProspectWithStats]"},"PaginatedResponse_SessionWithDetails_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SessionWithDetails"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[SessionWithDetails]"},"PaginatedResponse_SnapshotReadWithDetails_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SnapshotReadWithDetails"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[SnapshotReadWithDetails]"},"PaginatedResponse_StatusLabelReadWithCount_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StatusLabelReadWithCount"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[StatusLabelReadWithCount]"},"PaginatedResponse_SubscriptionPlanReadWithStats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SubscriptionPlanReadWithStats"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[SubscriptionPlanReadWithStats]"},"PaginatedResponse_UserReadWithOrg_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserReadWithOrg"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[UserReadWithOrg]"},"PaginatedResponse_UserReadWithStats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserReadWithStats"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[UserReadWithStats]"},"PaginatedResponse_WebhookDeliveryRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookDeliveryRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[WebhookDeliveryRead]"},"PaginatedResponse_WebhookRead_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookRead"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[WebhookRead]"},"PaginatedResponse_dict_":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[dict]"},"PaginationMeta":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page"},"per_page":{"type":"integer","minimum":1.0,"title":"Per Page"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"total_pages":{"type":"integer","minimum":0.0,"title":"Total Pages"},"has_next":{"type":"boolean","title":"Has Next"},"has_prev":{"type":"boolean","title":"Has Prev"}},"type":"object","required":["page","per_page","total","total_pages","has_next","has_prev"],"title":"PaginationMeta","description":"Pagination metadata."},"PasswordResetResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PasswordResetResponse","description":"Response for password reset email request."},"PermanentDeleteConfirmation":{"properties":{"confirm":{"type":"boolean","title":"Confirm","description":"Must be true to confirm permanent deletion"}},"type":"object","required":["confirm"],"title":"PermanentDeleteConfirmation","description":"Confirmation schema for permanent deletion operations.\n\nUsed by soft delete endpoints to require explicit confirmation before\npermanently removing records from the database.\n\nThis schema is shared across: assets, accessories, components, consumables."},"PlanUsageStats":{"properties":{"plan_id":{"type":"string","format":"uuid","title":"Plan Id","description":"The subscription plan ID"},"plan_name":{"type":"string","title":"Plan Name","description":"The subscription plan name"},"organization_count":{"type":"integer","minimum":0.0,"title":"Organization Count","description":"Number of organizations on this plan","default":0},"active_org_count":{"type":"integer","minimum":0.0,"title":"Active Org Count","description":"Number of active (paid) organizations","default":0},"trial_org_count":{"type":"integer","minimum":0.0,"title":"Trial Org Count","description":"Number of organizations on trial","default":0},"estimated_monthly_revenue":{"type":"number","minimum":0.0,"title":"Estimated Monthly Revenue","description":"Estimated monthly revenue based on active count","default":0.0},"total_users":{"type":"integer","minimum":0.0,"title":"Total Users","description":"Total users across all organizations on this plan","default":0},"total_assets":{"type":"integer","minimum":0.0,"title":"Total Assets","description":"Total assets across all organizations on this plan","default":0},"total_storage_bytes":{"type":"integer","minimum":0.0,"title":"Total Storage Bytes","description":"Total storage used across all organizations on this plan","default":0}},"type":"object","required":["plan_id","plan_name"],"title":"PlanUsageStats","description":"Statistics for organizations using a subscription plan."},"ProfileUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name","description":"Full name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Avatar Url","description":"Avatar URL"},"preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preferences","description":"User preferences"}},"type":"object","title":"ProfileUpdate","description":"Schema for updating own profile."},"ProspectDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"company":{"type":"string","title":"Company"},"team_size":{"type":"string","title":"Team Size"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"sessions":{"items":{"$ref":"#/components/schemas/SessionWithDetails"},"type":"array","title":"Sessions"},"total_activities":{"type":"integer","title":"Total Activities"},"avg_session_duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Session Duration Minutes"}},"type":"object","required":["id","email","full_name","company","team_size","utm_source","utm_medium","utm_campaign","created_at","updated_at","sessions","total_activities"],"title":"ProspectDetail","description":"Full prospect detail with all sessions."},"ProspectWithStats":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"company":{"type":"string","title":"Company"},"team_size":{"type":"string","title":"Team Size"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"session_count":{"type":"integer","title":"Session Count","description":"Number of sessions","default":0},"has_logged_in":{"type":"boolean","title":"Has Logged In","description":"Whether prospect has logged in","default":false},"first_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Login At","description":"First login timestamp"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At","description":"Last activity timestamp"},"total_activities":{"type":"integer","title":"Total Activities","description":"Total activity count","default":0}},"type":"object","required":["id","email","full_name","company","team_size","utm_source","utm_medium","utm_campaign","created_at","updated_at"],"title":"ProspectWithStats","description":"Demo prospect with computed statistics."},"QueueRuleCount":{"properties":{"key":{"$ref":"#/components/schemas/QueueRuleKey"},"count":{"type":"integer","minimum":0.0,"title":"Count"}},"type":"object","required":["key","count"],"title":"QueueRuleCount","description":"Count of organizations matching a specific queue rule."},"QueueRuleKey":{"type":"string","enum":["payment_risk","trial_ending_soon","high_usage","suspended_org","webhook_failures_recent"],"title":"QueueRuleKey","description":"Stable queue reason keys in priority order."},"QueueSummary":{"properties":{"total_customers_in_queue":{"type":"integer","minimum":0.0,"title":"Total Customers In Queue"},"by_rule":{"items":{"$ref":"#/components/schemas/QueueRuleCount"},"type":"array","title":"By Rule"}},"type":"object","required":["total_customers_in_queue"],"title":"QueueSummary","description":"Overview summary for customer queue state."},"RecoverAccountRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address of the account to recover","examples":["user@example.com"]},"recovery_code":{"type":"string","maxLength":16,"minLength":8,"title":"Recovery Code","description":"8-character recovery code (alphanumeric)","examples":["A3F9B2C1"]}},"type":"object","required":["email","recovery_code"],"title":"RecoverAccountRequest","description":"Request schema for account recovery using recovery code."},"RecoveryCodesResponse":{"properties":{"codes":{"items":{"type":"string"},"type":"array","title":"Codes","description":"List of 10 recovery codes. SAVE THESE - they are shown only once!"},"message":{"type":"string","title":"Message","default":"Recovery codes generated successfully"}},"type":"object","required":["codes"],"title":"RecoveryCodesResponse","description":"Response containing newly generated recovery codes."},"RecoveryCodesStatusResponse":{"properties":{"has_codes":{"type":"boolean","title":"Has Codes","description":"Whether user has generated recovery codes"},"codes_remaining":{"type":"integer","title":"Codes Remaining","description":"Number of unused codes remaining"},"total_codes":{"type":"integer","title":"Total Codes","description":"Total number of codes originally generated","default":10},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated At","description":"ISO timestamp when codes were generated"},"used_count":{"type":"integer","title":"Used Count","description":"Number of codes that have been used","default":0}},"type":"object","required":["has_codes","codes_remaining"],"title":"RecoveryCodesStatusResponse","description":"Status of user's recovery codes."},"RecoveryTokenResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"recovery_token":{"type":"string","title":"Recovery Token","description":"Temporary token valid for 15 minutes. Use this to reset password or disable MFA."},"expires_in_minutes":{"type":"integer","title":"Expires In Minutes","description":"Token validity in minutes","default":15},"allowed_actions":{"items":{"type":"string"},"type":"array","title":"Allowed Actions","description":"Actions allowed with this token","default":["reset_password","disable_mfa"]}},"type":"object","required":["message","recovery_token"],"title":"RecoveryTokenResponse","description":"Response containing temporary recovery token."},"RegisterRequest":{"properties":{"organization_name":{"type":"string","maxLength":100,"minLength":2,"title":"Organization Name","description":"Organization name for the new workspace","examples":["Acme Corp"]},"email":{"type":"string","format":"email","title":"Email","description":"User email address","examples":["newuser@example.com"]},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password","description":"Password (8-128 characters)"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name","description":"User's full name","examples":["John Doe"]},"captcha_token":{"type":"string","minLength":1,"title":"Captcha Token","description":"CAPTCHA token from Cloudflare Turnstile"}},"type":"object","required":["organization_name","email","password","captcha_token"],"title":"RegisterRequest","description":"Registration request schema.","example":{"captcha_token":"turnstile-token","email":"newuser@example.com","full_name":"John Doe","organization_name":"Acme Corp","password":"securepassword123"}},"ReorderItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Custom field definition ID"},"display_order":{"type":"integer","minimum":0.0,"title":"Display Order","description":"New display order value"}},"type":"object","required":["id","display_order"],"title":"ReorderItem","description":"Schema for a single reorder item."},"ReorderRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReorderItem"},"type":"array","minItems":1,"title":"Items","description":"List of custom field IDs with their new display order values"}},"type":"object","required":["items"],"title":"ReorderRequest","description":"Schema for reordering multiple custom field definitions."},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Account email address"}},"type":"object","required":["email"],"title":"ResendVerificationRequest","description":"Request schema for resending signup verification email."},"ResetPasswordRequest":{"properties":{"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password","description":"New password"}},"type":"object","required":["new_password"],"title":"ResetPasswordRequest","description":"Request schema for resetting a user's password."},"RestoreResult":{"properties":{"success":{"type":"boolean","title":"Success"},"snapshot_id":{"type":"string","format":"uuid","title":"Snapshot Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"restored_entities":{"additionalProperties":{"type":"integer"},"type":"object","title":"Restored Entities"},"pre_restore_backup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pre Restore Backup Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success","snapshot_id","restored_entities"],"title":"RestoreResult","description":"Result of a restore operation."},"RevenueFunnelResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"window_days":{"type":"integer","minimum":1.0,"title":"Window Days"},"signups":{"type":"integer","minimum":0.0,"title":"Signups"},"trials_started":{"type":"integer","minimum":0.0,"title":"Trials Started"},"paid_from_signups":{"type":"integer","minimum":0.0,"title":"Paid From Signups"},"paid_from_trials":{"type":"integer","minimum":0.0,"title":"Paid From Trials"},"payment_risk_organizations":{"type":"integer","minimum":0.0,"title":"Payment Risk Organizations"},"churned_organizations":{"type":"integer","minimum":0.0,"title":"Churned Organizations"},"signup_to_trial_rate":{"type":"number","minimum":0.0,"title":"Signup To Trial Rate"},"signup_to_paid_rate":{"type":"number","minimum":0.0,"title":"Signup To Paid Rate"},"trial_to_paid_rate":{"type":"number","minimum":0.0,"title":"Trial To Paid Rate"}},"type":"object","required":["generated_at","window_days","signups","trials_started","paid_from_signups","paid_from_trials","payment_risk_organizations","churned_organizations","signup_to_trial_rate","signup_to_paid_rate","trial_to_paid_rate"],"title":"RevenueFunnelResponse","description":"Revenue funnel metrics for a given window."},"RevenueSummaryResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"window_days":{"type":"integer","minimum":1.0,"title":"Window Days"},"paid_organizations_active":{"type":"integer","minimum":0.0,"title":"Paid Organizations Active"},"past_due_organizations":{"type":"integer","minimum":0.0,"title":"Past Due Organizations"},"unpaid_organizations":{"type":"integer","minimum":0.0,"title":"Unpaid Organizations"},"churned_organizations_window":{"type":"integer","minimum":0.0,"title":"Churned Organizations Window"},"new_signups_window":{"type":"integer","minimum":0.0,"title":"New Signups Window"},"paid_signups_window":{"type":"integer","minimum":0.0,"title":"Paid Signups Window"},"trial_starts_window":{"type":"integer","minimum":0.0,"title":"Trial Starts Window"},"trial_to_paid_window":{"type":"integer","minimum":0.0,"title":"Trial To Paid Window"},"mrr_estimate_eur":{"type":"number","minimum":0.0,"title":"Mrr Estimate Eur"},"arr_estimate_eur":{"type":"number","minimum":0.0,"title":"Arr Estimate Eur"},"mrr_monthly_eur":{"type":"number","minimum":0.0,"title":"Mrr Monthly Eur","default":0.0},"mrr_annual_eur":{"type":"number","minimum":0.0,"title":"Mrr Annual Eur","default":0.0},"signup_to_paid_rate":{"type":"number","minimum":0.0,"title":"Signup To Paid Rate"},"trial_to_paid_rate":{"type":"number","minimum":0.0,"title":"Trial To Paid Rate"}},"type":"object","required":["generated_at","window_days","paid_organizations_active","past_due_organizations","unpaid_organizations","churned_organizations_window","new_signups_window","paid_signups_window","trial_starts_window","trial_to_paid_window","mrr_estimate_eur","arr_estimate_eur","signup_to_paid_rate","trial_to_paid_rate"],"title":"RevenueSummaryResponse","description":"Revenue snapshot and window metrics."},"RevenueTrendPoint":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"active_paid_organizations":{"type":"integer","minimum":0.0,"title":"Active Paid Organizations"},"mrr_estimate_eur":{"type":"number","minimum":0.0,"title":"Mrr Estimate Eur"},"new_organizations":{"type":"integer","minimum":0.0,"title":"New Organizations"},"new_paid_organizations":{"type":"integer","minimum":0.0,"title":"New Paid Organizations"},"churned_organizations":{"type":"integer","minimum":0.0,"title":"Churned Organizations"}},"type":"object","required":["date","active_paid_organizations","mrr_estimate_eur","new_organizations","new_paid_organizations","churned_organizations"],"title":"RevenueTrendPoint","description":"One daily point for revenue trends."},"RevenueTrendsResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"window":{"type":"integer","minimum":1.0,"title":"Window"},"points":{"items":{"$ref":"#/components/schemas/RevenueTrendPoint"},"type":"array","title":"Points"}},"type":"object","required":["generated_at","window"],"title":"RevenueTrendsResponse","description":"Revenue trend payload."},"RevokeAdminRoleRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":10,"title":"Reason","description":"Required explanation for revoking admin role","examples":["User requested role change","Security review adjustment"]},"new_role":{"type":"string","pattern":"^(agent|user)$","title":"New Role","description":"Role to assign after removing admin (agent or user)","default":"agent"},"notify_user":{"type":"boolean","title":"Notify User","description":"Whether to send email notification to the user about their role change","default":true},"emergency_override":{"type":"boolean","title":"Emergency Override","description":"Allow revoking even if this is the last admin (use with caution!)","default":false}},"type":"object","required":["reason"],"title":"RevokeAdminRoleRequest","description":"Request schema for revoking admin role from a user."},"SAMLConfigCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Display name for the SAML provider (e.g., 'Corporate SSO')"},"provider_type":{"type":"string","maxLength":50,"title":"Provider Type","description":"Provider type for provider-specific handling","default":"generic"},"is_enabled":{"type":"boolean","title":"Is Enabled","description":"Whether this provider is enabled for authentication","default":false},"idp_entity_id":{"type":"string","maxLength":500,"minLength":1,"title":"Idp Entity Id","description":"Identity Provider Entity ID (from IdP metadata)"},"idp_sso_url":{"type":"string","maxLength":500,"minLength":1,"title":"Idp Sso Url","description":"Single Sign-On URL (from IdP metadata)"},"idp_slo_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idp Slo Url","description":"Single Logout URL (optional)"},"idp_certificate":{"type":"string","minLength":1,"title":"Idp Certificate","description":"X.509 certificate for signature verification (PEM format)"},"idp_metadata_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idp Metadata Url","description":"IdP metadata URL for auto-refresh"},"want_assertions_signed":{"type":"boolean","title":"Want Assertions Signed","description":"Require SAML assertions to be signed","default":true},"want_messages_signed":{"type":"boolean","title":"Want Messages Signed","description":"Require SAML messages to be signed","default":true},"authn_requests_signed":{"type":"boolean","title":"Authn Requests Signed","description":"Sign authentication requests","default":true},"attr_username":{"type":"string","maxLength":255,"title":"Attr Username","description":"SAML attribute for username","default":"uid"},"attr_email":{"type":"string","maxLength":255,"title":"Attr Email","description":"SAML attribute for email","default":"email"},"attr_first_name":{"type":"string","maxLength":255,"title":"Attr First Name","description":"SAML attribute for first name","default":"givenName"},"attr_last_name":{"type":"string","maxLength":255,"title":"Attr Last Name","description":"SAML attribute for last name","default":"sn"},"attr_groups":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Attr Groups","description":"SAML attribute for group membership","default":"groups"},"group_role_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Group Role Mapping","description":"Mapping of group names to roles (e.g., {'Admins': 'admin'})"},"auto_create_users":{"type":"boolean","title":"Auto Create Users","description":"Automatically create users on first SAML login","default":true},"auto_update_users":{"type":"boolean","title":"Auto Update Users","description":"Automatically update user info from SAML attributes on login","default":true},"default_role":{"type":"string","maxLength":20,"title":"Default Role","description":"Default role for auto-created users","default":"user"}},"type":"object","required":["name","idp_entity_id","idp_sso_url","idp_certificate"],"title":"SAMLConfigCreate","description":"Schema for creating a new SAML configuration."},"SAMLConfigRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"provider_type":{"type":"string","title":"Provider Type"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"idp_entity_id":{"type":"string","title":"Idp Entity Id"},"idp_sso_url":{"type":"string","title":"Idp Sso Url"},"idp_slo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idp Slo Url"},"idp_certificate":{"type":"string","title":"Idp Certificate","default":"********"},"idp_metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idp Metadata Url"},"want_assertions_signed":{"type":"boolean","title":"Want Assertions Signed"},"want_messages_signed":{"type":"boolean","title":"Want Messages Signed"},"authn_requests_signed":{"type":"boolean","title":"Authn Requests Signed"},"attr_username":{"type":"string","title":"Attr Username"},"attr_email":{"type":"string","title":"Attr Email"},"attr_first_name":{"type":"string","title":"Attr First Name"},"attr_last_name":{"type":"string","title":"Attr Last Name"},"attr_groups":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attr Groups"},"group_role_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Group Role Mapping"},"auto_create_users":{"type":"boolean","title":"Auto Create Users"},"auto_update_users":{"type":"boolean","title":"Auto Update Users"},"default_role":{"type":"string","title":"Default Role"},"created_by_id":{"type":"string","format":"uuid","title":"Created By Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/SAMLCreatorInfo"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","provider_type","is_enabled","idp_entity_id","idp_sso_url","idp_slo_url","idp_metadata_url","want_assertions_signed","want_messages_signed","authn_requests_signed","attr_username","attr_email","attr_first_name","attr_last_name","attr_groups","group_role_mapping","auto_create_users","auto_update_users","default_role","created_by_id","created_at","updated_at"],"title":"SAMLConfigRead","description":"Schema for reading SAML configuration data (certificate masked)."},"SAMLConfigUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Display name for the SAML provider"},"provider_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Provider Type","description":"Provider type for provider-specific handling"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled","description":"Whether this provider is enabled for authentication"},"idp_entity_id":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Idp Entity Id","description":"Identity Provider Entity ID"},"idp_sso_url":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Idp Sso Url","description":"Single Sign-On URL"},"idp_slo_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idp Slo Url","description":"Single Logout URL"},"idp_certificate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idp Certificate","description":"X.509 certificate for signature verification"},"idp_metadata_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idp Metadata Url","description":"IdP metadata URL"},"want_assertions_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Want Assertions Signed","description":"Require SAML assertions to be signed"},"want_messages_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Want Messages Signed","description":"Require SAML messages to be signed"},"authn_requests_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Authn Requests Signed","description":"Sign authentication requests"},"attr_username":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Attr Username","description":"SAML attribute for username"},"attr_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Attr Email","description":"SAML attribute for email"},"attr_first_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Attr First Name","description":"SAML attribute for first name"},"attr_last_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Attr Last Name","description":"SAML attribute for last name"},"attr_groups":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Attr Groups","description":"SAML attribute for group membership"},"group_role_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Group Role Mapping","description":"Mapping of group names to roles"},"auto_create_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Users","description":"Automatically create users on first SAML login"},"auto_update_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Update Users","description":"Automatically update user info from SAML attributes on login"},"default_role":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Role","description":"Default role for auto-created users"}},"type":"object","title":"SAMLConfigUpdate","description":"Schema for updating a SAML configuration."},"SAMLCreatorInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email"],"title":"SAMLCreatorInfo","description":"Minimal user info for embedding in SAML config responses."},"SAMLProviderInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"provider_type":{"type":"string","title":"Provider Type"}},"type":"object","required":["id","name","provider_type"],"title":"SAMLProviderInfo","description":"Minimal SAML provider info for login page display."},"SAMLTestResult":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"sp_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sp Entity Id"},"sp_acs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sp Acs Url"},"sp_metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sp Metadata Url"}},"type":"object","required":["success","message"],"title":"SAMLTestResult","description":"Result of SAML configuration test."},"SavedFilterCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"entity_type":{"type":"string","maxLength":20,"title":"Entity Type","default":"all"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"is_default":{"type":"boolean","title":"Is Default","default":false},"is_global":{"type":"boolean","title":"Is Global","default":false}},"type":"object","required":["name"],"title":"SavedFilterCreate","description":"Schema for creating a saved filter."},"SavedFilterRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"entity_type":{"type":"string","maxLength":20,"title":"Entity Type","default":"all"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"is_default":{"type":"boolean","title":"Is Default","default":false},"is_global":{"type":"boolean","title":"Is Global","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","id","organization_id","user_id","created_at","updated_at"],"title":"SavedFilterRead","description":"Schema for reading a saved filter."},"SavedFilterUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"is_global":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Global"}},"type":"object","title":"SavedFilterUpdate","description":"Schema for updating a saved filter."},"ScanByTagRequest":{"properties":{"condition":{"type":"string","title":"Condition","default":"good"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"found_location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Found Location Id"}},"type":"object","title":"ScanByTagRequest","description":"Request for scanning by asset tag."},"ScanResponse":{"properties":{"entry":{"$ref":"#/components/schemas/AuditEntryReadWithAsset"},"session_progress":{"additionalProperties":true,"type":"object","title":"Session Progress"},"asset":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Asset"}},"type":"object","required":["entry","session_progress"],"title":"ScanResponse","description":"Response for asset scan."},"SearchResultKind":{"type":"string","enum":["organization","user"],"title":"SearchResultKind","description":"Command center cross-entity search result types."},"SecurityHealthResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"window_days":{"type":"integer","minimum":1.0,"title":"Window Days"},"auth_failures":{"type":"integer","minimum":0.0,"title":"Auth Failures"},"impersonation_sessions_started":{"type":"integer","minimum":0.0,"title":"Impersonation Sessions Started"},"mfa_resets":{"type":"integer","minimum":0.0,"title":"Mfa Resets"},"system_admin_org_access_events":{"type":"integer","minimum":0.0,"title":"System Admin Org Access Events"},"admin_role_changes":{"type":"integer","minimum":0.0,"title":"Admin Role Changes"},"system_admin_users":{"type":"integer","minimum":0.0,"title":"System Admin Users"},"admins_without_mfa":{"type":"integer","minimum":0.0,"title":"Admins Without Mfa"},"suspended_organizations":{"type":"integer","minimum":0.0,"title":"Suspended Organizations"},"risk_level":{"$ref":"#/components/schemas/SecurityRiskLevel"}},"type":"object","required":["generated_at","window_days","auth_failures","impersonation_sessions_started","mfa_resets","system_admin_org_access_events","admin_role_changes","system_admin_users","admins_without_mfa","suspended_organizations","risk_level"],"title":"SecurityHealthResponse","description":"Security health metrics."},"SecurityRiskLevel":{"type":"string","enum":["low","medium","high"],"title":"SecurityRiskLevel","description":"Overall security risk level."},"SessionDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"prospect_id":{"type":"string","format":"uuid","title":"Prospect Id"},"prospect_email":{"type":"string","title":"Prospect Email"},"prospect_full_name":{"type":"string","title":"Prospect Full Name"},"prospect_company":{"type":"string","title":"Prospect Company"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"first_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Login At"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"is_expired":{"type":"boolean","title":"Is Expired"},"is_revoked":{"type":"boolean","title":"Is Revoked","default":false},"status":{"type":"string","title":"Status","default":"pending"},"activities":{"items":{"$ref":"#/components/schemas/ActivityWithContext"},"type":"array","title":"Activities"}},"type":"object","required":["id","prospect_id","prospect_email","prospect_full_name","prospect_company","created_at","expires_at","first_login_at","last_activity_at","ip_address","user_agent","is_expired","activities"],"title":"SessionDetail","description":"Full session detail with activities."},"SessionWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"prospect_id":{"type":"string","format":"uuid","title":"Prospect Id"},"prospect_email":{"type":"string","title":"Prospect Email"},"prospect_company":{"type":"string","title":"Prospect Company"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"first_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Login At"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"is_expired":{"type":"boolean","title":"Is Expired"},"is_revoked":{"type":"boolean","title":"Is Revoked","default":false},"was_clicked":{"type":"boolean","title":"Was Clicked","default":false},"status":{"type":"string","title":"Status","description":"Magic link lifecycle status","default":"pending"},"activity_count":{"type":"integer","title":"Activity Count","description":"Number of activities in session","default":0},"duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Minutes","description":"Duration from first login to last activity in minutes"}},"type":"object","required":["id","prospect_id","prospect_email","prospect_company","created_at","expires_at","first_login_at","last_activity_at","ip_address","user_agent","is_expired"],"title":"SessionWithDetails","description":"Demo session with prospect info and stats."},"SetPasswordRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token","description":"Password setup token from email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password","description":"New password"}},"type":"object","required":["token","password"],"title":"SetPasswordRequest","description":"Schema for setting initial password via setup token."},"SnapshotCreate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"}},"type":"object","title":"SnapshotCreate","description":"Schema for creating a snapshot."},"SnapshotReadWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"snapshot_type":{"type":"string","title":"Snapshot Type"},"status":{"type":"string","title":"Status"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data_size_bytes":{"type":"integer","title":"Data Size Bytes"},"compressed_size_bytes":{"type":"integer","title":"Compressed Size Bytes"},"entity_counts_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Counts Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"restored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Restored At"},"restored_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Restored By Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"original_org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Org Name"},"original_org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Original Org Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"organization_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Slug"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"restored_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Restored By Email"}},"type":"object","required":["id","organization_id","snapshot_type","status","label","description","data_size_bytes","compressed_size_bytes","entity_counts_json","created_at","completed_at","created_by_id","restored_at","restored_by_id","error_message"],"title":"SnapshotReadWithDetails","description":"Snapshot with organization and user details."},"StatusLabelCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"status_type":{"type":"string","maxLength":20,"title":"Status Type","default":"deployable"},"color":{"type":"string","maxLength":7,"title":"Color","default":"#6B7280"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"show_in_nav":{"type":"boolean","title":"Show In Nav","default":true}},"type":"object","required":["name"],"title":"StatusLabelCreate","description":"Schema for creating a status label."},"StatusLabelRead":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"status_type":{"type":"string","maxLength":20,"title":"Status Type","default":"deployable"},"color":{"type":"string","maxLength":7,"title":"Color","default":"#6B7280"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"show_in_nav":{"type":"boolean","title":"Show In Nav","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","id","organization_id","is_default","created_at","updated_at"],"title":"StatusLabelRead","description":"Schema for reading a status label."},"StatusLabelReadWithCount":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"status_type":{"type":"string","maxLength":20,"title":"Status Type","default":"deployable"},"color":{"type":"string","maxLength":7,"title":"Color","default":"#6B7280"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"show_in_nav":{"type":"boolean","title":"Show In Nav","default":true},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"asset_count":{"type":"integer","title":"Asset Count","default":0}},"type":"object","required":["name","id","organization_id","is_default","created_at","updated_at"],"title":"StatusLabelReadWithCount","description":"Status label with asset count."},"StatusLabelUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Type"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"show_in_nav":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show In Nav"}},"type":"object","title":"StatusLabelUpdate","description":"Schema for updating a status label."},"StatusType":{"type":"string","enum":["deployable","pending","archived","undeployable"],"title":"StatusType","description":"Types of status labels."},"SubscriptionPlanBasic":{"properties":{"name":{"type":"string","title":"Name","description":"Plan name (e.g., 'free', 'starter', 'professional')"},"features":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Features","description":"Feature flags for this plan"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users","description":"Maximum users (null = unlimited)"},"max_admins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Admins","description":"Maximum admins (null = unlimited)"},"max_total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Items","description":"Maximum total items (null = unlimited)"},"agent_role_enabled":{"type":"boolean","title":"Agent Role Enabled","description":"Whether agent role is available","default":false},"api_access_level":{"type":"string","title":"Api Access Level","description":"API access level: 'none', 'read_only', or 'full'","default":"full"},"audit_log_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Log Retention Days","description":"Audit log retention in days (null = unlimited)"}},"type":"object","required":["name"],"title":"SubscriptionPlanBasic","description":"Subscription plan info for auth responses.\n\nThis is a simplified version of the subscription plan that includes\nonly the fields needed for feature gating on the frontend."},"SubscriptionPlanCreate":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name","description":"Unique plan identifier"},"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name","description":"Human-readable plan name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users","description":"Maximum users (None = unlimited)"},"max_admins":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Admins","description":"Maximum admin users (None = unlimited)"},"max_storage_mb":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Storage Mb","description":"Maximum storage in MB (None = unlimited)"},"max_custom_fields":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Custom Fields","description":"Maximum custom field definitions (None = unlimited)"},"max_total_items":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Total Items","description":"Maximum total items across all types (None = unlimited)"},"audit_log_retention_days":{"anyOf":[{"type":"integer","minimum":90.0},{"type":"null"}],"title":"Audit Log Retention Days","description":"Audit log retention in days (minimum 90 for SOC2). None = unlimited.","default":365},"api_access_level":{"type":"string","title":"Api Access Level","description":"API access level: 'none', 'read_only', or 'full'","default":"full"},"agent_role_enabled":{"type":"boolean","title":"Agent Role Enabled","description":"Whether agent role is available","default":true},"features":{"additionalProperties":true,"type":"object","title":"Features","description":"Feature flags for this plan"},"price_monthly":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Monthly"},"price_yearly":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Yearly"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["name","display_name"],"title":"SubscriptionPlanCreate","description":"Schema for creating a subscription plan."},"SubscriptionPlanNested":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"max_total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Items"},"api_access_level":{"type":"string","title":"Api Access Level","default":"full"},"audit_log_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Log Retention Days"}},"type":"object","required":["id","name","display_name","max_users","max_total_items"],"title":"SubscriptionPlanNested","description":"Nested subscription plan for organization responses."},"SubscriptionPlanRead":{"properties":{"name":{"type":"string","maxLength":50,"title":"Name","description":"Unique plan identifier (e.g., free, starter, professional)"},"display_name":{"type":"string","maxLength":100,"title":"Display Name","description":"Human-readable plan name for display"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Plan description highlighting key features"},"id":{"type":"string","format":"uuid","title":"Id"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"max_admins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Admins"},"max_storage_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Storage Mb"},"max_custom_fields":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Custom Fields"},"max_total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Items"},"audit_log_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Log Retention Days"},"api_access_level":{"type":"string","title":"Api Access Level"},"agent_role_enabled":{"type":"boolean","title":"Agent Role Enabled"},"features":{"additionalProperties":true,"type":"object","title":"Features"},"price_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Monthly"},"price_yearly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Yearly"},"is_active":{"type":"boolean","title":"Is Active"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","display_name","id","max_users","max_admins","max_storage_mb","max_custom_fields","max_total_items","audit_log_retention_days","api_access_level","agent_role_enabled","features","price_monthly","price_yearly","is_active","sort_order","created_at","updated_at"],"title":"SubscriptionPlanRead","description":"Schema for reading subscription plan data."},"SubscriptionPlanReadWithStats":{"properties":{"name":{"type":"string","maxLength":50,"title":"Name","description":"Unique plan identifier (e.g., free, starter, professional)"},"display_name":{"type":"string","maxLength":100,"title":"Display Name","description":"Human-readable plan name for display"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Plan description highlighting key features"},"id":{"type":"string","format":"uuid","title":"Id"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"max_admins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Admins"},"max_storage_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Storage Mb"},"max_custom_fields":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Custom Fields"},"max_total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Items"},"audit_log_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Log Retention Days"},"api_access_level":{"type":"string","title":"Api Access Level"},"agent_role_enabled":{"type":"boolean","title":"Agent Role Enabled"},"features":{"additionalProperties":true,"type":"object","title":"Features"},"price_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Monthly"},"price_yearly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Yearly"},"is_active":{"type":"boolean","title":"Is Active"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"organization_count":{"type":"integer","title":"Organization Count","default":0}},"type":"object","required":["name","display_name","id","max_users","max_admins","max_storage_mb","max_custom_fields","max_total_items","audit_log_retention_days","api_access_level","agent_role_enabled","features","price_monthly","price_yearly","is_active","sort_order","created_at","updated_at"],"title":"SubscriptionPlanReadWithStats","description":"Schema for reading subscription plans with organization usage stats."},"SubscriptionPlanUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users"},"max_admins":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Admins"},"max_storage_mb":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Storage Mb"},"max_custom_fields":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Custom Fields"},"max_total_items":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Total Items"},"audit_log_retention_days":{"anyOf":[{"type":"integer","minimum":90.0},{"type":"null"}],"title":"Audit Log Retention Days","description":"Audit log retention in days (minimum 90 for SOC2). None = unlimited."},"api_access_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Access Level"},"agent_role_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agent Role Enabled"},"features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Features"},"price_monthly":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Monthly"},"price_yearly":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Yearly"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"SubscriptionPlanUpdate","description":"Schema for updating a subscription plan."},"SystemAdminCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address for the new system admin","examples":["admin@example.com"]},"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name","description":"Full name of the system admin","examples":["John Doe"]},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password","description":"Password for the new system admin (min 8 characters)"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Optional organization to assign the system admin to. If not provided, the admin will be platform-level only."}},"type":"object","required":["email","full_name","password"],"title":"SystemAdminCreate","description":"Schema for creating a new system administrator."},"SystemAlert":{"properties":{"id":{"type":"string","title":"Id","description":"Unique alert identifier"},"severity":{"$ref":"#/components/schemas/AlertSeverity","description":"Alert severity level"},"alert_type":{"type":"string","title":"Alert Type","description":"Type of alert"},"title":{"type":"string","title":"Title","description":"Alert title"},"message":{"type":"string","title":"Message","description":"Detailed alert message"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Related organization ID if applicable"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name","description":"Related organization name if applicable"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the alert was generated"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional alert context"}},"type":"object","required":["id","severity","alert_type","title","message","created_at"],"title":"SystemAlert","description":"System alert for admin dashboard."},"TeamSizeCount":{"properties":{"team_size":{"type":"string","title":"Team Size"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["team_size","count"],"title":"TeamSizeCount","description":"Count of prospects by team size."},"TestEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address to send test email to","examples":["admin@example.com"]}},"type":"object","required":["email"],"title":"TestEmailRequest","description":"Request schema for sending a test email."},"TestEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the email was sent successfully"},"message":{"type":"string","title":"Message","description":"Status message"},"provider":{"type":"string","title":"Provider","description":"Email provider used (resend, smtp, none)"},"email_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Id","description":"Email ID from provider (if available)"}},"type":"object","required":["success","message","provider"],"title":"TestEmailResponse","description":"Response schema for test email result."},"TokenResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Response message"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserReadWithOrganization"},{"type":"null"}],"description":"Authenticated user with organization info"},"mfa_required":{"type":"boolean","title":"Mfa Required","description":"Whether MFA code is required","default":false}},"type":"object","required":["message"],"title":"TokenResponse","description":"Token response for authentication operations.\n\nThe user field now includes embedded organization with subscription plan info,\nso there's no need for a separate organization field.","example":{"message":"Login successful","user":{"email":"user@example.com","full_name":"John Doe","id":"123e4567-e89b-12d3-a456-426614174000","is_active":true,"organization":{"feature_overrides":{},"id":"456e7890-e89b-12d3-a456-426614174000","name":"Acme Corp","subscription_plan":{"agent_role_enabled":true,"features":{"asset_kits":true,"physical_audit":true},"max_admins":5,"max_total_items":2500,"max_users":50,"name":"professional"}},"role":"user"}}},"TopActor":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"action_count":{"type":"integer","title":"Action Count"}},"type":"object","required":["user_id","user_email","user_name","action_count"],"title":"TopActor","description":"Top actor with action count."},"TopAgentKey":{"properties":{"name":{"type":"string","title":"Name"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"use_count":{"type":"integer","minimum":0.0,"title":"Use Count"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["name","use_count"],"title":"TopAgentKey"},"TrialExtensionRequest":{"properties":{"days":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Days","description":"Number of days to add to the trial"}},"type":"object","required":["days"],"title":"TrialExtensionRequest","description":"Request to extend an organization's trial."},"TrialProspectStats":{"properties":{"total_active_trials":{"type":"integer","minimum":0.0,"title":"Total Active Trials"},"trials_expiring_soon":{"type":"integer","minimum":0.0,"title":"Trials Expiring Soon"},"recent_conversions":{"type":"integer","minimum":0.0,"title":"Recent Conversions"},"avg_conversion_probability":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Avg Conversion Probability"}},"type":"object","required":["total_active_trials","trials_expiring_soon","recent_conversions","avg_conversion_probability"],"title":"TrialProspectStats","description":"Stats for trial prospects dashboard."},"TrialStatus":{"properties":{"is_trial":{"type":"boolean","title":"Is Trial","description":"Whether the organization is currently on trial"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining","description":"Days remaining in trial (null if not on trial)"},"trial_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Ends At","description":"Trial end date ISO string (null if not on trial)"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status","description":"Current subscription status"}},"type":"object","required":["is_trial","days_remaining","trial_ends_at","subscription_status"],"title":"TrialStatus","description":"Trial status information for the organization."},"UTMSourceCount":{"properties":{"source":{"type":"string","title":"Source"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["source","count"],"title":"UTMSourceCount","description":"Count of prospects by UTM source."},"UnreadCountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UnreadCountResponse","description":"Schema for unread notification count."},"UpgradePromoConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"starter_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Starter Code"},"professional_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Professional Code"}},"type":"object","title":"UpgradePromoConfig","description":"Configurable upgrade promo settings."},"UpgradePromoPublic":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"is_active_now":{"type":"boolean","title":"Is Active Now","default":false},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"starts_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ends At"},"starter_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starter Code"},"professional_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Professional Code"}},"type":"object","title":"UpgradePromoPublic","description":"Public promo payload consumed by upgrade UI."},"UserBrief":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email"],"title":"UserBrief","description":"Brief user info for history entries."},"UserCountStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of users across all organizations"},"active":{"type":"integer","title":"Active","description":"Number of active users"},"inactive":{"type":"integer","title":"Inactive","description":"Number of inactive users"},"new_this_month":{"type":"integer","title":"New This Month","description":"Users created this month"},"system_admins":{"type":"integer","title":"System Admins","description":"Number of system administrators"}},"type":"object","required":["total","active","inactive","new_this_month","system_admins"],"title":"UserCountStats","description":"Statistics for user counts."},"UserCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User email address"},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Password","description":"User password"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name","description":"User's full name"},"role":{"type":"string","title":"Role","description":"User role (admin, agent, user)","default":"user"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether user is active","default":true},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id","description":"Department ID to assign user to"}},"type":"object","required":["email"],"title":"UserCreateRequest","description":"Request schema for creating a new user."},"UserNested":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email","full_name"],"title":"UserNested","description":"Nested user info for GDPR request responses."},"UserRead":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Avatar Url"},"role":{"type":"string","maxLength":20,"title":"Role","default":"user"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"is_system_admin":{"type":"boolean","title":"Is System Admin","default":false},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"department":{"anyOf":[{"$ref":"#/components/schemas/DepartmentInfo"},{"type":"null"}]},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"has_password":{"type":"boolean","title":"Has Password","default":true},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"has_recovery_codes":{"type":"boolean","title":"Has Recovery Codes","default":false},"preferences":{"additionalProperties":true,"type":"object","title":"Preferences","default":{"theme":"system"}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"}},"type":"object","required":["email","id","created_at","updated_at","last_login"],"title":"UserRead","description":"Schema for reading user data."},"UserReadWithOrg":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Avatar Url"},"role":{"type":"string","maxLength":20,"title":"Role","default":"user"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"is_system_admin":{"type":"boolean","title":"Is System Admin","default":false},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"department":{"anyOf":[{"$ref":"#/components/schemas/DepartmentInfo"},{"type":"null"}]},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"has_password":{"type":"boolean","title":"Has Password","default":true},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"has_recovery_codes":{"type":"boolean","title":"Has Recovery Codes","default":false},"preferences":{"additionalProperties":true,"type":"object","title":"Preferences","default":{"theme":"system"}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationBasic"},{"type":"null"}],"description":"User's organization details"}},"type":"object","required":["email","id","created_at","updated_at","last_login"],"title":"UserReadWithOrg","description":"Extended user read schema with organization information."},"UserReadWithOrganization":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Avatar Url"},"role":{"type":"string","maxLength":20,"title":"Role","default":"user"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"is_system_admin":{"type":"boolean","title":"Is System Admin","default":false},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"department":{"anyOf":[{"$ref":"#/components/schemas/DepartmentInfo"},{"type":"null"}]},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"has_password":{"type":"boolean","title":"Has Password","default":true},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"has_recovery_codes":{"type":"boolean","title":"Has Recovery Codes","default":false},"preferences":{"additionalProperties":true,"type":"object","title":"Preferences","default":{"theme":"system"}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationForAuth"},{"type":"null"}],"description":"User's organization with plan info"}},"type":"object","required":["email","id","created_at","updated_at","last_login"],"title":"UserReadWithOrganization","description":"User with embedded organization for auth responses.\n\nExtends UserRead to include the organization with subscription plan info,\nwhich the frontend needs for feature gating without extra API calls."},"UserReadWithStats":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Avatar Url"},"role":{"type":"string","maxLength":20,"title":"Role","default":"user"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"is_system_admin":{"type":"boolean","title":"Is System Admin","default":false},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"department":{"anyOf":[{"$ref":"#/components/schemas/DepartmentInfo"},{"type":"null"}]},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"has_password":{"type":"boolean","title":"Has Password","default":true},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"has_recovery_codes":{"type":"boolean","title":"Has Recovery Codes","default":false},"preferences":{"additionalProperties":true,"type":"object","title":"Preferences","default":{"theme":"system"}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"},"assets_checked_out":{"type":"integer","title":"Assets Checked Out","default":0},"licenses_assigned":{"type":"integer","title":"Licenses Assigned","default":0}},"type":"object","required":["email","id","created_at","updated_at","last_login"],"title":"UserReadWithStats","description":"User read schema with additional statistics."},"UserRole":{"type":"string","enum":["admin","agent","user"],"title":"UserRole","description":"User roles for RBAC."},"UserUpdate":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preferences"}},"type":"object","title":"UserUpdate","description":"Schema for updating a user."},"UserUsageBreakdown":{"properties":{"admins":{"type":"integer","title":"Admins","description":"Number of admin users"},"agents":{"type":"integer","title":"Agents","description":"Number of agent users"},"users":{"type":"integer","title":"Users","description":"Number of end users"},"total":{"type":"integer","title":"Total","description":"Total number of users"}},"type":"object","required":["admins","agents","users","total"],"title":"UserUsageBreakdown","description":"Breakdown of users by role."},"UsersCanLoginRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether users with User role can login"},"send_setup_emails":{"type":"boolean","title":"Send Setup Emails","description":"If enabling, send password setup emails to existing users without passwords","default":false}},"type":"object","required":["enabled"],"title":"UsersCanLoginRequest","description":"Request to update users_can_login setting."},"UsersCanLoginResponse":{"properties":{"users_can_login":{"type":"boolean","title":"Users Can Login","description":"New setting value"},"affected_users":{"type":"integer","title":"Affected Users","description":"Number of User role users affected (without passwords when enabling)"},"setup_emails_sent":{"type":"integer","title":"Setup Emails Sent","description":"Number of password setup emails sent (if send_setup_emails was True)","default":0}},"type":"object","required":["users_can_login","affected_users"],"title":"UsersCanLoginResponse","description":"Response after updating users_can_login setting."},"ValidateSetupTokenRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token","description":"Password setup token from email"}},"type":"object","required":["token"],"title":"ValidateSetupTokenRequest","description":"Schema for validating a password setup token without consuming it."},"VerifyEmailRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token","description":"Email verification token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest","description":"Email verification request schema."},"WebhookCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"url":{"type":"string","maxLength":500,"minLength":1,"title":"Url"},"secret":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Secret"},"events":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Events","description":"List of events to subscribe to"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","url","events"],"title":"WebhookCreate","description":"Schema for creating a webhook.","example":{"description":"Send asset events to Slack","events":["asset.checkout","asset.checkin"],"name":"Slack Notifications","url":"https://hooks.slack.com/services/..."}},"WebhookDeliveryRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"webhook_id":{"type":"string","format":"uuid","title":"Webhook Id"},"event":{"type":"string","title":"Event"},"success":{"type":"boolean","title":"Success"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["id","webhook_id","event","success","response_status","error_message","created_at","duration_ms"],"title":"WebhookDeliveryRead","description":"Schema for reading webhook delivery records."},"WebhookRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"has_secret":{"type":"boolean","title":"Has Secret","description":"Whether a secret is configured"}},"type":"object","required":["id","name","url","events","is_active","description","created_at","updated_at","last_triggered_at","success_count","failure_count","has_secret"],"title":"WebhookRead","description":"Schema for reading a webhook (hides secret)."},"WebhookTestResult":{"properties":{"success":{"type":"boolean","title":"Success"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["success"],"title":"WebhookTestResult","description":"Result of testing a webhook."},"WebhookUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Url"},"secret":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Secret"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookUpdate","description":"Schema for updating a webhook."},"app__api__v1__assets__schemas__BulkLabelRequest":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Asset Ids"},"template":{"type":"string","title":"Template","description":"Label template ID","default":"DK-11202"},"code_type":{"type":"string","title":"Code Type","description":"Code type: qr or code128","default":"qr"},"include_serial":{"type":"boolean","title":"Include Serial","description":"Include serial number","default":true},"include_model":{"type":"boolean","title":"Include Model","description":"Include model name","default":true}},"type":"object","required":["asset_ids"],"title":"BulkLabelRequest","description":"Request schema for bulk label generation."},"app__api__v1__labels__BulkLabelRequest":{"properties":{"entity_type":{"type":"string","pattern":"^(asset|accessory|consumable|component)$","title":"Entity Type","description":"Entity type: asset, accessory, consumable, component"},"entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Entity Ids","description":"List of entity UUIDs"},"template":{"type":"string","title":"Template","description":"Template ID","default":"DK-11202"},"code_type":{"type":"string","pattern":"^(qr|code128)$","title":"Code Type","description":"Code type: qr or code128","default":"qr"},"include_serial":{"type":"boolean","title":"Include Serial","description":"Include serial number if available","default":true},"include_model":{"type":"boolean","title":"Include Model","description":"Include model name if available","default":true},"show_logo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Logo","description":"Override: show logo on label (None = use global settings)"},"show_company_name":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Company Name","description":"Override: show company name on label (None = use global settings)"}},"type":"object","required":["entity_type","entity_ids"],"title":"BulkLabelRequest","description":"Request schema for generating bulk labels."},"app__models__announcement__UserInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email","full_name"],"title":"UserInfo","description":"Minimal user info for embedding."},"app__models__impersonation__UserInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email"],"title":"UserInfo","description":"Minimal user info for embedding in impersonation responses."},"app__models__organization_credit__UserInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["id","email","full_name"],"title":"UserInfo","description":"Minimal user info for embedding."},"app__models__organization_snapshot__StorageStats":{"properties":{"total_bytes_used":{"type":"integer","title":"Total Bytes Used"},"max_bytes_allowed":{"type":"integer","title":"Max Bytes Allowed"},"percentage_used":{"type":"number","title":"Percentage Used"},"warning_threshold_percent":{"type":"number","title":"Warning Threshold Percent","default":85.0},"is_warning":{"type":"boolean","title":"Is Warning","default":false},"oldest_snapshot_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest Snapshot Date"},"total_snapshot_count":{"type":"integer","title":"Total Snapshot Count","default":0},"by_organization":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Organization","default":[]}},"type":"object","required":["total_bytes_used","max_bytes_allowed","percentage_used"],"title":"StorageStats","description":"Storage statistics for backups."},"app__services__admin_dashboard_service__schemas__StorageStats":{"properties":{"total_bytes":{"type":"integer","title":"Total Bytes","description":"Total storage used in bytes","default":0},"formatted":{"type":"string","title":"Formatted","description":"Human-readable storage size","default":"0 B"},"snapshot_bytes":{"type":"integer","title":"Snapshot Bytes","description":"Storage used by backup snapshots","default":0},"logo_bytes":{"type":"integer","title":"Logo Bytes","description":"Storage used by organization logos","default":0},"db_bytes":{"type":"integer","title":"Db Bytes","description":"Storage used by tenant data tables","default":0}},"type":"object","title":"StorageStats","description":"Statistics for storage usage."},"Error":{"description":"Generic error envelope for non-2xx JSON responses.\n\n``errors`` carries optional machine-readable context (used by domain\nexceptions); ``request_id`` correlates the response with server logs.","properties":{"detail":{"description":"Human-readable error message.","title":"Detail","type":"string"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Server-side correlation ID for log lookup.","title":"Request Id"},"errors":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Optional machine-readable error context.","title":"Errors"}},"required":["detail"],"type":"object"},"ValidationErrorResponse":{"description":"Response returned for HTTP 422 (request validation failures).\n\nInput values are deliberately excluded from ``errors`` to prevent\nreflection attacks (SEC-15).","properties":{"detail":{"description":"Human-readable summary of all validation failures.","title":"Detail","type":"string"},"errors":{"description":"Field-level failure details.","items":{"$ref":"#/components/schemas/FieldError"},"title":"Errors","type":"array"}},"required":["detail","errors"],"type":"object"},"FieldError":{"description":"A single field-level validation failure.","properties":{"loc":{"description":"Location of the failing field, e.g. [\"body\", \"name\"].","items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Loc","type":"array"},"msg":{"description":"Human-readable failure message.","title":"Msg","type":"string"},"type":{"description":"Machine-readable error type, e.g. \"missing\".","title":"Type","type":"string"}},"required":["loc","msg","type"],"title":"FieldError","type":"object"},"WebhookEventPayload":{"title":"WebhookEventPayload","type":"object","required":["event","timestamp","data"],"properties":{"event":{"type":"string","enum":["asset.created","asset.updated","asset.deleted","asset.checkout","asset.checkin","license.created","license.updated","license.deleted","license.seat.checkout","license.seat.checkin","user.created","user.updated","user.deleted","warranty.expiring","license.expiring"],"description":"Event name"},"timestamp":{"type":"string","format":"date-time","description":"ISO-8601 delivery timestamp"},"data":{"type":"object","additionalProperties":true,"description":"Event-specific payload"},"organization_id":{"type":"string","format":"uuid","description":"Organization context (when available)"}}}},"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"access_token","description":"JWT session token stored in an HTTP-only cookie (browser clients)."},"bearerApiKey":{"type":"http","scheme":"bearer","description":"Flottix API key sent as a bearer token (`Authorization: Bearer flottix_...` or `X-API-Key`). Accepted by all `/api/v1` endpoints and the MCP endpoint `/api/mcp`. Scopes are enforced per resource (`read:assets`, `write:licenses`, ...); assignment operations accept `write:<resource>` or `checkout:<resource>`. Surfaces without a dedicated scope and authentication endpoints require the `admin` scope or are rejected. Create keys via `POST /api/v1/api-keys`."}}},"tags":[{"name":"Health","description":"Health check endpoints for monitoring and load balancers."},{"name":"Authentication","description":"User authentication endpoints including login, logout, and session management."},{"name":"Dashboard","description":"Dashboard statistics and analytics including asset counts, recent activity, and alerts."},{"name":"Assets","description":"Asset management operations: create, read, update, delete, checkout, and checkin assets. Includes QR code generation and label printing support."},{"name":"Asset Models","description":"Asset model definitions (e.g., MacBook Pro 16\", Dell XPS 15). Models define the type and specifications of assets."},{"name":"Categories","description":"Asset and license categories (e.g., Laptops, Software, Monitors). Categories support EULA requirements and custom configuration."},{"name":"Status Labels","description":"Status labels for assets (e.g., Ready to Deploy, In Use, Retired). Includes color coding for visual identification."},{"name":"Users","description":"User management including roles (admin, agent, user), activation status, and authentication."},{"name":"Licenses","description":"Software license management with seat tracking and assignment. Supports expiration monitoring and multi-seat licenses."},{"name":"Webhooks","description":"Webhook configuration for external integrations. Receive real-time notifications when events occur in the system."},{"name":"API Keys","description":"API key management for programmatic and MCP (agent) access."},{"name":"Accessories","description":"Peripheral accessories (keyboards, mice, headsets) and their user assignments."},{"name":"Accessory Types","description":"Category definitions used to classify accessories."},{"name":"Components","description":"Hardware components installed inside assets (RAM, disks, batteries)."},{"name":"Consumables","description":"Consumable inventory (cables, toner) with stock levels and usage tracking."},{"name":"Custom Fields","description":"Organization-defined custom field definitions for assets and licenses."},{"name":"Departments","description":"Department management for user and asset grouping."},{"name":"Kits","description":"Bundled asset kits (e.g. laptop bundles) with batch checkout and checkin."},{"name":"Labels","description":"Label and QR code printing configuration and generation."},{"name":"Locations","description":"Physical locations and hierarchical site structure."},{"name":"Maintenance","description":"Asset maintenance scheduling, service records, and history."},{"name":"Physical Audits","description":"Physical inventory audit sessions for verifying asset custody."},{"name":"Organizations","description":"Organization profile, settings, and member management."},{"name":"Search","description":"Global cross-entity search across assets, licenses, users, and more."},{"name":"Inbox","description":"Notification inbox: expiring warranties, licenses, and alerts."},{"name":"Notifications","description":"User notification delivery and preferences."},{"name":"Announcements","description":"In-app announcements published to the current organization."},{"name":"Application Settings","description":"Organization-level application settings and preferences."},{"name":"Subscription Plans","description":"Public subscription plan catalog and current plan/limits."},{"name":"Export","description":"Data export endpoints (CSV/JSON) for backup and migration."},{"name":"Import","description":"Bulk data import (CSV) for onboarding existing inventories."},{"name":"Reports","description":"Reporting and analytics: depreciation, warranty, license compliance."},{"name":"GDPR","description":"GDPR compliance: personal data export and erasure requests."},{"name":"MFA","description":"Multi-factor authentication setup, verification, and recovery."},{"name":"Pending Actions","description":"Governance inbox: agent-proposed workflow executions awaiting human approval or rejection."},{"name":"OAuth","description":"OAuth 2.1 token endpoint for MCP access (client_credentials exchange against a Flottix API key)."},{"name":"Demo Authentication","description":"Guided demo environment access (public, rate-limited)."},{"name":"LDAP Authentication","description":"LDAP / Active Directory login configuration and authentication."},{"name":"OIDC Authentication","description":"OpenID Connect single sign-on: provider discovery, login, and callbacks."},{"name":"SAML Authentication","description":"SAML 2.0 single sign-on: metadata, login initiation, and ACS callbacks."},{"name":"Billing Webhooks","description":"Inbound payment provider webhooks (Lemon Squeezy, Polar). Public; signature-verified."},{"name":"Admin Users","description":"Cross-tenant user management (superadmin only)."},{"name":"Admin Dashboard","description":"Aggregated platform-wide metrics (superadmin only)."},{"name":"Admin Command Center","description":"Cross-tenant operational overview and actions (superadmin only)."},{"name":"Admin Audit Logs","description":"Platform-wide audit log access (superadmin only)."},{"name":"Admin Backups","description":"Database backup management (superadmin only)."},{"name":"Admin Email","description":"Outbound email log and delivery management (superadmin only)."},{"name":"Admin Announcements","description":"Platform-wide announcement management (superadmin only)."},{"name":"Admin Credits","description":"Account credit management (superadmin only)."},{"name":"Admin Demo Prospects","description":"Demo lead and prospect tracking (superadmin only)."},{"name":"Admin Impersonation","description":"Support impersonation session management (superadmin only)."},{"name":"Admin Subscription Plans","description":"Subscription plan catalog CRUD (superadmin only)."}],"security":[{"cookieAuth":[]},{"bearerApiKey":[]}],"webhooks":{"flottix.event":{"post":{"summary":"Flottix platform event","description":"Outbound event delivery to a subscribed webhook URL. Signed via `X-Webhook-Signature: sha256=<hmac>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventPayload"}}}},"responses":{"200":{"description":"Delivery accepted by the subscriber"}}}}},"servers":[{"url":"https://flottix.app","description":"Production server"},{"url":"http://localhost:8000","description":"Development server"}]}